3 Command Reference

Command reference for the ock-forge utility.

The ock-forge utility builds bootable media and OSTree container images for OCK, based on an rpm-ostree treefile configuration.

ock-forge
[{-s|--source} URI]
[{-b|--branch} branch-name]
[{-d|--device} block-device]
[{-D|--disk} image-path]
[{-f|--filesystem} filesystem]
[{-i|--image} container-image]
[{-s|--source} URI]
[{-b|--branch}]
[{-C|--configs-dir} path]
[{-c|--config-dir} path]
[{-o|--os-name} name]
[{-O|--ostree-image-path} path]
[{-n|--no-clean}]
[{-P|--partition}]
[{-p|--provider} ignition-provider]
[{-I|--ignition} path]
[{-B|--build-image} container-image]
[[--karg key=value]...]
[[--karg-append key=value]...]
[[--karg-delete key=value]...]

Where:

{-s|--source} URI

The path to either a Git repository or a directory. The contents of the location is copied to the build directory. If this option is omitted, the default configuration is used.

{-b|--branch} branch-name

The name of a Git branch. If this option is provided, the indicated branch is cloned. Without this option, the default branch is cloned.

{-d|--device} block-device

The path to an existing block device. This device is the installation target. All operations performed by OCK Image Builder are run against this device.

{-D|--disk} image-path

The path to a disk image file. This value is only necessary if the installation target is a file rather than a raw device. The disk image file is attached to the device specified with the --device option.

{-f|--filesystem} filesystem

The file system to use when formatting the root partition. This must be xfs.

{-i|--image} container-image

A fully qualified container image name, including a tag. This argument is used in several ways. If provided alone, this container image is used as the base image to deploy the OS. In this case, building the OSTree is skipped entirely. If provided with the --config-dir option, and the --ostree-image-path option, it generates an OSTree container image that can be used for later installations or upgrades.

{-s|--source} URI

The URI of an OCK configuration. The configuration is copied from this location into the value of the --configs-dir argument. If the URI ends with .git, the assumption is that it refers to a Git repository. Otherwise, the URI is assumed to be a directory on the local file system.

{-b|--branch}

If --source refers to a Git repository, the specified branch is checked out after cloning.

{-C|--configs-dir} path

A directory containing a set of rpm-ostree configurations.

{-c|--config-dir} path

A directory containing the rpm-ostree configuration to build. This must be a subdirectory of --configs-dir, at whatever depth is required to ensure all symlinks can be resolved. If this option is specified, a complete rpm-ostree build is performed and optionally packaged into an Open Container Initiative (OCI) archive.

{-o|--os-name} name

The name of the OSTree deployment.

{-O|--ostree-image-path} path

The path to write the Open Container Initiative (OCI) archive generated by the installation process. If this value isn't specified, no archive is generated. If the --config-dir option isn't provided, this option is ignored. If the --image option is provided and points to a valid OSTree container image, it's used as the reference for generating a chunked image.

{-n|--no-clean}

If this option is provided, don't perform any post install cleanup steps such as unmounting partitions, or detaching virtual block devices.

{-P|--partition}

If this option is provided, the block device specified using the --device option has its partition table wiped and repopulated with the default geometry.

{-p|--provider} ignition-provider

Sets the ignition provider. The default value is qemu, unless the --ignition option is used, in which case the default value is file.

This can also be set to oci when creating images for OCI. The oci provider reads Ignition information from the metadata user_data key/value pair in the Instance metadata service, when creating a compute instance.

{-I|--ignition} path

The path to an ignition file, which ock-forge can install directly to the boot disk. This is the complete ignition file from the output of an ocne cluster start or ocne cluster join command. The file is embedded into the initramfs on the deployment. If the --provider option isn't specified, the --provider option is set to file.

{-B|--build-image} container-image

The name of a container image to use when building the OCK boot media. The default value is ock-builder:latest.

--karg key=value

Set a kernel argument to pass to the ostree command. This overrides any existing argument with the same key. See the ostree-admin-deploy(1) man page for usage. Each kernel argument requires a separate --karg option.

--karg-append key=value

Append a kernel argument to pass to the ostree command. See the ostree-admin-deploy(1) man page for usage. Each kernel argument appended requires a separate --karg-append option.

--karg-delete key=value

Delete an existing kernel argument to the ostree command. See the ostree-admin-deploy(1) man page for usage. Each kernel argument deleted requires a separate --karg-delete option.