Create Provision Job
In Order to create the provision job on Jenkins, follow the below steps:
- 1.Create a Freestyle project as NodeProvisionJob in Jenkins.
- 2.Go to Jenkins -> NodeProvisionJob -> Configure .
- 3.Under Build Triggers, Select “Build after other projects are built” and enter “SampleJob” in Projects to watch.
- 4.Go to Build Environment section.
- 5.Select “Send files or execute commands over SSH after the build runs”.
- 6. Under “SSH Publishers” – > SSH Server
- Select App node name in Name Section.
- Under Transfers -> Exec command –
- a.If Configuration Management tool is chef in DevOps Setup then enter the command “sudo chef-client” .
- b.If Configuration Management tool is Puppet in DevOps Setup, then enter the command “sudo puppetd --server puppetmasterhostname --test ”.
- 7.In case of Chef as Configuration Management , click on Add Servers to add the sudo chef-client command for all the application nodes.
- 8.In case of Puppet as Configuration Management, click on Add Servers to add the sudo puppetd --server puppetmasterhostname --test command for all the application nodes.
- 9.Click on Apply and Save .