proton-cli is the Proton command-line tool for cluster deployment, configuration management, backup and recovery, Kubernetes maintenance, and offline package operations.
This README is written from the committed source code in this directory. It focuses on how to use the CLI, not on packaging artifacts that may exist outside the tracked code.
Scan the QR code to join the KWeaver community and contact the group owner to obtain the Kweaver offline installation package
OS: OpenEuler 24 x86/arm, Kylin V10 SP3 x86/arm, RHEL8.10 X86, OpenEuler 23 x86/arm Kernel: 4.11+ ARCH: amd64/arm64
The following steps are for quickly installing Proton with a prebuilt proton-cli binary and an offline dependency package.
- Download
proton-cli
Download the latest release from GitHub Releases and choose the archive that matches your CPU architecture. The examples below use v0.1.0:
# amd64
wget https://github.com/kweaver-ai/proton/releases/download/v0.1.0/proton-cli-linux-amd64.tar.gz
# arm64
wget https://github.com/kweaver-ai/proton/releases/download/v0.1.0/proton-cli-linux-arm64.tar.gz
tar xf proton-cli-linux-<arch>.tar.gz- Download the Proton offline dependency package
Choose the offline package that matches your CPU architecture:
# amd64
proton-cli oras pull swr.cn-east-3.myhuaweicloud.com/kweaver-ai/offline-pkg/proton-offline-package:24653585065-amd64
# arm64
proton-cli oras pull swr.cn-east-3.myhuaweicloud.com/kweaver-ai/offline-pkg/proton-offline-package:24653585065-arm64- Install the offline package
tar xf proton-offline-package.tar
bash install.sh- Start the initialization service
Disable firewall
proton-cli server -ldebug -s proton-offline/service-packageThen open http://<ip>:8888 in a browser to enter the initialization page.
- Complete initialization
Set custom MariaDB and Redis passwords on the initialization page, then click Complete and wait for initialization to finish successfully.
- Export an application offline package
Use the following command to download the charts and images defined in the specified yaml file and package them as an offline installation bundle:
proton-cli app export \
-f release-manifest/x.y.z/kweaver-dip.yaml \
--cache-dir /tmp/cache \
--override-registry swr.cn-east-3.myhuaweicloud.com/kweaver-ai- Import an application offline package
Use the following command to import the charts and images from the offline application package into the built-in registry:
proton-cli app import \
-i kweaver-dip-x.y.z-offline-package.tar \
--auto --force- Install a specific product version
Use the following command to install the specified product version into the kweaver namespace:
proton-cli app install \
-f release-manifest/x.y.z/kweaver-dip.yaml \
-n kweaverIf you need to override values at install time, for example to disable optional capabilities:
proton-cli app install \
-f release-manifest/x.y.z/kweaver-dip.yaml \
-n kweaver \
--set auth.enabled=false \
--set businessDomain.enabled=false--set overrides install-time values. See the later app install section for precedence rules and how it relates to manifest YAML.
- Linux environment
- Go 1.24 or newer to build from source
- A working Kubernetes client configuration at
~/.kube/config - For
apply, aservice-packagedirectory that contains at least:charts/images/
- If you use
edit conf, setEDITOR; otherwiseviis used
cd proton-cli
go build -o bin/proton-cli ./cmd/proton-cli
./bin/proton-cli --helpMost commands accept these flags:
-l, --log-level: log level, for exampleinfo,debug,error-s, --service-package: path to theservice-packagedirectory, defaultservice-package--service-package-eceph: path to theservice-package-ecephdirectory, defaultservice-package-eceph--cm-direct: enable component-manage direct connection mode
Show one of the built-in templates:
proton-cli get template --type internal
proton-cli get template --type external
proton-cli get template --type perfrecCreate a file from a template:
proton-cli get template --type internal > cluster.yamlTemplate types from the code:
internal: deploy a local clusterexternal: deploy into an existing Kubernetes clusterperfrec: recommended configuration reference
Apply a configuration file:
proton-cli apply -f cluster.yamlApply with an explicit deployment namespace:
proton-cli apply -f cluster.yaml -n protonApply with an explicit service package path:
proton-cli apply \
-f cluster.yaml \
-s /path/to/service-package \
--service-package-eceph /path/to/service-package-ecephCustomize the HTTP/HTTPS ports for the ingress-nginx addon:
cs:
addons:
- ingress-nginx
addonsConfig:
ingress-nginx:
httpPort: 8080
httpsPort: 8443This maps to the controller.containerPort.http/https of the ingress-nginx chart.
Behavior confirmed from the code:
applyreads the YAML file from-fapplyloads package content fromservice-package- if
-nis given, it overrides the namespace from the config file - the
deployfield in the configuration file currently only supportsnamespaceandserviceaccountfields; the oldmodeanddevicespecfields have been removed and will be ignored if still present - if a namespace is chosen,
applyupdates the local file~/.proton-cli.yaml - after a successful apply, the cluster configuration is uploaded into Kubernetes
Read the current configuration from Kubernetes:
proton-cli get confRead from a specific namespace:
proton-cli get conf -n protonget conf reads the configuration from the Kubernetes Secret proton-cli-config.
Open the stored configuration in your editor:
proton-cli edit confEdit a specific namespace:
proton-cli edit conf -n protonImportant:
- this command edits the Secret content directly
- it uses
$EDITOR, orviif$EDITORis unset - the command itself prints:
ONLY change secrets, not apply!
Create a backup:
proton-cli backup create --resources allCreate a backup with an explicit name and retention:
proton-cli backup create \
--backupname nightly-001 \
--resources all \
--ttl 3List backups and inspect logs:
proton-cli backup list
proton-cli backup log
proton-cli backup directory
proton-cli backup scheduleCreate a recovery from a backup:
proton-cli recover create \
--from-backup nightly-001 \
--resources allList recoveries and inspect logs:
proton-cli recover list
proton-cli recover logPrint the built-in manifest template:
proton-cli offline-package plan > manifest.yamlPrint a manifest template for a specific CPU architecture:
proton-cli offline-package plan --architecture arm64 > manifest.yamlBuild an offline package from a manifest:
proton-cli offline-package build --manifest manifest.yamlThe build command writes proton-offline-package.tar in the current directory.
Install an offline package:
proton-cli offline-package install proton-offline-package.tarKeep the extracted working directory:
proton-cli offline-package install proton-offline-package.tar --remainBehavior confirmed from the code:
buildreadsmanifest.yamlby defaultplanprints a generated manifest template to stdout and supports--architectureforamd64orarm64installextracts into.proton-offline-package/and runsinstall.sh
The app subcommand works with a VersionSet manifest to export, import, install, and uninstall an application package.
Export an application offline package:
proton-cli app export \
-f kelu/deploy/release-manifests/0.5.0/kweaver-dip.yaml \
--cache-dir /tmp/cache \
--override-registry swr.cn-east-3.myhuaweicloud.com/kweaver-aiIf you want to set the output filename explicitly:
proton-cli app export \
-f kelu/deploy/release-manifests/0.5.0/kweaver-dip.yaml \
-o kweaver-dip-0.5.0-offline-package.tar \
--cache-dir /tmp/cache \
--override-registry swr.cn-east-3.myhuaweicloud.com/kweaver-aiWhen importing an application offline package, it is recommended to always add --auto so the built-in registry and ChartMuseum of the current Proton cluster are discovered automatically:
proton-cli app import -i kweaver-dip-0.5.0-offline-package.tar --autoOverwrite existing charts if needed:
proton-cli app import -i kweaver-dip-0.5.0-offline-package.tar --auto --forceInstall the application after import:
proton-cli app install \
-f kelu/deploy/release-manifests/0.5.0/kweaver-dip.yaml \
-n kweaverOnly print the install plan without executing it:
proton-cli app install \
-f kelu/deploy/release-manifests/0.5.0/kweaver-dip.yaml \
-n kweaver \
--dry-runInstall with an explicit access address URL:
proton-cli app install \
-f kelu/deploy/release-manifests/0.5.0/kweaver-dip.yaml \
-n kweaver \
--access-address=https://1.1.1.1:8443/Pass shared install values to all charts and use values to control optional dependencies:
proton-cli app install \
-f release-manifests/0.6.0/kweaver-core.yaml \
-n kweaver \
--set auth.enabled=false \
--set businessDomain.enabled=falseUninstall the application:
proton-cli app uninstall \
-f kelu/deploy/release-manifests/0.5.0/kweaver-dip.yaml \
-n kweaverCommon app flags:
app export-f, --manifest: path to the VersionSet manifest-o, --output: output tar filename; if omitted, it is generated from the manifest--cache-dir: image export cache directory, useful when exporting the same image set repeatedly--override-registry: override.image.registryin chart values during export--platform: target export platform, auto-detected from the current host by default--disable-dependencies: only process the root manifest and skip recursive dependencies--ignore-missing-images: continue exporting even if some images cannot be pulledapp import--auto: auto-discover the current Proton cluster registry and ChartMuseum, recommended by default--force: overwrite charts that already exist in ChartMuseum--registry/--chartmuseum-url: specify import targets manually; required if--autois not usedapp install-f, --file: path to the VersionSet manifest used for installation-n, --namespace: target Kubernetes namespace, defaultkweaver--timeout: install timeout for each release, default30m--dry-run: only print the install plan--config: load values from a local config file whenproton-cli-configcannot be read from the cluster--image-registry: override the image registry injected into values during install--set: pass install-time values askey=value; repeatable and supports dotted keys such asauth.enabled=false--access-address: override the access address using a full URL such ashttps://1.1.1.1:8443/; when the port is omitted, defaults are443forhttpsand80forhttp--access-host/--access-port/--access-scheme: legacy split overrides; fields already present in values are preserved unless you explicitly pass these flagsapp uninstall-f, --file: path to the VersionSet manifest used for uninstall-n, --namespace: target Kubernetes namespace, defaultkweaver--timeout: uninstall timeout for each release, default1m--dry-run: only print the uninstall plan
Behavior confirmed from the code:
app exportreuses theoffline-package app exportimplementation, including--cache-dirand--override-registryapp importreuses theoffline-package app importimplementation, and--autois recommended for regular useapp installprints a completion message with the manifest and namespace after successapp installexpands manifest dependencies first, then computes install order usingstage: preanddependsOnapp installmerges cluster config values,--setoverrides, and release-localvaluesbefore calling Helm, with precedencerelease.values > --set > cluster config- The relationship between
--setand manifest YAML is:
dependencies:
- product: isf
version: 0.6.0
manifest: ./isf.yaml
optional: true
defaultEnabled: true
enabledIf: auth.enabled
releases:
mf-model-manager:
chart: mf-model-manager
version: 0.6.0
values:
auth:
enabled: trueMatching command:
proton-cli app install \
-f release-manifests/0.6.0/kweaver-core.yaml \
--set auth.enabled=false \
--set businessDomain.enabled=falseSemantics:
--set auth.enabled=false is injected as a global values override for every chart; if a release defines auth.enabled again under manifest values, that release-local value wins.
dependencies[].enabledIf: auth.enabled reads from the same merged install-time values; when the value is false, the dependency is skipped, and when the value is absent, the planner falls back to defaultEnabled.
dependsOnmeans a ready dependency between releases in the same manifest; the dependency release is installed and waited for first- optional dependencies can be controlled by manifest
enabledIfplus--set, for example:
dependencies:
- product: isf
version: 0.6.0
manifest: ./isf.yaml
defaultEnabled: true
enabledIf: auth.enabledapp uninstallruns in reverse install order
Show the current Kubernetes-related state:
proton-cli kubernetes showUpgrade Calico:
proton-cli kubernetes calico upgrade <version>The command validates the target version against a built-in supported version list before starting the upgrade.
Print version info:
proton-cli versionEnable shell completion:
proton-cli completion bash
proton-cli completion zsh
proton-cli completion fish
proton-cli completion powershellRoot commands exposed by the committed code include:
apply: apply a cluster configuration fileget: show current configuration or built-in templatesedit: edit stored configuration in Kubernetesbackup: create and inspect backupsrecover: create and inspect recoveriesoffline-package: print a manifest template, build packages, install packagesapp: export, import, install, and uninstall VersionSet-based application packageskubernetes: show Kubernetes state and manage Calicocompletion: generate shell completionversion: print version informationprecheck: check node environment before installreset: reset a Proton clustermigrate: migrate components deployed by other programscheck: check Proton runtime healthimages: manage imagespush-images: push images to a repositorypush-charts: push charts to a repositorypackage: packaging-related commandscomponent: data component managementdelete-images: delete images to reclaim disk spaceserver: run the CLI server modealpha: experimental commands
Use help on demand:
proton-cli --help
proton-cli <command> --helpThe committed code uses these default locations and names:
- Kubernetes client config:
~/.kube/config - local Proton CLI environment file:
~/.proton-cli.yaml - default Proton CLI config namespace:
proton - default Proton resource namespace:
resource - stored cluster configuration Secret:
proton-cli-config - cluster configuration key inside the Secret:
ClusterConfiguration
In practice:
get confandedit confread fromproton-cli-configapplymay update~/.proton-cli.yaml- namespace-sensitive commands usually default to the namespace recorded in
~/.proton-cli.yaml, orprotonif the file does not exist
- This README intentionally does not assume the repository already contains prebuilt
service-packageassets. - If you are unsure about a command, prefer the built-in help output over older scripts or placeholders.