Triangle OpenStack meetup 09 2013

Embed Size (px)

Citation preview

DEPLOYING RDO ONRED HAT ENTERPRISE LINUX

Please login and start the 2 RDO VMsUser/Password: RDO/openstackApplications -> System Tools -> Virt Manager

Name, title, role5 years, Raleigh HQ.

- Mysterious- complex- make simple

lecture/exercisequestions any timeLots contenttake notes

DEPLOYING RDO ONRED HAT ENTERPRISE LINUX

Dan RadezSr. Software Engineer, Red [email protected]: radez

Name, title, role5 years, Raleigh HQ.

- Mysterious- complex- make simple

lecture/exercisequestions any timeLots contenttake notes

What is OpenStack?

Cloud/Virtualization Platform

Designed for standard hardware

OpenSource

- attend earlier?- know- used, using

Overview

Lab Workstation

User: RDOPassword: openstack

Applications -> System Tools -> Virt Manager- RDO-control-node: 192.168.122.101- RDO-compute-node: 192.168.122.102

PackStack: Installation

Red Hat developed OpenStack installer

Deployment optionsInteractively

Answer file

Quick Start

All-in-one

FeaturesSingle-host install

Multi-host install

RHOS, RDO, EPEL

PackStack is suitable for deploying both single node proof of concept installations and more complex multi-node installations

PackStack: Installation

[RDO@workstation ~]# ssh 192.168.122.101 [root@control ~]# yum install -y openstack-packstack[root@control ~]# packstack --use-epel=n --install-hosts 192.168.122.101,192.168.122.102 --os-quantum-install=n

Install DefaultsMySQL

Qpid

Swift Not Installed (--os-swift-install=y)

Quantum/Neutron (--os-quantum-install=n)

PackStack: Installation

Exercise: Install OpenStack

file:///home/RDO/slides/index.html

Killing time while PackStack works magic

Relationship between OpenStack services

Killing time while PackStack works magic

Relationship between OpenStack services

Killing time while PackStack works magic

Relationship between OpenStack services

Killing time while PackStack works magic

Relationship between OpenStack services

Killing time while PackStack works magic

Relationship between OpenStack services

Killing time while PackStack works magic

Relationship between OpenStack services

Killing time while PackStack works magic

Relationship between OpenStack services

Killing time while PackStack works magic

Relationship between OpenStack services

Dashboard: Web Interface

Dashboard: Web Interface

web-based interface for managing OpenStack services

modular design for interfacing with other projects

includes interface for all core components

Dashboard: Web Interface

Dashboard: Web Interface

Dashboard: Web Interface

Exercise: Explore the Dashboardhttp://192.168.122.101/dashboard/

Help!

$ keystone help
$ keystone help user-create
$ glance help
$ glance help image-create
$ nova help
$ nova help boot

Keystone: Identity Management

Keystone: Identity Management

centralized identity service

central catalog of services

Multiple forms of authenticationUser name and password

Token-based systems

Amazon Web Services style logins

Keystone: Identity Management

Login as admin[root@control ~]# cat keystonerc_admin
export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export OS_PASSWORD=5ffbe9d2a38d4a48
export OS_AUTH_URL=http://192.168.122.101:35357/v2.0/
export PS1="[\u@\h \W(keystone_admin)]$ "[root@control ~]# source keystonerc_admin[root@control ~(keystone_admin)]#

Keystone: Identity Management

Get a token / troubleshooting auth[root@control ~(keystone_admin)]# keystone token-get+-----------+----------------------------------+
| Property | Value |
+-----------+----------------------------------+
| expires | 2013-06-07T19:22:06Z |
| id | e50158f737f14791ae7831c955524de2 |
| tenant_id | 70784578887b4468adacd92f2f376bc9 |
| user_id | f4270a7b46af467892173a02d9cd49d4 |
+-----------+----------------------------------+

Keystone: Identity Management

Add a User[root@control ~]# keystone user-create --name radez --pass supersecretpassid: 849616035d654b9b9a8cc38b10284a52[root@control ~]# keystone role-create --name role1id: 8ab4a27031084100afbafc0f95a47170[root@control ~]# keystone tenant-create --name tenant1Id: 427c01f33fcf4feb930f26dd550a14e0

Existing admin and member roles

Keystone: Identity Management

Add a User[root@control ~]# keystone user-role-add
--user-id radez --role-id role1 --tenant-id tenant1[root@control ~]# keystone user-list[root@control ~]# keystone role-list[root@control ~]# keystone tenant-list[root@control ~]# keystone user-role-list[root@control ~]# keystone endpoint-list

Keystone: Identity Management

Login as user[root@control ~]# cp keystonerc_admin keystonerc_radez
export OS_USERNAME=radez
export OS_TENANT_NAME=tenant1
export OS_PASSWORD=supersecretpass
export OS_AUTH_URL=http://192.168.122.101:35357/v2.0/
export PS1="[\u@\h \W(keystone_radez)]$ "[root@control ~]# source keystonerc_radez[root@control ~(keystone_radez)]# keystone token-get[root@control ~(keystone_radez)]# source keystonerc_admin[root@control ~(keystonerc_admin)]#

