openstack on cloudlab demo and tutorial...cloudlab openstack tutorial • goals • walk through...

48
OpenStack on CloudLab Demo and Tutorial David Irwin and Michael Zink University of Massachusetts Amherst

Upload: others

Post on 12-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

OpenStack on CloudLabDemo and Tutorial

David Irwin and Michael ZinkUniversity of Massachusetts Amherst

Page 2: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

CloudLab OpenStack Tutorial• Goals

• Walk through process of creating small cloud on CloudLab using OpenStack• Your OpenStack will run on bare-metal machines dedicated to you• You will have complete administrative (root) access to these machines

• Your OpenStack installation will be entirely customizable by you• Documentation: http://docs.cloudlab.us/openstack-tutorial.html

Page 3: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Relationship to Open Cloud Testbed (OCT)• CloudLab is a management framework designed for researchers to

run experiments on customizable cloud infrastructure• Its user interface and features (such as experiment scheduling and storage) are designed

around this use case• CloudLab can provision bare-metal and virtual machines for its experiments

• CloudLab is one management framework that OCT aims to support• OCT operates a layer below (or beside of) CloudLab by provisioning bare-

metal machines between different resource management frameworks• Other resource management frameworks could include container

orchestration platforms (e.g., Kubernetes), OpenStack VM management platform, batch schedulers (e.g., SLURM), etc.

Page 4: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Objectives• Log into CloudLab• Create your own cloud using a pre-defined profile• Access resources in the cloud that you created• Use administrative access to customize your cloud• Clean up your cloud when finished• Learn where to get more information

Page 5: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Prerequisites to Follow Along• You must have a CloudLab account

• We have pre-created accounts for those of you that filled out the Google Form• To join, go to https://cloudlab.us/, and click Request Account

Page 6: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Prerequisites to Follow Along• Joining an existing project – “oct-workshop” is project created here

Page 7: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Prerequisites to Follow Along• Must create public/private ssh key pair

• Example of creating keys below (on my Mac)• Upload public key when joining project (cloudlab_key.pub in example)

Page 8: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Prerequisites to Follow Along• Must create public/private ssh key pair

• Putty Windows client • Downloading - https://www.ssh.com/ssh/putty• Managing keys - https://www.ssh.com/ssh/putty/windows/puttygen

• SSH Tutorial • Google “github ssh tutorial” to learn more about ssh• https://help.github.com/en/github/authenticating-to-github/connecting-to-

github-with-ssh

• SSH provides command-line interface• Must use X11 to interact with remote machines via graphical interface• Won’t cover here – requires additional setup of X server

Page 9: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Finalizing CloudLab Account• 1. Once you’ve entered the information, click “Submit Request”• 2. You’ll receive a verification code via email

• Enter the verification code to complete signup

• 3. We’ll receive an email requesting us to approve your account• We need to approve before you can log in

Page 10: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Log in to CloudLab• Go to http://cloudlab.us and click Log In

• Enter username and password, and click Login

Page 11: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Building an OpenStack Cloud• Must instantiate a “profile” to create an “experiment”

• Profile is packaging of experiment that can be shared with others• Experiment is instance of a profile running on your own dedicated resources

• Profile program, Experiment process

• We will use template OpenStack profile• Created by CloudLab staff by scraping disk image of partially-completed

OpenStack installation• Rest of installation completed automatically once machines are allocated

• Based on information determined after allocation, such as IP addresses of machines

Page 12: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 1. Start Experiment • After logging in, you are taken to your main status dashboard

• Select “Start Experiment” from the “Experiments” menu

Page 13: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 2. Select a Profile• Click change profile, search for the “OpenStack” profile, and click

Next

Page 14: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 3. Set Parameters• CloudLab enables setting many hardware configuration parameters

• We will keep all of these parameters set as default, just click next

Page 15: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 4. Select a Cluster• CloudLab includes multiple clusters with different hardware

• Before selecting, we can check availability

Page 16: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 4. Select a Cluster• Utah is the largest cluster; has lots of availability here

Page 17: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 4. Select a Cluster• CloudLab includes multiple clusters with different hardware

• Lets select Utah

