Learn about the No_Ops CLI
This page is mainly for power users, if you just want to deploy an application, see Add the CLI to your pipeline.
The main use of the CLI is to:
- Allow power users to interact with the No_Ops platform from the command line
- Automate deployments to an environment using GitHub Actions (see Add the CLI to your pipeline)
Installation
You can install the CLI directly from our GitHub releases page.
Usage
You can get a full list of commands by running ops --help
We'll go over some basic commands to get you started.
Login
Authenticates the CLI with your No_Ops account
ops login
Select an organisation
Sets the current organisation for the CLI
ops orgs list
ops settings set orgs [org-code]
This
this
is a special keyword that accesses a specified noops.yaml
configuration file.
Create a new config using a noops.yaml
file:
ops this create -f=[noops.yaml directory]
Update a config with changes in your noops.yaml
file to the next patch version:
ops this update -f=[noops.yaml directory] --next
Deployments
ops deploy apply [env-code] [config-code] [version-number] [flags]
API keys
If you lose your API key it's gone forever. You'll need to create a new one and update your GitHub secrets.
ops keys create
If you've lost your key and need to generate a new one, you can use the following command:
ops keys update [key-id]
Container repository (ECR)
ops container-repository list [compute-code]
ops container-repository create [compute-code] [new-ecr-repo-code]
ops container-repository delete [compute-code] [ecr-repo-code]
You can now see how to add the CLI to your pipeline.