Cloud Computing with ACCESS-ci and Jetstream2
02 Apr 2024Background
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.
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.
- For Macs, download and installTigerVNC-1.13.1.dmg.
- Or, if you use homebrew on your Mac you can open terminal and type
brew install tigervnc-viewer
- Or, if you use homebrew on your Mac you can open terminal and type
- For PCs you want “vncviewer” not the full “TigerVNC”
- Try vncviewer64-1.13.1.exe for a 64 bit system.
- Or vncviewer-1.13.1.exe in the unlikely event that you have a 32 bit system.
- Alternatively, the Java version VncViewer-1.13.1.jar should work on any system
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.
- 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.
- 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
Clicking to on the top hit should open a window like the one below
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
- Open Git Bash (or Terminal if using Mac) on your Computer
- Enter “ssh exouser@” and the provided ip address in first textbox and then hit Enter.
- You will be greeted with a security warning, type “yes” then hit Enter
- 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. If you copy your password with control-c, you can paste it quickly by right clicking on the Git Bash window and selecting paste
- You are now connected to your instance
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:
- While still in Git Bash type
sudo passwd exouser
- 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.
Create password for vnc
- While still in Git Bash type
vncpasswd
- Enter a new password
- When asked “Would you like to enter a view-only password (y/n)?” just press enter
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.
- Start the Tiger VNCViewer on your local machine.
- 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”.
- Click on
Options
and then theSecurity
tab. For encryption, selectTLS with anonymous certificates
; for authentication, selectStandard VNC
. Then pressOK
. - Press the
Connect
button. - 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.
- The window now displays the desktop of your virtual Linux machine. Nifty!
- The icons at the bottom do/open the following (from L to R):
- 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