CLI Tools
TOC
Overview
The violet
CLI tool is a platform-integrated utility that allows you to upload software packages from your custom portal to the platform. The tool supports three types of software packages: Operators, Cluster Plugins, and Helm charts.
Supported Operating Systems
- Linux, macOS, and Windows
- Linux and macOS support both x86 and ARM architectures
Permission Requirements
- You must provide a valid platform user account (username and password)
- The account must have the role property set to
System
and the role name must be platform-admin-system
Note: If your account has a role property set to Custom
instead of System
, you will not be able to use this tool, even if the role has all Platform Management
permissions.
Downloading the Tool
- Navigate to the Administrator view
- Click on Marketplace/Upload Packages in the left navigation
- Click Download Package Upload Tool
- Select the binary that matches your operating system and architecture
Installing the Tool
After downloading the tool, install it on your packaging or uploading server or personal PC.
For Linux or macOS
For non-root users:
# Linux x86
sudo mv -f violet_linux_amd64 /usr/local/bin/violet && sudo chmod +x /usr/local/bin/violet
# Linux ARM
sudo mv -f violet_linux_arm64 /usr/local/bin/violet && sudo chmod +x /usr/local/bin/violet
# macOS x86
sudo mv -f violet_darwin_amd64 /usr/local/bin/violet && sudo chmod +x /usr/local/bin/violet
# macOS ARM
sudo mv -f violet_darwin_arm64 /usr/local/bin/violet && sudo chmod +x /usr/local/bin/violet
For root users:
# Linux x86
mv -f violet_linux_amd64 /usr/bin/violet && chmod +x /usr/bin/violet
# Linux ARM
mv -f violet_linux_arm64 /usr/bin/violet && chmod +x /usr/bin/violet
# macOS x86
mv -f violet_darwin_amd64 /usr/bin/violet && chmod +x /usr/bin/violet
# macOS ARM
mv -f violet_darwin_arm64 /usr/bin/violet && chmod +x /usr/bin/violet
For Windows
-
Download the file and rename it to violet.exe
or use PowerShell to rename it:
# Windows x86
mv -Force violet_windows_amd64.exe violet.exe
-
Run the tool in PowerShell.
Note: If you haven't added the tool path to your environment variables, you'll need to specify the full path to the tool when running commands.
Using the Tool
Previewing Packages
Platform administrators can use violet show
to view and confirm package information before uploading.
violet show topolvm-operator.v2.3.0.tgz
Name: NativeStor
Type: bundle
Arch: [linux/amd64]
Version: 2.3.0
violet show topolvm-operator.v2.3.0.tgz --all
Name: NativeStor
Type: bundle
Arch: []
Version: 2.3.0
Artifact: harbor.demo.io/acp/topolvm-operator-bundle:v3.11.0
RelateImages: [harbor.demo.io/acp/topolvm-operator:v3.11.0 harbor.demo.io/acp/topolvm:v3.11.0 harbor.demo.io/3rdparty/k8scsi/csi-provisioner:v3.00 harbor.demo.io/3rdparty/k8scsi/csi-provisioner:v2.1.1 harbor.demo.io/3rdparty/k8scsi/csi-resizer:v1.3.0 harbor.demo.io/3rdparty/k8scsicsi-attacher:v3.3.0 harbor.demo.io/3rdparty/k8scsi/csi-snapshotter:v3.0.2 harbor.demo.io/3rdparty/k8scsi/csi-node-driver-registrar:v2.3.0 harbordemo.io/3rdparty/k8scsi/livenessprobe:v2.4.0]
Uploading Operators
violet push opensearch-operator.v3.14.2.tgz --platform-address https://192.168.0.1 --platform-username <user> --platform-password <password>
Parameter | Description |
---|
args[0] | Required. The first parameter after the violet push
command. Specify the file path of the package to be uploaded. For
multiple packages, place them in the same directory and specify the
directory path - the tool will automatically upload all packages in the
directory. |
--platform-address | Required. The access address of the platform. |
--platform-username | Required. Username of a local user with the
Platform Administrator role . |
--platform-password | Required. Password for the username. |
--skip-push | Optional. Add this parameter when you only need to create upload-related
resources without pushing images. |
--force | Optional. Add this parameter to forcibly overwrite and update related
resources when images in the package already exist on the platform. |
--target-chartrepo | Optional. Add this parameter when you need to upload to a specific
catalogsource. |
--clusters | Optional. Add this parameter to specify which clusters to upload to.
Separate multiple cluster names with commas, e.g.,
global,cluster1,cluster2 . If not specified, the package
will be uploaded to the global cluster by default. |
--debug | Optional. Add this parameter when you need to print debug log
information. |
Uploading Cluster Plugins
violet push plugins-cloudedge-v0.3.16-hybrid.tgz --platform-address https://192.168.0.1 --platform-username <user> --platform-password <password>
Parameter | Description |
---|
args[0] | Required. The first parameter after the violet push
command. Specify the file path of the package to be uploaded. For
multiple packages, place them in the same directory and specify the
directory path - the tool will automatically upload all packages in the
directory. |
--platform-address | Required. The access address of the platform. |
--platform-username | Required. Username of a local user with the
Platform Administrator role . |
--platform-password | Required. Password for the username. |
--skip-push | Optional. Add this parameter when you only need to create upload-related
resources without pushing images. |
--force | Optional. Add this parameter to forcibly overwrite and update related
resources when images in the package already exist on the platform. |
--debug | Optional. Add this parameter when you need to print debug log
information. |
Tip: Uploading cluster plugins does not support specifying clusters. If you want to upload only to the global
cluster, you need to configure ModulePlugin. For specific configuration methods, please contact technical support.
Uploading Helm Charts
violet push chartmuseum-v3.16.1.tgz --platform-address https://192.168.0.1 --platform-username <user> --platform-password <password>
Parameter | Description |
---|
args[0] | Required. The first parameter after the violet push
command. Specify the file path of the package to be uploaded. For
multiple packages, place them in the same directory and specify the
directory path - the tool will automatically upload all packages in the
directory. |
--platform-address | Required. The access address of the platform. |
--platform-username | Required. Username of a local user with the
Platform Administrator role . |
--platform-password | Required. Password for the username. |
--skip-push | Optional. Add this parameter when you only need to create upload-related
resources without pushing images. |
--force | Optional. Add this parameter to forcibly overwrite and update related
resources when images in the package already exist on the platform. |
--debug | Optional. Add this parameter when you need to print debug log
information. |
Tip: The upload process does not support specifying a template repository. By default, packages will be uploaded to public-charts
.