OpenStack Cloud Computing Cookbook

http://www.openstackcookbook.com/

Tag Archives: nova

The OpenStack Cloud Computing Cookbook – Third Edition – is now available to purchase!

Thanks to Cody Bunch and Egle Sigler – and whole bunch of tech reviewers spanning the cloud and OpenStack community, the OpenStack Cloud Computing Cookbook has had its 3rd reboot. We cover configuration of Nova, Neutron, Glance, Keystone, Cinder and Swift. We show you how to use these. We show you how to use Ansible to deploy this in your datacentre. We show you how to use things like Heat and Cloud-Init to automate your cloud application environments as well as the latest and greatest like DVR and FWaaS.

We provide this with an accompanying multi-node Vagrant environment, where you can try out the steps in the book using free and open source stools such as VirtualBox and Vagrant – and we always make the latest versions of OpenStack available here too.

This is the best book in the series by far and now it’s available to buy here.

-Kevin Jackson

Advertisement

Pre-Order OpenStack Cloud Computing Cookbook and get 30% Off Before 25th July!

openstackbook3rdedcoverThe OpenStack Cloud Computing Cookbook, 3rd Edition is due for publication in August 2015. You can reserve a copy and get a whopping 30% Off with the code OCCC30 if used before July 25th 2015 from the Packt website.

We cover Juno and Kilo installations – and always maintain an updated multi-node learning environment with the latest releases at https://github.com/OpenStackCookbook/OpenStackCookbook

This is what we cover in the book to help you install and configure OpenStack for your environment, whether you’re setting up a lab or ready to move to production:


Chapter 1: Keystone
– Installation, Setting up SSL, using with LDAP and more!
Chapter 2: Glance – Installation, using with Object Storage, migrating from disk versions and more!
Chapter 3: Neutron – Installation, configuration of OVS, creating networks, using distributed virtual routers and more!
Chapter 4: Nova – Installation, configuration, launching instances, host aggregates and much more!
Chapter 5: Swift – Installation, configuration, rings and more!
Chapter 6: Using Swift – Uploading objects, large objects, containers, container replication and more!
Chapter 7: Administering Swift – monitoring, collecting stats, dealing with failures and more!
Chapter 8: Cinder – Installation, using and configuring 3rd party backends and more!
Chapter 9: More OpenStack – Cloud-init, LBaaS, FWaaS, Ceilometer and Heat!
Chapter 10: Horizon – Installation and configuration and using the dashboard!
Chapter 11: Production OpenStack – configuring HA, clusters, using Galera and other techniques and automation using Ansible!

Get your copy today at bit.ly/1MtAJov with 30% Off Code OCCC30

OpenStack clients installation on Ubuntu for the OpenStack Cloud Computing Cookbook

Throughout the OpenStack Cloud Computing Cookbook we expect the reader to have access to the client tools required to operate an OpenStack environment. If these are not installed, they can be installed by following this simple guide.

This guide will cover installation of

  • Nova Client
  • Keystone Client
  • Neutron Client
  • Glance Client
  • Cinder Client
  • Swift Client
  • Heat Client

Getting ready

To use the tools and this guide, you are expected to have access to a Ubuntu (preferably 14.04 LTS) server or PC that has access to the network where you are installing OpenStack.

How to do it…

To install the clients, simply execute the following commands

sudo apt-get update
sudo apt-get install python-novaclient python-neutronclient python-glanceclient \
    python-cinderclient python-swiftclient python-heatclient

Once these are installed, we can configure our CLI shell environment with the appropriate environment variables to allow us to communicate with the OpenStack endpoints.

A typical set of environment variables are as follows and is used extensively throughout the book when operating OpenStack as a user of the services:

export OS_TENANT_NAME=cookbook
export OS_USERNAME=admin
export OS_PASSWORD=openstack
export OS_AUTH_URL=https://192.168.100.200:5000/v2.0/
export OS_NO_CACHE=1
export OS_KEY=/vagrant/cakey.pem
export OS_CACERT=/vagrant/ca.pem

Typically these export lines are written to a file, for example called ‘$home/openrc’ that allows a user to simply execute the following command to source in these to use with OpenStack

source openrc

(or in Bash: . openrc)

Configuring Keystone for the first time

To initially configure Keystone, we utilize the SERVICE_TOKEN and SERVICE_ENDPOINT environment variables. The SERVICE_TOKEN is found in /etc/keystone/keystone.conf and should only be used for bootstrapping Keystone. Set the environment up as follows

export ENDPOINT=192.168.100.200
export SERVICE_TOKEN=ADMIN
export SERVICE_ENDPOINT=https://${ENDPOINT}:35357/v2.0
export OS_KEY=/vagrant/cakey.pem
export OS_CACERT=/vagrant/ca.pem

This bypasses the usual authentication process to allow services and users to be configured in Keystone before the users and passwords exist.

How it works…

The OpenStack command line tools utilize environment variables to know how to interact with OpenStack. The environment variables are easy to understand in terms of their function. A user is able to control multiple environments by simply changing the relevant environment variables.

To initially install the users and services, a SERVICE_TOKEN must be used as at this first stage there are no users in the Keystone database to assign administrative privileges to. Once the initial users and services has been set up, the SERVICE_TOKEN should not be used unless maintenance and troubleshooting calls for it.