Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can we wire up cluster based softwares using chef?

As part of a platform setup orchestration we are using our python package to install various software packages on a cluster of machines in cloud.

We have the following scenario:

  1. out of many softwares, one of our software is Ambari(helps in managing hadoop platform).
  2. it works as follows - 'n' number of cluster machines reporting to 1 ambari-server.
  3. for each cluster machine to do reporting, we have to install ambari-agent on each of cluster machine and modify its properties file with the ambari server it is suppposed to report and start ambari-agent.

what are we able to do-- we were successful in installing ambari server and ambari agents seperately in our cluster machines with the help of seperate chef cookbooks.

what we are not able to do-- how can we modify each machine's ambari-agent properties file so that it is pointing to our ambari server IP. in general what is an elegant way to wire up cluster based softwares as part of chef orchestration?

NB:. ambari-server is created on fly and hence its IP is obtained during run time.

Is it possible? are there any alternatives to above problem?

Thanks

like image 645
phoenix Avatar asked Jul 06 '15 08:07

phoenix


1 Answers

If you have a chef server, you can do a search for the node that runs the ambari-server recipe. Then you use the IP of that machine. Alternately, you can use a DNS name for the ambari-server, and then update you DNS entry to point to the new server when it is available.

Other options include using confd with etcd, or using consul. Each would allow you to update your config post-chef with the ip of the server.

like image 98
Tejay Cardon Avatar answered Sep 23 '22 17:09

Tejay Cardon