A simple ansible playbook to provision and boot a single Devstack (see OpenStack) instance using the Rackspace cloud.
You must have ansible and pyrax installed and configured to use this playbook.
You will likely want an entry for localhost in your /etc/ansible/hosts file. Like so:
[localhost]
localhost ansible_connection=local
You probably want to change one or more of these playbook variables to suit your needs.
- key_name: The ssh key-pair name to inject to the devstack host.
- server_name: What to name the new devstack server.
- flavor: The type of machine to spool for the devstack server.
- image: The OS image to use on the devstack server.
- environment: The pyrax environment to use when requesting a new server.
- devstack_config_filename: The file to use as devstack's local.conf. Available configurations are located in the devstack files folder
All examples assume execution from the repository root.
$ ansible-playbook boot-devstack.yml
to boot a machine using the default options.
$ ansible-playbook boot-devstack.yml -e "devstack_config_filename=ironic-pxe-driver-local.conf"
boots a devstack instance using a version of local.conf which uses enables the PXE driver for use under Ironic.
Currently, this repo contains two Ironic-specific devstack configurations taken from the Ironic developer quickstart guide.
You can select the devstack configuration you want by over-riding the 'devstack_config_filename' variable. Available configurations are found in the ${repository_root}/roles/devstack/files/ directory.
Also, there's a task file in ${repo_root}/roles/devstack/tasks/customization_tasks.yml where you can specify custom tasks you want to execute before ./stack.sh is run.
You will likely want to change the name of the key-pair you use in ${repo_root}/roles/localhost/vars/main.yml, since I hope you're not using mine!
Needs work to make it more flexible and useful! Feel free to contribute!