How To Install HashiCorp Packer
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
In today’s blog post, we will discuss how to install HashiCorp Packer. Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration management like Chef or Puppet. In fact, when building images, Packer is able to use tools like Chef or Puppet to install software onto the image.
Image source: https://www.datocms-assets.com/2885/1509739571-diagram-blue.jpg
How To Install HashiCorp Packer:
How To Install HashiCorp Packer In Windows OS:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
## ---------- ## Windows OS ## ---------- ## Check if Chocolety is already installed choco --version #should return an output ## Install Chocolety if not already installed ## Open a command propmt as admin and execute below command @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" ## Install packer using chocolety choco install packer |
How To Install HashiCorp Packer In MAC OS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
## ------ ## MAC OS ## ------ ## Check if Homebrew already installed brew --version #should return an output ## Install Homebrew if not already installed /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ## Install the HashiCorp tap (a repository of all our Homebrew packages) brew tap hashicorp/tap ## Install packer using brew brew install hashicorp/tap/packer |
How To Install HashiCorp Packer In Ubuntu Or Debian OS:
1 2 3 4 5 6 7 8 9 10 11 12 |
## ------------------ ## Ubuntu | Debian OS ## ------------------ ## Add HashiCorp GPG key curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - ## Add HashiCorp repository sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" ## Install HashiCorp packer sudo apt-get update && sudo apt-get install packer |
How To Install HashiCorp Packer In Red Hat Enterprise Linux (RHEL) Or CentOS:
1 2 3 4 5 6 7 8 9 10 11 12 |
## ---------------- ## RHEL | CentOS OS ## ---------------- ## Install yum-config-manager sudo yum install -y yum-utils ## Add HashiCorp repository sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo ## Install HashiCorp packer sudo yum -y install packer |
How To Install HashiCorp Packer In Fedora OS:
1 2 3 4 5 6 7 8 9 10 11 12 |
## --------- ## Fedora OS ## --------- ## Install dnf-config-manager sudo dnf install -y dnf-plugins-core ## Add HashiCorp repository sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo ## Install HashiCorp packer sudo dnf -y install packer |
How To Install HashiCorp Packer In AWS EC2 Instance With Amazon Linux OS:
1 2 3 4 5 6 7 8 9 10 11 12 |
## --------------- ## Amazon Linux OS ## --------------- ## Install yum-config-manager sudo yum install -y yum-utils ## Add HashiCorp repository sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo ## Install HashiCorp packer sudo yum -y install packer |
Validate HashiCorp Packer Installation:
1 2 |
## Validate Installation packer #should return an output |
Hope you have enjoyed this article, to get more details on HashiCorp Packer, please refer below official documentation.