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
--deviceoption. -
{-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-diroption, and the--ostree-image-pathoption, 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-dirargument. 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
--sourcerefers 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-diroption isn't provided, this option is ignored. If the--imageoption 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
--deviceoption 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--ignitionoption is used, in which case the default value isfile.This can also be set to
ociwhen creating images for OCI. Theociprovider reads Ignition information from themetadatauser_datakey/value pair in the Instance metadata service, when creating a compute instance. -
{-I|--ignition} path -
The path to an ignition file, which
ock-forgecan install directly to the boot disk. This is the complete ignition file from the output of anocne cluster startorocne cluster joincommand. The file is embedded into the initramfs on the deployment. If the--provideroption isn't specified, the--provideroption is set tofile. -
{-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
ostreecommand. This overrides any existing argument with the same key. See theostree-admin-deploy(1)man page for usage. Each kernel argument requires a separate--kargoption. -
--karg-append key=value -
Append a kernel argument to pass to the
ostreecommand. See theostree-admin-deploy(1)man page for usage. Each kernel argument appended requires a separate--karg-appendoption. -
--karg-delete key=value -
Delete an existing kernel argument to the
ostreecommand. See theostree-admin-deploy(1)man page for usage. Each kernel argument deleted requires a separate--karg-deleteoption.