Cinder – Block Storage
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, @JFrappier
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 OpenStack7/9/2013 – Vagrant Primer7/16/2013 – Identity services (Keystone)7/23/2013 – Image services (Glance)7/30/2013 – Compute Services (Nova)8/6/2013 – Block Storage / Volume Services (Cinder) << We Are Here8/13/2013 – Networking Services (Neutron fka 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 Nova Install and manually install Cinder
Remember we have a G+ Support group here:http://bit.ly/C2OSGooglePlus
Homework Review
- Block Storage for Cloud Instances over iSCSI
- Originally part of Nova as nova-volume. Now, a separate project.
- Cinder Volumes are presented as /dev/vd* in Linux Instances and as a new Volume to Storage Manager in Windows Instances.
- Mount and format them like normal disks.
Cinder Intro
- Creates the Controller, Compute, and Cinder (Block) Nodes
- Sets variables required for Cinder deployment- Creates a Cinder Service and Endpoint in
Keystone- Updates MySQL
- Creates a Cinder DB- Assigns the Cinder User to the DB
- Installs Cinder- Configures Cinder settings
Build – What’s it doing?
Cinder Architecture
- http://docs.openstack.org/grizzly/basic-install/apt/content/basic-install_controller.html#basic-install_controller-cinder
- http://docs.openstack.org/grizzly/openstack-compute/install/apt/content/cinder-install.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 /vagrant/.stackrc
Using Cinder!
- keystone service-list+----------------------------------+----------+----------+----------------------------+| id | name | type | description |+----------------------------------+----------+----------+----------------------------+| 3e5e37bd90394e01b981daef86c10dab | ec2 | ec2 | EC2 Service || 07409443890b4d7da1ae35686332b2c3 | glance | image | OpenStack Image Service || e8fcf639a36147de8b9894db072268b6 | keystone | identity | OpenStack Identity Service || c9c4ffc41c184c82bfa9e501a35977f7 | nova | compute | OpenStack Compute Service || ec098d41c68b4278b3e68418dfd08dac | volume | volume | Volume Service |+----------------------------------+----------+----------+----------------------------+
- keystone service-get <UUID>+-------------+----------------------------------+| Property | Value |+-------------+----------------------------------+| description | Volume Service || id | ec098d41c68b4278b3e68418dfd08dac || name | volume || type | volume |+-------------+----------------------------------+
Verify Cinder Service
- cinder-manage host list
host zonecinder.book nova
Verify Cinder Nodes
Cinder Component Functions
Component Purpose
cinder-api Interact with users and other OpenStack services
cinder-scheduler Determine which Cinder node to present storage from
cinder-volume* Block Storage Server
tgtd* A Linux iSCSI target. Not an OpenStack Component, but important for test environments.
- Private Network for OpenStack Compute instances internally:nova-manage network create privateNet --fixed_range_v4=10.10.<3rd Octet>.2/24 \--network_size=20 --bridge_interface=eth2
- Assign a floating (Public) IP address for users to access to the Instance:nova-manage floating create --ip_range=172.16.<3rd Octet>.1/28
- Create a keypair using Nova Client with the following commands:nova keypair-add demo > /vagrant/demo.pemchmod 0600 /vagrant/*.pem
- Nova Security Rules to enable ping and ssh to our Instances:nova secgroup-add-rule default tcp 22 22 0.0.0.0/0nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
- Fix nova-network on the Compute Nodekillall dnsmasqsudo stop nova-networksudo start nova-network
- Deploy an Ubuntu Imagenova boot myInstance --image <get UUID from nova image-list> --flavor 2 --key_name demo
Configure a Nova Instance
- Verify the source LVM Volume (cinder-volumes) was createdpvscan PV /dev/sda5 VG precise64 lvm2 [79.76 GiB / 0 free] PV /dev/loop2 VG cinder-volumes lvm2 [5.00 GiB / 5.00 GiB free] Total: 2 [84.75 GiB] / in use: 2 [84.75 GiB] / in no VG: 0 [0 ]
- Create the Cinder volume that we will present to the VMcinder create --display-name c2OS 1
- Verify the volume was createdcinder listlvdisplay cinder-volumesnova volume-list (command only works on the Nova or Controller Nodes)
Create the Cinder Volume
Use the Cinder Volume- Attach the Volume to the Instancenova volume-attach <instance_uuid> <volume_uuid> /dev/vdc
- Login to the Instancessh -i /vagrant/demo.pem ubuntu@<instance IP>
- Format and mount the volumefdisk -lsudo mkfs.ext4 /dev/vd<substitute correct letter>sudo mkdir /mnt1sudo mount /dev/vdb /mnt1df -h
Monitor /var/log/nova/nova-compute.log
2013-08-01 04:56:56.324 9369 TRACE nova.openstack.common.rpc.amqp Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2010-10.org.openstack:volume-bd31eb87-5eda-4171-946c-326c0318d837 -p 10.0.2.15:3260 --rescan2013-08-01 04:56:56.324 9369 TRACE nova.openstack.common.rpc.amqp Exit code: 2552013-08-01 04:56:56.324 9369 TRACE nova.openstack.common.rpc.amqp Stdout: ''2013-08-01 04:56:56.324 9369 TRACE nova.openstack.common.rpc.amqp Stderr: 'iscsiadm: No portal found.\n'
Volume Attach Troubleshoot
For next week’s session, we will add another node to the deployment: Quantum (Neutron) Networking.
We will need perform a few extra actions than we have done for the previous sessions:1. Edit the Vagrantfile to generate an additional server give it the name “quantum”
2. The additional server that we create should have its own shell script file with its hostname as the filename (ex: quantum.sh).
3. The controller.sh will need to be extended to create a quantum database, an endpoint, service, etc. Also, the nova.conf file will need to be extended to use Quantum for Network Services
4. Post ideas, questions, comments on the Google Plus Community: http://bit.ly/C2OSGooglePlus
Homework!
Top Related