herqles-io / hq-code-deployment

Herqles Frameworks and Workers for Code Deployment
MIT License
0 stars 0 forks source link

Add worker processer to run puppet agent #3

Open everestx opened 8 years ago

everestx commented 8 years ago

After the initial deployment to an app server, we want to initiate a puppet run. This would be in the 'deploy' task and before the 'touch tmp/restart.txt' or 'touch app_init.wsgi' actions.

The goal would be:

  1. Determine if the puppet run is needed (did mkdir create a new deploy_path)
  2. Run puppet (check exit code). Watch out puppet agent exit codes can be diverse
  3. Initiate passenger or wsgi restart only of the puppet agent run was successful
rmb938 commented 8 years ago

This all could be done very easily once the app types get moved to python classes. Currently with the json structure it is not very easy to do logic calculations.

everestx commented 8 years ago

Yes, but there's some consideration to be made on whether action/logic should live in the actual processors or in the task/actions. I'm still wrapping my own head around those on a case by case basis.