Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Install specifc packages on client nodes and slave nodes

Solved Go to solution

Install specifc packages on client nodes and slave nodes

New Contributor

Hi, I am trying to develop a custom service for ambari. My question is for a cassandra client I am installing the whole cassandra package and doing start cassandra so that I would only use the client to connect to the cluster. But is there any way to tell ambari that only install specific package on client and some specific package on slaves. If it is possible I will be only able to install cassandra client on client nodes.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Install specifc packages on client nodes and slave nodes

I would recommend looking at code for HBASE as an example as it has master, slaves and client

https://github.com/apache/ambari/tree/trunk/ambari...

In the metainfo.xml you specify which code should get executed on the master (ie hbase_master.py), clients (hbase_client.py) and slaves (hbase_regionserver.py)

6 REPLIES 6

Re: Install specifc packages on client nodes and slave nodes

I would recommend looking at code for HBASE as an example as it has master, slaves and client

https://github.com/apache/ambari/tree/trunk/ambari...

In the metainfo.xml you specify which code should get executed on the master (ie hbase_master.py), clients (hbase_client.py) and slaves (hbase_regionserver.py)

Re: Install specifc packages on client nodes and slave nodes

@Amey Jain did this help? If so could you please accept the answer so it doesn't show up in our list of open issues?

Re: Install specifc packages on client nodes and slave nodes

New Contributor

@Ali Bajwa so just want to clarify, in the client script the install method is calling install_package(env) method and same ofr master, from where install_package is picking up the package names? is it from metainfo.xml (osspecifics tag)? or can we write in the install method Execute(format('yum install cassandra'))?

Re: Install specifc packages on client nodes and slave nodes

Yes the install_package method will pick the package names listed under <package> item of metainfo.xml. We avoid putting "yum install" in the code because for other platforms (like ubuntu) the command would be different. For example of how to specify the package, see here. It basically means that on all platforms install the package called "hbase" using whatever is the appropriate call for platform.

Alternatively you can specify different package names for each platform/version using something like this in the metainfo.xml

Re: Install specifc packages on client nodes and slave nodes

@Amey Jain you can also check the metainfo.xml for the Cassandra service built by Greg Hill here.

(btw any reason why you can't reuse the Cassandra Ambari service he has already worked on?)

Re: Install specifc packages on client nodes and slave nodes

New Contributor

@Ali Bajwalooks like the link your are saying is cassandra service is not correct. It takes me to trunk.