Skip to content

Instance Setup and Tutorial

Instances are the basic unit of compute on cloud.rc. Requesting an instance involves a number of steps, and requires that a Network has already been setup, along with certain Security settings and features. It is also possible to attach persistent reusable Volumes to instances.

Important

If you are viewing this page as part of the cloud.rc tutorial, please follow the steps in order from top to bottom. Ignore any sections on deleting or releasing resources unless you need to correct a mistake.

Note

Virtual machines are disposable! If you get stuck at any point, or things don't seem like they're working as expected, etc., feel free to delete the instance and start over.

Creating an Instance

Creating an instance is possibly a step you'll perform often, depending on your workflow. There are many smaller steps to create an instance, so please take care to check all the fields when you create an instance.

These instructions require that you've set up a Network and followed all of the instructions on the linked page. You should have a Network, Subnet, Router and Floating IP. You will also need to setup a Key Pair and an SSH Security Group.

  1. Click "Compute" in the left-hand navigation pane to open the fold-out menu.

    !cloud.rc Overview page.

  2. Click "Instances".

    !cloud.rc Instances page. The Instances table is empty.

  3. Click "Launch Instance" to open a dialog box.

  4. Fill out the dialog box completely. There are several tabs that will need to be completed.

    !Launch Instance dialog. The dialog form has multiple tabs on the left menu. The Details tab is selected. The Details dialog form is empty except the Instance Name is set to my_instance.

Details Tab

  1. Enter an "Instance Name". See Naming Conventions.
  2. Enter a "Description".
  3. Select "nova" in the "Availability Zone" drop down box.
  4. Select "1" in the "Count" field.
  5. Click "Next >" to move to the "Source" tab.

Source Tab

Sources determine what operating system or pre-defined image will be used as the starting point for your operating system (OS).

  1. Select "Image" in the "Select Boot Source" drop down box.
  2. Select "Yes" under "Create New Volume".
  3. Choose an appropriate "Volume Size" in GB. Note that for many single-use instances, 20 GB is more than enough. If you need more because you have persistent data, please create a persistent volume<volume_setup_basic>.
  4. Select "Yes" or "No" under "Delete Volume on Instance Delete"

    1. "Yes" is a good choice if you don't care about reusing the OS.
    2. "No" is a good choice if the OS volume will be reused.

    !Launch Instance dialog. The Source tab is selected.

  5. Pick an image from the list under the "Available" section.

    1. Use the search box to help find the image that best suits your research needs.
    2. When you find the best image, click the button with an up arrow next to the image.
    3. The image will move to the "Allocated" section above the "Available" section.

    !Launch Instance dialog. The Source tab is selected. An Ubuntu 20.04 image has been moved up from the available images list to the allocated images list.

  6. Click "Next >" to move to the "Flavor" tab.

Flavor Tab

Flavors determine what hardware will be available to your instance, including cpus, memory and gpus.

  1. Pick an instance flavor form the list under the "Available" section.

    1. Use the search box to help find the flavor that best suits your needs.
    2. When you find the best flavor, click the button with an up arrow next to the flavor.
    3. The flavor will move to the "Allocated" section above the "Available" section.

    !Launch Instance dialog. The Flavor tab is selected.

  2. Click "Next >" to move to the "Networks" tab.

Networks Tab

Networks determine how your instance will talk to the internet and other instances. If you are following along with the tutorial, you should already have a Network set up. See Network for more information.

  1. Pick a network from the list under the "Available' section.

    1. A Network may already be picked in the "Allocated" section. If this is not the correct Network, use the down arrow next to it to remove it from the "Allocated" section. If the Network is correct, skip (ii.) through (iv.).
    2. Use the search box to help find the Network that best suits your needs.
    3. When you find the best Network, click the button with an up arrow next to the Network.
    4. The Network will move to the "Allocated" section above the "available" section.

    !Launch Instance dialog. The Networks tab is selected.

  2. Click "Next >" to move to the "Network Ports" tab.

Network Ports Tab

  1. Leave this tab empty.

    !Launch Instance dialog. The Network Ports tab is selected. The dialog form has been left empty.

  2. Click "Next >" to move to the "Security Groups" tab.

Security Groups Tab

Security Groups allow for fine-grained control over external access to your instance. If you are following along with the tutorial, you should already have an "ssh" Security Group set up. For more information see Creating a Security Group for more information.

  1. Pick the "ssh" Security Group from the "Available" section by pressing the up arrow next to it.
  2. The "default" Security Group should already be in the "Allocated" section.

    !Launch Instance dialog. The Security Groups tab is selected. The ssh security group has been moved up from the available list to the allocated list.

  3. Click "Next >" to move to the "Key Pair" tab.

Key Pair Tab

Key Pairs allow individual access rights to the instance via SSH. If you are following along with the tutorial, you should already have a key pair set up. For more information see Creating a Key Pair.

  1. Pick one or more key pairs from the list under the "Available" section.

    1. A Key Pair may already be picked in the "Allocated" section. If this is not the correct "Key Pair", use the down arrow next to it to remove it form the "Allocated" section. If the Key Pair is correct, skip (ii.) through (iv.).
    2. Use the search box to help find the Key Pair that best suits your needs.
    3. When you find the best Key Pair(s), click the button with an up arrow next to the Key Pair(s).
    4. The Key Pair(s) will move to the "Allocated" section above the "Available" section.

    !Launch Instance dialog. The Key Pair tab is selected. The Key Pair my_key_pair has been moved up from the available list to the allocated list.

  2. Click "Next >" to move to the "Configuration" tab.

