Cloud Computing with ACCESS-ci and Jetstream2

Background

Most bioinformatics software runs on Linux or unix (including Mac) operating systems. For this class we will work in a Linux environment. Since the computer lab machines and many students’ computers run Windows this presents a problem. To overcome this problem we will run Linux in a virtual cloud environment.

What is Linux?

Specifically we will use Jetstream2. Jetstream2 is a cloud computing resource provider in partnership with NSF’s ACCESS program. We will run virtual Linux machines (Instances) on Jetstream2 servers and then use a virtual network connection (VNC) to display the “desktop” of the virtual machine to be displayed on our local computer.

We will use the computers in the computer lab to connect to our virtual machines.

It is also possible to connect to your Jetstream2 virtual machine from your own personal computer. You will probably want to do this so you can work on your instance outside of the classroom. To use your own computer you need to install VNC Viewer on your computer.

If you want to use other campus computer rooms, VNC Viewer has been installed on computers in:

  • 102 Wellman
  • 78 Hutchison
  • 2101 SCC
  • 91 Shields

You can check the schedule of these rooms to see when they are available.

Additionally, you can connect to the computers from your personal computer using the UC Davis Virtual Lab. I wouldn’t bother doing that unless you have trouble getting TigerVNC running on your own computer.

If you are curious about what version of Linux we are using and how we created the Jetstream2 virtual machine, please see this document.

Getting Started with Jetstream2

We have gone ahead and created an instance for each person. This will be your own virtual sandbox where you will explore the computational environment and complete the lab assignments.

Connecting to your Instance

There are two possible ways to connect to your instance.

  1. Using a secure shell(ssh) text connection. This allows you to send and receive text from your virtual machine’s linux “console”. A SSH connection is a good choice if your network connection is slow or if you don’t need any graphical display.
  2. Using a Virtual Network Connection(VNC). A VNC connection allows the screen of your virtual machine to be displayed on the screen of your local computer. With a VNC you will be able to interact with your virtual machine as if it was in front of you.

Connect to your instance via SSH

You can learn how to connect to your instance via an SSH text connection. While not necessary for this class after this initial setup, this would be the standard way to connect to a Linux server for many people. It is much better when the network is slow or your VNC connection is not working.

For a windows computer see the section immediately below. If you are using a Mac (or Linux) computer to connect please skip to the “Connecting to your Instance via SSH” section.

Windows

There are many ways to connect to your instance via SSH on a Windows computer. Each method has its pros and cons depending on how you plan to use your instance. For Windows users we will be using Git Bash.

If you already have a different method to SSH into your instance, feel free to use that instead.

Git Bash

Git Bash can be found on the lab computers by typing “Git Bash” in the search bar in the bottom left corner of your desktop

GitBash_Location

Clicking to on the top hit should open a window like the one below

GitBash_HomeScreen

Connecting to your Instance via SSH

Connecting to your instance is easy and quick. If you are on a Mac using Terminal, the steps should mostly be the same

  1. Open Git Bash (or Terminal if using Mac) on your Computer GitBash_HomeScreen
  2. Enter “ssh exouser@” and the provided ip address in first textbox and then hit Enter. IP GitBash
  3. You will be greeted with a security warning, type “yes” then hit Enter Security Alert GitBash
  4. Enter the provided password and hit enter. When entering your new passwords, it will appear as if nothing is being entered. This is on purpose so no one physically looking at your screen can see what you are typing. Password GitBash If you copy your password with control-c, you can paste it quickly by right clicking on the Git Bash window and selecting paste
  5. You are now connected to your instance SSH

Setting passwords and securing connections

There are two passwords associated with your virtual machine, one for the user account, and one for the VNC viewer. We need to create both.

Reset user account password

Let’s reset the overall password for your account. This is a good practice since your password was sent to you through email / Canvas. The username for your account is “exouser”. To reset the password for this account:

  1. While still in Git Bash type sudo passwd exouser
  2. Enter a new password.
    When entering your new passwords, it will appear as if nothing is being entered. This is on purpose so no one physically looking at your screen can see what you are typing. Set Password

Create password for vnc

  1. While still in Git Bash type vncpasswd
  2. Enter a new password
  3. When asked “Would you like to enter a view-only password (y/n)?” just press enter Set Password

Connect to your instance via VNC

VNC connections work on a client/server model. Your virtual machine is the server because it serves its graphical display. Your local machine is the client.

  1. Start the Tiger VNCViewer on your local machine.
  2. In the window that pops up type the IP Address of your virtual machine followed by “:1”. The “:1” denotes screen one on your virtual machine. For example if your virtual machine IP address is 149.165.155.163 then you would enter “149.165.155.163:1”. VNC Connect
  3. Click on Options and then the Security tab. For encryption, select TLS with anonymous certificates; for authentication, select Standard VNC. Then press OK. VNC Security
  4. Press the Connect button.
  5. When you are asked for a password enter the vnc password you created earlier. Although the login window may say that the connection is not secure I am reasonably sure that it is encrypted. VNC Signin
  6. The window now displays the desktop of your virtual Linux machine. Nifty! VNC Success
  7. The icons at the bottom do/open the following (from L to R): Icons
    • Open an Interface to show all applications
    • Open help for the Ubuntu desktop
    • Open the file explorer (a bit slow)
    • Open Firefox
    • Open Rstudio
    • Open Terminal, where you will do all your command line work
    • Open github Desktop
    • Open Slack

Citations

  1. AWS Setup Guide