Add new abstract base job and nodeset to zuul configuration
To start the migration to zuulv3, we need a new base job that loses all the devstack dependencies. We are basing this new abstract job on the base multinode job. Devstack is not needed anymore, and all the provided operations we still require are in the pre-run playbooks. The new nodesets are compatible with the new base job, and should be used in the migration instead of the legacy-* ones Change-Id: I827fddbea3692ebe951f240555e6d37b8807a5dc
This commit is contained in:
parent
c605fd193f
commit
2694dbdff3
|
@ -0,0 +1,64 @@
|
|||
- hosts: all
|
||||
roles:
|
||||
- role: fetch-zuul-cloner
|
||||
destination: "/usr/zuul-env/bin/zuul-cloner"
|
||||
repo_src_dir: "/home/zuul/src/git.openstack.org"
|
||||
- legacy-copy-jenkins-scripts
|
||||
|
||||
tasks:
|
||||
- name: Create nodepool directory
|
||||
file:
|
||||
path: /etc/nodepool
|
||||
state: directory
|
||||
- name: Create nodepool sub_nodes file
|
||||
copy:
|
||||
dest: /etc/nodepool/sub_nodes
|
||||
content: ""
|
||||
- name: Create nodepool sub_nodes_private file
|
||||
copy:
|
||||
dest: /etc/nodepool/sub_nodes_private
|
||||
content: ""
|
||||
- name: Populate nodepool sub_nodes file
|
||||
lineinfile:
|
||||
path: /etc/nodepool/sub_nodes
|
||||
line: "{{ hostvars[item]['nodepool']['public_ipv4'] }}"
|
||||
with_items: "{{ groups['subnodes'] }}"
|
||||
when: groups['subnodes'] is defined
|
||||
- name: Populate nodepool sub_nodes_private file
|
||||
lineinfile:
|
||||
path: /etc/nodepool/sub_nodes_private
|
||||
line: "{{ hostvars[item]['nodepool']['private_ipv4'] }}"
|
||||
with_items: "{{ groups['subnodes'] }}"
|
||||
when: groups['subnodes'] is defined
|
||||
- name: Create nodepool primary file
|
||||
copy:
|
||||
dest: /etc/nodepool/primary_node_private
|
||||
content: "{{ hostvars['primary']['nodepool']['private_ipv4'] }}"
|
||||
when: hostvars['primary'] is defined
|
||||
- name: Create nodepool node_private for this node
|
||||
copy:
|
||||
dest: /etc/nodepool/node_private
|
||||
content: "{{ nodepool.private_ipv4 }}"
|
||||
- name: Copy ssh keys to nodepool directory
|
||||
command: "cp .ssh/{{ item }} /etc/nodepool/{{ item }}"
|
||||
with_items:
|
||||
- id_rsa
|
||||
- id_rsa.pub
|
||||
|
||||
- name: Add sudoers role for zuul-sudo-grep.sh
|
||||
copy:
|
||||
dest: /etc/sudoers.d/zuul-sudo-grep
|
||||
content: "zuul ALL = NOPASSWD:/usr/local/jenkins/slave_scripts/zuul-sudo-grep.sh\n"
|
||||
mode: 0440
|
||||
become: true
|
||||
|
||||
- name: Validate sudoers config after edits
|
||||
command: "/usr/sbin/visudo -c"
|
||||
become: true
|
||||
|
||||
- name: Show the environment passed in to job shell scripts
|
||||
shell:
|
||||
cmd: |
|
||||
env
|
||||
executable: /bin/bash
|
||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
@ -3,6 +3,46 @@
|
|||
# This file contains parent layouts for all TripleO jobs.
|
||||
# Do not add children specific layout here.
|
||||
|
||||
- job:
|
||||
name: tripleo-ci-base
|
||||
abstract: true
|
||||
description: |
|
||||
Base abstract job for all TripleO CI zuulv3 jobs
|
||||
parent: multinode
|
||||
vars:
|
||||
unbound_cache_min_ttl: 900
|
||||
ara_generate_html: true
|
||||
bridge_name: br-ex
|
||||
bridge_address_prefix: 192.168.24
|
||||
bridge_address_subnet: 24
|
||||
bridge_address_offset: 2
|
||||
nodeset: two-centos-7-nodes
|
||||
roles:
|
||||
- zuul: openstack-infra/zuul-jobs
|
||||
required-projects:
|
||||
- openstack-infra/tripleo-ci
|
||||
- openstack/tripleo-quickstart
|
||||
- openstack/tripleo-quickstart-extras
|
||||
- openstack/tripleo-upgrade
|
||||
pre-run:
|
||||
- playbooks/nodepool-provider/pre.yaml
|
||||
- playbooks/multinode-networking/pre.yaml
|
||||
- playbooks/openstack-zuul-jobs/legacy/pre.yaml
|
||||
run: playbooks/tripleo-ci/run-v3.yaml
|
||||
irrelevant-files:
|
||||
- ^.*\.md$
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^etc/.*$
|
||||
- ^metadata.json$
|
||||
- ^releasenotes/.*$
|
||||
- ^requirements.txt$
|
||||
- ^test-requirements.txt$
|
||||
- ^spec/.*$
|
||||
- ^Puppetfile.*$
|
||||
- tox.ini
|
||||
- ^setup.*$
|
||||
|
||||
- job:
|
||||
name: tripleo-ci-dsvm
|
||||
description: |
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
- nodeset:
|
||||
name: two-centos-7-nodes
|
||||
nodes:
|
||||
- name: primary
|
||||
label: centos-7
|
||||
- name: secondary
|
||||
label: centos-7
|
||||
groups:
|
||||
- name: switch
|
||||
nodes:
|
||||
- primary
|
||||
- name: peers
|
||||
nodes:
|
||||
- secondary
|
||||
- name: subnodes
|
||||
nodes:
|
||||
- secondary
|
||||
|
||||
- nodeset:
|
||||
name: single-centos-7-node
|
||||
nodes:
|
||||
- name: centos-7
|
||||
label: centos-7
|
Loading…
Reference in New Issue