Compute Service
Introduction
Switch Cloud Compute provides on-demand virtual machines (instances) via OpenStack. By activating the service in a project, you gain access to a linked OpenStack project that’s automatically synchronised with the Switch Cloud Portal. Most instance management tasks, such as launching, resizing, or shelving VMs, take place in the OpenStack Horizon Dashboard or via OpenStack CLI. However, the Switch Cloud Portal offers features for:
- Adding or removing project members in OpenStack.
- Generating application credentials for automation or service integrations.
- Regenerating your OpenStack account password.
- Viewing basic information about your project networks.
Provision and Use the Compute Service
After activating the Compute service from your project’s page, you will be redirected to the Compute service page. Here you can:
- Access the Horizon Dashboard.
- Manage membership for the OpenStack project.
- Create shared application credentials.
- View configured networks.
- Rename or delete the Compute project.
Important
When you delete the Compute project, the Compute service is deactivated and all associated resources are removed. You can always reactivate the service from the project’s main page, but any deleted resources are not recoverable.
Manage Memberships
From the Compute service page, you can add or remove members in the linked OpenStack project. This is a prerequisite for accessing your project via the Horizon Dashboard or OpenStack CLI. When you add a member (including yourself):
- The Portal checks if that user already has an OpenStack account.
- If not, a new OpenStack account is created automatically.
- The user receives a pop-up (if it’s you) or an email notification (if it’s someone else) indicating that an OpenStack account has been created.
- They can then visit their Profile page in the Portal to regenerate a password (for the Horizon Dashboard login or CLI usage).
Adding a Member
Important
When adding members, you can choose from a pool of users, who are either part of the corresponding project or the Organisation. Click the email field to view the list of eligible users.
- In the Compute service page, click Add member.
- Fill in the user’s email address.
- Click Add to send a request for Compute membership.
Removing a Member
- Locate the user in the Members list.
- Click Remove to revoke their access to the OpenStack project.
- Confirm the removal when prompted.
Access the Horizon Dashboard
Many day-to-day operations (such as creating instances, configuring networks, and assigning floating IPs) are performed in the OpenStack Horizon Dashboard.
You can access your project in the Horizon Dashboard either from the Compute service page, clicking Dashboard, or from the project page by clicking Dashboard in the Compute card. The Portal stores your credentials and authenticates you automatically. If you visit the Horizon Dashboard outside the Portal you can still sign in using your OpenStack credentials (username and password). If you have never set an OpenStack password, or if you forgot it, you can regenerate it.
Once logged in, you can fully manage your virtual machines, volumes, security groups, and more through the Horizon Dashboard’s graphical interface.
To learn how to use Compute features visit Switch Cloud Compute.
Create Shared Application Credentials
Shared application credentials allow multiple users or automated systems to authenticate and interact with Compute resources without using personal user credentials. These credentials are ideal for automation, CI/CD pipelines, and service integrations.
- On the Compute service page, click Create credential.
- Provide a Name and optional Expires at date.
- Save the Secret Key (it will not be shown again).
- Click the eye icon in the credentials list to see environment variables.
- Export these variables in your CLI session or CI/CD environment.
Access Compute Service via OpenStack CLI or OpenTofu
Switch Cloud supports two primary tools for managing Compute resources:
- OpenStack CLI: A command-line interface for interacting with OpenStack services.
- OpenTofu: An open-source infrastructure-as-code tool compatible with Terraform for provisioning and managing cloud resources.
Both tools require the configuration of environment variables for authentication. Once you have created a shared application credential, you must export the following variables in your CLI session or CI/CD environment:
export OS_AUTH_TYPE=v3applicationcredential
export OS_AUTH_URL=https://identity.api.zhw.cloud.switch.ch/v3
export OS_REGION_NAME=zhw
export OS_APPLICATION_CREDENTIAL_ID=<your_application_credential_id>
export OS_APPLICATION_CREDENTIAL_SECRET=<your_application_credential_secret>
By setting up these variables, you can now use both OpenStack CLI and OpenTofu to interact with Switch Cloud Compute resources.
Regenerate your OpenStack Account Password
If you need to update your OpenStack password (for the Horizon Dashboard or OpenStack CLI):
- Click your user name in the top-right corner of the Portal.
- Select Profile from the dropdown menu.
- Click Regenerate Password and confirm.
- Copy the newly generated password and store it securely.
View Project Networks
The Networks section on the Compute service page displays a list of configured networks for the OpenStack project. This information is read-only in the Portal. Any further network configuration, like creating networks, subnets, or routers, should be done in the Horizon Dashboard or using OpenStack CLI.
Edit the Project Name
To rename your Compute project:
- Click Edit in the top-right corner of the Compute service page.
- Enter the new project Name.
- Click Save to finalise.
Delete the Compute Project
When you no longer need the Compute service:
- Click Delete in the top-right corner of the Compute service page.
- Type the project name to confirm the deletion.
- Click Delete Project and Associated Resources.
Warning
Deleting the service will irreversibly delete all associated resources.