Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
DevOps Bootcamp

You're reading from   DevOps Bootcamp The fastest way to learn DevOps

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787285965
Length 312 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Mitesh Soni Mitesh Soni
Author Profile Icon Mitesh Soni
Mitesh Soni
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. DevOps Concepts and Assessment Framework FREE CHAPTER 2. Continuous Integration 3. Containers 4. Cloud Computing and Configuration Management 5. Continuous Delivery 6. Automated Testing (Functional and Load Testing) 7. Orchestration - End-to-End Automation 8. Security and Monitoring

Continuous Delivery in AWS EC2 and Microsoft Azure VM using Script

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
ec2-user@ec2-52-90-116-36.compute-1.amazonaws.com "sudousermod -a
-G tomcat ec2-user;
sudochmod -R g+w /var/lib/tomcat6/webapps; sudo service tomcat6
stop;"
  • Copy the WAR file into the remote directory:
        scp  -i /home/mitesh...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime