Vagrant is a popular development tool that makes it easy to create and
configure lightweight, reproducible, and portable development environments. It
allows developers to easily manage virtual machines for development or staging
environments. Vagrant provides a plugin mechanism through which different VM
providers can be used. These providers can either be local (e.g. VirtualBox,
LXC, Docker) or remote (AWS, OpenStack). This tutorial shows you how to use
OpenStack as a remote provider for Vagrant.

Currently there are two different Vagrant OpenStack providers in common usage:
vagrant-openstack-plugin and vagrant-openstack-provider. The
configuration for both these providers is similar, which can lead to confusion.
Be sure you know which provider you are using.

The next step is to create a Vagrantfile in the root of your repository:

Note

You are referencing environment variables in this configuration. Ensure you have followed the steps described at Source an OpenStack RC file.
Also note that the auth api has updated to v3. This Vagrantfile has been updated to use this version of the api. If your Vagrantfile has stopped working, compare it to the following. The changes are minor.

require'vagrant-openstack-provider'Vagrant.configure("2")do|config|config.ssh.username='ubuntu'config.vm.provision:shell,path:"bootstrap.sh"config.vm.provider:openstackdo|os|os.identity_api_version="3"os.openstack_auth_url="#{ENV['OS_AUTH_URL']}/auth/tokens"os.domain_name="#{ENV['OS_USER_DOMAIN_NAME']}"os.username="#{ENV['OS_USERNAME']}"os.password="#{ENV['OS_PASSWORD']}"os.project_name="#{ENV['OS_PROJECT_NAME']}"os.region="#{ENV['OS_REGION_NAME']}"# Set your own hostname.os.server_name="a-host-for-#{ENV['OS_USERNAME']}"# Select a flavour from the list.# https://catalystcloud.nz/pricing/price-list/os.flavor='c1.c1r1'# Select an image to start with.# https://dashboard.cloud.catalyst.net.nz/project/imagesos.image='ubuntu-14.04-x86_64'# Select from what you have available.# https://dashboard.cloud.catalyst.net.nz/project/security_groups/os.security_groups=['default','dev']os.floating_ip_pool='public-net'endend