OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through...
Transcript of OpenStack on CloudLab Demo and Tutorial...CloudLab OpenStack Tutorial • Goals • Walk through...
OpenStack on CloudLabDemo and Tutorial
David Irwin and Michael ZinkUniversity of Massachusetts Amherst
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
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.
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
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
Prerequisites to Follow Along• Joining an existing project – “oct-workshop” is project created here
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)
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
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
Log in to CloudLab• Go to http://cloudlab.us and click Log In
• Enter username and password, and click Login
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
Step 1. Start Experiment • After logging in, you are taken to your main status dashboard
• Select “Start Experiment” from the “Experiments” menu
Step 2. Select a Profile• Click change profile, search for the “OpenStack” profile, and click
Next
Step 3. Set Parameters• CloudLab enables setting many hardware configuration parameters
• We will keep all of these parameters set as default, just click next
Step 4. Select a Cluster• CloudLab includes multiple clusters with different hardware
• Before selecting, we can check availability
Step 4. Select a Cluster• Utah is the largest cluster; has lots of availability here
Step 4. Select a Cluster• CloudLab includes multiple clusters with different hardware
• Lets select Utah
Step 5. Schedule Experiment• CloudLab supports experiment scheduling
• We want our experiment to start immediately, so just click Finish
Step 6. CloudLab Instantiates Your Profile• Takes a few minutes to start-up
• Will see status page similar to below
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
Exploring Your Experiment – Profile Instructions• Profiles have written instructions for using them
• In this case, provides link and password for admin console of OpenStack
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
Exploring Your Experiment – List View• Shows how to ssh into your machines
Exploring Your Experiment – Manifest View• Underlying description of the resources allocated
Exploring Your Experiment – Graphs View• Plot of resource usage – too little data to generate initially
• Example below
Exploring Your Experiment – Actions• Can spawn ”actions” from list view or topology view
• Start a shell• Get a console
Exploring Your Experiment – Actions• Can spawn ”actions” from list view or topology view
• Start a shell• Get a console
Step 7. Cloud is ready! • Make sure everything is ready to go
Visit the OpenStack Horizon web interface• Click on the link in the instructions panel (in a new tab)
Login to OpenStack web interface• Login with username and password given in instructions
Launch a new VM instance• Click the “Launch Instance” button on the “Instances” page of the
web interface
Set Basic Settings for the Instance• Pick any instance name, use Image Name xenial-server, select boot
from image, select Flavor m1.small
Set Basic Settings for the Instance• Pick any instance name, use Image Name xenial-server, select boot
from image, select Flavor m1.small
Set Basic Settings for the Instance• Pick any instance name, use Image Name xenial-server, select boot
from image, select Flavor m1.small
Set Basic Settings for the Instance• Add networking – sets up internal tunneled connection within cloud
• Select tun0-net
Set Basic Settings for the Instance• Click next until “Set an SSH Keypair”
Click Launch and Wait for Instance to Boot
Add a Public IP Address• Need a public IP address to access machine
• Click on Associate Floating IP
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
Login to your OpenStack Instance
Login to your OpenStack Instance
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
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
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
2. Reboot the Compute Node• Check OpenStack to see the node is down
• Click Admin -> Compute Hypervisors -> Compute Host
2. Reboot the Compute Node• To bring instances back up
• Admin -> Compute -> Instances and then Hard Reboot VM instances
Terminating the Experiment• We need to release resources so that other people have them
• Go back to CloudLab page and click “Terminate”
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/