We have already created VMs in AWS and Microsoft Azure in Chapter 4, Cloud Computing and Configuration Management. To deploy an application in AWS and Microsoft Azure VM, we need a WAR package file. Once it is created by the Jenkins build job, we need to perform the following steps:
Let's configure the build job to execute the deployment of the WAR file in the AWS instance by executing the commands shown as follows:
- Give rights to ec2-user in the webapps directory of Tomcat so we can copy the WAR file:
ssh -i /home/mitesh/book.pem -o StrictHostKeyChecking=no -t -t firstname.lastname@example.org ...