Reputation: 24707
We start to use chef in order to deploy latest war to servers. I am a bit confused what is the best way to start and perform the deployment. The process should be the following:
We also use Jenkins to automate builds.
How chef-client should be executed on the servers? Should we use Jenkins for this?
Upvotes: 2
Views: 2329
Reputation: 23492
Chef is used to configure an instance. So below two points should be handled by using AWS APIs (AWS SDK OR AWS CLI)
Now, you can leverage chef to do below things:
Please take a look at application_java cookbook which will deploy pre-built artifacts.
I am presuming that your Jenkins is uploading the artifacts to some place. So you can use application_java
cookbook to deploy those artifacts to the server and then restart tomcat.
For adding/removing instances from ELB, I would use AWS CLI as it is the quickest way to do.
Here are some commands for your reference which will do the job: Click here and here.
Hope this helps.
Upvotes: 2