Skip to content

tool_use

brodriguez-opennebula edited this page Jun 10, 2024 · 11 revisions

Using the build tools

Building appliances and contextualization packages is made simple with the provided Makefile. To explore available options, just run make help:

Usage examples:
    make <distro>          -- build just one distro
    make <service>         -- build just one service

    make all               -- build all distros and services
    make all -j 4          -- build all in 4 parallel tasks
    make distros           -- build all distros
    make services          -- build all services

    make context-linux     -- build context linux packages
    make context-windows   -- build windows linux packages

Available distros:
    alma8 alma9 alpine316 alpine317 alpine318 alt9 alt10 amazon2
    centos7 centos8stream debian10 debian11 debian12 devuan3 devuan4
    fedora37 fedora38 freebsd12 freebsd13 ol8 ol9 opensuse15 rocky8
    rocky9 ubuntu2004 ubuntu2004min ubuntu2204 ubuntu2204min
    
Available services:
    service_Wordpress service_VRouter service_OneKE service_OneKEa

IMPORTANT: The build must be done as the user root (i.e. sudo make ubuntu2204 to create a ubuntu2204 image), otherwise the postprocessing stage will fail. In this stage the user must have chroot permissions to delete the machine ID and some other unneeded data from the image.

The products of the building process are stored in the following folders:

  • Linux context packages in context-linux/out/ folder
  • Linux context packages in context-windows/out/ folder
  • Appliance images in export folder

Configuration options

Fine-tune the Makefile's behavior, such as defining the distributions to build or configuring output folders, by adjusting the following variables. Simply create a Makefile.local file and set the variables as needed:

Variable Description
VERSION Defines the context packages version. Useful for releasing oficial packages
RELEASE Specifies the release version.
VERBOSE Controls verbosity in logging for troubleshooting.
PACKER_LOG Enables logging for Packer builds.
PACKER_HEADLESS Sets Packer to run in headless mode.
DISTROS Lists supported Linux distributions for building.
SERVICES Lists service appliances available for building.
DIR_BUILD Default directory for building artifacts (out of packer)
DIR_EXPORT Default directory for storing produced artifacts.
LINUX_CONTEXT_PACKAGES Lists Linux context packages generated.
WINDOWS_CONTEXT_PACKAGES Lists Windows context packages generated.

For example, to obtain a more verbose output to troubleshoot any issue, add the following contents:

PACKER_HEADLESS    := false
PACKER_LOG         := 1

Clone this wiki locally