Keystone: Identity Management

Exercise: Add a user

Glance: Image Management

Glance: Image Management

registry for virtual machine images

images used as templates for new servers

Add an image[root@control ~]# glance image-create --name cirros
--is-public 1 --disk-format qcow2 --container-format bare
--file /mnt/cirros-0.3.0-x86_64-disk.imgid: d3d1f38e-3f2c-4f45-91e1-cb4535f62d10 [root@control ~]# glance image-list

Glance: Image Management

Image BuildingOz

appliance-creator

Native glance builder in the works

Manually (launch installer, import before first boot)

Build Notes:Include cloudinit for post boot configuration

Important: The image must be sealed Static Ips

MAC references

Hostname

SSH host keys

SSL Certificates

Kerb Keytabs

RHN System ID

One method: firstboot + reconfigSys

Glance: Image Management

Exercise: Add an image

Quantum: Networking

built in a modular architecture to allow advanced network services (open and closed source) plug into Openstack tenant networks.

Quantum: Networking

networking as a service

built in modular architecture

FeaturesSingle or Multiple host deployment

virtual network, subnet, and port abstractions

Plugin architecture supports many network technologies

built in a modular architecture to allow advanced network services (open and closed source) plug into Openstack tenant networks.

Nova: Instance Management

Nova: Instance Management

manages virtual machines on nodes

provides virtual servers on demand

Design FeaturesDesigned to scale horizontally

Designed for standard hardware

Nova: Instance Management

Boot an instance[root@control ~]# nova flavor-list[root@control ~]# nova keypair-add --pub-key .ssh/id_rsa.pub mykey[root@control ~]# nova keypair-listmykey | 84:6e:28:d3:75:17:ab:25:4d:f3:0d:61:93:55:ee:e2[root@control ~]# nova image-list[root@control ~]# nova boot --flavor 1 --key_name mykey
--image cirros my_instance[root@control ~]# nova list

Nova: Instance Management

Communicate with the instance[root@control ~]# ping 192.168.122.3PING 192.168.122.3 (192.168.122.3) 56(84) bytes of data.
64 bytes from 192.168.122.3: icmp_seq=2 ttl=63 time=0.668 ms[root@control ~]# ssh [email protected] authenticity of host '192.168.122.3 (192.168.122.3)' can't be established.
RSA key fingerprint is 38:49:f2:67:80:11:31:84:1f:b1:79:df:5f:e4:e5:f7.
Are you sure you want to continue connecting (yes/no)? Yes
Warning: Permanently added '192.168.122.3' (RSA) to the list of known hosts.$

Nova: Instance Management

Exercise: Boot an Instance

Cinder: Block Storage

Cinder: Block Storage

manages persistent block storage volumes

snapshots can be taken

Create and attach a volume[root@control ~]# cinder create 1id: 4d6cbb1f-5873-4357-99c7-8ae0502e6de5[root@control ~]# nova volume-attach my_instance
4d6cbb1f-5873-4357-99c7-8ae0502e6de5 auto

Cinder: Block Storage

Mount a volume[root@control ~]# ssh -i .ssh/id_rsa [email protected]_instance$ sudo -imy_instance# mkfs.ext4 /dev/vdbmy_instance# mkdir -p /mnt/volumemy_instance# mount /dev/vdb /mnt/volumemy_instance# touch /mnt/volume/test.txtmy_instance# umount /mnt/volume[root@control ~]# nova volume-detach my_instance
4d6cbb1f-5873-4357-99c7-8ae0502e6de5

Cinder: Block Storage

Exercise: Create, attach and mount a volume

Swift: Object Storage

data replication is managed by software, allowing greater scalability and redundancy than dedicated hardware.

Swift: Object Storage

Install Swift/root/packstack-answers-20130614-091000.txtCONFIG_SWIFT_INSTALL=n[root@control ~]# packstack --answer-file packstack-answers-20130614-091000.txt

Generating a packstack answer file[root@control ~]# packstack --gen-answer-file answers.txt

Swift: Object Storage

allows users to store and retrieve files

distributed architecture to allow for horizontal scaling

provides redundancy as failure-proofing

data replication is managed by software

data replication is managed by software, allowing greater scalability and redundancy than dedicated hardware.

Swift: Object Storage

Upload an object[root@control ~]# swift stat[root@control ~]# swift list[root@control ~]# swift upload test packstack-answers.txt[root@control ~]# swift list[root@control ~]# swift list test[root@control ~]# swift upload test /etc/motd [root@control ~]# swift list test

Swift: Object Storage

Exercise: Create a container & upload an object

Review

Action/Remember: Now you have installed and configured OpenStack. Use these directions to do it again.

Resources

RDO: openstack.redhat.com

https://access.redhat.com/knowledge/docs/en-US/Red_Hat_OpenStack

OpenStack.org

TryStack.org

Puppetlabs.com

Djangoproject.com

Oz: https://github.com/clalancette/oz/

https://github.com/redhat-openstack/image-building-poc

http://radez.fedorapeople.org/slides.tar.gz

Click to edit the title text format

Click to edit the outline text format