Cloud Quick Start/en: Difference between revisions

Jump to navigation Jump to search
Updating to match new version of source page
(Updating to match new version of source page)
(Updating to match new version of source page)
Tags: Mobile edit Mobile web edit
Line 3: Line 3:
''Parent page: [[Cloud]]''
''Parent page: [[Cloud]]''
=Before you start=
=Before you start=
#'''Have a cloud project''' <br> '''You cannot access a cloud without first having a cloud project.''' If you don't already have a [[OpenStack#Projects|cloud project]], see [[Cloud#Getting_a_Cloud_project|Getting a cloud project]]. Once a cloud project is associated with your account you will receive a confirmation email which will have important details you will need to access your project and get started with the cloud. Make sure you have this confirmation email ready.  
#'''Have a cloud project''' <br> '''You cannot access a cloud without first having a cloud project.''' If you don't already have a [[OpenStack#Projects|cloud project]], see [[Cloud#Getting_a_Cloud_project|Getting a cloud project]]. Once a cloud project is associated with your account, you will receive a confirmation email which will have important details you will need to access your project and get started with the cloud. Make sure you have this confirmation email ready.  
#'''Have a compatible browser''' <br> The web interface for accessing your cloud project works well with both the [https://www.mozilla.org/en-US/firefox/new/ Firefox] and [https://www.google.com/chrome/ Chrome] web browsers. Other browsers may work also, however some browsers have shown the error message <code>Danger: There was an error submitting the form. Please try again.</code> which suggests that your browser is not supported by our system. This error message was noticed with certain versions of the Safari web browser on Macs; upgrading Safari may help but we recommend that you use [https://www.mozilla.org/en-US/firefox/new/ Firefox] or [https://www.google.com/chrome/ Chrome]. If you are still having issues, email [mailto:cloud-support@computecanada.ca cloud support].
#'''Have a compatible browser''' <br> The web interface for accessing your cloud project works well with both the [https://www.mozilla.org/en-US/firefox/new/ Firefox] and [https://www.google.com/chrome/ Chrome] web browsers. Other browsers may work also, however some have shown the error message <code>Danger: There was an error submitting the form. Please try again.</code> which suggests that your browser is not supported by our system. This error message was noticed with certain versions of the Safari web browser on Macs; upgrading Safari may help, but we recommend that you use [https://www.mozilla.org/en-US/firefox/new/ Firefox] or [https://www.google.com/chrome/ Chrome]. If you are still having issues, email [mailto:cloud-support@computecanada.ca cloud support].


=Creating your first virtual machine=
=Creating your first virtual machine=
Line 25: Line 25:


