Add install-devstack role

This adds a role that installs OpenStack via devstack for end-users.
This lets any job for a project which uses OpenStack as a client
install an OpenStack for testing.

Change-Id: Ic561c7c67b563e3cee7acbcbddc4ae463a695e97
This commit is contained in:
James E. Blair 2019-06-24 09:52:15 -07:00
parent 9bc813daa7
commit 23f9f9ae6c
5 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Cloud Computing Roles
=====================
.. zuul:autorole:: install-devstack

View File

@ -8,6 +8,7 @@ Roles
log-roles
afs-roles
container-roles
cloud-roles
deprecated-roles
galaxy-roles
js-roles

View File

@ -0,0 +1,12 @@
Install OpenStack using devstack.
There are currently no configuration options available. This role
uses the devstack default settings, except that it does not install
horizon, tempest, cinder, or swift, and it supplies a restricted
network configuration designed to work in the maximum number of
environments.
.. warning:: Do not use this role for testing changes to OpenStack or
OpenStack related projects. Use the ``devstack`` job
defined in the https://opendev.org/openstack/devstack
project instead.

View File

@ -0,0 +1,20 @@
- name: Set ownership of /opt
become: true
file:
path: /opt
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
- name: Clone devstack
git:
repo: https://opendev.org/openstack/devstack
dest: /opt/devstack
version: master
- name: Write local.conf
template:
dest: /opt/devstack/local.conf
src: local.conf.j2
- name: Run devstack
command: ./stack.sh
args:
chdir: /opt/devstack

View File

@ -0,0 +1,15 @@
[[local|localrc]]
disable_service horizon
disable_service tempest
disable_service cinder
disable_service swift
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
NETWORK_GATEWAY=10.1.0.1
FIXED_RANGE=10.1.0.0/20
IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20
FLOATING_RANGE=172.24.5.0/24
PUBLIC_NETWORK_GATEWAY=172.24.5.1
LIBVIRT_TYPE=qemu