org-deathe / iac-packer-base-rockylinux-8-x64

Packer Build of Rocky Linux 8 x86_64 Base Vagrant Box and VM Image

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Packer Build of Rocky Linux 8 x86_64 Base Vagrant Box and VM Image

This provides the configuration and Makefile to build a Vagrant minimal base box using Packer. The base box is intended for server (terminal) use only so is restricted to a single locale (with en_US being the default) which allows for a smaller box size.

There are templates provided for the following with x86_64 architecture:

  • Rocky-8.8

There is currently no requirement to support older minor release versions or alternative architectures but they could be added if necessary.

Usage Instructions

Prerequisites

The build environment required is macOS or GNU Linux (Fedora 38) Intel x86_64.

To build the box files you will need the following installed.

NOTE: You may need to create the VirtualBox NAT Network 10.0.2.0/24 if it doesn't already exist.

Build

To build the latest, x86_64 base box run make or make build.

$ make

To build a specific release version, use the BOX_VERSION_RELEASE variable.

$ BOX_VERSION_RELEASE=8.8 make

For usage instructions run make help.

$ make help

Box Variants

To build a box variant from an alternative box template use BOX_VARIANT. The default is minimal but there is an alternative minimal-cloud-init template to build boxes that include Cloud-Init. The variant minimal-vmi will generate an VMDK image suitable for importing into AWS.

To build images with an LVM partitioning scheme append the suffix -lvm.

Build a vagrant box with cloud-init support and an LVM partition:

$ BOX_VARIANT=minimal-cloud-init-lvm make

Build an image suitable for importing to a Cloud Provider such as AWS, DigitalOcean, Oracle OCI etc.

$ BOX_VARIANT=minimal-vmi make

Provider

The default provider is libvirt.

To build a box for the virtualbox provider use BOX_PROVIDER.

$ BOX_PROVIDER=virtualbox make

Local Install

To install from a box file, generated by a successful build, use make install supplied with the same environment variables used to build the require box. This will add the box and output a minimal Vagrantfile template that can be used to create a Vagrantfile in a suitable directory for testing.

$ BOX_VARIANT=minimal-cloud-init make install

NOTE: If running vagrant via sudo do the same here to ensure the box is installed for the expected user.

About

Packer Build of Rocky Linux 8 x86_64 Base Vagrant Box and VM Image

License:Other


Languages

Language:HCL 86.3%Language:Makefile 7.4%Language:Shell 5.8%Language:Ruby 0.5%