End-to-end automation using Jenkins, Chef, and AWS EC2
In this section, we will orchestrate different tasks using the Build Pipeline
plugin available in Jenkins.
In Chapter 4, Cloud Computing and Configuration Management, we installed a Chef workstation, configured the hosted Chef account, and installed knife plugins for AWS and Microsoft Azure.
We created an instance in AWS EC2 using the following command:
[root@devops1 Desktop]# knife ec2 server create -I ami-1ecae776 -f t2.micro -N DevOpsVMonAWS --aws-access-key-id '< Your Access Key ID >' --aws-secret-access-key '< Your Secret Access Key >' -S book --identity-file book.pem --ssh-user ec2-user -r role[v-tomcat]
We created a virtual machine in Microsoft Azure using the following command:
[root@devops1 Desktop]# knife azure server create --azure-dns-name 'distechnodemo' --azure-vm-name 'dtserver02' --azure-vm-size 'Small' -N DevOpsVMonAzure2 --azure-storage-account 'classicstorage9883' --bootstrap-protocol 'cloud-api' --azure-source...