Get an extra 20% off the OpenStack Cloud Computing Cookbook from PacktPub.com during the OpenStack Design Summit using this code: OpenStackSummit2012.
Testing OpenStack is now as easy thanks to VirtualBox and Vagrant. To run a mini test environment with Compute, Cinder, Keystone and Horizon you just need the following tools:
- Git client
To set up a sandbox environment within VirtualBox to run OpenStack Folsom you will need to download:
- VirtualBox from http://www.virtualbox.org/
- Vagrant from http://vagrantup.com/
- Git (using your trusty package manager or from http://github.com/)
Installation of these tools are simple – follow the on-screen prompts.
When ready we need to configure the VirtualBox “Host-Only” Networking. This networking mode allows us to communicate with our VirtualBox guest and our underlying host.
We will set up the following:
- Host-Only Network: IP 172.16.0.254; Network 172.16.0.0/255.255.0.0; Disable DHCP
- Host-Only Network #2: IP 10.0.0.254; Network 10.0.0.0/255.0.0.0; Disable DHCP
(Hint: there is a bash script @ https://raw.github.com/uksysadmin/OpenStackInstaller/folsom/virtualbox/vbox-create-networks.sh to create these for you).
How To Do It
To create a VirtualBox VM, running Ubuntu 12.04 with OpenStack Folsom from Ubuntu’s Cloud Archive, carry out the following
1. Clone the GitHub OpenStackInstaller scripts
git clone https://github.com/uksysadmin/OpenStackInstaller.git
2. Make the scripts the ‘folsom’ branch
cd OpenStackInstaller git checkout folsom
3. Run ‘vagrant’ to launch your OpenStack instance which will come up with IP 172.16.0.201
cd virtualbox vagrant up
4. After a short while your instance will be ready. Note that on the first run, Vagrant will download a 384Mb Precise64 “box”. Subsequent launches will not require this step.
Launch a web browser at http://172.16.0.201/horizon and log in with:
Username: admin Password: openstack
(Note, to edit the IP it is assigned, modify virtualbox/vagrant-openstack-bootstrap.sh (Warning its a bit of a sed hack!).
We are nearing the most complete and feature-rich OpenStack release to date, so given that we’ve all be running stable Diablo and Essex releases, what’s in Folsom that will get people reaching for their favorite package manager?
The OpenStack Folsom release is the community’s sixth release. With each release, the community gets larger and more exciting as more companies come on board and more developers commit their code; with each release comes greater stability and new features that allow us greater flexibility when deploying our cloud environments.
It’s hard to talk about OpenStack Folsom without mentioning two notable new projects: Quantum and Cinder. Quantum provides a feature-rich and extensible API for programmatically defining networks. This allows for far richer network topologies to be defined than currently available such as configuring multi-tier applications and the subnets they’re allocated. It also allows for more advanced configurations at the backend by utilizing plugins, such as utilizing the excellent Open vSwitch software or implementing QoS and security functions. Quantum gives users of OpenStack the ability to completely control all aspects of their cloud compute environment, without compromising the underlying infrastructure and security of the underlying OpenStack environment; Quantum brings true multi-tenancy without any restrictions of VLANs.
Cinder is the OpenStack Block Storage project that was formerly known as nova-volume. This re-birth into its own project allows this crucial piece of core functionality to be developed independently of Nova (Compute) itself. To a user, this means faster development, quicker bug fixes and newer features to meet the demands of today’s hosting requirements.
Other notable features included in Folsom are Microsoft’s hypervisor, Hyper-V, making a comeback after it was removed due to the code being unmaintained for the Essex release and the highly available OpenStack Storage, Swift, being ramped up to 1.7.2. For those upgrading Swift, read the advice here https://lists.launchpad.net/openstack/msg16188.html as this comes with a speed improvement to the rings that is backwards compatible – but downgrading at a later date using the new rings won’t be possible.
Put all the elements of Folsom together and you have a cloud software suite that allows you to easily scale out your secure compute environment and place highly available object storage within your datacenter. With a feature rich API fronting all aspects of an OpenStack controlled datacenter, management of this environment brings cost savings through efficiency and automation. Everything becomes code.
So how do you get the magical OpenStack Folsom installed onto the pristine that adorns your network? Over the last couple of months, there have been great strides in this area with the release of Rackspace’s Private Cloud Edition and Piston’s Airframe, both allowing swift installation of OpenStack without the overhead of some of the complexities previously experienced with an installation. Expect Folsom versions of easy to install methods soon. For those installing on Red Hat based and Ubuntu distros are left to stitch some of the required magic together, with some nuances to be mindful of when moving from a previous release – such as keystone and glance command line syntax changes. In fact, moving from a previous release isn’t as straight-forward as an apt-get upgrade, although with the Canonical starting to fulfil their promise of supporting future OpenStack releases on the latest LTS release via their Cloud Archive – this is quickly becoming a reality. Behind the scenes moving from one version to the next makes this process complex, so for those looking at moving from Diablo or Essex are best looking at migrating workloads to your new environment rather than expecting an hands-free upgrade at this stage. This “want” will become mandatory as OpenStack matures further to remove people from the endless conversations and confusions for those entering OpenStack and the sticking point being the version to accept as stable.
Essex laid the foundations for OpenStack production clouds, Folsom builds on this success and comes brandishing new weapons. With performance enhancements in Compute and Storage, Nova Volumes moving to its own Cinder project and Quantum added to its arsenal – OpenStack just made the choice easier when deciding on what cloud software you should deploy in your datacenter.
I’m nearing the end of my latest project – my book: OpenStack Cloud Computing Cookbook. A few more cuts here and there and it will be released to the general public in September. This is predominantly the cause of the 4 month blog update starvation.
About the book
The book is designed specifically to help people get up to speed with OpenStack and give you the confidence and understanding to roll this out into your own datacenters. The book covers installation of OpenStack in a sandbox environment on local equipment running VirtualBox to recipes covering topics that allow you to move out to the datacenter, and sections covering some of the tools and techniques to make for a robust installation of OpenStack in your production environment.
So a sneaky peak at the recipes to tease you until publish time:
- Creating a sandbox environment with VirtualBox
- Installing OpenStack Compute Packages
- Configuring Database Services
- Configuring OpenStack Compute
- Stopping and starting OpenStack Compute services
- Creating a cloudadmin account and project
- Installation of command line tools
- Checking OpenStack Compute services
- Uploading a sample machine image
- Launching your first cloud instance
- Terminating your instance
- Creating and modifying user accounts
- Managing security groups
- Creating and managing keypairs
- Using Public Cloud Images
- Alternative upload method using euca2ools
- Creating Custom Windows Images
- Creating Custom CentOS Images
- Installing the OpenStack Identity Service
- Creating tenants
- Creating roles
- Adding users
- Defining service endpoints
- Creating the service tenant and service users
- Configuring OpenStack Image Service
- Configuring OpenStack Compute
- Using OpenStack Compute with the OpenStack Identity Service
- Creating an OpenStack Storage Sandbox Environment
- Installing OpenStack Storage
- Configuring Storage
- Configuring Replication
- Configuring OpenStack Storage Service
- Configuring OpenStack Storage Proxy Server
- Configuring Account Server
- Configuring Container Server
- Configuring Object Server
- Making the rings
- Stopping and starting OpenStack Storage
- Testing OpenStack Storage
- Installing the swift client tool
- Creating containers
- Uploading objects
- Uploading large objects
- Listing containers and objects
- Downloading objects
- Deleting containers and objects
- Using Swift ACLs
- Preparing drives for OpenStack Storage
- Managing OpenStack Storage cluster with swift-init
- Checking cluster health
- OpenStack Storage Benchmarking
- Managing capacity
- Removing nodes from a cluster
- Replacing failed hard drives
- Collecting usage statistics
- Installing OpenStack Image Service
- Configuring OpenStack Image Service with MySQL
- Configuring OpenStack Image Service with OpenStack Storage
- Configuring OpenStack Compute with OpenStack Image Service
- Managing Images
- Registering a Remotely Stored Image
- Configuring Nova-Volume Services
- Configure OpenStack Compute for Nova-Volume
- Creating Volumes
- Attaching volumes to instances
- Detaching volumes from an instance
- Deleting volumes
- Installing the OpenStack Dashboard
- Key Management using the OpenStack Dashboard
- Security Group management using the OpenStack Dashboard
- Launching instances using the OpenStack Dashboard
- Terminating instances using the OpenStack Dashboard
- Connecting to instances using the OpenStack Dashboard and VNC
- Adding new tenants using the OpenStack Dashboard
- User management using the OpenStack Dashboard
- Configuring Flat Networking
- Configuring Flat Networking with DHCP
- Configuring VLAN Networking
- Configuring Per-Project (Tenant) IP ranges
- Automatically assigning fixed networks to tenants
- Modifying a tenant’s fixed network
- Manually associating floating IPs to instances
- Manually removing floating IPs from instances
- Automatically assigning floating IPs
- Installing MAAS for bare-metal provisioning
- Using MAAS for bare-metal provisioning
- Installing and configuring Juju
- Installing OpenStack Services using Juju
- Increasing OpenStack Compute capacity
- MySQL clustering using Galera
- Configuring HA Proxy for MySQL Galera Load Balancing
- Configuring highly-available OpenStack services
- Bonding Network Interfaces for Redundancy
- Monitoring Compute Services with Munin
- Monitoring Instances using Munin and collectd
- Monitoring Storage Service using StatsD/Graphite
- Monitoring MySQL with Hyperic
- Checking OpenStack Compute Services
- Understanding logging
- Troubleshooting OpenStack Compute services
- Troubleshooting OpenStack Storage
- Troubleshooting OpenStack Authentication
- Submitting bugs
- Asking help from the community
Where possible I explain both Euca2ools and Nova Client – so whichever floats your boat, the recipe will apply to you where applicable!
I’ll save all my thanks for those that have donated their time in helping me write this when the book is out. In the meantime – a big thank you to everyone in the OpenStack community that has helped me in some shape or form!
THE ONLY WAY IS ESSEX
You can read my newest blog entry on the trials and tribulations of my experience of OpenStack at http://www.openstack.org/blog/2012/04/openstack-community-pulls-it-out-of-the-bag/
OpenStack is a true Open Source Cloud Platform, backed by many companies who have full-time staff writing code and fixing bugs. It has a large community of intelligent minds powering OpenStack that you won’t find in any other community cloud ecosystem. They’re the rock stars of cloud computing.
A 12 minute screencast showing an installation of OpenStack ‘Essex’ on Ubuntu 12.04 running on VirtualBox
Note that this screencast has no sound.
- Configure VirtualBox with the following
eth1 host-only: 172.16.0.0/16
eth2 host-only: 10.0.0.0/8
Hard Disk: 20Gb
System Processor (optional but recommended): Increase CPU from 1
- Install Ubuntu 12.04, specifying eth0 as your default interface
- Configure networking:
eth1 is your public network set to be 172.16.0.0/16
eth2 is your private VLAN
- Run an update on the machine, and reboot
- Install Git which allows you to pull down a script to perform the installation of OpenStack
- Grab the script using the following:
git clone https://github.com/uksysadmin/OpenStackInstaller.git
- Ensure you’re running the ‘essex’ version of the script by running: git checkout essex
- Run the script with the following:
./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v qemu
- Upload an image using the test supplied script:
./upload_ubuntu.sh -a admin -p openstack -t demo -C 172.16.0.1
- Log into the Dashboard: http://172.16.0.1/ with ‘demo/openstack’
- Create your access keys
- Edit the default security group (add in SSH access and ability to ping)
- Launch your instance
- Log into your new instance!
The latest release of OpenStack Essex has changed the way Keystone is managed. Rather than most of the work being done by nova-manage, this has moved to a ‘keystone’ client command (which can be found in the Ubuntu package, python-keystoneclient).
An example of its use can be seen here: https://github.com/uksysadmin/OpenStackInstaller/blob/essex/keystone-services.sh
I’m very pleased to announce that you can pre-order my book on OpenStack: OpenStack Cloud Computing Cookbook
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
I’ll be doing a short (well, I can get carried away but the plan is short) talk on what Autotrader.co.uk is doing in terms of cloud computing which includes efforts and plans around OpenStack and AWS.
You will find some great people at the informal event – from people who are actively involved in cloud technology, to those that are just starting their cloud journey.
If you’re in the North West of the UK and fancy coming along – it is being kindly hosted by the Warrington offices of AppSense Ltd. The evening is turning out to be a great forum and the hope is that more events in the area will follow. If you have an interest in the cloud bubble, please come along for a chat over some drinks and some food.
Full details here: http://cloudcamp.org/warrington