SURF Research Boot Camp 2018-11-02
Part A

HU logo

SURF logo

This is part A of the HPC Cloud session of SURF Research Boot Camp. Here are the topics to be covered:

  1. Access the user interface
  2. Add your public SSH key
  3. My first VM

1. Access the User Interface

The User Interface (UI) is the web site that allows you to manage your Virtual Machines (VMs) on the HPC Cloud.

Log in to the UI

Once you login, feel free to explore the menus and tabs offered by the OpenNebula UI. These will offer most of the functionalities a user needs to manage and operate VMs.

Change your password

It is a good practice to change the initial password provided, to ensure the work environment is yours.

Logout

Let’s check whether changing the password worked.

From now on, you can use your new password to log in to the UI. Please login again.

2. Add your public SSH key

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.

Next, you need to copy the public SSH key (id_rsa.pub) to the UI. The matching private key (id_rsa) remains safe in your laptop.

3. My first VM

Working with the HPC Cloud service mostly revolves around building and destroying VMs. This section will teach how to build a VM running Linux with the following steps:

Let’s create your first VM to be run on the HPC Cloud Oort!

Import an appliance from the AppMarket

SURFsara HPC Cloud provides ready-made appliances to their users. These appliances are available in the Apps option of the Storage menu in the HPC Cloud UI. This is meant to help users instantiating secure VMs quickly. Proceed as follows:

Food for brain:

  • When you click on an appliance (anywhere on the row except for the tick-box), you can see detailed information about the appliance. Can you see the information about the appliance we are using in this exercise?
  • When you import an appliance, an image and a template are created as explained during the introductory presentation. You can verify that the process is complete by inspecting the Images section in the Storage tab, and the VMs section in the Templates tab. You should see your new image and template there.
  • Can you see them?
  • What is the Status of the image just after you import it?
  • Refresh the images list until the Status is READY.

Review the Template

A template file consists of a set of attributes that define a Virtual Machine. For example, you can define how many cores you want your VM to have, how much RAM memory, what storage drives to attach, which network connections, etc. To get a general overview of the attributes that define a VM, proceed as follows:

Start the VM

When an appliance is imported from the Apps , the disk image is normally non-persistent (persistency=no). In simple words, image persistency is a property that controlls whether changes to the image are kept (persistency = yes) or not (persistency = no) when you shutdown the VM. Follow the next steps to make your image persistent:

As mentioned earlier, a template is just a description of the virtual machine that we want to build. Let’s create the actual virtual machine from it.

What happened?

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:

NOTE:
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 you actually use your VM.

Log in to the 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

NOTE:

Replace 145.100.5X.YZT with your IP address!

ssh ubuntu@145.100.5X.YZT

First login

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. Type Yes, in that case.

You should now see a similar line in your terminal: ubuntu@145...:~$

This means that you have logged in successfully to your Virtual Machine!

ubuntu@145...:~$ ls ~
ubuntu@145...:~$ whoami
ubuntu@145...:~$ echo "Some text ..." > myfile
ubuntu@145...:~$ cat myfile
ubuntu@145...:~$ logout

Food for brain:

Log in to your VM again. Is your file still there?

First shutdown

Let’s shutdown your VM. Whenever you do not need your VM running, 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 image and template still there?

Note:

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.

Bonus food for brain

This section is meant as extra questions that we thought would be nice for you to investigate, and we invite you to do/think about them even after the workshop is 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!!!

Next: Calculate π

You have completed part A of the Tutorial SURF Research Boot Camp 2018-11-02. Please continue with part Calculate π.

NOTE:

Before you move to the next sections, remember to shut your VMs down.