ArlonCTL
Arlonctl is a command line utility that enables you to operate with the Arlon profile engine built into PMK. For context around Arlon capabilities built into PMK, please first read Profile Engine with Arlon
Arlonctl extends the open source Arlon CLI with key additional features context management, using the PMK environment credentials provided by the PMK administrator.
Installation
You can download the arlonctl binary using the following command:
bash <(curl -sL https://arlon-assets.s3.us-west-1.amazonaws.com/arlonCTL/5.6/arlonctl_setup)Operating Systems Supported :
- Linux (amd64)
- MacOS (amd64,arm64)
Note: arlonctl command may run into errors when the KUBECONFIG environment variable is set to point to some Kubernetes cluster other than the Arlon management cluster (Platform9 DU). The arlonctl command internally uses the KUBECONFIG environment variable (and sets it to point to the Platform9 management plane DU's kubeconfig. The file resides in the location ~/.config/arlon/context.config). If the user has set this variable to a different cluster's kubeconfig file, arlonctl will error out. As a workaround, unset the KUBECONFIG environment variable.
List of commands
arlonctl Usage: arlonctl [flags] arlonctl [command]Available Commands: bundle Manage configuration bundles cloudprovider Lists out the cloud providers of the DU cluster Manage clusters clusterspec Manage cluster specifications completion Generate the autocompletion script for the specified shell context Manage contexts controller Run the Arlon controller help Help about any command listclusters List the clusters registered with ArgoCD profile Manage configuration profiles verify Verify if arlonctl can be runFlags: -h, --help help for arlonctlUse "arlonctl [command] --help" for more information about a command.verify
This command is used to verify if all the optional and mandatory tools/requirements to run arlonctl are present.
(Mandatory Requirements : kubectl Optional Requirements: argocd CLI, git)
Example:
arlonctl verify ✓ Successfully verified kubectl status✓ [Optional] Successfully verified git status! [Optional] Error while verifying Argocd CLI status: install argocd v2.2.x to run arlonctl✓ All mandatory requirements are installedcontext
This command allows user to create and switch between two or more DUs / contexts. It makes it easy for the user to manage multiple DUs. All the contexts which have been added by the user are stored in a contexts.json file which is at ~/.config/arlon .Sensitive credentials such as passwords are stored in the JSON file after being encrypted. The kubeconfig of the current DU as well is stored in the same location with the name context.config. The logs for all the arlonctl commands are stored in ~/.config/arlon/logs.txt
arlonctl context Usage: arlonctl context [flags] arlonctl context [command]Available Commands: create Create a new context delete Delete the existing context list Lists the existing contexts refresh Refresh the tokens in DU config and argo config switch Switch between the contexts update updates the existing contextFlags: -h, --help help for contextUse "arlonctl context [command] --help" for more information about a command.create
This command creates a new context, which the user can then work with. The current context will be set to the newly created context using this command. To create a new context, the user needs to add their DU-FQDN, their username and password.
Usage:
arlonctl context create --help Create or add a new context to the already existing contexts and the current context will be set to the recently created contextUsage: arlonctl context create context-name [flags]Examples:arlonctl context create context-name [flags]Flags: -f, --fqdn string sets the fqdn -h, --help help for create -p, --password string sets password -u, --username string sets usernameExample:
arlonctl context create ctx2 FQDN: pf9arlon-kubedu.platform9.horseUsername: user@platform9.comPassword: *******Successfully authenticated with DUSuccessfully authenticated with ArgoCDSuccessfully added and set to ctx2 contextswitch
This command allows the user to switch between multiple contexts.
Example:
arlonctl context switch arlonctl-ctxContext found with the name: arlonctl-ctxSuccessfully switched the DU Config fileSuccessfully switched the ArgoCD configSuccessfully switched to arlonctl-ctx contextlist
Lists the contexts present. It also mentions the current context of the user.
Example:
arlonctl context list NAME DU_FQDN USERNAME CURRENTCONTEXTnew2 arlon-kubedu-3.platform9.horse user@platform9.com Falsearlonctl-ctx pf9arlon-kubedu.platform9.horse user@platform9.com Falsectx2 pf9arlon-kubedu.platform9.horse user@platform9.com Truedelete
Deletes the context provided by the user.
Example:
arlonctl context delete new2Context deleted Successfullyrefresh
Refreshes the x-auth token of the DU and the argocd token after it expires.
Example:
arlonctl context refreshSuccessfully refreshed the DU config fileSuccessfully refreshed the Argo config filecloud provider
This command allows user to list the cloud providers present in the DU. Example:
arlonctl cloudprovider listNAME CLOUDPROVIDERaws 44317bcb8b024041846dc2cb36a92352-awsaws-demo 44317bcb8b024041846dc2cb36a92352-aws-demobundle
This command is used to manage the bundles which together form a profile which is then used to deploy a cluster. This command is inherited from the arlon OSS CLI. the available commands in arlonctl bundle are :
arlonctl bundle Manage configuration bundlesUsage: arlonctl bundle [flags] arlonctl bundle [command]Available Commands: create Create configuration bundle delete Delete configuration bundle dump Dump content of static configuration bundle list List configuration bundles update update configuration bundleFlags: -h, --help help for bundleUse "arlonctl bundle [command] --help" for more information about a command.profile
arlonctl profile is used to create profiles which in turn will be used to deploy the clusters in following steps. This is a command which has been inherited from arlon CLI.
arlonctl profile Usage: arlonctl profile [flags] arlonctl profile [command]Available Commands: create Create profile delete Delete profile list List configuration profiles update Update profileFlags: -h, --help help for profileUse "arlonctl profile [command] --help" for more information about a command.clusterspec
arlonctl clusterspec is used to create the specs with which the user wants to deploy the cluster. User can use the cluster specifications which they created while deploying the cluster. This command has been inherited from Arlon CLI.
$ arlonctl clusterspec --helpManage cluster specificationsUsage: arlonctl clusterspec [flags] arlonctl clusterspec [command]Available Commands: create Create clusterspec delete Delete clusterspec list List configuration clusterspecs update Update clusterspecFlags: -h, --help help for clusterspecUse "arlonctl clusterspec [command] --help" for more information about a command.cluster
arlonctl cluster command is used to manage the clusters. We can deploy the clusters using the available command in the arlonctl cluster. This command as well is inherited from arlon OSS CLI and works same as in Arlon CLI
$ arlonctl cluster --helpManage clustersUsage: arlonctl cluster [flags] arlonctl cluster [command]Available Commands: deploy deploy new cluster list List the clusters managed by Arlon manage manage external cluster with specified profile unmanage unmanage external cluster update update existing clusterFlags: -h, --help help for clusterUse "arlonctl cluster [command] --help" for more information about a command.