38,763
edits
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
<languages /> | <languages /> | ||
<i>Parent page: [[Cloud]]</i> | |||
=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 [[Managing_your_cloud_resources_with_OpenStack#Projects|cloud project]], see [[Cloud# | #'''Have a cloud project''' <br> '''You cannot access a cloud without first having a cloud project.''' If you don't already have a [[Managing_your_cloud_resources_with_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 | #'''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 also work, 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 [[technical support]]. | ||
=Creating your first virtual machine= | =Creating your first virtual machine= | ||
Your project will allow you to create virtual machines (also referred to as | Your project will allow you to create virtual machines (also referred to as <i>instances</i> or <i>VMs</i>) stored in the cloud, which you can access from your personal computer using our web interface. | ||
# '''Log in to the cloud interface to access your project''' <br> The confirmation email you received includes a link to the cloud interface your project is associated with. Click on this link to open your project in your default web browser. If your default web browser is not compatible, open a compatible web browser and copy and paste the link address into the browser. If you know the name of your associated cloud, but don't have the login URL see [[Cloud# | # '''Log in to the cloud interface to access your project''' <br> The confirmation email you received includes a link to the cloud interface your project is associated with. Click on this link to open your project in your default web browser. If your default web browser is not compatible, open a compatible web browser and copy and paste the link address into the browser. If you know the name of your associated cloud, but don't have the login URL see [[Cloud#Cloud_systems|using the cloud]] for the list of cloud interface URLs at which you can log in. Use your username (not your email address) and password to log in. | ||
#'''Check your OpenStack dashboard''' <br> After logging in to the cloud interface (the platform is called | #'''Check your OpenStack dashboard''' <br> After logging in to the cloud interface (the platform is called <i>OpenStack</i>) you will see a dashboard that shows an overview of all the resources available in your project. If you want to know more about navigating and understanding your OpenStack dashboard read the official [https://docs.openstack.org/horizon/latest/user/index.html OpenStack documentation]. | ||
Below there are instructions on starting a Windows VM or a Linux VM, depending on which tab you select. '''Remember this is the operating system for the virtual machine or 'instance' you are creating, not the operating system of the physical computer you are using to connect'''. It should be clear from your project pre-planning whether you will be using Linux or Windows for your VM operating system, but if you are unsure please email [[technical support]]. | Below there are instructions on starting a Windows VM or a Linux VM, depending on which tab you select. '''Remember this is the operating system for the virtual machine or 'instance' you are creating, not the operating system of the physical computer you are using to connect'''. It should be clear from your project pre-planning whether you will be using Linux or Windows for your VM operating system, but if you are unsure please email [[technical support]]. | ||
Line 28: | Line 28: | ||
When you create a virtual machine, password authentication is disabled for security reasons. | When you create a virtual machine, password authentication is disabled for security reasons. | ||
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, you will need to create a key pair. If you are using a windows machine see the [[Generating SSH keys in Windows/en|Generating SSH keys in Windows | 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, you will need to create a key pair. If you are using a windows machine see the [[Generating SSH keys in Windows/en|Generating SSH keys in Windows]] page, otherwise follow the [[Using SSH keys in Linux|Linux/Mac instructions]]. For more information on creating and managing your key pairs see the [[SSH Keys/en|SSH Keys]] page in our wiki. | ||
[[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)]] | ||
===Importing an existing key pair=== | ===Importing an existing key pair=== | ||
#On the OpenStack left menu, select | #On the OpenStack left menu, select <i>Compute->Key Pairs</i>. | ||
#Click on the | #Click on the <i>Import Public Key</i> button; the <i>Import Public Key</i> 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 | #Click on the <i>Import Public Key</i> button. | ||
'''It is not advised to create key pairs in OpenStack because they are not created with a passphrase which creates security issues''' | '''It is not advised to create key pairs in OpenStack because they are not created with a passphrase which creates security issues''' | ||
<br /><br /><br /><br /><br /><br /> | <br /><br /><br /><br /><br /><br /> | ||
Line 57: | Line 57: | ||
#*:''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 [[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 [[Working_with_volumes|Working with volumes]]. | ||
#*:''Delete Volume on Instance Delete:'' Click on ''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 on ''Yes''. | #*:''Delete Volume on Instance Delete:'' Click on ''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 on ''Yes''. | ||
#*''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 /> | #*''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 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 /> | #*''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 /> | ||
Line 68: | Line 68: | ||
#''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 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. | 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== | ||
Line 79: | Line 79: | ||
#*Click on the drop-down arrow menu (indicated by ▼) on the far right of the row for your VM and select ''Associate Floating IP'', then in the ''Allocate Floating IP'' window, click on the ''Allocate IP'' button. 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 ▼ in the ''IP Address'' field. | #*Click on the drop-down arrow menu (indicated by ▼) on the far right of the row for your VM and select ''Associate Floating IP'', then in the ''Allocate Floating IP'' window, click on the ''Allocate IP'' button. 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 ▼ in the ''IP Address'' field. | ||
#*Click on the ''Associate'' button. | #*Click on the ''Associate'' button. | ||
#*You should now have two IP | #*You should now have two IP addresses 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 the firewall | #Configure the firewall | ||
#*On the OpenStack left menu, select ''Network->Security Groups''. | #*On the OpenStack left menu, select ''Network->Security Groups''. | ||
#*On the group row named ''default'', click on the ''Manage Rules'' button 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 on the ''+Add Rule'' button near the top right corner. | #*On the next screen, click on the ''+Add Rule'' button near the top right corner. | ||
#*In the ''Rule'' 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'' 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. | #*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 on 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 [[Managing_your_cloud_resources_with_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 [[Managing_your_cloud_resources_with_OpenStack#Security_Groups|Security Groups]]). | ||
#*'''Security rules cannot be edited''', they can only be deleted and re-added. 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. | #*'''Security rules cannot be edited''', they can only be deleted and re-added. 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 | #*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 | ||
#*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 | 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]. | |||
#*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. | #*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. | ||
Line 140: | Line 141: | ||
#Ensure that the ''Specify username'' checkbox is checked, then enter the image type for your VM (ubuntu for example) into the username field, all lowercase. | #Ensure that the ''Specify username'' checkbox is checked, then enter the image type for your VM (ubuntu for example) into the username field, all lowercase. | ||
#Click on the ''Advanced SSH settings'' tab, and check the ''Use private key'' checkbox. | #Click on the ''Advanced SSH settings'' tab, and check the ''Use private key'' checkbox. | ||
#Click on the page icon in the far right of the ''Use private key'' field. In the pop up dialogue box select the key pair (.pem file) that you saved to your computer at the beginning of this quick guide. | #Click on the page icon in the far right of the ''Use private key'' field. In the pop-up dialogue box select the key pair (.pem file) that you saved to your computer at the beginning of this quick guide. | ||
#Then click on OK. MobaXterm will then save that session information you just entered for future connections, and also open an SSH connection to your VM. It also opens an SFTP connection which allows you to transfer files to and from your VM using drag-and-drop via the left-hand panel. | #Then click on OK. MobaXterm will then save that session information you just entered for future connections, and also open an SSH connection to your VM. It also opens an SFTP connection which allows you to transfer files to and from your VM using drag-and-drop via the left-hand panel. | ||
[[File:MobaXterm connected.png|400px|thumb| Connected to a remote host (Click for larger image)]] <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> | [[File:MobaXterm connected.png|400px|thumb| Connected to a remote host (Click for larger image)]] <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> |