[[File:Import key pair 3.png|500px|thumb|Importing an existing key pair (Click for larger image)]]
[[File:Import key pair 3.png|500px|thumb|Importing an existing key pair (Click for larger image)]]
Instead, OpenStack creates your VM with one SSH (secure shell) public key installed, and you can only log in using this SSH key pair. If you have used SSH keys before, the SSH public key can come from a key pair which you have already created on some other machine. In this case follow the instructions below for '''Importing an existing key pair'''. If you have not used SSH key pairs before, or don't currently have a pair you want to use, OpenStack can create a pair for you. In this case follow the instructions below for '''Creating a new key pair'''. For more information on creating and managing your key pairs see the [[SSH Keys/en|SSH Keys page]] in our wiki.
Instead, OpenStack creates your VM with one SSH (Secure Shell) public key installed, and you can only log in using this SSH key pair. If you have used SSH keys before, the SSH public key can come from a key pair which you have already created on some other machine. In this case follow the instructions below for '''Importing an existing key pair'''. If you have not used SSH key pairs before or don't currently have a pair you want to use, OpenStack can create a pair for you. In this case follow the instructions below for '''Creating a new key pair'''. For more information on creating and managing your key pairs see the [[SSH Keys/en|SSH Keys page]] in our wiki.




===Importing an existing key pair===
===Importing an existing key pair===
#On the OpenStack left menu, select ''Compute'' and ''Key Pairs''.
#On the OpenStack left menu, select ''Compute->Key Pairs''.
#Click on the ''Import Public Key'' button; the ''Import Public Key'' window is displayed.
#Click on the ''Import Public Key'' button; the ''Import Public Key'' window is displayed.
#Name your key pair.
#Name your key pair.
#Paste your public key (only RSA type ssh keys are currently supported). <br/>Ensure your pasted public key contains no newline or space characters.
#Paste your public key (only RSA type SSH keys are currently supported). <br/>Ensure your pasted public key contains no newline or space characters.
#Click on the ''Import Public Key'' button.
#Click on the ''Import Public Key'' button.
[[File:Import key pair 2.png|500px|thumb|Creating a new key pair (Click for larger image)]]
[[File:Import key pair 2.png|500px|thumb|Creating a new key pair (Click for larger image)]]


===Creating a new key pair===
===Creating a new key pair===
#On the OpenStack left menu, select ''Compute'' and ''Key Pairs''.
#On the OpenStack left menu, select ''Compute->Key Pairs''.
#Click on the ''+Create Key Pair'' button; the ''Create Key Pair'' window is displayed.
#Click on the ''+Create Key Pair'' button; the ''Create Key Pair'' window is displayed.
#Give your key pair a name so you can recognize the file when it saves to your computer, you can only use letters, numbers, spaces and dashes; no other special characters are permitted.
#Give your key pair a name so you can recognize the file when it saves to your computer. You can only use letters, numbers, spaces and dashes; no other special characters are permitted.
#Click on the ''Create Key Pair'' button.
#Click on the ''+Create Key Pair'' button.
#The key pair file will download to your default download folder on your pc. It will have a .pem file extension on it. Make sure to save the file to your dekstop (or another easy access folder on your hard drive).
#The key pair file will download to your default download folder on your pc. It will have a .pem file extension on it. Make sure to save the file to your dekstop (or another easy access folder on your hard drive).


Line 46: Line 46:


==Launching a VM==
==Launching a VM==
To create a virtual machine, click on ''Compute'' and  ''Instances'' on the left menu, then click on the ''Launch Instance'' button.
To create a virtual machine, select ''Compute->Instances'' on the left menu, then click on the ''Launch Instance'' button.


A form is displayed where you define your virtual machine. If you have a plan for the exact specifications your VM needs through your pre-planning, feel free to use those specifications. Otherwise, you can follow along with this example for a fairly generic easy way to use Linux VM.
A form is displayed where you define your virtual machine. If you have a plan for the exact specifications your VM needs through your pre-planning, feel free to use those specifications. Otherwise, you can follow along with this example for a fairly generic easy way to use Linux VM.
The ''Launch Instance'' window has the following options:
The ''Launch Instance'' window has the following options:
#''Details''
#''Details''
#*''Instance Name'': Enter a name for your virtual machine. Do not include spaces or special characters in your instance name. For more details on naming rules see [https://en.wikipedia.org/wiki/Hostname restrictions on valid host names].
#*''Instance Name:'' Enter a name for your virtual machine. Do not include spaces or special characters in your instance name. For more details on naming rules see [https://en.wikipedia.org/wiki/Hostname restrictions on valid host names].
#*''Description'': This field is optional.
#*''Description:'' This field is optional.
#*''Availability Zone'': The default is ''Any Availability Zone''; do not change this.   
#*''Availability Zone:'' The default is ''Any Availability Zone''; do not change this.   
#*''Count'': This indicates the number of virtual machines to create. Unless you have specifically planned for multiple machines leave this set at 1.[[File:Source tab.png|500px|thumb]]<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
#*''Count:'' This indicates the number of virtual machines to create. Unless you have specifically planned for multiple machines leave this set at 1.[[File:Source tab.png|500px|thumb]]<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
#''Source''
#''Source''
#*''Select Boot Source'': Because it's your first VM select ''Image'' as the boot source. For information about other options see our [[OpenStack#Booting_from_a_Volume|Booting From a Volume]] page.
#*''Select Boot Source:'' Because it's your first VM, select ''Image'' as the boot source. For information about other options see [[OpenStack#Booting_from_a_Volume|Booting From a Volume]].
#*''Create New Volume'': Click ''Yes''; your VM's data will be stored in the cloud volume (or persistent storage). For more information on volume usage and management see our [[OpenStack#Working_with_Volumes|Working with Volumes]] page.
#*''Create New Volume:'' Click ''Yes''; your VM's data will be stored in the cloud volume (or persistent storage). For more information on volume usage and management see [[OpenStack#Working_with_Volumes|Working with Volumes]].
#*:''Volume Size (GB)'': If you have a pre-planned volume size use that, otherwise 30 GB is reasonable for the operating system and some modest data needs. For more information on volume usage and management see our [[OpenStack#Working_with_Volumes|Working with Volumes]] page.
#*:''Volume Size (GB):'' If you have a pre-planned volume size use that, otherwise 30 GB is reasonable for the operating system and some modest data needs. For more information on volume usage and management see [[OpenStack#Working_with_Volumes|Working with Volumes]].
#*:''Delete Volume on Instance Delete'': Click ''No'' to help prevent your volume from being deleted accidentally; however, if you are confident you always want your volume deleted when your instance is deleted click ''Yes''.
#*:''Delete Volume on Instance Delete:'' Click ''No'' to help prevent your volume from being deleted accidentally; however, if you are confident you always want your volume deleted when your instance is deleted, click ''Yes''.
#*''Allocating'' and ''Available'' lists: The list at the bottom of the window shows the available images your VM can boot. For a beginner on Linux we recommend the most recent '''Ubuntu''' image, but if you prefer you can choose any one of the other Linux operating systems. To select an image click the upwards pointing arrow on the far right of the row containing your desired image. That row should now show up in the ''Allocated'' list above. '''It is important for later to remember which image you chose''' (ex. ubuntu, fedora, etc.).[[File:Flavor tab.png|500px|thumb]] <br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
#*''Allocated'' and ''Available'' lists: The list at the bottom of the window shows the available images your VM can boot. For a beginner on Linux we recommend the most recent '''Ubuntu''' image, but if you prefer you can choose any one of the other Linux operating systems. To select an image click on the upwards pointing arrow on the far right of the row containing your desired image. That row should now show up in the ''Allocated'' list above. '''It is important for later to remember which image you chose''' (ex. ubuntu, fedora, etc.).[[File:Flavor tab.png|500px|thumb]] <br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
#''Flavor''  
#''Flavor''  
#*''Allocated'' and ''Available'' lists: The flavor determines what type of hardware is used for your VM, which determines how much memory and processing capabilities it has. The ''Available'' list shows all the flavors available for your chosen boot image. Click the arrow on the far left of a row to see how that particular flavor matches up with what you have been allocated for your project. If there is an alert icon on one of the specifications, that means that your project doesn't have enough of that resource to support that flavor. Choose a flavor that your project can support (i.e. issues no alerts)  and click the upwards arrow on the far right of that row. That flavor should now show up in the ''Allocated'' list. For more details, see [[Virtual machine flavors]]. <br /><br /><br /><br /><br /><br /><br /><br />
#*''Allocated'' and ''Available'' lists: The flavor determines what type of hardware is used for your VM, which determines how much memory and processing capabilities it has. The ''Available'' list shows all the flavors available for your chosen boot image. Click on the > icon at the far left of a row to see how that particular flavor matches up with what you have been allocated for your project. If there is an alert icon on one of the specifications, that means that your project doesn't have enough of that resource to support that flavor. Choose a flavor that your project can support (i.e. doesn't issue an alert)  and click on the upwards arrow on the far right of that row. That flavor should now show up in the ''Allocated'' list. For more details, see [[Virtual machine flavors]]. <br /><br /><br /><br /><br /><br /><br /><br />
#''Networks'': Do not change this now.[[File:Security groups.png|500px|thumb]]
#''Networks:'' Do not change this now.[[File:Security groups.png|500px|thumb]]
#''Network Ports'': Do not change this now. <br /><br /><br /><br /><br />
#''Network Ports:''  Do not change this now. <br /><br /><br /><br /><br />
#''Security Groups'': The ''Default Security Group'' should be listed in the ''Allocated'' list. If it is not, move it from ''Available'' to ''Allocated'' using the upwards arrow located on the far right of the ''Default Security Group'' row. For more information see our [[OpenStack#Security_Groups|Security Groups]] page.[[File:Key pair tab.png|500px|thumb]]<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
#''Security Groups:''  The default security group should be in the ''Allocated'' list. If it is not, move it from ''Available'' to ''Allocated'' using the upwards arrow located on the far right of the group's row. For more information see [[OpenStack#Security_Groups|Security Groups]].[[File:Key pair tab.png|500px|thumb]]<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
#''Key Pair'':  Select the SSH key pair you created earlier from the '''Available''' list by clicking the upwards arrow on the far right of its row. If you do not have a key pair, you can create or import one from this window using the buttons at the top of the window. Please see [[#SSH key pair | above]] for more instructions around Key Pairs. For more detailed information on managing and using key pairs see our [[SSH_Keys|SSH Keys]] page.<br /><br />
#''Key Pair:'' From the ''Available'' list, select the SSH key pair you created earlier by clicking the upwards arrow on the far right of its row. If you do not have a key pair, you can create or import one from this window using the buttons at the top of the window (please [[#SSH key pair | see above]]). For more detailed information on managing and using key pairs see [[SSH_Keys|SSH Keys]].<br /><br />
#''Customization Script'': '''Do not change this now'''. For more information on using customization scripts see our [[OpenStack_VM_Setups#using_cloudinit|Cloud Init]] page.
#''Configuration:''  Do not change this now. For more information on customization scripts see [[OpenStack_VM_Setups#using_cloudinit|Using CloudInit]].
#''Server Groups'': '''Do not change this now'''.  
#''Server Groups:''  Do not change this now.  
#''Scheduler Hints'': '''Do not change this now'''.
#''Scheduler Hints:''  Do not change this now.
#''Metadata'': '''Do not change this now'''.<br /><br />
#''Metadata:'' Do not change this now.<br /><br />
#Once you have reviewed all the options and defined your virtual machine, click on the '''Launch''' button and your virtual machine will be created. The ''Instances'' list will be displayed and the ''Task'' field will show the current task for the VM; it will likely be '''spawning''' initially. Once the VM has spawned it will have the '''Power State''' of '''Running'''. It may take a few minutes for your virtual machine to show the '''Running''' state.
#Once you have reviewed all the options and defined your virtual machine, click on the ''Launch Instance'' button and your virtual machine will be created. The list of instances will be displayed and the ''Task'' field will show the current task for the VM; it will likely be ''Spawning'' initially. Once the VM has spawned it will have the power state of ''Running''; this may take a few minutes.


==Network Settings==
==Network Settings==
[[File:Manage-Floating-IP-Associations-Form.png|400px|thumb| Manage Floating IP (Click for larger image)]]
[[File:Manage-Floating-IP-Associations-Form.png|400px|thumb| Manage Floating IP (Click for larger image)]]
[[File:Add-Rule-Form.png|400px|thumb| Add Rule (Click for larger image)]]
[[File:Add-Rule-Form.png|400px|thumb| Add Rule (Click for larger image)]]
On the ''Instances'' page is a list VMs with their IP address(es) displayed in the ''IP Address'' column. Each VM will have at least one private IP address, but some may also have a second public IP assigned to it.When your OpenStack project is created a local network is also created for you. This local network is used to connect VMs to each other and to an internet gateway within that project, allowing them to communicate with each other and the outside world. Their private IP address does not allow the outside world to reference that VM. Any VM created in your project will have a private IP address assigned to it from this network of the form <code>192.168.X.Y</code>. Public IPs allow outside services and tools to initiate contact with your VM, such as allowing you to connect to it to perform administrative tasks or serve up web content. Public IPs can also be pointed to by domain names.
On the ''Instances'' page is a list of VMs with their IP address(es) displayed in the ''IP Address'' column. Each VM will have at least one private IP address, but some may also have a second public IP assigned to it. When your OpenStack project is created, a local network is also created for you. This local network is used to connect VMs to each other and to an internet gateway within that project, allowing them to communicate with each other and the outside world. The private IP address provides inter VM networking but does not allow for connection to the outside world. Any VM created in your project will have a private IP address assigned to it from this network of the form <code>192.168.X.Y</code>. Public IPs allow outside services and tools to initiate contact with your VM, such as allowing you to connect to your VM via your personal computer to perform administrative tasks or serve up web content. Public IPs can also be pointed to by domain names.


#''Assign a Public IP Address''
#Assign a Public IP Address
#*Ensure you are still viewing the '''Instances''' list where you were redirected as your VM launched. If you need to use the navigation panel on the left hand side and go to '''Compute -> Instances'''.
#*Ensure you are still viewing the instances list where you were redirected as your VM launched. If you need to use the navigation panel, select options ''Compute->Instances'' on the OpenStack menu.
#*Click the drop down arrow menu on the far right of the row for your VM and select ''Associate Floating IP'' from the drop-down menu button (indicated by &#x25BC;).
#*Click on the drop-down arrow menu (indicated by &#x25BC;) on the far right of the row for your VM and select ''Associate Floating IP''.
#*If this is your first time associating a floating IP, you need to click on the “+” sign in the ''IP Address'' dialog box. If you need to allocate a public IP address for this VM again in the future you can select one from the list by clicking the &#x25BC; in the '''IP Address''' dialogue box.
#*If this is your first time associating a floating IP, you need to click on the “+” sign in the ''Manage Floating IP Associations'' dialog box. If you need to allocate a public IP address for this VM again in the future, you can select one from the list by clicking the &#x25BC; in the ''IP Address'' field.
#*Click on the ''Associate'' button.
#*Click on the ''Associate'' button.
#*You should now have two IP address in your IP address column. One will be of the form <code>192.168.X.Y</code>, the other one is your public IP. You can also find a list of your public IP addresses and their associated projects by going to '''Network->Floating IPs. You will need your public IP when you are trying to connect to your VM.'''
#*You should now have two IP address in your IP address column. One will be of the form <code>192.168.X.Y</code>, the other is your public IP. You can also find a list of your public IP addresses and their associated projects by going to ''Network->Floating IPs''. You will need your public IP when you are trying to connect to your VM.
#''Configure Firewall''
#Configure the firewall
#*Using the left navigation pane go to '''Network->Security Groups'''.
#*On the OpenStack left menu, select ''Network->Security Groups''.
#*On the group row named '''default''', click the [[File:Manage-Rules-Button.png]] on the far right.
#*On the group row named ''default'', click on the ''Manage Rules'' button on the far right.
#*On the next screen, click [[File:Add-Rule-Button.png]] near the top right corner.
#*On the next screen, click on the ''+Add Rule'' button near the top right corner.
#*In the ''' Rules''' drop-down menu select '''SSH'''
#*In the ''Rule'' drop-down menu select ''SSH''.
#* The '''Remote''' Text box should automatically have '''CIDR''' in it, '''Do not change this.'''
#* The ''Remote'' text box should automatically have ''CIDR'' in it; do not change this.
#*In the '''CIDR''' dialogue box replace the <code>0.0.0.0/0</code> in the CIDR text box with <code>your-ip/32</code>. Note that this is the IP address of the physical computer you are wanting to use to connect to your VM. If you don't know your current IP address you can see it by going to [http://ipv4.icanhazip.com ipv4.icanhazip.com] in your browser. If you want to access your VM from other IPs you can add more rules with different IP addresses. If you want to specify a range of IP addresses use [https://www.ipaddressguide.com/cidr this tool] to calculate your CIDR rule for a range of IP addresses.
#*In the ''CIDR'' text box, replace <code>0.0.0.0/0</code> with <code>your-ip/32</code>. Note that this is the IP address of the physical computer you are wanting to use to connect to your VM. If you don't know your current IP address you can see it by going to [http://ipv4.icanhazip.com ipv4.icanhazip.com] in your browser. If you want to access your VM from other IPs you can add more rules with different IP addresses. If you want to specify a range of IP addresses use [https://www.ipaddressguide.com/cidr this tool] to calculate your CIDR rule for a range of IP addresses.
#*Finally, click the ''Add'' button. Now the rule you just created should show up on the list in security groups.
#*Finally, click on the ''Add'' button. Now the rule you just created should show up on the list in security groups.
#Important Notes
#Important notes
#*'''Do not remove the default security rules''' as this will affect the ability of your VM to function properly (see [[OpenStack#Security_Groups|security groups]]).
#*'''Do not remove the default security rules''' as this will affect the ability of your VM to function properly (see [[OpenStack#Security_Groups|Security Groups]]).
#*'''Security rules cannot be edited''', they can only be deleted and re-added.So if you make a mistake when creating a security group rule you need to delete it using the '''Delete This''' button on the far left of the row for that rule in the security groups screen, and then re-add it correctly from scratch using the '''Add Rule''' button.
#*'''Security rules cannot be edited''', they can only be deleted and re-added.So if you make a mistake when creating a security group rule you need to delete it using the ''Delete Rule'' button on the far left of the row for that rule in the security groups screen, and then re-add it correctly from scratch using the ''+Add Rule'' button.
#*If you change your network location (and therefore your IP address) then you need to add the security rule described in this section for that new IP address. Remember that when you change your physical location (example working on-campus vs working from home) you are changing your network location.
#*If you change your network location (and therefore your IP address) then you need to add the security rule described in this section for that new IP address. Remember that when you change your physical location (example working on-campus vs working from home) you are changing your network location.
#*If you do not have a static IP address for the network you are using remember that it can sometimes change, so if you can no longer connect to your VM after a period of time sometimes it's worth checking to see if your IP address has changed. You can do this by putting [http://ipv4.icanhazip.com ipv4.icanhazip.com] in your browser and seeing if it matches what you have in your security rule. If your IP address changes frequently, but the left-most numbers always stay the same, it could make more sense to add a range of IP addresses rather than frequently modifying your security rules. Use [https://www.ipaddressguide.com/cidr this tool] for determining a CIDR IP range from an IP range or learn more about CIDR notation [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation here].
#*If you do not have a static IP address for the network you are using, remember that it can sometimes change, so if you can no longer connect to your VM after a period of time sometimes it's worth checking to see if your IP address has changed. You can do this by putting [http://ipv4.icanhazip.com ipv4.icanhazip.com] in your browser and seeing if it matches what you have in your security rule. If your IP address changes frequently, but the left-most numbers always stay the same, it could make more sense to add a range of IP addresses rather than frequently modifying your security rules. Use [https://www.ipaddressguide.com/cidr this tool] for determining a CIDR IP range from an IP range or learn more about CIDR notation [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation here].
#*It can be helpful to add a description about what a security rule is for, e.g. home or office. That way you will know which rule is no longer needed if you need to add a new rule while connecting, for example, from home.
#*It can be helpful to add a description about what a security rule is for (e.g. home or office). That way you will know which rule is no longer needed if you want to add a new rule while connecting, for example, from home.


==Connecting to your VM with SSH==
==Connecting to your VM with SSH==
38,760

edits

Navigation menu