Installing Operator

Glossary

TermDefinition
operator packageA tgz compressed package containing image files and configuration files
upload toolAn executable file used to parse the operator package and import/upload it to the platform
operation machineThe machine used to perform installation operations
working directoryThe directory where the operator package and upload tool are stored

Prerequisites

  1. Prepare an operation machine with Windows, Linux, or macOS that can access the platform. Linux is recommended, and the following instructions will use Linux as an example.
  2. Ensure the operation machine can access the platform.
  3. Download the operator package and save it to the working directory on the operation machine.

Obtaining the Upload Tool

From Platform Management -> Marketplace -> Upload Packages, download the upload tool. After download, set appropriate permissions for the executable.

Uploading the Operator

Whether importing a new operator or adding a new version to an existing operator, you can use the upload tool to complete the task, and the commands are the same.

Execute the following command in the working directory:

./violet push \
    <operator-package> \
    --platform-address <platform-address> \
    --platform-username <platform-username> \
    --platform-password <platform-password> \
    --clusters <clusters>

The main parameters are as follows:

ParameterDefinitionExample
<operator-package>The name of the operator packageoperator.v3.18.0-beta.93.g691b79c3.tgz
<platform-address>The access address of the platformhttps://platform.example.com
<platform-username>The platform username, which requires Platform Administrator privilegesadmin
<platform-password>The platform password********
<clusters>The list of clusters where the operator needs to be uploaded, separated by commas if multipleglobal,business

If you see the following output after execution, it indicates that the upload was successful:

INFO[0024] artifactversion <operator-name>.<operator-version> not found, create it  cluster=business type=bundle
INFO[0024] artifactversion <operator-name>.<operator-version> has been created successfully  cluster=business type=bundle

Go to the platform's Platform Management -> Marketplace -> Upload Packages page, search for the operator keyword, and then click on the operator name to enter the operator details page.

The details page will display the new version of the operator. If the status is Uploaded, it indicates that the upload was successful.

Next Steps

After the Operator is uploaded, you can go to the Platform Management -> Marketplace -> Operator Hub page, switch to the target cluster, and then deploy the corresponding Operator.

Common Issues

Pushing Images to a Specified Image Registry During Upload

If you need to upload images to a specified registry during the upload process, you can use the following three parameters:

ParameterDefinitionExample
--dst-repoThe address of the target registry--dst-repo registry.example.com
--usernameThe username of the target registry--username admin
--passwordThe password of the target registry--password ********

Example command:

./violet push \
    <operator-package> \
    --platform-address <platform-address> \
    --platform-username <platform-username> \
    --platform-password <platform-password> \
    --clusters <clusters> \
    --dst-repo <dst-repo> \
    --username <username> \
    --password <password>

If the target image registry uses the http protocol, you need to specify the additional --plain parameter as follows:

./violet push \
    ... \
    --dst-repo <dst-repo> \
    --username <username> \
    --password <password> \
    --plain

How to View All Parameters Supported by Violet

Use the following command to view all parameters of the violet push command:

./violet push --help