Welcome to Day 29 of 101 Days of DevOps. The topic for today is Introduction to Packer — Part 1.
To view the complete course, please check the below url.
101 Days of DevOps
http://100daysofdevops.com/day-100-100-days-of-devops/ The good news is starting from Topics Include(Please let me know…
For more info, register via the below link
YouTube Channel link
Primary idea is to share my Linux knowledge via video. My Linkedin Profile…
What is Packer?
Packer is easy to use and automates the creation of any machine image.
- It integrates natively with a bunch of configuration management systems, e.g., Ansible, Puppet.
- Packer is cross-platform(Linux/Window)
- Packer uses a JSON template file and lets you define immutable infrastructure.
- It’s written in the GO language.
Installing Packer on Ubuntu
Download Packer — Packer by HashiCorp
— Packer by HashiCorp Download Packerwww.packer.io
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"sudo apt-get update && sudo apt-get install packer
- Some Packer Options
Usage: packer [--version] [--help] <command> [<args>]Available commands are:
build build image(s) from template
console creates a console for testing variable interpolation
fix fixes templates from old versions of packer
fmt Rewrites HCL2 config files to canonical format
hcl2_upgrade transform a JSON template into an HCL2 configuration
init Install missing plugins or upgrade plugins
inspect see components of a template
validate check that a template is valid
version Prints the Packer version
- Divided into three parts, each of them is a json array, so you can have as many as you want in each section.
- Use to generate an image, and it’s provider-specific. E.g., if you create an image for AWS, your builder will tell the packer which AMI to start with and what region to create that AMI.
- It let you customize your images.
- These can be scripts(bash or PowerShell)or your existing configuration management system(e.g., chef, puppet, salt stack, and Ansible) or files where you can upload a file to the running instance for capturing things, e.g., config files, binaries, etc.
- Let’s integrate with other services like Docker. E.g., it will let you upload an image to dockerhub.
If you like to dig deeper into the AWS concept, please feel free to check my book.
AWS for System Administrators: Build, automate, and manage your infrastructure on the most popular…
Amazon.com: AWS for System Administrators: Build, automate, and manage your infrastructure on the most popular cloud…
Looking forward to you guys joining this journey and spend a minimum of an hour every day for the next 101 days on DevOps work and post your progress using any of the below mediums.
- Website: https://101daysofdevops.com/
- Linkedin: https://www.linkedin.com/in/prashant-lakhera-696119b/
- Twitter: @100daysofdevops OR @lakhera2015
- Facebook: https://www.facebook.com/groups/795382630808645/
- Medium: https://medium.com/@devopslearning
- GitHub: https://github.com/100daysofdevops/100daysofdevops
- YouTube Channel: https://www.youtube.com/user/laprashant/videos
- Slack: https://join.slack.com/t/100daysofdevops/shared_invite/zt-au03logz-YfDUp_FJF4rAUeDEbgWmsg
- Reddit: r/101DaysofDevops
- Meetup: https://www.meetup.com/100daysofdevops/