Browse Source

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
changes/57/667157/3
James E. Blair 1 month ago
parent
commit
23f9f9ae6c

+ 4
- 0
doc/source/cloud-roles.rst View File

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

+ 1
- 0
doc/source/roles.rst View File

@@ -8,6 +8,7 @@ Roles
8 8
    log-roles
9 9
    afs-roles
10 10
    container-roles
11
+   cloud-roles
11 12
    deprecated-roles
12 13
    galaxy-roles
13 14
    js-roles

+ 12
- 0
roles/install-devstack/README.rst View File

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

+ 20
- 0
roles/install-devstack/tasks/main.yaml View File

@@ -0,0 +1,20 @@
1
+- name: Set ownership of /opt
2
+  become: true
3
+  file:
4
+    path: /opt
5
+    state: directory
6
+    owner: "{{ ansible_user }}"
7
+    group: "{{ ansible_user }}"
8
+- name: Clone devstack
9
+  git:
10
+    repo: https://opendev.org/openstack/devstack
11
+    dest: /opt/devstack
12
+    version: master
13
+- name: Write local.conf
14
+  template:
15
+    dest: /opt/devstack/local.conf
16
+    src: local.conf.j2
17
+- name: Run devstack
18
+  command: ./stack.sh
19
+  args:
20
+    chdir: /opt/devstack

+ 15
- 0
roles/install-devstack/templates/local.conf.j2 View File

@@ -0,0 +1,15 @@
1
+[[local|localrc]]
2
+disable_service horizon
3
+disable_service tempest
4
+disable_service cinder
5
+disable_service swift
6
+ADMIN_PASSWORD=secret
7
+DATABASE_PASSWORD=$ADMIN_PASSWORD
8
+RABBIT_PASSWORD=$ADMIN_PASSWORD
9
+SERVICE_PASSWORD=$ADMIN_PASSWORD
10
+NETWORK_GATEWAY=10.1.0.1
11
+FIXED_RANGE=10.1.0.0/20
12
+IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20
13
+FLOATING_RANGE=172.24.5.0/24
14
+PUBLIC_NETWORK_GATEWAY=172.24.5.1
15
+LIBVIRT_TYPE=qemu

Loading…
Cancel
Save