Upload Packages
The platform provides a command-line tool violet, which is used to upload packages downloaded from the Marketplace in the Customer Portal to the platform.
violet supports uploading the following types of packages:
- Operator
- Cluster Plugin
- Helm Chart
When the status of a package in Cluster Plugins or OperatorHub is shown as Absent, you need to use this tool to upload the corresponding package.
The upload process of violet mainly includes the following steps:
- Extract and retrieve information from the package
- Push images to the image registry
- Create Artifact and ArtifactVersion resources on the platform
TOC
Download the ToolFor Linux or macOSFor WindowsPrerequisitesUsageCommon ParametersPlatform Connection ParametersImage Registry Parametersviolet showviolet listOptional Flagsviolet gcOptional Flagsviolet verifyOptional Flagsviolet pushOptional FlagsUpload an Operator to Multiple ClustersUpload an Operator to a Standby Global ClusterUpload a Cluster PluginUpload a Helm Chart to the chart repositoryPush all packages at onceDownload the Tool
Log in to the Customer Portal, navigate to the Downloads page, and click CLI Tools. Download the binary that matches your operating system and architecture.
After downloading, install the tool on your server or PC.
For Linux or macOS
For non-root users:
For root users:
For Windows
-
Download the file and rename it to
violet.exe, or use PowerShell to rename it: -
Run the tool in PowerShell.
Note: If the tool path is not added to your environment variables, you must specify the full path when running commands.
Prerequisites
Permission requirements
- You must provide a valid platform user account (username and password).
- The account must have the role property set to
Systemand the role name must beplatform-admin-system.
Note: If the role property of your account is set to
Custom, you cannot use this tool.
Usage
Common Parameters
Several violet commands accept the following parameters. Refer to individual command sections for specific usage.
Platform Connection Parameters
Image Registry Parameters
IPv6 Address Limitation
For --platform-address and --dest-repo parameters:
- If using an IP address (rather than a domain name), IPv6 format is NOT supported
- Only IPv4 addresses or domain names are supported
violet show
Before uploading a package, use the violet show command to preview its details.
violet list
When upgrading the platform, use violet list to list the L4/L5 applications installed in the current environment and export the result to a YAML file. The generated file can then be uploaded to Alauda Cloud so that the required extension packages can be downloaded.
The command lists the following application types:
- ModulePlugin — cluster plugins whose lifecycle type is
alignedoragnostic. - OperatorBundle — installed operators.
- Chart — Helm chart applications created from chart references.
By default, the command prints the YAML content to stdout and writes it to apps.yaml in the current directory.
You can also authenticate with a platform token instead of username and password:
To export only applications installed in specific clusters, specify multiple cluster names separated by commas:
Example output:
Optional Flags
For platform connection parameters (--platform-address, --platform-username, --platform-password, --platform-token, --client-id), see Common Parameters.
violet gc
Use violet gc to clean up uninstalled L3/L4 Operator and ClusterPlugin resources. The command checks OperatorView and ModulePluginView records in the global cluster, then removes resources that are no longer installed or no longer match the installed version.
The command can delete the following resource types:
- Artifact — artifacts for uninstalled operators.
- ArtifactVersion — old artifact versions for installed operators. The currently installed CSV or version is kept.
- ModulePlugin — cluster plugins that are not installed in any cluster.
- ModuleConfig — obsolete cluster plugin configuration records.
By default, the command scans all clusters visible to the platform user and prints a summary of deleted resources.
You can also authenticate with a platform token instead of username and password:
To clean up resources related to specific clusters only, specify multiple cluster names separated by commas:
Example output:
If no resources are deleted, the command prints:
Optional Flags
For platform connection parameters (--platform-address, --platform-username, --platform-password, --platform-token, --client-id), see Common Parameters.
violet verify
Use the violet verify command to verify the signature of one or more packages before uploading them.
Two verification methods are supported: checksum and GPG.
The package (.tgz) and its corresponding signature file must be located in the same directory.
Example output:
Explanation:
- Verified successfully with GPG — The listed files have been successfully verified using GPG signature files (with
.sigextension). - Verified successfully with checksum — Files verified using checksum files (e.g.,
.sha256) passed the integrity check. - Verification failed — The listed files failed verification due to mismatched or invalid signatures.
- No verification file found — No corresponding
.sig(GPG) or checksum file was found in the directory.
Optional Flags
violet push
The following examples illustrate common usage scenarios.
For platform connection and image registry parameters, see Common Parameters.
Optional Flags
--skip-crs and --skip-push cannot be specified together.
When --dest-repo is specified, either the authentication info of the image registry or --no-auth MUST be provided.
Upload an Operator to Multiple Clusters
- If
--clustersis not specified, the Operator is uploaded to the global cluster by default.
Upload an Operator to a Standby Global Cluster
When using violet to upload packages to a standby cluster:
- The parameter
--dest-repo <VIP addr of standby cluster>MUST be specified - The parameter
--platform-addressMUST be set to the standby cluster's platform access address - Either the authentication info of the standby cluster's image registry or
--no-authparameter MUST be provided
Otherwise, the packages will be uploaded to the image repository of the primary cluster, preventing the standby cluster from installing or upgrading extensions.
Upload a Cluster Plugin
- You do not need to specify the
--clustersparameter when uploading a Cluster Plugin, as the platform will automatically distribute it based on its affinity configuration. If you specify--clusters, the parameter will be ignored.
Upload a Helm Chart to the chart repository
- Helm Charts can only be uploaded to the default
public-chartsrepository provided by the platform.
Push all packages at once
When multiple packages are downloaded from the Marketplace, you can place them in the same directory and upload them all at once:
When the upgrade target is the global cluster , you can omit the --clusters parameter, as it defaults to uploading to the global cluster.
However, when the upgrade target is a workload cluster, you must specify the --clusters <workload_cluster_name> parameter.