From Documentation
Revision as of 14:24, 15 December 2017 by Edward (Talk | contribs)

Jump to: navigation, search
Note: Some of the information on this page is for our legacy systems only. The page is scheduled for an update to make it applicable to Graham.

About

Cloud computing is a method of sharing computing resources. While the resources are shared the end user has their own isolated cloud "instance". The advantage of cloud computing over traditional cluster computer is that the user can install their perferred operating system, log in with administrator privilages, and have access to the external internet. These advantages come at the cost of the user requiring some experience in setting up their computing environment. This page introduces and provides details about the 'OpenStack' cloud computing platform.

Quick Start

In order to launch an instance you much first create a key-pair (alternately upload a keypair), second enable ssh access, and lastly launch an instance.
The following instructions will require you to have logged in to the dashboard (https://cloud.sharcnet.ca/dashboard).

Keypair Creation

The first thing you need to do is to create a keypair. The key pair will allow you to login to the instances you create in the cloud. To do so follow the following guidelines Under the “Compute” tab, press on “Access & Security” tab in the left hand side.

  1. Open the Project tab, then open the Compute tab, and open the Access & Security tab.
  2. Select "Key Pairs
  3. Press“Create Key Pair” in the upper right corner
  4. Choose a name for the keypair, and click create.
    • The cloud will automatically download a ".pem" file to your desktop, which is the private key used to access your cloud instances. The file’s name will be “Name you chose for the keypair”.pem.

Modify a Security Group to Enable SSH Access

To reach a service on your instances, you will need open a port on them by following these steps:

  1. Under the “Compute” tab”, press on “Access & Security” tab in the left hand side.
  2. Press “Security Groups” on the top tab bar.
  3. You can add rules using the “Add Rule” on the top right corner.
    • Ingress traffic is traffic reaching your machine from outside world. Egress is the traffic your machine communicates to the outside world.
  4. Under default, click "Manage Rules".
  5. Click "Add Rule".
  6. Select rule "SSH" from the drop down menu, leave the other default options.

Create an Instance

To create an instance, you will need to select an image, a flavor (cpu/memory allocation), and indicate which key-pair you are using.

  1. Under the “Compute” tab, press “Instances” on the left hand side
  2. Click “Launch Instance” from the top right corner
  3. Choose an instance name, nova availability zone (the only option), flavor to boot from.
  4. Select Image
    1. Under "source", change 'Select Boot Source' to image.
    2. Select desired image by clicking the plus (+) symbol.
  5. In the “Access & Security” tab, select the Key pair you created in earlier steps
  6. By default your instance will have the “default” security group (see above)
  7. By default your instance will connect to the network specifically created for you
  8. After the instance is created, associate a floating ip to the instance in order to reach it externally

Details

Instances

Instances are virtual machines that run inside the cloud.

Volumes

A volume is a detachable block storage device, similar to a USB hard drive. You can attach a volume to only one instance. On the volumes page, you can click on a volume name to see more information on that volume. You can have up to 10 volumes with a total size of up to 400GB.

Create a volume

  1. Log in to the dashboard (https://cloud.sharcnet.ca/dashboard).
  2. Open the Project tab, then open the Compute tab, and click Volumes category (show me where).
  3. Click Create Volume.
  4. In the dialog box that opens, enter or select the following values.
  5. Volume Name: Specify a name for the volume.
  6. Description: Optionally, provide a brief description for the volume.
  7. Volume Source: Select one of the following options:
    1. No source, empty volume: Creates an empty volume. An empty volume does not contain a file system or a partition table.
    2. Snapshot: If you choose this option, a new field for Use snapshot as a source displays. You can select the snapshot from the list.
    3. Image: If you choose this option, a new field for Use image as a source displays. You can select the image from the list.
    4. Volume: If you choose this option, a new field for Use volume as a source displays. You can select the volume from the list. Options to use a snapshot or a volume as the source for a volume are displayed only if there are existing snapshots or volumes.
    5. Type: Leave this field blank.
  8. Size (GB): The size of the volume in gibibytes (GiB).
  9. Availability Zone: The only option available is Nova.
  10. Click Create Volume.

Attach a volume to an instance

After you create one or more volumes, you can attach them to instances. You can attach a volume to one instance at a time.

  1. Log in to the dashboard (https://cloud.sharcnet.ca/dashboard).
  2. Open the Project tab, then open the Compute tab, and click Volumes category (show me where).
  3. Select the volume to add to an instance and click 'Manage Attachments' from the right hand menu (show me where).
    • This will open up the 'Manage Attachments' dialog box (show me).
  4. In the Manage Volume Attachments dialog box, select an instance.
  5. Enter the name of the device from which the volume is accessible by the instance. The actual device name might differ from the volume name because of hypervisor settings.
  6. Click Attach Volume. The dashboard shows the instance to which the volume is now attached and the device name.

Now you can log in to the instance and mount, format, and use the disk.

Detach a volume from an instance

  1. Log in to the dashboard (https://cloud.sharcnet.ca/dashboard).
  2. Open the Project tab, then open the Compute tab, and click Volumes category (show me where).
  3. Select the volume and click Manage Attachments.
  4. Click Detach Volume and confirm your changes.
  5. A message indicates whether the action was successful.

Create a snapshot from a volume

  1. Log in to the dashboard (https://cloud.sharcnet.ca/dashboard).
  2. Open the Project tab, then open the Compute tab, and click Volumes category (show me where).Select a volume from which to create a snapshot.
  3. In the Actions column, click Create Snapshot.
  4. In the dialog box that opens, enter a snapshot name and a brief description.
  5. Confirm your changes.
    • The dashboard shows the new volume snapshot in Volume Snapshots tab.

Edit a volume

  1. Log in to the dashboard (https://cloud.sharcnet.ca/dashboard).
  2. Open the Project tab, then open the Compute tab, and click Volumes category (show me where).
  3. Select the volume that you want to edit.
  4. In the Actions column, click Edit Volume.
  5. In the Edit Volume dialog box, update the name and description of the volume.
  6. Click Edit Volume.

You can extend a volume by using the Extend Volume option available in the More dropdown list and entering the new value for volume size.

Delete a volume

  1. When you delete an instance, the data in its attached volumes is not deleted.
  2. Log in to the dashboard.
  3. Select the appropriate project from the drop down menu at the top left.
  4. On the Project tab, open the Compute tab and click Volumes category.
  5. Select the check boxes for the volumes that you want to delete.
  6. Click Delete Volumes and confirm your choice.
  7. A message indicates whether the action was successful.

Images

A virtual machine image is a single file containing a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.

Access & Security

This tab on the dashboard allows you to add ssh key-pairs, and setup firewall rules.

Modify a Security Group to Enable a Specific Port

To reach a service on your instances, you will need open a port on them by following these steps:

  1. Under the “Compute” tab”, press on “Access & Security” tab in the left hand side.
  2. Press “Security Groups” on the top tab bar.
  3. You can add rules using the “Add Rule” on the top right corner.
    • Ingress traffic is traffic reaching your machine from outside world. Egress is the traffic your machine communicates to the outside world.
  4. Under default, click "Manage Rules".
  5. Click "Add Rule".
  6. Select rule "Custom TCP Rule" from the drop down menu, leave the other default options.
  7. Select the direction
    • Ingress for incoming
    • Egress for outgoing
  8. Select Port or Port range, and enter the port numbers.
  9. Specify the source of the traffic to be allowed (Remote). Selecting either an IP address block (CIDR) or a security group. Selecting a security group as the source will allow any other instance in that security group access to any other instance via this rule.
  10. Specify the incoming ip range in CIDR notation.

Troubleshooting Instances

Error when using 'apt-get update' 1) Make sure your DNS Resolver config file is writable: sudo chmod o+r /etc/resolv.conf

2) Change your DNS to use Google's nameservers: sudo vim /etc/resolv.conf Change the IP address in the file to: nameserver 8.8.8.8

Sources