Configuration Tab

  1. Skip this tab.
  2. Click "Next >" to move to the "Server Groups" tab.

Server Groups Tab

  1. Skip this tab.
  2. Click "Next >" to move to the "Scheduler Hints" tab.

Scheduler Hints Tab

  1. Skip this tab.
  2. Click "Next >" to move to the "Metadata" tab.

Metadata Tab

  1. Skip this tab.

Launching the Instance

Click "Launch Instance" to launch the instance.

  1. Redirects to the "Instances" page.
  2. There should be a new entry in the table.
  3. The instance will take some time to build and boot. When the Status column entry says "Active" please move to the next steps.

    !The task column of the Instances table reads none indicating the instance is ready for use.

Associate a Floating IP

If you are following along with the tutorial, you should already have a floating IP set up.

  1. In the "Actions" column entry, click the drop down triangle and select "Associate Floating IP".
  2. A dialog box will open.
  3. Select an IP address in the "IP Address" drop down box.
  4. Select a port in the "Port to be associated" drop down box.
  5. Click "Associate" to return to the "Instances" page and associate the selected IP.

    !Manage Floating IP Associations dialog. The form is filled out. The Floating IP Address created earlier is selected under IP Address. The port from the Instance my_instance is selected under Port to be Associated.

Instances Failing to Start

There are a number of reasons an instance might fail. We are able to provide direct support for instances which fail to start for reasons outside the instance itself. To help us correct the error, you'll need to have information from the instance page. Below is an example of a failed instance in the "Instances" table, helpfully named failed_instance. Note the "Error" label under the "Status" column.

!failed instance in instances table

In the "Instances" table, click the name of your failed instance. You should see a page like below, with some basic metadata about the instance as well as a "Fault" section.

!failed instance overview page showing id and fault reason

We will need to "ID" and the reason for the fault. In this case, the instance failed because it could not allocate a GPU, as all GPUs were allocated at the time of its creation. It is not possible to diagnose the specifics without consulting us, so please feel free to contact Support.

Instances can fail for other reasons as well, please contact Support with the "ID" and "Fault" information.

For instances which fail due to internal reasons, i.e. while using SSH or an application, we are still able to provide support but it will have to be on a case-by-case basis. Be prepared to walk us through the steps you took to set up the instance and any software, as well as any data processing steps, leading up to the failure.

SSH Into the Instance

If you are following the tutorial, then at this stage you should be able to SSH into your instance from the UAB Campus Network or on the UAB Campus VPN. You will need to Install an SSH Client Once your machine has an ssh client, use the following command. If your image uses an operating system other than Ubuntu, such as CentOS, replace the user ubuntu with centos or whatever is appropriate. The value <floating ip> should be whatever IP was assigned in Creating a Floating IP, and the value <private_key_file> should be whatever your key pair file was named from Creating a Key Pair.

  1. Install an SSH Client to use SSH from your local machine to your cloud instance.
  2. Manage Your Private Key
  3. Verify the SSH Client Works. Use the following command to connect

    ssh ubuntu@<floating ip> -i ~/.ssh/<private_key_file>
    
    • If your image uses an operating system other than Ubuntu, such as CentOS, replace the user ubuntu with centos, or whatever may be appropriate.
    • The value <floating ip> should be whatever IP was assigned in Creating a Floating IP.
    • The value <private_key_file> should be whatever your key pair file was named from Creating a Key Pair.

    !MINGW64 terminal on Windows. The ssh command has been used to login to the Floating IP Address using the -i command with the locally stored private key my_key_pair.pem. Login was successful. A banner page has been shown and a terminal prompt is waiting for input.

  4. (optional, but helpful) Set Up a Configuration File to simplify the command used to make a connection.

Note

Reusing a floating IP for a new instance can result in a "Remote Host Identification Has Changed" error, preventing connection. Please see Remove an Invalid Host Fingerprint.

Streamlining SSH

Refer to Setting up a Configuration File in Cloud Remote Access.

Next Steps

Now you are ready to Install Software, set up Security Groups for Servers, and optionally Create a Persistent Volume.

Deleting an Instance

Note

Deleting Instances is not part of the tutorial, and is here as a reference.

To delete an instance, return to the "Instances" page using the left-hand navigation pane. In the table, find the row with the instance you wish to delete, and click the drop-down arrow under "Actions" in that row. Then click "Delete Instance" to open a confirmation dialog.

!Delete instance entry highlighted in table row actions drop down menu.

Click "Delete Instance" again to delete the instance permanently.

!Delete instance confirmation dialog.

Warning

It is highly recommended to shut off an instance before deleting it.

Help my Instance is Stuck or not Working

If your instance is stuck or otherwise not working as expected, first try deleting it and starting over. If you are unable to delete it or it gets stuck while deleting, please contact Support and copy the the instance ID as shown below.

Where is my Instance ID?

To find your instance ID, navigate to the "Instances" table. Click the "Instance Name" for the instance you are interested in to load an information page for that instance.

!instance table with instance highlighted by mouse

In the instance information page, navigate to the "Overview" tab. Near the top is a field labeled "ID". The value to the right of "ID" is a Universally Unique ID (UUID) which uniquely names your instance. We need that ID to delete a stuck instance, so please provide it when requesting cloud.rc instance support.

!instance information overview tab with ID highlighted

Continuing the Tutorial

Now that you have set up a Network, Security Policies and an Instance, you are done with the tutorial, congratulations! There is one remaining optional step. If you need a persistent data volume to move between instances, please check our Volumes page.