-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Zhelyan edited this page Feb 11, 2016
·
10 revisions
- Configure the credential from a knife/client .rb file. This should be an admin client! The .rb/.pem files can be deleted later.
- Add a new Build parameter - 'List Chef enviroments'. Note that you can replace this with any build parameter or env variable as long as you reference it in the build wrapper (see below)
- Add new Build wrapper - 'Save details to data bag item'. The wrapper needs to know which environment you are deploying to, which packages and where you want to save this information (in which Chef data bag item)
- Add a new build step which runs chef-client on the servers. You can skip this step if you don't require immediate deployment. Given that the chef-client service is running on your servers it will eventually deploy the changes.
For immediate deployment you can do something like:
knife ssh "chef_environment:$ENV AND role:myapp 'sudo chef-client'"
Run the job. If you have parameterized the build and if you used the 'List Chef environments' parameter the plugin will retrieve the environments from the Chef server
The selected data bag item will be updated:
The plugin will generate environment report page where you can track what got deployed where
This is available for both the project and for individual builds:
Report