Ambari Management Packs are a new convenient way to integrate various services to the Ambari stack. As an example in this post we are using the Solr service mpack to install HDP on top of a newly installed cluster.
The HDP search mpack is available on the Hortonworks public repository for download. A mpack essentially is tar balls containing a mpack.json file specification and related binaries.Download the mpack from Hortonworks repo:
$ 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
After downloading the tar file it can directly be used to install it with Ambari server:
$ ambari-server install-mpack --mpack=/tmp/solr-service-mpack-5.5.2.2.5.tar.gz Using python /usr/bin/python Installing management pack Ambari Server 'install-mpack' completed successfully.
Before you restart Ambari we still have to add the package repository containing Solr. Ambari keeps that information under /var/lib/ambari-server/resources/stacks/HDP/2.5/repos/repoinfo.xml and it should look like this:
<reposinfo> <latest>http://192.168.11.13:81/HDP/hdp_urlinfo.json</latest> <os family="redhat7"> <repo> <baseurl>http://192.168.11.13:81/HDP/centos7/2.x/updates/2.5.0.0</baseurl> <repoid>HDP-2.5</repoid> <reponame>HDP</reponame> </repo> <repo> <baseurl>http://192.168.11.13:81/HDP-UTILS-1.1.0.21/repos/centos7</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/centos7/</baseurl> <repoid>HDP-SOLR-2.5-100</repoid> <reponame>HDP-SOLR</reponame> </repo> </os> </reposinfo>
Repository links for other platforms:
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
Finally you have to restart Ambari for it to make the changes available:
$ ambari-server restart Using python /usr/bin/python Restarting ambari-server Using python /usr/bin/python Stopping ambari-server Ambari Server is not running Using python /usr/bin/python Starting ambari-server Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari database consistency check started... No errors were found. Ambari database consistency check finished Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start.................... Ambari Server 'start' completed successfully.
Now HDP can be installed like any other service already available:
Select Solr:
Make sure you have the correct settings like SolrCloud, index path in HDFS or not, and if you want the sample collection to be created.