Skip to content

migtools/konveyor-cli-deployment

Repository files navigation

Konveyor CLI Deployment

Overview

The Konveyor CLI Deployment tool simplifies deployment and preparation for the Konveyor CLI. It supports end-to-end deployment, both for containerized images and containerless CLI environments.

Usage

To view all available options, run the following command:

./install_cli.py --help

Command Output:

usage: install_cli.py [-h] [--mta_version MTA_VERSION] [--build BUILD]
                      [--image IMAGE] [--normalized_url NORMALIZED_URL]
                      [--upstream UPSTREAM] [--install_path INSTALL_PATH]
                      [--image_output_file IMAGE_OUTPUT_FILE]
                      [--dependency_file DEPENDENCY_FILE]
                      [--ip_address IP_ADDRESS] [--os OS]
                      [--platform PLATFORM]

Deploys and prepares MTA CLI either locally or remotely.

options:
  -h, --help            show this help message and exit
  --mta_version MTA_VERSION
                        The MTA version to use.
  --build BUILD         Build number to use
  --image IMAGE         Image URL to use (if using konflux)
  --normalized_url NORMALIZED_URL
                        Normalized URL to use (to avoid using `opm` if using
                        konflux)
  --upstream UPSTREAM   Optional, forces latest upstream deployment instead of
                        downstream
  --install_path INSTALL_PATH
                        Optional, overrides default installation path $HOME/.kantra 
  --image_output_file IMAGE_OUTPUT_FILE
                        Optional, the file containing related_images for
                        bundle, generated by using get-image-build-details.py
  --dependency_file DEPENDENCY_FILE
                        Optional, the file containing dependencies to be
                        unpacked in `~/.kantra`
  --ip_address IP_ADDRESS
                        Optional, IP address of target server where MTA CLI
                        will be deployed
  --os OS               Optional for remote deployment, OS of remote host
                        (windows/linux/darwin)
  --platform PLATFORM   Optional for remote deployment, platform of remote
                        host (amd64/arm64)

Example

Basic command to deploy the Downstream (D/S) CLI:

./install_cli.py --mta_version 7.2.0 --build 46

Basic command to deploy the Upstream (U/S) CLI:

./install_cli.py --upstream true

Basic command to pull and configure kantra-cli-tests (https://github.com/konveyor/kantra-cli-tests):

 ./prepare_remote_host.py --ip_address X.X.X.X

Important:

  • System variables GIT_USERNAME and GIT_PASSWORD should be present and should have respective values assigned in order to run all tests properly.
  • --install_path overrides the directory where the dependencies zip is unpacked (default is ~/.kantra on the machine where unpacking runs). With --ip_address, that path is on the remote host.

Configuration

You need to create a config.json file before running the tool. A template file, config.json.example, is included for reference.

Example config.json

{
  "misc_downstream_path": "YOUR_PATH/misc-downstream/",
  "extract_binary": "mta-cli-binary-extract.py",
  "get_images_output": "get-image-build-details.py",
  "bundle": "--bundle mta-operator-bundle-container-",
  "no_brew": "--no-brew",
  "ssh_user": "",
  "ssh_key": ""
}

Configuration Parameters

  1. misc_downstream_path
  • Path to the cloned misc_downstream tool, used to generate dependencies and image lists.
  • This parameter can be omitted if you plan to use a pre-generated image list file and dependencies archive.
  • This parameter can be omitted if you install the U/S CLI.
  1. extract_binary
  • Name of the script used to extract the binary.
  • This parameter can be omitted if you plan to use a pre-generated dependencies archive.
  • This parameter can be omitted if you install the U/S CLI.
  1. get_images_output
  • Script to generate the related_images file for the bundle.
  • This parameter can be omitted if you plan to use a pre-generated image list file.
  • This parameter can be omitted if you install the U/S CLI.
  1. bundle
  • Specifies the bundle flag for the MTA operator bundle container.
  • This parameter can be omitted if you plan to use a pre-generated image list file and dependencies archive.
  • This parameter can be omitted if you install the U/S CLI.
  1. no_brew
  • Optional flag to skip the use of Brew.
  • This parameter can be omitted if you plan to use a pre-generated image list file and dependencies archive.
  • This parameter can be omitted if you install the U/S CLI.
  1. ssh_user
  • Username for SSH access to a remote host. It can be omitted for local deployments.
  1. ssh_key
  • SSH key for authentication to the remote host. It can be omitted for local deployments.

Additional Information

  • Ensure all required scripts and dependencies are accessible in the paths specified in config.json.
  • Refer to the example config.json file for further customizations.

For detailed documentation, see the Konveyor project page.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages