Provisioning CLI - Overview¶
The Provisioning CLI is a command-line tool explicitly designed to activate and install an IEM Pro on an existing Kubernetes cluster. It takes an onboarding/activation file (downloaded from the IE Hub) as input, creates the required key pair, and activates the key pair with the IE Hub. It then uses the Helm diagrams provided by the IE Hub to install the IEM Pro on the Kubernetes cluster.
The CLI is completely self-contained and does not rely on any other commands/tools. It only requires a connection to the IE Hub (http_proxy and https_proxy settings are honored) on the local machine, and that the credentials to the Kubernetes cluster are in the ~/.kube/config file. To interact with the cluster and for monitoring purposes, it is recommended, but not required, to also install kubectl and helm.
Activating and Installing a new IEM Pro¶
The ieprovision install CONFIG_FILENAME command merges all necessary steps into a single step. Use the -v option for more detailed information during the installation process. If no namespace is provided using the flag -n the namespace iem is used as default.
Listing available Charts and Versions¶
To list the available charts from the IE Hub, a valid access token is needed which is bound to a specific activated IEM Pro. Therefore, the instance ID is required to list the available charts.
The following command lists the available charts:
ieprovision list-charts [-n NAMESPACE]
If the installation or activation is done using a namespace other than iem, please specify the namespace.
Installing a specific Version from the IE Hub¶
In order to list the available charts on the IE Hub, an enabled IEM Pro is required to gain access. For a new IEM Pro, this procedure allows you to list the available versions and select a specific one.
Use the following commands:
ieprovision activate CONFIG_FILENAME
ieprovision list-charts CONFIG_FILENAME
ieprovision install --chart iehub/CHARTNAME:VERSION CONFIG_FILENAME
Note The
CONFIG_FILENAMEcan be omitted for the second and third command as the configuration is already present in the cluster.
Listing available Instances and Checking their Status¶
A configuration is stored for each IEM Pro added to the cluster. The following command displays the available instance ID, name, map, and version in the target namespace (default: iem):
ieprovision list [-n NAMESPACE]
The status command can be used to check the installation status via the following command (default namespace iem):
ieprovision status [-n NAMESPACE]
Removing an Installation¶
To completely remove an installation, use the following command (default namespace iem):
ieprovision cleanup [-n NAMESPACE]
This command uninstalls and removes the configuration from the cluster. Note that a normal installation will not be available after this unless a fully exported JSON configuration is available.
Upgrading to a newer Version¶
To upgrade to a newer version, use the following command (default namespace iem):
ieprovision upgrade [-n NAMESPACE]
This command performs an upgrade to a newer version. If the `--chart' option was used with a specific version during installation, the new version must also be specified. Use the following command:
ieprovision upgrade [-n NAMESPACE] --chart iehub/CHARTNAME:NEW_VERSION
Note The IE Provision CLI is independent from the Helm Chart, therefore updating the Helm Chart does not require an update of the IE Provision CLI.
Updating an Installation Configuration¶
To update the configuration of an installation, use the following command:
ieprovision upgrade [-n NAMESPACE] -f CONFIG_FILE
If the --chart option was used with a specific version during installation, the version will not be updated. To update the configuration only, without updating to a different version, use the following command:
ieprovision upgrade [-n NAMESPACE] -f CONFIG_FILE --chart iehub/CHARTNAME:CURRENT_VERSION
Further commands¶
The CLI takes either the IEM activation file (downloadable from the IE Hub) or an IEM Pro instance ID for most interactions. The following commands are available:
ieprovision help
Prints a short description of all subcommands and options.
ieprovision install
Performs a one-step installation of an IEM Pro. It takes the data from the onboarding file, activates the IEM Pro (if necessary), prepares the credentials for the IE Hub access, downloads the installation chart and performs the installation.
ieprovision upgrade
Upgrades an application to a newer version and/or allows changing the configuration of a deployed installation. Depending on the used parameters, it is possible to only upgrade the version, to only update the configuration or to do both at the same time.
ieprovision uninstall
Uninstalls a deployed installation. The activation is kept intact which allows a reinstallation without a new configuration. The configuration is kept on the cluster and a reinstallation can be done with the configuration file.
ieprovision activate
Performs only the activation on the IE Hub without any installations. This can be used to install a specific version.
ieprovision list-charts
Lists the available installation charts and versions. Note that this command needs an activated instance ID to connect to the backend.
ieprovision list
Lists the instance ID, names, chart name and version of the activated instances (including not yet installed or uninstalled).
ieprovision status
Shows the installation status of an IEM Pro.
ieprovision export-config
Extracts the configuration of a device and writes it to a file.
ieprovision version
Prints the version information.
ieprovision cleanup
Uninstalls and removes the configuration from the cluster.
Command Line Flags¶
The following command line flags can be used to set configuration inputs.
Flags:
--chart string helm chart for deployment (dir or repository)
--dry-run do dry-run of installation
--set stringArray set arbitrary values as comma separated key-values pair: key1=val1,key2=val2
--set-file stringArray set values from file: key1=path1,key2=path2
--set-string stringArray set string values as comma separated key-values pair: key1=val1,key2=val2
-f, --values strings read input from values.yaml, can be used multiple times
The --chart flag selects a helm chart for the installation. This can be used to install a different chart than the default IEM Pro. This flag accepts local directories (for downloaded charts) or repository names. The charts residing on the IE Hub can be accessed with the iehub/ prefix to the chart name. The version of a chart can be given after a colon (:).
The output of the list-charts flag directly shows the string which can be used with this flag.
Additional Command Line Flags¶
In addition to the configuration parameters listed above, the CLI accepts additional options as command line flags:
-
-vor--verbose: Print intermediate output while the command is running. -
-nor--namespace: Use this namespace instead of the default namespaceiem -
--log-config: This flag works only in conjunction with-vand prints the complete configuration that has been collected from the different inputs. Note: Long lines might be shortened and secrets are partially made invisible. To get the full configuration, useexport-config. -
--proxy: If a proxy is necessary to access the IE Hub or the public network, use this flag. Alternatively, thehttp_proxyandhttps_proxyenvironment variables are also honored when set. -
--no-proxy: Comma separated list of domains excluded from the proxy. Alternatively, theno_proxyenvironment variable can be used. -
--output: Output format (JSON, text) ofieprovision. By default,textis used. -
-hor--help: Prints the help on the current subcommand. To get more detailed information about the usage of a subcommand, enterieprovision SUBCOMMAND -h. -
-sor--set: Comma separated list of key-value pairs (e.g.-s key=val,key2=val2) set directly in the helm chart. A variable set with-smay override any settings from a configuration. Note: Variables set with-sare not stored in the configuration. -
--skip-activation: Skips the activation step during the installation and does not activate the configuration. Use--isactivatedto both skip the activation and store it in the configuration.