Quick OpenStack Deployments with PuppetStack

October 5, 2013

How To

Quick OpenStack Deployments with PuppetStack

Introduction

Sometimes I need to create a quick and simple OpenStack environment. While DevStack would work perfect for this, I have a small collection of shell scripts and Puppet manifests that I use instead. Due to the simplicity of this collection, I’ve also used it to help introduce other people to both OpenStack and Puppet.

I call this collection PuppetStack.

Table of Contents

  • Configuration Assumptions
  • How to Use It
  • Post-Install
  • Notes on Networking
  • Final Notes

Configuration Assumptions

PuppetStack only works on Ubuntu-based systems. You do not need a centralized Puppet Master server — PuppetStack can be run using the puppet apply command-line tool.

To keep PuppetStack simple, several OpenStack design choices are predetermined and are unable to be changed. The resulting OpenStack environment consist of:

  • Glance with a file-backend
  • RabbitMQ
  • nova-network configured for FlatDHCP and non-multi-host
  • libvirt and KVM as the hypervisor

Cinder is installed but is not configured with a volume backend. This must be done manually.

Swift is not installed.

PuppetStack is able to deploy an all-in-one OpenStack environment or a multi-node environment consisting of a single Cloud Controller and one or more Compute Nodes.

How to Use It

You can find PuppetStack here. The first file to look at is the init.sh script. This script installs the Ubuntu Grizzly apt repo as well as the required Puppet OpenStack modules.

The next file to review is the params.pp Puppet manifest. You will need to edit this file with the values you want to use for your environment.

Note that since a central Puppet Master service is not used, values are not shared between servers. This means that if you use PuppetStack to deploy a multi-node environment, you must copy the params.pp manifest to all servers manually.

Once params.pp is ready, run one of the three manifests depending on what role you want to apply to the server you’re currently working on:

  • all-in-one.pp: Will install and configure all OpenStack services to the current server.
  • controller.pp: Will make the current server a Cloud Controller.
  • compute.pp: Will make the current server a Compute Node.

For example, to turn the current server into a Cloud Controller, run:

1 $ puppet apply –verbose controller.pp

Post-Install

Once all nodes have been configured, review the nova.sh shell script. This script downloads and installs the CirrOS image, creates a key pair, and configures a default security group. Once this script finishes, you can launch a CirrOS-based instance.

Notes on Networking

I almost always use PuppetStack in virtual environments to create nested OpenStack clouds. Creating a nested OpenStack cloud is just as easy as creating a bare-metal OpenStack cloud with one exception: networking in multi-node environments.

I’ve found that if the host cloud is using Open vSwitch, then all nodes in the nested cloud will be able to communicate with each other without issues. This includes DHCP broadcast traffic. However, if the host cloud is using Linux’s standard bridging system, DHCP traffic sent from the Cloud Controller will not reach the instance on the Compute Node.

To get around this, you can create a gretap bridge between the cloud controller and all compute nodes. The nested-cloud.sh script assists in setting this tunnel up.

Final Notes

The beauty of PuppetStack is in its simplicity. In order to achieve this simplicity, though, lots of configuration assumptions have to be made on behalf of the user.

All is not lost, though. As I mentioned in the beginning of this article, PuppetStack has been a great tool to teach people about both OpenStack and Puppet. By reviewing the individual manifests, you can see how the assumed OpenStack environment is configured. With a little effort, you can modify the manifests to suit your environment’s requirements.

http://terrarum.net/administration/quick-openstack-deployments-with-puppetstack.html

,

Subscribe

Subscribe to our RSS feed and social profiles to receive updates.

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: