Zuul v3: run devstack

Add a role to run devstack, and add it to the main devstack playbook
for the next-gen devstack job.

Change-Id: If84d764e9b2f8dbb6beb1990abc11cbb9f1156b0
This commit is contained in:
James E. Blair 2017-09-01 14:44:26 -07:00
parent bd612be0b6
commit d8b44c78ab
10 changed files with 98 additions and 15 deletions

View File

@ -10,20 +10,46 @@
description: Base devstack job.
required-projects:
- openstack-dev/devstack
- openstack/requirements
- openstack/nova
- openstack/keystone
- openstack/glance
- openstack/cinder
- openstack/neutron
timeout: 7200
vars:
devstack_localrc:
DATABASE_PASSWORD: secretdatabase
RABBIT_PASSWORD: secretrabbit
ADMIN_PASSWORD: secretadmin
SERVICE_PASSWORD: secretservice
NETWORK_GATEWAY: 10.1.0.1
Q_USE_DEBUG_COMMAND: True
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
FLOATING_HOST_PREFIX: 172.24.4
FLOATING_HOST_MASK: 23
SWIFT_REPLICAS: 1
SWIFT_START_ALL_SERVICES: False
LOG_COLOR: False
VERBOSE: True
NETWORK_GATEWAY: 10.1.0.1
NOVNC_FROM_PACKAGE: True
ERROR_ON_CLONE: True
# NOTE(dims): etcd 3.x is not available in debian/ubuntu
# etc. As a stop gap measure, devstack uses wget to download
# from the location below for all the CI jobs.
ETCD_DOWNLOAD_URL: "http://tarballs.openstack.org/etcd/"
devstack_services:
horizon: False
tempest: False
pre-run:
playbooks/pre
post-run:
playbooks/post
- job:
name: devstack-lxc
parent: devstack
description: A job which sets something in local.conf
vars:
devstack_localrc:
LIBVIRT_TYPE: lxc
NOVA_BACKEND: LVM
- job:
name: devstack-legacy
parent: base-test
@ -106,7 +132,7 @@
name: openstack-infra/devstack-gate
check:
jobs:
- devstack-lxc:
- devstack:
files:
- ^playbooks/pre
- ^playbooks/post

View File

@ -1,5 +1,3 @@
# A temporary test playbook to aid in job construction.
- hosts: all
tasks:
- command: ls /opt/stack
- command: cat /opt/stack/devstack/local.conf
roles:
- run-devstack

View File

@ -4,5 +4,18 @@
- setup-tempest-user
- setup-devstack-source-dirs
- setup-devstack-log-dir
- setup-devstack-cache
- start-fresh-logging
- write-devstack-local-conf
# TODO(jeblair): remove when configure-mirrors is fixed
tasks:
- name: Hack mirror_info
shell:
_raw_params: |
mkdir /etc/ci
cat << "EOF" > /etc/ci/mirror_info.sh
export NODEPOOL_UCA_MIRROR=http://mirror.dfw.rax.openstack.org/ubuntu-cloud-archive
EOF
args:
executable: /bin/bash
become: true

View File

@ -0,0 +1,8 @@
Run devstack
**Role Variables**
.. zuul:rolevar:: devstack_base_dir
:default: /opt/stack
The devstack base directory.

View File

@ -0,0 +1 @@
devstack_base_dir: /opt/stack

View File

@ -0,0 +1,6 @@
- name: Run devstack
command: ./stack.sh
args:
chdir: "{{devstack_base_dir}}/devstack"
become: true
become_user: stack

View File

@ -0,0 +1,15 @@
Set up the devstack cache directory
If the node has a cache of devstack image files, copy it into place.
**Role Variables**
.. zuul:rolevar:: devstack_base_dir
:default: /opt/stack
The devstack base directory.
.. zuul:rolevar:: devstack_cache_dir
:default: /opt/cache
The directory with the cached files.

View File

@ -0,0 +1,2 @@
devstack_base_dir: /opt/stack
devstack_cache_dir: /opt/cache

View File

@ -0,0 +1,14 @@
- name: Copy cached devstack files
# This uses hard links to avoid using extra space.
command: "find {{ devstack_cache_dir }}/files -mindepth 1 -maxdepth 1 -exec cp -l {} {{ devstack_base_dir }}/devstack/files/ ;"
become: true
- name: Set ownership of cached files
file:
path: '{{ devstack_base_dir }}/devstack/files'
state: directory
recurse: true
owner: stack
group: stack
mode: a+r
become: yes

View File

@ -27,7 +27,7 @@ class VarGraph(object):
for k, v in vars.items():
self._varnames.add(k)
for k, v in vars.items():
self._addVar(k, v)
self._addVar(k, str(v))
bash_var_re = re.compile(r'\$\{?(\w+)')
def getDependencies(self, value):