Chapter 3. Installing HDP Search Using Ambari
HDP Search can be installed using a new Management Pack created by Lucidworks for Ambari 2.4. Complete the following steps to download and install the Management Pack.
Download the Ambari management pack to the Ambari Server host.
In this example,
/tmp
is a temporary directory that stores the management pack before it is installed.cd /tmp wget http://public-repo-1.hortonworks.com/HDP-SOLR/hdp-solr-ambari-mp/solr-service-mpack-5.5.2.2.5.tar.gz
Install the management pack on the Ambari Server host, using the following command:
# ambari-server install-mpack --mpack=/tmp/solr-service-mpack-5.5.2.2.5.tar.gz
You should see the following output:
Using python /usr/bin/python Installing management pack Ambari Server 'install-mpack' completed successfully.
The management pack has now been added to Ambari.
Before using the management pack, you must create a definition for the HDP Search repository. To populate details for the repository, execute the following commands from the same Ambari Server host:
Using your preferred editor, edit the
/var/lib/ambari-server/resources/stacks/HDP/2.5/repos/repoinfo.xml
file.For the specific OS on which you will be installing HDP Search, add the HDP-SOLR-2.5-100
<repo/>
definition (the third definition in the following example) to the existing<os/>
section. The following example illustrates this forredhat6
:<os family="redhat6"> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0</baseurl> <repoid>HDP-2.5</repoid> <reponame>HDP</reponame> </repo> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6</baseurl> <repoid>HDP-UTILS-1.1.0.21</repoid> <reponame>HDP-UTILS</reponame> </repo> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos6/</baseurl> <repoid>HDP-SOLR-2.5-100</repoid> <reponame>HDP-SOLR</reponame> </repo> </os>
Specify the appropriate
<baseurl>
for your operating system, using either the public repository links below or, for a local repository setup, the URL for your local repository (see Using a Local Repository).- CentOS/RHEL/Oracle Linux 6
http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos6
- CentOS/RHEL/Oracle Linux 7
http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos7
- SUSE11SP3/SP4
http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/suse11sp3
- Ubuntu12
http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/ubuntu12
- Ubuntu14
http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/ubuntu14
- Debian6
http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/debian6
- Debian7
http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/debian7
Restart the Ambari Server, to recognize the new repository and the management pack:
ambari-server restart
Add the Solr service, either during initial cluster installation using the Ambari installation wizard or after cluster deployment.
It’s important to note that during the Solr install, the Solr package has a set of prerequisite checks that are performed before the package can be completely installed. Specific checks such as disk space, installation directory access, solr users, and the Java setup are checked during this process. If any of these checks fail, they need to be manually remediated on each node where Solr will be installed before the installation task can be retried.
In the case of the Java preinstall check failing, the easiest remediation is to login to
each machine that Solr will be installed on, temporarily set the JAVA_HOME
environmental
variable, then then use yum/zypper/apt-get
to install the package. For example on CentOS:
export JAVA_HOME=/usr/jdk64/jdk1.8.0_77 yum install lucidworks-hdpsearch
Once all of the prerequisite checks have been satisfied and the package is installed, you can simply click “Retry” in the Ambari Web UI to move forward and complete the installation.
For information about Solr configuration options, refer to the Startup Option Reference section of the Lucidworks Solr Service documentation.