Difference between revisions of "OpenStack"
m (→Key Pairs) |
|||
(48 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | [https://en.wikipedia.org/wiki/OpenStack OpenStack] is an [https://en.wikipedia.org/wiki/Open-source_model open-source] [https://en.wikipedia.org/wiki/Cloud_computing#Service_models cloud stack] that is currently running on [[Red_Cloud|Red Cloud]]. Also, for more information, see the [https://docs.openstack.org/ Official Documentation for OpenStack | + | [https://en.wikipedia.org/wiki/OpenStack OpenStack] is an [https://en.wikipedia.org/wiki/Open-source_model open-source] [https://en.wikipedia.org/wiki/Cloud_computing#Service_models cloud stack] that is currently running on [[Red_Cloud|Red Cloud]]. Also, for more information, see the [https://docs.openstack.org/ Official Documentation for 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. | 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. | ||
Line 36: | Line 36: | ||
:** [[#Key_Pairs|Create a key pair]] - for authentication when you log in the first time | :** [[#Key_Pairs|Create a key pair]] - for authentication when you log in the first time | ||
:** [[#Security_Groups|Create a security group]] - defines allowable types of port access for an instance | :** [[#Security_Groups|Create a security group]] - defines allowable types of port access for an instance | ||
− | :** Optional: [[Networks|Set up a private network]] - if you do not want your instance to be available on the [[Public | + | :** Optional: [[Networks#Private_Networks|Set up a private network]] - if you do not want your instance to be available on the [[Networks#Public Network|public network]] |
:* You may also want to: | :* You may also want to: | ||
− | :** [[Volumes|Create and Attach a Volume]] (can also be done when launching an instance) | + | :** [[Volumes#Create and Attach a Volume|Create and Attach a Volume]] (can also be done when launching an instance) |
− | :** [[#Floating IP|Associate a Floating IP address]] - a fixed IP address that can be assigned to an instance | + | :** [[Networks#Floating IP Addresses|Associate a Floating IP address]] - a fixed IP address that can be assigned to an instance |
=== Key Pairs === | === Key Pairs === | ||
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 "<tt>Compute</tt>" tab along the top (you should start here at login), then click on "<tt>Key Pairs</tt>" 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. | ||
Line 55: | Line 55: | ||
[[File:Overview_SecurityGroups.png|350px|frameless|border]] | [[File:Overview_SecurityGroups.png|350px|frameless|border]] | ||
− | + | To get to the Security Groups page: select the "<tt>Network</tt>" drop-down menu along the top, then click on "<tt>Security Groups</tt>" as pictured above. If you are already logged in, you can also get to it by following this link: [https://redcloud.cac.cornell.edu/dashboard/project/security_groups/ Security Groups] | |
− | + | On the Security Groups page, you can view a list of available [[OpenStack Security Groups|security groups]] for your project, including a default security group. On this page, you can also [[OpenStack_Security_Groups#Creating_a_Security_Group|create]] and delete security groups. It '''is ''not''''' recommended that you use the default security group without [[OpenStack_Security_Groups#Managing_a_Security_Group.27s_Rules|modifying the rules]] to fit your needs. A good security practice is to have one security group per application or one per user. Instances that have no business talking to each other should generally be in separate security groups. | |
− | [[OpenStack Security Groups]] | + | If you do not already have a security group set up, you will want to [[OpenStack_Security_Groups#Creating_a_Security_Group|create]] one before [[OpenStack#Launch_an_Instance|launching an instance]] because you cannot create one during instance setup. However, you can [[OpenStack_Security_Groups#Assigning_Security_Groups_to_an_Instance|assign a security group]] to an instance later, and even [[OpenStack_Security_Groups#Adding_a_Rule_to_a_Security_Group|add]] or |
+ | [[OpenStack_Security_Groups#Managing_a_Security_Group.27s_Rules|modify the rules]] of the security group at any time. | ||
+ | |||
+ | For more information, here is a walk-through on [[OpenStack Security Groups]]. | ||
== Instances == | == 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: | + | Each instance is a Virtual Machine (VM) in the cloud. You can select CPU/RAM/disk configurations (called "flavors") for the VM. Note that each vCPU currently equates to one core. The available VM configurations are: |
{| border="1" cellspacing="0" cellpadding="10" align="center" style="text-align:center;" | {| border="1" cellspacing="0" cellpadding="10" align="center" style="text-align:center;" | ||
− | ! | + | ! Flavor |
− | ! | + | ! vCPUs |
+ | ! GPUs | ||
! RAM | ! RAM | ||
|- | |- | ||
− | | c1.m8 || 1 || 8 GB | + | | 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 |
|- | |- | ||
− | | | + | | *''c4.t1.m20'' || 4 || 1 '''[https://www.nvidia.com/en-us/data-center/tesla-t4/ Nvidia Tesla T4]''' || 20 GB |
|- | |- | ||
− | | | + | | *''c14.g1.m60'' || 14 || 1 '''[https://www.nvidia.com/en-us/data-center/tesla-v100/ Nvidia Tesla V100]''' || 60 GB |
|- | |- | ||
− | | | + | | colspan="4" style="text-align:left;" | ''* GPU flavors |
|} | |} | ||
− | The root disk size of the instance will default to the size of the [[Images|image]] you select. You have the option to create a [[Volumes|volume]] as the root disk beyond the image size at launch time. Note that we do not oversubscribe physical RAM | + | When you are first starting an instance, we '''recommend''' that you select the smallest flavor (least number of CPUs) that you think will be able to handle installation and configuration of the software and environment on your instance, and then [[Resizing an Instance|resize the instance]] when you are ready to run. This way you will save core hours that would otherwise have been spent idle. This method is especially useful when configuring a ''GPU instance'' due to the number of cores. Also note: you can begin with a smaller instance size (or flavor) that does not contain a GPU, and later resize to one that does. |
+ | |||
+ | The root disk size of the instance will default to the size of the [[Images|image]] you select. You have the option to create a [[Volumes|volume]] as the root disk beyond the image size at launch time. Note that we do not oversubscribe physical RAM, CPU cores, or GPUs (hyperthreading is disabled). | ||
To work with instances, select the "<tt>Instances</tt>" page under the "<tt>Compute</tt>" tab, as pictured below: | To work with instances, select the "<tt>Instances</tt>" page under the "<tt>Compute</tt>" tab, as pictured below: | ||
Line 93: | Line 105: | ||
=== Launch an Instance === | === 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 | + | 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 these pages: |
+ | |||
+ | :* [[Red Cloud Linux Instances|Linux Instances]] | ||
+ | :* [[Red Cloud Windows Instances|Windows Instances]] | ||
==== To launch a new instance ==== | ==== To launch a new instance ==== | ||
Line 123: | Line 138: | ||
#* Get more details about the specific source by selecting the right-arrow on the left-hand side next to the name. | #* 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 "<tt>Image</tt>" or "<tt>Instance Snapshot</tt>" as the source (default is "<tt>Yes</tt>"): | #* You will have the option to '''Create New Volume''' if you have selected either "<tt>Image</tt>" or "<tt>Instance Snapshot</tt>" as the source (default is "<tt>Yes</tt>"): | ||
− | #*# '''<tt>Yes</tt>''': If selected, a [[Volumes|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 | + | #*# '''<tt>Yes</tt>''': If selected, a [[Volumes|volume]] will be created to be the instance's root disk. You will then have the options of extending the size of the volume beyond the image size, and deleting the volume when the instance is deleted. |
#*#* '''Volume Size''' is the size of your root [[Volumes|volume]]. The default number will match the size of the [[Images|image]] you select, and can be increased. | #*#* '''Volume Size''' is the size of your root [[Volumes|volume]]. The default number will match the size of the [[Images|image]] you select, and can be increased. | ||
− | #*#* '''Delete Volume on Instance Delete''' determines whether or not | + | #*#* '''Delete Volume on Instance Delete''' determines whether or not the root volume will be deleted automatically when you terminate the instance. The default is "<tt>No</tt>", which prevents your data from being deleted when you delete your instance (perhaps accidentally). However, ''if you do not need this extra level of protection, and you do not intend to re-use the root volume, you could unintentionally incur excess storage usage''. Therefore, it can be a good idea to set this option to "<tt>Yes</tt>" so that the volume is deleted automatically when you terminate your instance. Your alternative is to find and delete the root volume manually, later (it will show up in the list of volumes with a name identical to its arbitrarily assigned ID, unless you give it a different name). |
#*#* You can also customize the name of the volume under '''Device Name'''. | #*#* You can also customize the name of the volume under '''Device Name'''. | ||
#*# '''<tt>No</tt>''': 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. | #*# '''<tt>No</tt>''': 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. | ||
# The "<tt>Flavor</tt>" tab is where you select the VM configuration discussed [[#Instances|above]]. | # The "<tt>Flavor</tt>" tab is where you select the VM configuration discussed [[#Instances|above]]. | ||
+ | #* We '''recommend''' that you select the smallest flavor (least number of CPUs) that you think will be able to handle installation and configuration of the software and environment on your instance, and then [[Resizing an Instance|resize the instance]] when you are ready to run. This way you will save core hours that would otherwise have been spent idle. Also note: you can begin with a smaller instance size (or flavor) that does not contain a GPU, and later resize to one that does. | ||
#* You can select a configuration by selecting the up arrow on the right-hand side. | #* 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. | #* Get more details about the configuration by selecting the right-arrow on the left-hand side next to the name. | ||
#* The "<tt>Total Disk</tt>" will show "0 GB" because the disk size will match the [[Images|image]] you selected on the "<tt>Source</tt>" tab. | #* The "<tt>Total Disk</tt>" will show "0 GB" because the disk size will match the [[Images|image]] you selected on the "<tt>Source</tt>" tab. | ||
− | # For the "<tt>Networks</tt>" tab, | + | # For the "<tt>Networks</tt>" tab, two options are available: |
+ | ## You can make the instance available on the [[Networks#Public Network|public net]]. This is the simplest and most common selection. | ||
+ | ## You can select your own [[Networks#Private Networks|private network]], which has to be set up before you launch an instance. For more information, see the [[Networks]] page. | ||
# On the "<tt>Security Groups</tt>" tab, select the [[#Security Groups|security group]] you already created. | # On the "<tt>Security Groups</tt>" tab, select the [[#Security Groups|security group]] you already created. | ||
# On the "<tt>Key Pairs</tt>" tab, select the [[#Key Pairs|key pair]] you already created. | # On the "<tt>Key Pairs</tt>" tab, select the [[#Key Pairs|key pair]] you already created. | ||
Line 138: | Line 156: | ||
=== Instance States === | === Instance States === | ||
− | You | + | OpenStack defines several [https://developer.openstack.org/api-guide/compute/server_concepts.html#server-status Server States] through which you can move your instances. You change the state of your instance by making a selection from a drop-down menu under the <tt>Actions</tt> 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. | ||
+ | |||
+ | [[File:Openstack-server-states.png|thumb|left|700px|Source: OpenStack[https://docs.openstack.org/nova/latest/reference/vm-states.html]]] | ||
+ | <div style="clear: both"></div> | ||
+ | |||
+ | When your instance has been created, the "<tt>Instances</tt>" tab will list its current state (as well as the state of your other instances) under the "<tt>Status</tt>" column. In the rightmost column called "<tt>Actions</tt>," 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 that Shelving is the only operation that will free up the computational resources your Instance has been using so that you stop 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 <code>lscpu</code> or <code>cat /proc/cpuinfo</code>; 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 <code>sudo poweroff</code> or <code>sudo init</code>, 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''. |
Revision as of 17:15, 23 November 2020
OpenStack is an open-source cloud stack that is currently running on Red Cloud. Also, for more information, see the Official Documentation for 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:
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:
- 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.
- 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 network
- You may also want to:
- Create and Attach a Volume (can also be done when launching an instance)
- Associate a Floating IP address - a fixed IP address that can be assigned to an instance
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: 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
To get to the Security Groups page: select the "Network" drop-down menu along the top, then click on "Security Groups" as pictured above. If you are already logged in, you can also get to it by following this link: Security Groups
On the Security Groups page, you can view a list of available security groups for your project, including a default security group. On this page, you can also create and delete security groups. It is not recommended that you use the default security group without modifying the rules to fit your needs. A good security practice is to have one security group per application or one per user. Instances that have no business talking to each other should generally be in separate security groups.
If you do not already have a security group set up, you will want to create one before launching an instance because you cannot create one during instance setup. However, you can assign a security group to an instance later, and even add or modify the rules of the security group at any time.
For more information, here is a walk-through on 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. Note that each vCPU currently equates to one core. 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 |
*c4.t1.m20 | 4 | 1 Nvidia Tesla T4 | 20 GB |
*c14.g1.m60 | 14 | 1 Nvidia Tesla V100 | 60 GB |
* GPU flavors |
When you are first starting an instance, we recommend that you select the smallest flavor (least number of CPUs) that you think will be able to handle installation and configuration of the software and environment on your instance, and then resize the instance when you are ready to run. This way you will save core hours that would otherwise have been spent idle. This method is especially useful when configuring a GPU instance due to the number of cores. Also note: you can begin with a smaller instance size (or flavor) that does not contain a GPU, and later resize to one that does.
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, CPU cores, or GPUs (hyperthreading is disabled).
To work with instances, select the "Instances" page under the "Compute" tab, as pictured below:
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 these pages:
To launch a new instance
- Create Key Pair
- 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)
- Select "Launch Instance" on the top right side of the Instances page
The full "Launch Instance" menu will pop up like this:
- 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
- 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".
- 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"):
- Yes: If selected, a volume will be created to be the instance's root disk. You will then have the options of extending the size of the volume beyond the image size, and deleting the volume when the instance is deleted.
- 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 the root volume will be deleted automatically when you terminate the instance. The default is "No", which prevents your data from being deleted when you delete your instance (perhaps accidentally). However, if you do not need this extra level of protection, and you do not intend to re-use the root volume, you could unintentionally incur excess storage usage. Therefore, it can be a good idea to set this option to "Yes" so that the volume is deleted automatically when you terminate your instance. Your alternative is to find and delete the root volume manually, later (it will show up in the list of volumes with a name identical to its arbitrarily assigned ID, unless you give it a different name).
- You can also customize the name of the volume under Device Name.
- 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.
- Yes: If selected, a volume will be created to be the instance's root disk. You will then have the options of extending the size of the volume beyond the image size, and deleting the volume when the instance is deleted.
- You must Select Boot Source, which is described on the page as "the template used to create an instance."
- The "Flavor" tab is where you select the VM configuration discussed above.
- We recommend that you select the smallest flavor (least number of CPUs) that you think will be able to handle installation and configuration of the software and environment on your instance, and then resize the instance when you are ready to run. This way you will save core hours that would otherwise have been spent idle. Also note: you can begin with a smaller instance size (or flavor) that does not contain a GPU, and later resize to one that does.
- 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.
- For the "Networks" tab, two options are available:
- You can make the instance available on the public net. This is the simplest and most common selection.
- You can select your own private network, which has to be set up before you launch an instance. For more information, see the Networks page.
- On the "Security Groups" tab, select the security group you already created.
- On the "Key Pairs" tab, select the key pair you already created.
Instance States
OpenStack defines several Server States through which you can move your instances. You change the state of your 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.
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 that Shelving is the only operation that will free up the computational resources your Instance has been using so that you stop 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.