Week 8 Lab: The Cloud Foundation
Module: Operating Systems 3 (Virtualisation & Cloud Technologies)
Estimated Time: 45 Minutes
Lab Type: Administration / CLI
Lab Overview
Before we can launch Virtual Machines, we must construct the "Digital Data Center" that will house them. This involves setting up the Authentication (Keystone), Storage Library (Glance), and Network Wiring (Neutron).
Objectives:
- Identity Management: Create a new Project (Tenant) and User.
- Asset Management: Download and Upload a Disk Image.
- Network Architecture: Create a Private Network, Subnet, and Router.
- Verification: View the Network Topology in the Dashboard.
Prerequisites:
- Week 7 VirtualBox Appliance running.
- SSH Access (
ssh student@...). source admin-openrc(The Administrator Credentials).
Part 1: Identity (Who are we?)
We will create a specific project for our lab work, rather than using the default "admin" project.
-
Create Project:
bash source admin-openrc openstack project create --description "Week 8 Foundation" lab8_project- Record ID: Copy the ID from the output table.
[ ________________________________ ]
- Record ID: Copy the ID from the output table.
-
Create User:
bash openstack user create --password secret --project lab8_project lab_student -
Grant Access: We must give the user the "member" role on the project.
bash openstack role add --project lab8_project --user lab_student member
Part 2: Image (What are we running?)
We need an operating system. We will use CirrOS, a tiny Linux testing OS.
-
Download Image:
bash wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img -
Upload to Glance:
bash openstack image create "cirros-lab8" \ --file cirros-0.5.1-x86_64-disk.img \ --disk-format qcow2 \ --container-format bare \ --public -
Verify:
bash openstack image list- Question: What is the Status of the image?
[ ________ ]
- Question: What is the Status of the image?
Part 3: Networking (Where does it live?)
This is the most complex part. We will build a "Home Router" inside the cloud.
-
Create the Network (The Switch):
bash openstack network create lab8_net -
Create the Subnet (The IP Range): We will use
192.168.88.0/24.bash openstack subnet create --network lab8_net --subnet-range 192.168.88.0/24 --dns-nameserver 8.8.8.8 lab8_subnet -
Create the Router (The Gateway):
bash openstack router create lab8_router -
Wiring It Up:
-
Internal Link: Plug the Subnet into the Router.
bash openstack router add subnet lab8_router lab8_subnet -
External Link: Plug the Router into the Provider Network (Public Internet).
- Note: The external network is usually named
publicorexternal. Checkopenstack network list.bash openstack router set --external-gateway public lab8_router
- Note: The external network is usually named
-
Part 4: Visualization (Horizon)
Now let's see what we built.
-
Log in to Dashboard:
- Open
http://<IP>/dashboard - Login: Use the
lab_student/secretcredentials we created in Part -
Screenshot:
- You should see a graph showing your
lab8_netconnected tolab8_router, which connects topublic. - Take a screenshot.
- You should see a graph showing your
- Open
Lab Checkpoint
- I have created the
lab8_project. - I have uploaded
cirros-lab8to Glance. - I have created a fully routed network (
lab8_net). - I have verified the topology graph in Horizon.
Reflection:
- Why do we need a Router? Why can't we just plug VMs into the external network? (Hint: IP Availability).
- What happens if you try to delete the Network before deleting the Subnet?
Instructor Signature: ___ Date: ___