The #OpenStack Cloud Computing Cookbook by @itarchitectkev and @cody_bunch

7587_CoverIt’s out! Cody and I managed to get the book out the door recently after a few months of hard slog upgrading the 1st Edition of the OpenStack Cloud Computing Cookbook to work with Grizzly. The 2nd Edition, published by Packt Publishing, can be found at the list of locations below – and being Amazon, check your local version for rates in your country:

Looking to purchase?
Amazon UK Print: http://amzn.to/1624lXL
Amazon UK Kindle: http://amzn.to/17aFAJx

Amazon US Print: http://amzn.to/1cB8bZi
Amazon US Kindle: http://amzn.to/162S84N

Available direct from publisher in many non-DRM eBook formats: http://bit.ly/1bi5I8M

You can read an interview about the book with Rackspace with Cody and myself here: http://bit.ly/1hfjVng

OpenStack Cloud Computing Cookbook – Book Available for Pre-Order

I’m very pleased to announce that you can pre-order my book on OpenStack: OpenStack Cloud Computing Cookbook

http://www.packtpub.com/openstack-cloud-computing-cookbook/book

Understand, install and configure Nova, OpenStack’s Cloud Compute resource
Learn how to install Swift, how it operates—with practical recipes to troubleshooting and maintaining OpenStack’s Object Storage service
Configure Keystone, OpenStack’s Identity Service which underpins the authentication of all OpenStack services
Manage cloud computing images using the OpenStack Image Service, Glance
Learn how to create custom Windows and Linux images for use in your private cloud environment
Configure and install Horizon, the OpenStack Dashboard service for managing your cloud environment
Learn how to secure your private cloud and the instances running on them
Learn how to troubleshoot, monitor and deploy OpenStack environments beyond test environments and into real-world datacenters

Available around September 2012

OpenStack Diablo, updates and work in progress!

It has been a while since I blogged, and in that time OpenStack has come on leaps and bounds with Diablo being the latest official release. This will change as I work pretty much full-time on testing OpenStack as an end-user (and day job as architect) based on Diablo. This will also help with some book projects that are in the pipe-line for which I’m very humbled and excited about. I’ll blog my experiences as I go along – after all, it’s the reason you’ve stumbled upon this corner of the internet in the first place to learn from my experiences in using OpenStack.
The project I’m working on will be based on Ubuntu running the latest release of OpenStack, Diablo (2011.3). I’ll be investigating Crowbar from Dell to see how remote bare-metal provisioning of OpenStack is coming along – a crucial element for this to be adopted in established enterprises where it is the norm to roll-out enterprise class software in this way. I’ll try to squeeze in JuJu too. Most importantly though is playing catch up on the raft of projects that are flowing through OpenStack from Keystone for authentication, Quantum (although probably more relevant to Essex as this develops) as well as playing catch up on where Swift, Glance and the Dashboard are.

Running OpenStack under VirtualBox – A Complete Guide (Part 2)

In the previous post, we very simply got OpenStack running under VirtualBox. This next part takes this further by getting multiple compute nodes installed to spread the load of your instances. It also paves the way for Part 3 where we will then start to look at Swift, OpenStack’s storage implementation of S3.

Part 2 – OpenStack on a multiple VirtualBox VMs with OpenStack instances accessible from host

We will be using the same set up as for Part 1.

The proposed environment

  • OpenStack “Public” Network: 172.241.0.0/25
  • OpenStack “Private” Network: 10.0.0.0/8
  • Host has access to its own LAN, separate to this on 192.168.0.0/16 and not used for this guide
  • One VirtualBox VM running the software needed for the controller
  • One VirtualBox VM running the software needed for a compute node

This guide will assume you have followed Part 1. We are simply adding in a compute node now, so that will make the virtual machine you created in Part 1 will become the Cloud Controller (CC). Also, OpenStack has been designed so that any part of the environment can run on a separate server. For this guide we will have the following

  • Cloud Controller running MySQL, RabbitMQ, nova-network, nova-scheduler, nova-objectstore, nova-api, nova-compute
  • Compute node running: nova-compute

