Self-Managed Quali CloudShell
Torque supports connecting Quali CloudShell as an asset repository. CloudShell blueprints are treated as assets in Torque and can be referenced using the 'CloudShell' grain type.
Prerequisites
- CloudShell user with at least "External Extended" permissions in the CloudShell Domains that you want to use.
- A self-hosted Torque agent that can reach the Sandbox Api of your CloudShell instance.
- CloudShell version 2021.2 and higher.
Configuration
- Register CloudShell as a Repository Provider via Torque REST API. If the API call is successful it will return a GUID representing the ID of the new repository provider. Save this ID for the next step.
curl -L 'https://portal.qtorque.io/api/settings/repository_providers' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"name": "<PROVIDER_NAME>",
"type": "CloudShell",
"details": {
"base_url": "<CLOUDSHELL_SERVER_URL>:<SANDBOX_API_PORT>",
"username": "<CLOUDSHELL_USER>",
"password": "<CLOUDSHELL_PASSWORD>",
"domain": "<CLOUDSHELL_DOMAIN>",
"token_ttl": 300
},
"repos": []
}'
- Replace <TOKEN> with a valid Torque token with Torque Admin permissions
- Replace <PROVIDER_NAME> with a display name for the CloudShell instance. Example: "CloudShell_Dev"
- Replace <CLOUDSHELL_SERVER_URL> with the IP or DNS of your CloudShell instance. The CloudShell instance needs to be reachable from at least one of your self-hosted Torque agents. Torque will automatically select an agent for communicating with CloudShell
- Replace <SANDBOX_API_PORT> with the port of the CloudShell Sandbox API. The default port is 82
- Replace <CLOUDSHELL_USER> and <CLOUDSHELL_PASSWORD> with a valid CloudShell username and password
- Replace <CLOUDSHELL_DOMAIN> with the CloudShell Domain that will be used as the default Domain. If needed you can later set a different Domain per each space
- [Optional] You can also set a value for the "token_ttl", this property defines the expiration in seconds of the token received from the CloudShell Sandbox API . Default: 300 sec
- Connect the repository as an asset repository to a space.
curl -L 'https://portal.qtorque.io/api/spaces/<SPACE_NAME>/repositories/cloudshell' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"provider_id": "<PROVIDER_ID>",
"repository_url": "<CLOUDSHELL_SERVER_URL>:<SANDBOX_API_PORT>",
"repository_name": "<REPOSITORY_NAME>",
"branch": "<CLOUDSHELL_DOMAIN>"
}'
- Replace <SPACE_NAME> with the relevant Torque space
- Replace <TOKEN> with a valid Torque token with Torque Admin permissions
- Replace <PROVIDER_ID> with the GUID received from the API in step #1
- Replace <CLOUDSHELL_SERVER_URL> with the IP or DNS of your CloudShell instance.
- Replace <SANDBOX_API_PORT>> with the port of the CloudShell Sandbox API. The default port is 82
- Replace <REPOSITORY_NAME> with the name you would like to assign to this repository. This name will be used in Torque Blueprints to reference this repo
- [Optional] Replace <CLOUDSHELL_DOMAIN> with the domain name to use for this repository. If omitted, the default Domain name provided in step #1 will be used. Note: The user provided in step #1 must have correct access to the provided Domain.
- Discover suitable assets. For details, see Discover Your Assets.