AMI stands for Amazon Machine Image i.e. a special type of virtual appliance that is used to create a virtual machine within the Amazon Elastic Compute Cloud. It serves as the basic unit of deployment for services delivered using EC2.
I have a web application to be deployed to cloud. This repository contain configuration for building custom AMI for deploying and running webapp Bookstore
The AMI is built and made available on the AWS accounts by using CircleCI pipeline. The CircleCI pipeline leverages Packer to validate and build AMI.
- Install Java 8 and Maven using
java.sh
shell script - Install Tomcat Server using
tomcat.sh
shell script - Install AWS Cloud Watch using
cloud-watch.sh
shell script - Install AWS Code Deploy Agent and start it using
deploy-agent.sh
shell script
sh packer validate ami.json
sh packer build
-var 'aws_access_key=REDACTED'
-var 'aws_secret_key=REDACTED'
-var 'aws_region=us-east-1'
-var 'subnet_id=REDACTED'
ami.json