The Guide

  • Add a new VirtualBox Guest
    • Name: cloud2
      • OS Type: Linux
      • Version: Ubuntu (64-Bit)
    • 2048Mb Ram
    • Boot Hard Disk
      • Dynamically Expanding Storage
      • 8.0Gb
    • After this initial set up, continue to configure the guest
      • Storage:
        • Edit the CD-ROM so that it boots Ubuntu 10.10 Live or Server ISO
        • Ensure that the SATA controller has Host I/O Cache Enabled (recommended by VirtualBox for EXT4 filesystems)
      • Network:
        • Adapter 1
          • Host-only Adapter
          • Name: vboxnet0
        • Adapter 2
          • NAT
          • This will provide the default route to allow the VM to access the internet to get the updates, OpenStack scripts and software
      • Audio:
        • Disable (just not required)
    • Boot the guest and install Ubuntu as per normal
  • Assign static IPs to the cloud controller
    • Ensure that the Cloud Controller you created in Part 1 has static addresses for eth0 and eth1.
      • For the sake of this guide, I’m assuming you have assigned the following
        • eth0: 172.241.0.101/255.255.255.128.  This address is your Cloud Controller address (CC_ADDR) and will be the API interface address you will be communicating on from your host.
        • eth1: stays as dhcp as it is only used for NAT’d access to the real world
    • Your compute nodes don’t need to be set statically, but for the rest of this guide it is assumed the addresses are as follows
      • Cloud2
        • eth0: 172.241.0.102/255.255.255.128
        • eth1: stays as dhcp as it is only used for NAT’d access to the real world
  • Grab this script to install OpenStack
    • This will set up a repository (ppa:nova/trunk) and install MySQL server where the information regarding your cloud will be stored
    • The options specified on the command line match the environment described above
    • wget --no-check-certificate \
      https://github.com/uksysadmin/OpenStackInstaller/raw/master/OSinstall.sh
  • Run the script (as root/through sudo) specifying that you want a compute node and that you’ve specified the IP address of the Cloud Controller
    • sudo bash ./OSinstall.sh -A $(whoami) -T compute -C 172.241.0.101
  • No further configuration is required.
  • Once completed, ensure that the Cloud Controller knows about this new compute node
    • On the Cloud Controller run the following
      • mysql -uroot -pnova nova -e 'select * from services;'
      • sudo nova-manage service list
      • You should see your new compute node listed under hosts
      • If you don’t have a DNS server running that resolves these hosts add your new compute node to /etc/hosts
        • 172.241.0.102 cloud2
  • On the new compute node run the following
    • sudo nova-manage db sync
  • As you copied your credentials from the cloud controller created in Part 1, you should just be able to continue to use this from your host – but this time you can spin up more guests.
    • If you changed the eth0 address of your cloud controller, ensure your cloud/creds/novarc environment file has the correct IP.
  • Repeat the steps above to create further compute nodes in your environment, scaling seamlessly

Running OpenStack under VirtualBox

This page has been superseded by Running OpenStack under VirtualBox – A Complete Guide.

(There’s still some good things on here though)

Running OpenStack under VirtualBox is detailed on many pages on the internet.  The Wiki at OpenStack.org has an intro on getting this going and why you would want to do this.  One big reason is that getting this great cloud software running under virtual hardware means you can set up multi-node clusters without a big outlay in hardware. This allows you to develop your cloud environment under the safety and convenience of your own machine.

The steps below are a mixture of instructions from http://fnords.wordpress.com/2010/12/02/bleeding-edge-openstack-nova-on-maverick/ and http://wiki.openstack.org/NovaInstall/.

What you will be setting up

Instructions

  1. Install VirtualBox
  2. Create a Ubuntu 64 Guest
    • 1vCPU
    • 1024Mb Ram
    • 8Gb Disk
    • Enable Hardware VT-x/AMD-V if available
    • Add in an extra NIC, Host-only Adapter
  3. Once installed, run the updates (and optionally install the Guest Additions if you’re running the desktop version) and reboot.
  4. Assign a static IP to your eth1 interface (Host-only) – you will use this to access the guest from your host.
  5. To install OpenStack follow the instructions http://fnords.wordpress.com/2010/12/02/bleeding-edge-openstack-nova-on-maverick/

Warning for nested virtualization

Since you are running virtualization software under virtualization software (nested virtualization) some words of warning:

Intel VT-x: KVM does NOT currently support nested virtualization

To run instances under OpenStack under VirtualBox, you must specify that software emulation be used

sudo apt-get install qemu

Edit /etc/nova/nova.conf to enable qemu (software virtualization) support

--libvirt_type=qemu

AMD-V: Enable nested KVM virtualization support

To enable AMD’s KVM support create a file /etc/modprobe.d/kvm_amd.conf with the following in

options kvm_amd nested=1

And restart all the OpenStack services

service libvirt-bin restart; service nova-network restart; service  nova-compute restart; service nova-api restart; service nova-objectstore  restart; service nova-scheduler restart

Known Issues

Currently, at the time of writing, there is a bug in some of the Python scripts used to launch instances that may cause the following error to be thrown: KeyError: ‘imageId’ when creating instance with EC2/S3. A patch is available.

wget http://launchpadlibrarian.net/64364074/x.patch -O /tmp/KeyError_imageId.patch
cd /usr/lib/pymodules/python2.6
sudo patch -p0 < /tmp/KeyError_imageId.patch
service libvirt-bin restart; service nova-network restart; service   nova-compute restart; service nova-api restart; service nova-objectstore   restart; service nova-scheduler restart