0

I am automating HDP Hadoop Cluster install using Chef on a 3 Node Cluster. I have following recipes,

  1. Ambari_Server
  2. Ambari_Agent
  3. Metastore
  4. Blueprint.

I want to run blueprint recipe(4) on a specific node only after all the recipe(1,2,3) are completed in all the nodes(3 servers). Looking for best option to do it here using chef.

Thanks in advance.

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185

1 Answers1

0

I would be very happy to be wrong about this but to the best of my knowledge there is no way to do orchestration like this with chef. Off the top of my head you could possibly set an attribute at the end of the run of each other recipe then have a guard at the start of your dependent recipe that checks to see if they are all true before running.

i.e.

Ambari_Server
...
node.set['Amari_Server']['installed'] = true

Ambari_Agent
...
node.set['Amari_Agent']['installed'] = true

Metastore
...
node.set['Metastore']['installed'] = true

Blueprint
...
if node['Amari_Agent']['installed'] and node['Armari_Server']['installed'] and node['Metastore']['installed']
# Do whatever blueprint does
...

This is hacky and would potentially require multiple converges.

JackChance
  • 520
  • 3
  • 11