This is part A of the tutorial UvA HPC course 2019-01-30 and covers the following topics:
The User Interface (UI) is the web site that allows you to manage your Virtual Machines (VMs) on the HPC Cloud.
The interface supports several views and for this course, you should use the “user view”.
Once you login to the UI, it is a best practice to change the initial password.
Let’s check whether it worked.
From now on you can use your new password to log in to the UI. Do so now.
To complete the setup of your HPC Cloud account, you need to add a Secure Shell (SSH) public key to your profile. This is a one-time task.
First, you need an SSH private/public key pair.
~/.ssh/directory. Create one now if needed.
ls ~/.ssh; you should see the files
Next, you need to copy the public SSH key (
id_rsa.pub) to the UI.
The matching private key (
id_rsa) stays safe in your laptop.
cat ~/.ssh/id_rsa.pub, then selecting and copying all of that text).
Using the HPC Cloud revolves around building Virtual Machines (VM). SURFsara provides several Apps readily available in the HPC Cloud UI, to facilitate creating simple VMs. Apps are ready-made
appliances for you to copy and use.
These are the steps to build your first VM from one of the Apps; detailed instructions follow:
imagewith a Linux operating system installed.
templateto create your first VM.
Let’s run your first VM on the HPC Cloud!
appUbuntu-18.04.1-Desktop by clicking anywhere on that line except the tick-box to the left of it.
Food for brain:
When you import an
templatewill be created, as explained during the introductory presentation. In the UI you have an Images tab under Storage and a VMs tab under Templates on the left menu. You should see your new
- Can you see them?
- What is the STATUS of the
imagejust after you import it?
- Refresh the contents of the Images tab page by clicking button , next to the button until it is READY.
template consists of a set of attributes that defines a Virtual Machine. For example, how many cores you want your VM to have, how much RAM memory, what storage drives to attach, which network connections, etc. We will have to adapt the
template to meet your requirements before you can use it to create VMs out of it.
Edit the imported
template following these steps:
templateyou just imported (Course Template), and click on it (anywhere except the tick-box).
nics) for your VM.
NIC 0on the left pane is mapped to
template, click the green button Update at the top, to save your changes.
template is just a description of the virtual machine that we want to build. Let’s create the actual virtual machine from it.
template, there is only one item in the list. You can see the feedback:
templateattributes, for the time being do not change them (leave “Number of instances” at 1).
Congratulations! You have just created a fresh, clean virtual machine!
Let’s summarise what you have seen so far. Click on each of the tabs on the left side menu and inspect the information provided. The most important ones at this point in time are described here:
templategives your VM the shape you want. A
templateis just a recipe; not the machine itself.
appliancesendorsed by SURFsara HPC Cloud team that you can use.
Your VM will appear in the list of virtual machines. At first, it will have the state
PENDING. This indicates that the HPC Cloud is looking for a place where your virtual machine can actually run. Finding the right place depends on the amount of resources (cores, memory, and disk) you requested in the associated
template. Keep refreshing the list by clicking button . When the required capacity becomes available, your VM will show the status
RUNNING. Only then can you actually use your VM.
You can interact with your VM in several ways: command-line (e.g.: SSH), VNC (UI in your browser) or a remote desktop. We will use SSH in a terminal for the time being.
The way to log in to your virtual machine is making use of the SSH key pair that you stored in your profile earlier.
Commandline access - SSH
First find your VM’s IP address. It is shown in the IPs column from the virtual machines list on the UI and also in the Network tab of the VM’s details page.
On your laptop, start a terminal (in Mac/Linux) or GitBash (in Windows).
Type the following command on the terminal to establish a connection with your VM:
Replace 145.100.5Q.RST with your IP address! And remember that we know which username to use because we read that on the Description attribute of the app when we were importing it.
If everything went well, the first time you try to log in, your terminal will ask you to add the VM’s IP to the list of known hosts in your laptop. Type Yes, in that case.
Right after you reach the newly created VM via SSH for the first time, you may see a prompt asking you to change the default password for user ubuntu. Please, do so by typing first the current password, which is the same as the username. You can then type the password you want. When this password-changing process is finished (even successfully), you may be logged out of the VM. You will then have to submit the SSH command again, and then everything should work as expected: you are connected to a shell in the VM.
You should now see a similar line in your terminal:
This means that you have logged in successfully to your Virtual Machine!
ubuntu@ip-145...:~$ ls / ubuntu@ip-145...:~$ whoami
ubuntu@ip-145...:~$ echo "Some text ..." > myfile ubuntu@ip-145...:~$ cat myfile
ctrl-Din your terminal (do not issue any shutdown command):
Food for brain:
Log in to your VM again. Is your file still there?
Let’s shut your first VM down. Anytime you expect your VM to be doing nothing useful, you should shut it down to stop consuming the resources that your VM is holding.
Food for brain:
When the VM has been shut down and disappeared from the list, check and refresh the Storage > Images and Templates > VMs tabs. Are your
This section is meant to propose extra questions we thought would be nice for you to investigate. We invite you to do/think about them even after the workshop has finished.
Bonus: The HPC Cloud has hundreds of users. Many of them have common questions. In order to address these we have put together a web site with some documentation for users. We call it the HPC Cloud Documentation. Do you know the URL of this web site? Make sure you find out!
Your running VMs get exclusive access to their resources whether they are doing something useful or are idle. Because the HPC Cloud is offered on a fair-share basis and other users may actually be needing resources that you may be holding, before you move to the next part of this workshop, please remember to shut all your VMs down.