I was introduced to Packer by one of my coworkers, @rms1000watt, while describing my setup at home. I have a SMB network full of various appliance servers running as VMs on an ESXi server. Since I'm not a datacenter brimming with the cash to pay for vCenter or Puppet premium recipes I've been hand-rolling my VMs. But, NO LONGER!!! Enter Packer (and Terraform, et cetera).
The details for installation are covered at https://www.packer.io/intro/getting-started/install.html. Just download your flavor, unzip, and move the binary to your folder of choice. I chose /usr/local/bin/packer
.
Turns out all Redhat-based distros (maybe all distros?) with cracklib installed already have a binary called packer
. So, if you get an error running packer similar to the following...
$ packer
/usr/share/cracklib/pw_dict.pwd: Permission denied
/usr/share/cracklib/pw_dict: Permission denied
... rest assured, there's nothing wrong with your install. Your $PATH
is favoring the cracklib packer binary instead of the HashiCorp binary.
There are a couple solutions to this issue. You can rename the HashiCorp binary (e.g. packer.io) or create a symlink. But, the solution I like the most is to update your path to favor the HashiCorp binary, a solution suggested by @rcousens. My .bash_profile
now looks like this:
...
PATH=/usr/local/bin/packer:${PATH}
export PATH
...
Now just source your bash profile:
$ source ~/.bash_profile
And you're done! packer
should now default to the HashiCorp binary.