Page 18: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 5. Schedule Experiment• CloudLab supports experiment scheduling

• We want our experiment to start immediately, so just click Finish

Page 19: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 6. CloudLab Instantiates Your Profile• Takes a few minutes to start-up

• Will see status page similar to below

Page 20: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – Experiment Status• Panel at top of page shows experiment status

• Note – when time limit is up resources are terminated and local disk state is lost

Page 21: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – Profile Instructions• Profiles have written instructions for using them

• In this case, provides link and password for admin console of OpenStack

Page 22: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – Topology View• Bottom of page shows topology

• 2 machines connected by a LAN – shows only experiment network• SSH in over separate control network

Page 23: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – List View• Shows how to ssh into your machines

Page 24: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – Manifest View• Underlying description of the resources allocated

Page 25: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – Graphs View• Plot of resource usage – too little data to generate initially

• Example below

Page 26: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – Actions• Can spawn ”actions” from list view or topology view

• Start a shell• Get a console

Page 27: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Exploring Your Experiment – Actions• Can spawn ”actions” from list view or topology view

• Start a shell• Get a console

Page 28: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Step 7. Cloud is ready! • Make sure everything is ready to go

Page 29: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Visit the OpenStack Horizon web interface• Click on the link in the instructions panel (in a new tab)

Page 30: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Login to OpenStack web interface• Login with username and password given in instructions

Page 31: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Launch a new VM instance• Click the “Launch Instance” button on the “Instances” page of the

web interface

Page 32: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Set Basic Settings for the Instance• Pick any instance name, use Image Name xenial-server, select boot

from image, select Flavor m1.small

Page 33: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Set Basic Settings for the Instance• Pick any instance name, use Image Name xenial-server, select boot

from image, select Flavor m1.small

Page 34: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Set Basic Settings for the Instance• Pick any instance name, use Image Name xenial-server, select boot

from image, select Flavor m1.small

Page 35: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Set Basic Settings for the Instance• Add networking – sets up internal tunneled connection within cloud

• Select tun0-net

Page 36: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Set Basic Settings for the Instance• Click next until “Set an SSH Keypair”

Page 37: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Click Launch and Wait for Instance to Boot

Page 38: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Add a Public IP Address• Need a public IP address to access machine

• Click on Associate Floating IP

Page 39: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Add a Public IP Address• Press red cross button to set up a new IP address• Click the “Allocate IP” button—this allocates a new address for you from the public

pool available to your cloud• Click the “Associate” button—this associates the newly-allocated address with this

instance

Page 40: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Login to your OpenStack Instance

Page 41: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Login to your OpenStack Instance

Page 42: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Administering OpenStack• Go through some examples of administering OpenStack

• Unable to do these examples as a mere user of OpenStack

• 1. Logging into the Control Network• 2. Rebooting a Compute Node

Page 43: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

1. Logging into the Control Network• Use ”List View” on CloudLab page to log into bare-metal machines

• Then run some commands on ctl and cp1• See OpenStack processes running (on ctl) -> ps –ef | grep openstack• See OpenStack network setup (on cp1) -> ifconfig | less• See running VMs (on cp1) -> sudo virsh list –all

Page 44: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

2. Reboot the Compute Node• Lets reboot cp1 and watch it over the serial console

• 1. Open serial console for cp1• 2. Reboot the node • 3. Watch the node on the console

Page 45: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

2. Reboot the Compute Node• Check OpenStack to see the node is down

• Click Admin -> Compute Hypervisors -> Compute Host

Page 46: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

2. Reboot the Compute Node• To bring instances back up

• Admin -> Compute -> Instances and then Hard Reboot VM instances

Page 47: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

Terminating the Experiment• We need to release resources so that other people have them

• Go back to CloudLab page and click “Terminate”

Page 48: OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through process of creating small cloud on CloudLab using OpenStack • Your OpenStack will

More things to do• Create a new project to work on CloudLab past this tutorial• Try out some profiles other than OpenStack (use the “Change Profile” button on the

“Start Experiment” page)• Read more about the basic concepts in CloudLab• Try out different hardware• Learn how to make your own profiles

• See http://docs.cloudlab.us/