IBM Cloud Pak® CLI (cloudctl) CASE commands

Learn about the CASE commands that you can use with the Cloudctl command line tool to manage your Container Application Software for Enterprises (CASE).

Commands

Cloudctl case save

Use the cloudctl case save command to save and parse a CASE package in preparation for installation. The package includes the CASE itself and any dependent CASEs and Helm charts. The container images that are referenced by the CASE is compiled into a comma-separated values (CSV) file, which you can use to mirror your images into a local image repository.

When you run this command, the command downloads all CASEs to the specified output directory. For each CASE, the command completes the following tasks:

Case save command:

cloudctl case save --case <CASE_PATH_OR_URL> --outputdir <OUTPUT_DIR>

OPTIONS:
   --case value,      -c value  Sets the local filepath or URL that includes the CASE file to be parsed. The expected file format for a CASE file is .tgz
   --outputdir value, -o value  Sets the output directory where the CASE file is saved. The output directory is created when the directory does not exist.
   --tolerance value, -t value  Indicates the tolerance level for validating the CASE. Accepted values:
                                  0 - Maximum validation level (default)
                                  1 - Reduced validation level

The command can return one of two possible return codes:

Case save examples

Sample output structure

Sample CASE hierarchy:

├── case1
│   ├── chart1
│   ├── case2
│   │   ├──chart2

When you run the cloudctl case save to save this case, the output includes two Helm charts (.tgz) in the charts directory, two CASE files (.tgzs) for the two CASEs in the root directory, and CSV files. These CSV files contain information about the Helm charts and container images that are associated with each of the CASEs.

├── charts
│   ├── chart1-1.0.0.tgz
│   ├── chart2-2.0.0.tgz
├── case1-1.0.0-charts.csv
├── case1-1.0.0-images.csv
├── case1-1.0.0.tgz
├── case2-2.0.0-charts.csv
├── case2-2.0.0-images.csv
└── case2-2.0.0.tgz

No container images are downloaded by running the cloudctl case save command. Only the metadata for container images are downloaded. If you are using the CASE to install a product on a system that has an active internet connect, you do not need to download the images before you use the cloudctl case launch command. If you need to install the product offline, use the contents of the image CSV files.

Image CSV files

The image CSV files include a list of all images that are referenced by a CASE. Each CASE references either a specific image manifest, or a manifest list, when the CASE supports multiple architectures. If a manifest list is specified, the list must always represent the entire set of manifests. The list cannot include a subset of manifests. Most repositories require the images to be present before you create the manifest list. If images are removed from the manifest list, the digest is changed.

Each image CSV file uses the following naming convention:

<case>-<version>-images.csv

The file includes the following fields:

You can parse, filter, and use the image CSV to mirror or download only the images that you need. For example, you can use the image CSV to complete the following tasks:

cloudctl case launch

Use the cloudctl case launch command to launch a CASE into a targeted cluster. This command runs the CASE launcher script to complete an action that is defined in a CASE. This process validates any prerequisites for the action and validates the CASE before running the script. A CASE can include zero or multiple launch scripts.

Case launch command

cloudctl case launch --case <CASE-PATH> [additional parameters]

OPTIONS:
   --action value, -a value     The name of the action to be launched.
   --args value, -r value       Any additional arguments.
   --case value, -c value       The root directory where the extracted CASE file is located.
   --instance value, -i value   The name of the instance for the target application (release).
   --inventory value, -e value  The name of the inventory item launched.
   --namespace value, -n value  The name of the target namespace.
   --tolerance value, -t value  Indicates the tolerance level for validating the CASE. Accepted values:
                                  0 - Maximum validation level (default)
                                  1 - Reduced validation level

The command can return one of two possible return codes:

Case launch examples

cloudctl case launch --case /tmp/cache --inventory clusterSetup --action setup --args "--serviceAccount sample-sa1"
cloudctl case launch --case /tmp/cache --args "--localCache /tmp/cache"

Debugging a launcher script

A launcher script can fail due to the following possible causes: