Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Install specifc packages on client nodes and slave nodes

avatar
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

avatar

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)

View solution in original post

6 REPLIES 6

avatar

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)

avatar

@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?

avatar
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'))?

avatar

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

avatar

@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?)

avatar
Contributor

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