Tuesday, July 30th session of the vBrownBag OpenStack Sack Lunch Series: Couch to OpenStack. We cover Nova, the Compute Service that deploys and runs VMs.
2. - git clone https://github.com/bunchc/Couch_to_OpenStack.git
- cd Couch_to_OpenStack
- vagrant up
Build Time!
3. - Subscribe & Recordings: http://bit.ly/BrownbagPodcast
- Sign up for the rest of the series:
http://openstack.prov12n.com/about-couch-to-openstack/
Some Logistics
5. - New Edition: http://www.packtpub.com/openstack-cloud-
computing-cookbook-second-edition/book
- Old Edition: http://amzn.to/12eI6rX
Buy the Book
6. 7/2/2013 – Intro to OpenStack
7/9/2013 – Vagrant Primer
7/16/2013 – Identity services (Keystone)
7/23/2013 – Image services (Glance)
7/30/2013 – Compute Services (Nova) << We Are Here
8/6/2013 – Block Storage / Volume Services (Cinder)
8/13/2013 – Networking Services (Quantum)
8/20/2013 – Monitoring & Troubleshooting
8/27/2013 – HA OpenStack
9/3/2013 – DevOps Deployments
Note: Dates are subject to change depending on how far we get in each lesson.
The Rest of the Series
7. Use the automated Glance Install and manually install
Nova
Remember we have a G+ Support group here:
https://plus.google.com/communities/1016630525883821
71429
Homework Review
8. - Creates the Controller & Nova (Compute) Nodes
- Sets variables required for Nova deployment
- Creates an Nova Service and Endpoint in Keystone
- Updates MySQL
- Creates a Nova DB
- Assigns the Nova User to the DB
- Installs Nova
- Configures Nova settings
Build – What’s it doing?
9. - Deploy and run cloud computing workloads
- Depending on the hypervisor, the VMs run natively on
the Nova Host (KVM, Xen) or are remotely controlled
via API (vSphere)
- Nova gets its images from Glance
- … Let’s take a look:
Nova Intro
10. - Deploy an additional node
- Increase resource allocations beyond the default
- … Let’s take a look:
Vagrantfile Review
14. - 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 |
+----------------------------------+----------+----------+----------------------------+
- keystone service-get <UUID>
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | OpenStack Compute Service |
| id | c9c4ffc41c184c82bfa9e501a35977f7 |
| name | nova |
| type | compute |
+-------------+----------------------------------+
Verify Nova Service
15. - nova-manage service list
Binary Host Zone Status State
nova-conductor controller.book internal enabled :-)
nova-scheduler controller.book internal enabled :-)
nova-compute compute.book nova enabled :-)
nova-network compute.book internal enabled :-)
If any binaries have an XXX State, check the /var/log/nova logs on the appropriate host
Verify Nova Component Status
17. Nova Component Functions
Component Purpose
nova-api Interact with users and other OpenStack services
nova-scheduler Determine which Nova node to deploy a VM on
nova-objectstore Simple Image storage that we replace with Glance
nova-conductor Update database on behalf of nova-compute
nova-compute Deploy and run instances
nova-api-metadata Provide information about instances
nova-network Original OpenStack networking service
18. - Private Network to be used by our OpenStack Compute instances internally:
nova-manage network create privateNet
--fixed_range_v4=10.10.<your third octet>.2/24
--network_size=20
--bridge_interface=eth2
- Public Network to access our OpenStack Compute instances:
nova-manage floating create --ip_range=172.16.<your third octet>.2/28
- Access rules that will be implemented in the instance iptables:
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
- Restart Nova-Network:
service nova-network restart
Configure Networking
19. - Create a certificate file for communication with your VM
nova keypair-add demo > demo.pem
chmod 0600 *.pem
- Verify your images
nova image-list OR 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 |
+--------------------------------------+----------------------------+-------------+-----------+
- Boot a new instance of an image
nova boot myInstance --image <Image ID> --flavor 2 --key_name demo
Deploy an Instance
21. On the Compute Node, review /var/log/nova/nova-compute.log
Instance Deployment Progress
22. For next week’s session, we will add another node to the deployment: Cinder for Block Storage.
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 “cinder”
2. The additional server that we create should have its own shell script file with its
hostname as the filename (ex: cinder.sh).
3. The controller.sh will need to be extended to create a cinder database, an endpoint,
service, etc. Also, the nova.conf file will need to be extended to use Cinder for Block
Storage
4. Post ideas, questions, comments on the Google Plus Community
Homework!
23. Now that you know a little about Nova, attempt an integration with vSphere. There are two
options:
1. A single Nova node can control a single ESXi node
2. A single Nova node can control a single vCenter Cluster (Cluster should only have one shared
datastore)
How do I spin up a test vSphere environment as easily as I can with the OpenStack labs? The
AutoLab, of course!
Reference Sites:
1. Nova-vSphere Integration: https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide
2. Nova-vSphere Integration: http://docs.openstack.org/trunk/openstack-
compute/admin/content/vmware.html
3. AutoLab: http://www.labguides.com/autolab/
Extra Credit
Notas del editor
If you see the following after deploying your Instance:root@compute:~# ps -ef | grep dns107 4450 1 0 14:31 ? 00:00:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.confroot 6003 5897 0 19:17 pts/3 00:00:00 grep --color=auto dnsMay need to do the following:killalldnsmasqservice nova-network restartroot@compute:~# ps -ef | grepdnsnobody 6259 1 0 19:22 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/var/lib/nova/networks/nova-br100.pid --listen-address=10.10.139.1 --except-interface=lo --dhcp-range=set:privateNet,10.10.139.3,static,255.255.255.224,120s --dhcp-lease-max=32 --dhcp-hostsfile=/var/lib/nova/networks/nova-br100.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro --domain=novalocalroot 6260 6259 0 19:22 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/var/lib/nova/networks/nova-br100.pid --listen-address=10.10.139.1 --except-interface=lo --dhcp-range=set:privateNet,10.10.139.3,static,255.255.255.224,120s --dhcp-lease-max=32 --dhcp-hostsfile=/var/lib/nova/networks/nova-br100.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro --domain=novalocalroot 6775 5897 0 19:26 pts/3 00:00:00 grep --color=auto dns