4

I am new to chef and planning to implement it in our production environment.

We are planning to use chef to maintaining the system state/configuration and as well as for application deployment. During the time of application deployment, the deployment should not happen parallel on all hosts in the cluster. Instead the deployment have to happen in sets i.e in a cluster of 10 hosts first 2 hosts have to be taken out of rotation and the release has to be done there, then only if the release completes successfully then next set of hosts should be deployed.

Can this be done with chef ?

Yaalie
  • 175
  • 1
  • 2
  • 8

1 Answers1

1

Yes, it can. There are many ways to do it, however, so giving you much more detail would be hard. A few possibilities:

  1. Run chef-client manually on the servers on each group in succession.
  2. Create a new chef_environment for each release, and then promote nodes into that environment as you wish them to be updated
  3. Set version flags on nodes to determine which version they should run
  4. Set version flags in the role, and then have a new role for each new release. By moving nodes to different roles you can impact which will be updated.

There are many other options as well.

Tejay Cardon
  • 379
  • 1
  • 4
  • the methods you have proposed is prone to human errors. Is there any other third party tool or chef addons that than perform this operation more reliably. – Yaalie Mar 24 '15 at 02:27
  • if you're in the cloud, you might want to look at asgard, by netflix. Asgard isn't chef centric, it's AMI centric. But what we do is use chef with packer to build the AMI's, and then you can use asgard to manage the deployment process in a rolling fashion. There are also some knife plugins that help make it easier, but are far from foolproof. – Tejay Cardon Mar 24 '15 at 14:42