Couch to OpenStack: Glance - July, 23, 2013

Preview:

DESCRIPTION

Tuesday, July 23rd session of the vBrownBag OpenStack Sack Lunch Series: Couch to OpenStack

Citation preview

Image - Glance

Couch To OpenStack

- git clone https://github.com/bunchc/Couch_to_OpenStack.git

- cd Couch_to_OpenStack- vagrant up

Build Time!

- Subscribe & Recordings: http://bit.ly/BrownbagPodcast

- Sign up for the rest of the series: http://openstack.prov12n.com/about-couch-to-openstack/

Some Logistics

On Twitter: #vBrownBag

Also: @VMTrooper

Join the conversation

- New Edition: http://www.packtpub.com/openstack-cloud-computing-cookbook-second-edition/book

- Old Edition: http://amzn.to/12eI6rX

Buy the Book

7/2/2013 – Intro to OpenStack < Recording here: http://buff.ly/1cQZ3xC7/9/2013 – Vagrant Primer < Recording here: http://bit.ly/149FnWt7/16/2013 – Identity services (Keystone)7/23/2013 – Image services (Glance) << We Are Here7/30/2013 – Compute Services (Nova)8/6/2013 – Block Storage / Volume Services (Cinder)8/13/2013 – Networking Services (Quantum)8/20/2013 - Monitoring & Troubleshooting8/27/2013 - HA OpenStack9/3/2013 – DevOps Deployments

Note: Dates are subject to change depending on how far we get in each lesson.

The Rest of the Series

Use the automated Keystone Install and manually install Glance

Remember we have a G+ Support group here:https://plus.google.com/communities/101663052588382171429

Homework Review

- Sets variables required for Glance deployment- Creates an Glance Service and Endpoint in

Keystone- Updates MySQL

- Creates a Glance DB- Assigns the Glance User to the DB

- Installs Glance- Configures Glance settings

- Verifies successful install- Uploads two image files

Build – What’s it doing?

- VM Image Management Service- Provides centralized source of VM images for

the OpenStack Compute (Nova) nodes- … Let’s take a look:

Glance Intro

Keystone Intro

- http://docs.openstack.org/developer/glance/#concepts

- http://docs.openstack.org/developer/glance/configuring.html

Concepts – Reference

- vagrant ssh controller- sudo su -- cat .stackrc

- export OS_TENANT_NAME=cookbook- export OS_USERNAME=admin- export OS_PASSWORD=openstack- export

OS_AUTH_URL=http://${MY_IP}:5000/v2.0/

- source .stackrc

Using Glance!

- keystone service-list+----------------------------------+----------+----------+----------------------------+| id | name | type | description |+----------------------------------+----------+----------+----------------------------+| 551dbd02eac14d379dd2190292138182 | glance | image | OpenStack Image Service || 0d1db0981352466dacd4cd8fcdf0c3fa | keystone | identity | OpenStack Identity Service |+----------------------------------+----------+----------+----------------------------

- keystone service-get <UUID>+-------------+----------------------------------+| Property | Value |+-------------+----------------------------------+| description | OpenStack Image Service || id | 551dbd02eac14d379dd2190292138182 || name | glance || type | image |+-------------+----------------------------------+

Verify Glance Service

- glance image-list+--------------------------------------+----------------------------+-------------+-----------+| ID | Name | Disk Format | Size |+--------------------------------------+----------------------------+-------------+-----------+| bc670eb3-67dc-42f3-82b2-91e96f5eca52 | Cirros 0.3 | qcow2 | 9761280 || 90c17ca9-6447-4d45-b862-86366881c13a | Ubuntu 12.04 x86_64 Server | qcow2 | 252641280 |+--------------------------------------+----------------------------+-------------+-----------+

List Images

# cd /home/vagrant# glance image-create \ --name='Ubuntu 12.04 x86_64 Server' \ --disk-format=qcow2 \ --container-format=bare \ --public < precise-server-cloudimg-amd64-disk1.img

Create an Image

Disk & Container FormatsDisk Typerawvmdkqcow2vdivhdakiariami

Container Typebareovfakiariami

# glance image-delete <UUID or Name>

Delete an Image

# keystone endpoint-list+---------------------------------------+--------------------------------+----------------------------------+| id | publicurl | internalurl | service_id |+---------------------------------------+--------------------------------+----------------------------------+| ... | http://172.16.94.200:5000/v2.0 | http://172.16.94.200:5000/v2.0 | 0d1db0981352466dacd4cd8fcdf0c3fa || ... | http://172.16.94.200:9292/v1 | http://172.16.94.200:9292/v1 | 551dbd02eac14d379dd2190292138182 |+---------------------------------------+--------------------------------+----------------------------------+

# keystone endpoint-get --service image+--------------------+------------------------------+| Property | Value |+--------------------+------------------------------+| identity.publicURL | http://172.16.94.200:9292/v1 |+--------------------+------------------------------+

List Endpoints

For next week, our OpenStack deployment will increase from one to two servers when we introduce the Compute (Nova) Service. A Production OpenStack deployment typically consists of multiple Compute nodes to run the Cloud workloads.

We will need perform a few extra actions than we have done for the previous sessions:1. Edit the Vagrantfile to generate two servers instead of just one, and call the

second node “compute” (Hint: you may need to change the “nodes” Ruby Hash at the top of the file)

2. Any additional server that we create should have its own shell script file with its hostname as the filename (ex: compute.sh). At a minimum, automate the install of the following Ubuntu packages:

a. nova-api-metadata, nova-compute, nova-compute-qemu, nova-doc, nova-network, libvirt-bin, pm-utils

3. The controller.sh will need to be extended to create a nova database, an endpoint, service, etc. Also, the following Ubuntu packages need to be installed on the Controller:

a. rabbitmq-server, nova-api, nova-scheduler, nova-objectstore, dnsmasq, nova-conductor

Additionally, like getting glance up and running, let’s try to get compute installed and running on our own for next week.

Homework!

Recommended