Ansible Role for OpenStack Development

As mentioned previously, I have been usingansible for managing my development configuration for a few months
now, and I’m finally getting around to releasing some of the roles
I’ve created in a form (possibly) useful to other folks. This one
configures some of the packages needed to run unit tests for OpenStack
projects.

Features

There’s nothing quite as annoying as having tox fail to build a test
environment because some system package is missing. Theopenstack-dev role installs many of the commonly needed system
dependencies, such as libxml2 and libffi-dev. It isn’t an
exhaustive list, and it isn’t sufficient to run OpenStack properly,
but it does allow most of the unit tests to run, including some that
are optional when driver libraries are not present. For a complete
list of packages installed, refer to the source.

The role also sets up a working directory
(openstack_dev_repos_dir) where the git repositories containing
OpenStack source can be checked out. The role clones theopenstack/oslo-incubator and creates an update.sh script in
the openstack_dev_repos_dir to call the tool from the
oslo-incubator for cloning copies of all of the OpenStack source
trees.

The role also clones openstack/requirements, which containstools/build_wheels.sh, a script for building wheels of all of the
OpenStack project Python requirements. Since the role depends ondhellmann.devpi, a devpi server is set up running on the
development server. Running build_wheels.sh will populate the
cache for the devpi server and the wheelhouse so that tox environment
builds for the unit tests for projects with a lot of dependencies will
go more quickly.

Installing the Role

Clone the role from github or use ansible-galaxy to installdhellmann.openstack-dev. If you use ansible-galaxy, the
dependencies will also be installed automatically.