suse-edge / edge-image-builder

Tool for creating and configuring a set of images to automate the deployment of Edge environments
Apache License 2.0
55 stars 28 forks source link

Edge Image Builder (EIB)

Usage

EIB runs as a container. Some form of container runtime is needed, such as Podman.

The latest version of EIB (1.1.0) can be downloaded from the Open Build Service using the following command:

podman pull registry.opensuse.org/isv/suse/edge/edgeimagebuilder/containerfile-sp6/suse/edge-image-builder:1.1.0

Alternatively, EIB can be built from this repository. See the Building from Source section below.

Image Definition

For details on how to create the artifacts needed to build an image, see the Building Images guide.

Running EIB

The image configuration directory must be attached to the container at runtime. This serves as both the mechanism to introduce image definition files and provide a way to get the built image out of the container and onto the host machine.

Validating an image definition

The following example command attaches the image configuration directory and validates a definition:

podman run --rm -it -v $IMAGE_DIR:/eib \
$EIB_IMAGE \
validate --definition-file $DEFINITION_FILE.yaml

Building an image

The following example command attaches the image configuration directory and builds an image:

podman run --rm -it -v $IMAGE_DIR:/eib \
$EIB_IMAGE \
build --definition-file $DEFINITION_FILE.yaml

NOTE: Image builds which involve package resolution must include the --privileged flag. Package resolution will be automatically performed when requesting package installation or configuring components which require it (e.g. Elemental, Kubernetes SELinux, etc.).

Testing Images

For details on how to test the built images, see the Testing Guide.

Building from Source

Build the container (from the root of this project). The image tag eib:dev will be used in the Podman command examples above for the $EIB_IMAGE variable.

podman build -t eib:dev .