OpenStack is an open source cloud computing platform. The School runs an OpenStack cluster for both students and staff within the School to provide cloud computing capabilities. The page provides the information needed to get started with OpenStack and create your first compute instance.
OpenStack can be accessed by pointing your web browser at https://cscloud.cf.ac.uk and logging in with your University username and password. Enter cs.cf.ac.uk in the domain field.
When you login the overview page is shown. This provides a summary of your project usage and your remaining quota. Each account is given a set number of instances, CPUs, memory, storage and floating IPs that can be used to provide fair usage.
If this is the first time you have logged in to OpenStack then you must create a private network for your project before you can run any instances.
In the left hand panel expand Project then Network and click on Networks.
We need to create a network so click on the Create Network button.
In the window that opens enter a name for your network then click the Next button.
Enter a subnet name and a private network address range e.g. 192.168.0.0/24 or 172.16.10.0/24 then click Next.
We must now assign the allocation ranges and DNS servers that your network should use. In the Allocation Pools box enter a comma separated IP range. For example, 192.168.0.3,192.168.0.250 will provide IPs in the range 192.168.0.3 to 192.168.0.250. Make sure there is no whitespace otherwise the configuration will be invalid.
For the DNS Name Servers use the University’s name servers which have the following IP addresses: 10.239.40.2 and 10.239.40.130.
Finally click on Create to create the network.
The network you created should now show on the Networks page.
Next we create a router, in the left hand panel select Project then Network and click on Routers. To create a router click the Create Router button.
In the window that opens enter a name for your router and ensure that the Admin State is set to up. In the dropdown list at the bottom choose cscloud_priv_floating as the External Network and click the Create button.
Now we need to assign the network we created to the router. Click on the router name that you entered in the previous step.
Select the Interfaces tab and then click then Add Interface button.
In the window that opens choose the subnet you created previously from the list of dropdown options. Click Submit to assign it to the router.
To access your instances you will need to use passwordless SSH. If you are unsure about passwordless login or SSH then see Configuring Passwordless Login on Linux which provides an overview and instructions on how to generate SSH keys.
In the Project panel select Compute then Access & Security. In the Access & Security page select the Key Pairs tab and then click the Import Key Pair button.
In the window that opens provide a name that will help you to indentify your key and paste your public key into the provided box. Click Import Key Pair to the key to your account. This public key will now be added to the authorised keys file on every instance your create.
Security groups are used to define what traffic is allowed to instances assigned to a specific group. When you create an instance it will be automatically be assigned to the default security group. This group prevents all incoming traffic to your instance. We will edit the default security group to allow SSH traffic.
In the left hand panel select Project then Compute and click on Access & Security. In the Security Groups tab click on Manage Rules for the Default Security Group.
We need to add a rule to allow SSH traffic to our instances. Click on the Add Rule button.
A number of rule templates come preconfigured but you can of course define your own rules if necessary. We want to allow SSH so we select the rule from the dropdown menu.
Click Add to add the rule to the security group.
To create an instance first select Project then Compute in the left hand panel and click on Instances. Next click on the Launch Instance button.
The window that opens allows you to configure the instance to your liking. The first page allows you to set an instance name and the number of instances you wish to launch.
The Source page allows you to create an instance from an image, snapshot or volume, we will only cover booting from an image in this guide. Select Image in the Boot Source dropdown which will then show the images available. You can add your own images or use the ones provided. Select one from the available options by clicking the + on the right.
The Flavor determines how much memory, CPU and storage will be available to the instance. Select a flavour by clicking on the + on the right.
We can leave the rest of the options at their default values as we only have one SSH key and one network configured.
Click on Launch Instance to create the instance.
After a couple of minutes your instance will be available for use. This is indicated by the Active status.
You now have an instance created but no way to access it, we must assign a floating IP. Click on the dropdown options to the right of your instance and select Associate Floating IP.
In the IP Address dropdown you can select a floating IP to assign. If there are no IPs in the list then click the + button to the right. In the window that opens ensure that the Pool is cscloud_priv_floating and then click Allocate IP. You should then be able to select an IP from the dropdown menu to assing to your instance. Click Associate to add the floating IP to your instance.
A floating IP should now be visible on instance overview page. Note you may need to refresh the page.
To determine the floating IP address of your instance select Instances from the Compute menu in the left hand panel. In the IP address column of your instance’s details you will find the floating IP.
In the example the floating IP address of the instance is 10.72.97.12. The instance is also running Ubuntu 16.04 and the default user name is ubuntu so to log in to the instance we would use the following command:
ssh -i ~/.ssh/your_private_key email@example.com
where ~/.ssh/your_private_key is the path to the private key associated with the public key you added to OpenStack.
Each of the images available comes with a default user name, these are summarised in the table below.
|Default user names for available images|
|Image Name||User Name|