The VMware vSphere Big Data Extension product (aka Project Serengeti) needs to ensure the bootstrap order when deploying a hadoop cluster in which the slave nodes must wait for the master node. BDE uses the native Chef way to implement it.
For example, hadoop datanode service should be started only after hadoop namenode service is started. In the chef recipe, we use this code to do this wait:
in namenode recipe github.com/vmwa…amenode.rb#L127 :
service ‘hadoop-namenode’ do
action [:start]
end
provide_service(“hadoop-namenode”)
in datanode recipe github.com/vmwa…datanode.rb#L29 :
wait_for_service(“hadoop-namenode”)
service ‘hadoop-datanode’ do
action [:start]
end
provide_service and wait_for_service are functions defined in the chef cookbook cluster_server_discovery.
The elastic_search and etcd or other service discovery solution can also be used in Chef cookbook.
留下评论