scyld-modimg -- Tool for manipulating image contents.



[-h] [-v] [-q] [[-c | --config] CONFIG] [--base-url URL] [[-u | --user] USER[:PASSWD]] [--human | --json | --csv | --table] [--pretty | --no-pretty] [--show-uids] [--fields FIELDS] [ [-a | --all] | [[-i | --image] IMAGE] ] [--freshen | --download-only [PATHNAME]] [--overwrite | --no-overwrite] [--upload | --no-upload] [--discard | --no-discard] [--shell SHELL] [--clean-local] [--register-all] [--set-name NAME] [--set-description DESC] [--chroot] [--create [DISTRO]] [--delete] [--import FILE] [--capture NODE] [--install PKGS] [--update [PKGS]] [--uninstall PKGS] [--query [PKGS]] [--unpack TARGZ] [--copyin SRC DEST] [--copyout SRC DEST] [--execute COMMAND] [--mount PATH] [--unmount PATH] {list,ls}


list (ls)

List information about node images.


-h, --help

Print usage message and exit. Ignore trailing args, parse and ignore preceding args.

-v, --verbose

Increase verbosity.

-q, --quiet

Decrease verbosity.

-c, --config CONFIG

Specify a client configuration file CONFIG.

-a, --all

Select all local images (default).

-i, --image IMAGE

Or select an image by its name IMAGE.

--download-only [PATH]

Download a new local copy and then exit. If PATH is provided, then it is overwritten; Otherwise any cached changes are lost.


Discard any cached changes.


Keep the same UID after modifications and overwrite any existing image on upload.


Opposite of --overwrite.


Upload the final version. NOTE: This must follow all image manipulations options.


Opposite of --upload.


Discard image changes.


Opposite of --discard.

--pkgmgr CONF

Specify a package config file (using the '@' prefix), or pass the config contents as a string CONF, to override the default config example seen in /opt/scyld/clusterware-tools/examples/pkgmgr.ini. A cluster administrator wishing to customize pkgmgr.ini should copy that example to another location, then add, delete, and/or modify that copy as desired.

--shell SHELL

Select the shell to use in the image for the mutation operations (default /bin/bash).


--base-url URL

Specify the base URL of the ClusterWare REST API.

-u, --user USER[:PASSWD]

Masquerade as user USER with optional colon-separated password PASSWD.



Format the output for readability (default).


Format the output as JSON.


Format the output as CSV.


Format the output as a table.


Indent JSON or XML output, and substitute human readable output for other formats.


Opposite of --pretty.


Do not try to make the output more human readable.


Make changes to the local image cache.


Delete local images not found in the manifest and any temporary files or directories.


Record information about all locally stored images.


The following steps are be performed on a selected image. Any failure terminates execution.

--chroot [KVER]

Chroot into the unpacked image to allow for manual modifications. Optionally specify KVER, which is the version of a kernel inside the image, which informs a uname -r inside the chroot to identify the specific kernel version if/when configuring software needing to link against that kernel. (Otherwise a uname -r inside a chroot names the kernel of the host system executing the scyld-modimg, not the kernel installed inside the chrooted image.) See --execute COMMAND and EXAMPLES.

--create [DISTRO]

Create a new image from scratch, optionally specifying a non-default distro name DISTRO.


Delete the selected image(s) from the local cache.

--import FILE

Import an existing tar, squashfs, or singularity image.

--capture NODE [--set-name IMAGE]

Capture image from a booted node. If the optional --set-name IMAGE is not supplied, then the tool prompts the user for an IMAGE name to create or overwrite.

--install PKGS

Install packages PKGS into the image.

--set-name NAME

Set the name of the image.

--set-description DESC

Set the description for the image.

--query [PKGS]

Query package versions from the image (default=ALL).

--update [PKGS]

Update specified packages in the image (default=ALL).

--uninstall PKGS

Uninstall packages from the image.

--unpack TARGZ

Unpack a tar.gz file into the image.

--execute COMMAND

Execute a command in the unpacked image. Note that this COMMAND can include KVER=<kernelVersion>, thereby overriding the default behavior of a uname -r executing inside the image. See --chroot KVER and EXAMPLES.

--copyin SRC DEST

Copy files or directories from SRC into the image as DEST.

--copyout SRC DEST

Copy files or directories SRC out of the image to destination DEST.

--mount PATH

Unpack the image into PATH and bind-mount various folders as if preparing for --chroot. After the mount the image can be customized by other commands, such as ansible, before being repacked.

--unmount PATH

Repack the image from a previously mounted PATH.


scyld-modimg -i NewImage --query kernel,clusterware-node

Display the kernel and clusterware-node RPM versions installed in the image.

scyld-modimg -i NewImage --query

Display all RPMs installed in the image.

scyld-modimg -i NewImage --chroot

Examine and/or modify the contents of the image using chroot.

scyld-modimg -i NewImage --chroot 3.10.0-1160.45.1.el7.x86_64

Explicitly override the uname -r output when executed inside the image.

scyld-modimg -i NewImage --execute 'KVER=3.10.0-1160.45.1.el7.x86_64 uname -r'

Explicitly control the uname -r output inside the image when executing commands, e.g., in this case the uname -r command.

scyld-modimg --capture n8 --set-name CapturedN8image --upload

Capture the image executing on node n8, give it the name "CapturedN8image", and upload it.


Note that when exiting a --chroot, several directories do not get repacked and saved into the image, including /tmp/, /var/tmp/, /var/cache/yum.


Upon successful completion, scyld-modimg returns 0. On failure, any changes are discarded, an error message is printed to stderr, and scyld-modimg returns 1.