Accessing CAEPE with the CLI↑
This guide shows you how to manage CAEPE resources in a terminal using the CAEPE CLI tool.
Authentication and configuration↑
There are two options for authenticating and configuring the CAEPE CLI tool:
- Browser flow is typically the most convenient option for end users of CAEPE.
- Service user flow, typically used by non-human users of CAEPE, such as CI jobs.
Browser flow↑
To use the browser flow authentication option, you need to use the organization name for your CAEPE instance, which is typically the same as the sub-domain name of your CAEPE instance.
Pass that value to the --organization
argument of the caepe-cli
command using the login
sub-command.
This opens a browser window and takes you through a typically login flow. When that is successful, the CLI saves an authentication token into a .caepe/auth file in your home directory. The CLI uses this token for all following requests to your CAEPE instance.
Service user flow↑
Create a service account user and copy the client ID and secret values. Then use the caepe-cli
command with the login
sub-command with the --organization
, passing the --client-id
, and --client-secret
values as environment variables.
CAEPE_CLIENT_ID={CLIENT_ID} CAEPE_CLIENT_SECRET={CLIENT_SECRET} caepe-cli --organization {ORGANIZATION} login
Managing resources↑
To use the CAEPE CLI tool, use the command caepe
followed by the resource you want to manage. The available resources are the following.
cluster
↑
You can create, list, update and delete clusters using the CLI. You can also fetch the namespaces and persistent volumes of clusters.
For more information use the caepe cluster --help
command or read the autogenerated documentation.
deployment
↑
You can create, list, update and delete deployments using the CLI. You can also rollout and get the status of deployment rollouts.
For more information use the caepe deployment --help
command or read the autogenerated documentation.
smoketest
↑
You can create, list, update and delete smoke tests using the CLI. You can also execute and callback smoke test jobs.
For more information use the caepe smoketest --help
command or read the autogenerated documentation.
snapshot
↑
snapshot definition
↑
You can create, list, update and delete snapshot definitions using the CLI.
For more information use the caepe snapshot definition --help
command or read the autogenerated documentation.
snapshot deployment
↑
You can create, list, and delete snapshot deployments using the CLI.
For more information use the caepe snapshot deployment --help
command or read the autogenerated documentation.
snapshot instance
↑
You can create, list, and delete snapshot instances using the CLI.
For more information use the caepe snapshot instance --help
command or read the autogenerated documentation.
Other arguments↑
--debug
: To debug commands, use the--debug
argument.
For example, to debug what happens when creating a deployment:
caepe-cli --debug deployment create --deploymentPost.application warehouse --deploymentPost.cluster ware-clusters --deploymentPost.name warehouse --organization biqmind --deploymentPost.release.branch main --deploymentPost.release.message ware-app-deployment --hostname demo.biqmind.sh --deploymentPost.namespace warehouse --scheme https
--dry-run
: To see the result of running commands without executing them, use the--dry-run
argument.
For example, to debug what happens when creating a deployment:
caepe-cli --dry-run deployment create --deploymentPost.application warehouse --deploymentPost.cluster ware-clusters --deploymentPost.name warehouse --organization biqmind --deploymentPost.release.branch main --deploymentPost.release.message ware-app-deployment --hostname demo.biqmind.sh --deploymentPost.namespace warehouse --scheme https