Compute
Note
Red Cloud 2 is currently in beta testing and not available to all users. If you are not a Red Cloud 2 beta tester, use the production Red Cloud instead. This Red Cloud 2 documentation is still under development.
Beta testers: Report all problems to CAC Help. Please specify Red Cloud 2 when reporting problems. Thank you!
You can launch virtual servers ("instance") of various configurations ("flavors") running Linux or Windows operating systems ("images").
Flavors
Flavors are hardware configurations of virtual machines ("instances") you can create in Red Cloud. Each flavor consists of a number of vCPUs (1 vCPU == physical CPU core), amount of RAM, and GPU (for GPU flavors).
The available VM configurations are:
Flavor | vCPUs | GPUs | RAM |
---|---|---|---|
c1.m8 | 1 | None | 8 GB |
c2.m16 | 2 | None | 16 GB |
c4.m32 | 4 | None | 32 GB |
c8.m64 | 8 | None | 64 GB |
c14.m112 | 14 | None | 112 GB |
c20.m160 | 20 | None | 160 GB |
c28.m224 | 28 | None | 224 GB |
c64.m120 | 64 | None | 120 GB |
c128.m240 | 128 | None | 240 GB |
*c4.t1.m20 | 4 | 1 Nvidia T4 | 20 GB |
*c14.g1.m60 | 14 | 1 Nvidia V100 | 60 GB |
*c16.a1.m55 | 16 | 1 Nvidia A100 | 55 GB |
* denotes GPU flavors
Images
An image contains a Linux or Windows operating system. When an instance is created, a boot volume is cloned from the specified image and the virtual machine is booted from the volume.
Supported Images
CAC supports the following operating systems in Red Cloud via these official images:
Image Name | Operating System | Initial User Name |
---|---|---|
rocky-8.9 | Rocky Linux 8 | rocky |
rocky-9.3 | Rocky Linux 9 | rocky |
ubuntu-20.04-LTS | Ubuntu Linux 20.04 LTS | ubuntu |
ubuntu-22.04-LTS | Ubuntu Linux 22.04 LTS | ubuntu |
windows-image | Windows version | administrator |
Image Attributes
An image has the following attributes. You can set these attributes when creating an image or modifying them afterwards.
- Minimum Disk: (optional) You can set the minimum disk requirement to the size of your image or larger.
- Minimum RAM: (optional) You can set the minimum RAM requirement for the instance that will use the image.
- Visibility: Set to
Private
to make the image visible only to your project. Set toShared
so the image can be shared with another project. - Protected: Set to
Yes
to prevent an image from being unintentially deleted or modified.
Upload an Image
Red Cloud uses the KVM hypervisor to run instances. You can upload a custom disk image in the RAW format containing an OS that can boot KVM virtual machines.
Create an Image from Instance
You can create an image from an existing instance using the Openstack CLI client.
Note
To prevent creating an image from a corrupted file system and make sure all cached data have been flushed back to the disk, shutdown the instance before creating the image.
Create an Image from Volume
You can also create an image from an existing volume in Red Cloud that contains an operating system.
Note
To prevent creating an image from a corrupted file system and make sure all cached data have been flushed back to the disk, shutdown the instance to which the volume is attached before creating the image.
Delete an Image
Download an Image
Using the Openstack CLI client, you can download an image to your local computer for backup or making further customizations.
Share an Image
Supported images are public and accessible by all projects. Images created by you belong to your project and are visible to users in your project. However, you can share an image with another project using the Openstack CLI client.
Keypairs
SSH keypairs provide secure and passwordless access to your instance. A keypair is made up of a private key that only you know, and a public key to be installed on systems to which you wish to authentiate.
Before creating an instance, upload at least 1 public key in your user account. You should specify a public key to be installed when creating an instance so you can use the matching private key to gain initial access. You can only specify a public key to be installed at the time of instance creation, not afterwards.
There are 2 ways to upload a public key to Red Cloud:
Import a Public Key
If you already have an existing SSH keypair that you want to use in Red Cloud, you can import the public key into your user account.
Create a New Keypair
The Horizon web console or CLI client can create a new SSH keypair. The public key will be automatically saved in your user account.
Note:
- The upload public keys belong to your user account. They are not visible to other users in your project.
- If your user account belongs to multiple projects, you can use the public keys you uploaded to create a new instance in any project you belong.
- Keep the private key in a safe location on your computer and is readable only to you, i.e. mode
0600
. Use thechmod 0600 <private key>
command if it is not. Moreoever, most ssh clients will refuse to use a private key in a parent directory that's writable to users other than the owner.
List Public Keys
Delete a Public Key
Use the Matching Private Key to Log In
In Linux instances, the pair's public key is installed into the root (or ubuntu user) account at the time of its creation, allowing you to login simply by providing the private key. For Windows instances, you will need to provide the private key to the Red Cloud web interface in order to fetch a valid password for logging in to the instance's administrator account.
Key pairs are created or imported per user within a project, so other project members will not be able to use the key pairs you create. You will also not be able to use a given key pair in multiple accounts unless you import it into each account.
Protect Your Private Key with a Passphrase
You should use a passphrase to protect the private key when creating a key pair to prevent unauthroized access to the private key. When a passphrase-protected private key is used, the ssh client will prompt you for the passphrase.
If you need to use a passphrase-protected private key in an automated workflow, learn to use ssh-agent
.
Create a New Keypair with Passphrase-protected Private Key
To create a passphrase-protected keypair, enter a terminal on your operating system. Navigate to a directory where you wish to store the key pair, using cd on a Mac or Linux (see Linux Tutorial). Then, enter this command:
ssh-keygen -t ed25519 -f cloud.key
It will then prompt you to enter a passphrase. Type a secure passphrase and hit enter. This generates a passphrase-protected private key (cloud.key) and a public key (cloud.key.pub). You can now [upload the public key].
Encrypt an Existing Private Key
If you have an existing keypair and just want to encrypt the private key (or change the passphrase), use this command: ssh-keygen -f <private key file> -p
. Enter the passphrase when prompted.
Instance States
After an instance is launched, it can be in one of the server states. You change the state of the instance by making a selection from a drop-down menu under the Actions column. Three significant actions to know about are "Resize Instance", "Shelve Instance", and "Unshelve Instance"; these are described below.
Allowed actions—i.e., the ones that appear in the drop-down menu — depend on the current state of the instance. For example, the "Resize Instance" action is allowed only for instances that are in the Active state. The figure below shows the possible states in OpenStack and the transitions that are allowed in each case.
Source: OpenStack
When your instance has been created, the "Instances" tab will list its current state (as well as the state of your other instances) under the "Status" column. In the rightmost column called "Actions," you will see a drop-down menu for each instance. This menu lists the actions that are allowed for the given instance. Below we describe the typical states and list some of the common actions you will use to change instance state.
Important States
Note: The only state where you are NOT being charged for computational resources is Shelved Offloaded
- Active: Instance is active, you can connect to it and are being billed for the computational resources dedicated to it.
- Shelved Offloaded: The Instance is not resident on the compute host; this means you will not be billed for computational resources while the Instance is in this state (although you will be charged for the storage required to hold it). You can restart the server when you need it again.
- Paused: In this state, the server state is preserved in RAM, but operations have been stopped and will resume when instructed. You are still being charged for the computational resources dedicated to the Instance.
- Suspended: Instance state has been stored on disk, including the contents of its RAM. With Red Cloud's configuration, you are still paying for the computational resources you were using.
- Stopped: This is like powering off a server; in this state, you are still being billed for the computational resources.
- Resized: At this time, the Instance is being Resized to a different flavor—that is, a different allocation of vCPUs and RAM—and is not contactable.
Operations to transition between states
These options are available, subject to the current state of the Instances, from the dropdown available in the "Actions" column of the Instances page. Remember Shelving is the only operation that will free up the computational resources used by your instance and stop your project from being charged for them!
- Pause Instance: Put instance into the Paused state.
- Suspend Instance: Put instance into the Suspended state.
- Shelve Instance: This is how you put the Instance aside so that you are no longer charged for computational resources being used; your Instance will still be visible on the Instances page with Status Shelved Offloaded. To get the Instance back up and running, select "Unshelve" from the actions menu.
- Resize Instance: Allows you to select a new Instance flavor. After you have selected it, Status will be shown as "Confirm or Revert Resize/Migrate" you will have to confirm in the Actions dropdown, after which the Instance will be taken down and then come back up with the new computational resources available to it. On Linux you can check with commands such as
lscpu
orcat /proc/cpuinfo
; on Windows you can, for example, use the "Performance" tab of Task Manager to see the available cores. - Resume Instance: Will restart the Instance from states of Paused and Suspended
- Soft Reboot Instance or Hard Reboot Instance: Reboot your instance, either through issuing a command to the operation system ("Soft") or as if power-cycling the Instance ("Hard")
- Shut Off Instance: Like powering off the Instance, an action you will need to confirm in a pop-up window. The Status shown will be Shutoff and you will need to "Restart" to get it back. Additionally, if you are logged into an instance and use an OS command such as
sudo poweroff
orsudo init
, the Instances page will show the same status and you will need to select "Restart" to get the Instance back up and running. In this state, you are still being charged for computational resources.