The Packer template in this directory creates a CentOS 8 AMD64 image for use with MAAS.
- A machine running Ubuntu 18.04+ with the ability to run KVM virtual machines.
- qemu-utils, libnbd-bin, nbdkit and fuse2fs
- Packer., v1.7.0 or newer
The default username is cloud-user
The deployment image may be customized by modifying http/centos8.ks. See the CentOS kickstart documentation for more information.
The Packer template downloads the CentOS net installer from the Internet. To tell Packer to use a proxy set the HTTP_PROXY environment variable to your proxy server. Alternatively you may redefine iso_url to a local file, set iso_checksum_type to none to disable checksuming, and remove iso_checksum_url.
To use a proxy during the installation define the KS_PROXY
variable in the
environment, as bellow:
export KS_PROXY="--proxy=\"${HTTP_PROXY}\""
You can easily build the image using the Makefile:
make
Alternatively you can manually run packer. Your current working directory must be in packer-maas/centos8, where this file is located. Once in packer-maas/centos8 you can generate an image with:
packer init
PACKER_LOG=1 packer build .
Note: centos8.pkr.hcl is configured to run Packer in headless mode. Only Packer output will be seen. If you wish to see the installation output connect to the VNC port given in the Packer output or change the value of headless to false in centos8.pkr.hcl.
Installation is non-interactive.
maas $PROFILE boot-resources create \
name='centos/8-custom' title='CentOS 8 Custom' \
architecture='amd64/generic' filetype='tgz' \
content@=centos8.tar.gz
The default username is cloud-user