Difference between revisions of "OpenStack"

From CAC Documentation wiki
Jump to navigation Jump to search
Line 45: Line 45:
 
[[File:Overview_KeyPairs_Circled.png|350px|frameless|border]]
 
[[File:Overview_KeyPairs_Circled.png|350px|frameless|border]]
  
To get to the Key Pairs page, select the "Compute" tab along the top (you should start here at login), then click on "Key Pairs" along the top bar as pictured above.  If you are logged in already, you can also get to it by this link: [https://redcloud.cac.cornell.edu/dashboard/project/key_pairs/ Key Pairs].
+
To get to the Key Pairs page: select the "Compute" tab along the top (you should start here at login), then click on "Key Pairs" along the top bar as pictured above.  If you are logged in already, you can also get to it by this link: [https://redcloud.cac.cornell.edu/dashboard/project/key_pairs/ Key Pairs].
  
 
On the Key Pairs page, you can view the list of available [[OpenStack_Key_Pairs|key pairs]] for your project.  From here, you can also [[OpenStack_Key_Pairs#Creating_a_Key_Pair|create]] or [[OpenStack_Key_Pairs#Importing_a_Key_Pair|import]] a key pair.  If you do not already have a key pair listed, you can either create one before [[OpenStack#Launch_an_Instance|launching an instance]], or [[OpenStack_Key_Pairs#Selecting_a_Key_Pair_When_Creating_an_Instance|create or upload a key pair]] during instance setup.
 
On the Key Pairs page, you can view the list of available [[OpenStack_Key_Pairs|key pairs]] for your project.  From here, you can also [[OpenStack_Key_Pairs#Creating_a_Key_Pair|create]] or [[OpenStack_Key_Pairs#Importing_a_Key_Pair|import]] a key pair.  If you do not already have a key pair listed, you can either create one before [[OpenStack#Launch_an_Instance|launching an instance]], or [[OpenStack_Key_Pairs#Selecting_a_Key_Pair_When_Creating_an_Instance|create or upload a key pair]] during instance setup.

Revision as of 15:15, 11 January 2019

OpenStack is an open-source cloud stack that is currently running on Red Cloud. Also, for more information, see the Official Documentation for OpenStack. If you are looking for information on how to migrate an instance from Eucalyptus to OpenStack, please see Migrating from Eucalyptus to OpenStack.

This page is intended as a quick walk-through of the most-used features of OpenStack, so it is not comprehensive, but links to a lot of supporting documentation for more thorough explanations and advanced topics.

Using the OpenStack Web Interface (Horizon)

There are two ways to manage Red Cloud resources:

  1. OpenStack Web Interface
  2. OpenStack CLI

Most users will use the OpenStack Web Interface (called Horizon). This web-based interface can be used to manage instances and volumes. For Linux Instances, however, some users may choose to use the OpenStack CLI. This section focuses on the OpenStack Web Interface.

Logging In

Log in to the OpenStack Web Interface to create and manage Red Cloud resources. There are two ways to login:

RedCloudCACLogin.pngWhite square.pngRedCloudGlobusAuthLogin.png

  1. CAC Account - Enter cac as the "Domain" and your CAC username and password, not your Cornell NetID. If your CAC password has expired, you will need to reset it before you will be able to login to the OpenStack Web Interface.
  2. Globus Auth - Log in through Globus
    • Currently, this feature is only available to Aristotle users. This feature will be enabled for all users in the future.
    • You must link your Cornell account, or any accounts attached to the projects you are on, in order to have access to them when using Globus Auth.
    • If you can't log in with Globus Auth, it may be that you have not linked your account yet.

You can use the "Authenticate using" drop-down to switch between the two options. Neither option requires you to enter a project ID; you can switch between the projects you are on once logged in.

Overview Page

The Overview page is the first place you will be taken upon logging into Red Cloud.

  • Provides useful metrics on currently selected project
  • Before creating an instance, you will need to:
    • Select the correct project from the "Project" drop-down at the top right of the page (if you are on multiple projects)
    • Create a key pair - for authentication when you log in the first time
    • Create a security group - defines allowable types of port access for an instance
    • Optional: Set up a private network - if you do not want your instance to be available on the public net
  • You may also want to:

Key Pairs

Overview KeyPairs Circled.png

To get to the Key Pairs page: select the "Compute" tab along the top (you should start here at login), then click on "Key Pairs" along the top bar as pictured above. If you are logged in already, you can also get to it by this link: Key Pairs.

On the Key Pairs page, you can view the list of available key pairs for your project. From here, you can also create or import a key pair. If you do not already have a key pair listed, you can either create one before launching an instance, or create or upload a key pair during instance setup.

For more information, here is a walk-through on OpenStack Key Pairs.

Security Groups

Overview SecurityGroups.png

Getting to this is not obvious: Security Groups

Can't create one during Instance setup.

OpenStack Security Groups

Instances

Each instance is a Virtual Machine (VM) in the cloud. You can select CPU/RAM/disk configurations (called "flavors") for the VM. The available VM configurations are:

Type CPUs RAM
c1.m8 1 8 GB
c2.m16 2 16 GB
c4.m32 4 32 GB
c8.m64 8 64 GB
c14.m112 14 112 GB
c20.m160 20 160 GB
c28.m224 28 224 GB

The root disk size of the instance will default to the size of the image you select. You have the option to create a volume as the root disk beyond the image size at launch time. Note that we do not oversubscribe physical RAM or CPU cores (hyperthreading is disabled).

To work with instances, select the "Instances" page under the "Compute" tab, as pictured below:

InstancesMenu.png

Launch an Instance

This section is a general walk-through for creating a new instance, which is not specific to an Operating System (OS). For more specific information per OS, see either of the Linux Instances or Windows Instances pages.

To launch a new instance

  1. Create Key Pair
  2. Create a Security Group and be sure that you select the appropriate rule for connecting to your instance (SSH for Linux Instances and RDP for Windows Instances)
  3. Select "Launch Instance" on the top right side of the Instances page InstancesOptions.png

The full "Launch Instance" menu will pop up like this:

InstanceLaunchMenuFull.png

  • Tabs that you are required to fill out are marked with a *
  • It is recommended that you also select your own Security Group, otherwise the default security group will be selected, which may not be ideal for your work.
  • It is necessary that you select your own Key Pair, even though this field is not marked required, so that you are able to connect to your instance after creation.

Configuring the Instance

  1. Under the "Details" tab:
    • Enter a name for your instance
    • Count is the number of identical instances you would like to create (typically 1).
      • Note that if you create multiple instances this way, the names will be identical with a dash and number added at the end.
      • For example, if you set Instance Name to "my_instance" and you set Count to 3, you would start instances named "my_instance-1", "my_instance-2", and "my_instance-3".
  2. On the "Source" tab:
    • You must Select Boot Source, which is described on the page as "the template used to create an instance."
      • It is generally a good idea to start with an image as the source, unless you want to create an instance from a pre-existing source.
      • For more information on the other options, see Creating an Image.
    • You can select a specific source under the Available list by selecting the up arrow on the right-hand side.
    • Get more details about the specific source by selecting the right-arrow on the left-hand side next to the name.
    • You will have the option to Create New Volume if you have selected either "Image" or "Instance Snapshot" as the source (default is "Yes"):
      1. Yes: If selected, a volume will be created to be the instance's root disk. You will have the options of extending the size of the volume beyond the image size, and keeping the volume when the instance is deleted (by selecting No in the Delete Volume on Instance Delete field).
        • Volume Size is the size of your root volume. The default number will match the size of the image you select, and can be increased.
        • Delete Volume on Instance Delete determines whether or not your root volume will be deleted when you terminate the instance. By default, this option is set to "No" to prevent accidental deletion of your data. However, if you do not intend to re-use the root volume, you could unintentionally incur excess storage usage. You can either delete the root volume manually later (it will show up in the list of volumes with the ID the same as the name), or select "Yes" on this option to automatically delete it when you terminate your instance later.
        • You can also customize the name of the volume under Device Name.
      2. No: If selected, the instance will boot off a root disk the same size as the image. The root disk will be deleted when the instance is deleted.
  3. The "Flavor" tab is where you select the VM configuration discussed above.
    • You can select a configuration by selecting the up arrow on the right-hand side.
    • Get more details about the configuration by selecting the right-arrow on the left-hand side next to the name.
    • The "Total Disk" will show "0 GB" because the disk size will match the image you selected on the "Source" tab.
  4. For the "Networks" tab, no action is necessary unless you want to set up a private network. Your instance will default to being available on the public net.
  5. On the "Security Groups" tab, select the security group you already created.
  6. On the "Key Pairs" tab, select the key pair you already created.

Instance States

You should not take a snapshot of a file system that's mounted. You will lose all the info that's still in Linux's write cache. So if you want to take a snapshot of the root file system, the OS cannot be running.