DevOps Classroom Series – 02/Jan/2020 – Packer

Where Packer Fits in CI/CD


Softwares Required

choco install git -y
  • Visual Studio Code
choco install vscode -y

Create a tomcat Server AMI in AWS

  • Create an EC2 machine with Ubuntu AMI
  • Login into machine and execute the following commands
sudo apt-get update
sudo apt-cache search jdk
sudo apt-get install openjdk-8-jdk -y
sudo apt-cache search tomcat
sudo apt-get install tomcat8 -y
sudo service tomcat8 status
  • Create an AMI of the EC2 Machine
  • Image References Preview



  • Important info for creating ami in AWS
    • EC2 machines Image (Source AMI => Ubuntu)
    • EC2 machines size (t2.micro)
    • Region (Oregon)
    • Commands to be executed in ubuntu

Install Packer

  • Chocolatey in windows
choco install packer -y
# Close and reopen powershell
packer --version
packer --help

Packer Json

  • Packer Json has sections
    • Builder: Where to create Image
    • Provisioner: Commands to be executed to install software.
    • Post-Processor: any post build activities


  • Builder is a virtualization env where packer can build an Image. Refer Here


  • Used for installing software / packages etc. Refer Here for full list of Provisioners

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner