Cosmocloud CLI is a command line interface for Cosmocloud Deploy. It allows you to interact with Cosmocloud Deploy from the command line.
To install the Cosmocloud CLI, run the following command:
pip install cosmocloud
Here are some commands you can use for managing your App Services in Cosmocloud Deploy -
- Login
- List Organisations
- List App Services in an Organisation
- Get list of Releases for App Service
- Release a new version for an App Service
- Promote a Release to another Environment
To log in to your Cosmocloud account, use the following command:
cosmocloud login --username <username> --password <password>
If successful, you should see a meesage such as -
Login successful!
If you see any other error messages, please check the message and follow the instructions.
To list the organisations you have access to, use the following command:
cosmocloud list-organisations
This will return a list of organisations you have access to, along with their active status, such as -
TestOrg : ACTIVE
AnotherOrg : ACTIVE
SampleBusiness : INACTIVE
To list the app services in a specific organisation, use the following command:
cosmocloud list-app-services --organisation <organisation_name>
This will return a list of app services in the specified organisation, such as -
AppService1 : ACTIVE
AppService2 : ACTIVE
AppService3 : INACTIVE
To get a list of releases for a specific app service, use the following command:
cosmocloud list-releases --organisation <organisation_name> --app-service <app_service_name>
To release a new version for an app service, use the following command:
cosmocloud release --organisation <organisation_name> --app-service <app_service_name> --version <version_number> --environment <environment_name>
You can only releases a version once for an app service. If you try to release the same version again, you will see an error message.
You can promote an existing release to another environment, by using the promote command.
To promote a release to another environment, use the following command:
cosmocloud promote --organisation <organisation_name> --app-service <app_service_name> --version <version_number> --environment <environment_name>
If there is no version existing already, you will see an error message.
If you need help or support, please contact us at contact@cosmocloud.io.
You can also join our Cosmocloud Discord Server for instant support.