Tested the packer configuration on MacOS - vbox-ubuntu20.pkr.hcl
.
And run a vagrant vm for a testing on CentOS 8 within KVM (Qemu) provider.
In this repository i don't handle with preseed, subiquity or kickstart configuration. There are simple demo-configuration for the packer build.
Following setup will be needed for this example repo:
- Ansible - official install instruction
- Virtualbox + Vagrant - small instruction to install and use
- if you want to use packer on your client, then packer - official install instruction
If you already a setup on MacOS with Virtualbox, you can use direct packer without a vagrant vm.
- Change in packer directory
cd packer
- Run the Deployment with following Arguments
make FILE="vbox-ubuntu20.pkr.hcl" VARS="variables.pkrvars.hcl"
- After the build is finished, you can use the image for further deployments or use cases.
If you don't have a setup on you client, then we use a vagrant vm.
💡 Attention:
We need ansible for provisioning, so make sure you can use ansible with plain or with a virtualenv.
- Start the vagrant vm
vagrant up
- SSH-Connection
vagrant ssh
- The vagrant vm has our packer directory mounted to /data, so we change to this directory and can run the packer build process.
cd /data
make FILE="ubuntu-20.pkr.hcl" VARS="variables.pkrvars.hcl"
- After the build is finished, you can the image for further deployments or use cases.