From 2720f4bb5446e7cf847c3adc4b641672060cad6e Mon Sep 17 00:00:00 2001 From: Artom Lifshitz Date: Thu, 24 Oct 2019 14:46:38 -0400 Subject: [PATCH] Zuul job This commit adds a devstack multinode Zuul CI job. Playbooks to install requirements on the hosts as well as set them up for SSH access are included. Change-Id: I1dce6bdab8cb54de50d787e58ccadce03ea44a2b --- .zuul.yaml | 67 ++++++++++++++++++++++ playbooks/whitebox.yaml | 4 ++ roles/whitebox-common/tasks/main.yml | 23 ++++++++ roles/whitebox-nova-compute/tasks/main.yml | 9 +++ 4 files changed, 103 insertions(+) create mode 100644 playbooks/whitebox.yaml create mode 100644 roles/whitebox-common/tasks/main.yml create mode 100644 roles/whitebox-nova-compute/tasks/main.yml diff --git a/.zuul.yaml b/.zuul.yaml index 8efb1fcf..dfd55e4e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,3 +1,64 @@ +# TODO(artom) Once https://review.opendev.org/#/c/679656/ merges, we can unify +# the nodeset names and use the one in Nova. Until then, have a different name +# here. +- nodeset: + name: multi-numa-multinode + nodes: + - name: controller + label: multi-numa-ubuntu-bionic + - name: compute + label: multi-numa-ubuntu-bionic + groups: + # Node where tests are executed and test results collected + - name: tempest + nodes: + - controller + # Nodes running the compute service + - name: compute + nodes: + - controller + - compute + # Nodes that are not the controller + - name: subnode + nodes: + - compute + # Switch node for multinode networking setup + - name: switch + nodes: + - controller + # Peer nodes for multinode networking setup + - name: peers + nodes: + - compute + +- job: + name: whitebox-multinode-devstack + nodeset: multi-numa-multinode + parent: tempest-multinode-full-py3 + description: | + Devstack multinode job. + required-projects: + x/whitebox-tempest-plugin + pre-run: playbooks/whitebox.yaml + vars: + tox_envlist: all + tempest_concurrency: 1 + tempest_test_regex: ^whitebox_tempest_plugin\. + devstack_plugins: + whitebox-tempest-plugin: https://opendev.org/x/whitebox-tempest-plugin.git + devstack_localrc: + MAX_COMPUTE_NODES: 2 + LIBVIRT_TYPE: kvm + TEMPEST_PLUGINS: /opt/stack/whitebox-tempest-plugin + WHITEBOX_PRIVKEY_PATH: /home/tempest/.ssh/id_rsa + group-vars: + subnode: + num_hugepages: 2048 + devstack_localrc: + LIBVIRT_TYPE: kvm + tempest: + num_hugepages: 512 + - project: name: x/whitebox-tempest-plugin templates: @@ -5,3 +66,9 @@ - openstack-python35-jobs - openstack-python36-jobs - openstack-python37-jobs + check: + jobs: + - whitebox-multinode-devstack + gate: + jobs: + - whitebox-multinode-devstack diff --git a/playbooks/whitebox.yaml b/playbooks/whitebox.yaml new file mode 100644 index 00000000..59b23eb2 --- /dev/null +++ b/playbooks/whitebox.yaml @@ -0,0 +1,4 @@ +- hosts: all + roles: + - whitebox-common + - whitebox-nova-compute diff --git a/roles/whitebox-common/tasks/main.yml b/roles/whitebox-common/tasks/main.yml new file mode 100644 index 00000000..5c5aaa00 --- /dev/null +++ b/roles/whitebox-common/tasks/main.yml @@ -0,0 +1,23 @@ +# NOTE(artom) We need to install cruini and iniparse from source until +# https://github.com/pixelb/crudini/issues/58 and +# https://github.com/candlepin/python-iniparse/issues/5 are on fixed PyPi. +- name: crudini and iniparse + pip: + name: "{{ item }}" + state: present + with_items: + - git+https://github.com/pixelb/crudini.git#egg=crudini + - git+https://github.com/candlepin/python-iniparse.git#egg=iniparse + become: yes + +# NOTE(artom) The run-tempest role runs as the tempest user, so we need to give +# the tempest user SSH access to all hosts. Devstack's orchestrate-devstack +# role should have put a pubkey into the stack user's authorized_keys, so if we +# put the corresponding private key in the tempest user's .ssh, things should +# magically work. +- name: Setup tempest SSH key + include_role: + name: copy-build-sshkey + vars: + copy_sshkey_target_user: 'tempest' + become: yes diff --git a/roles/whitebox-nova-compute/tasks/main.yml b/roles/whitebox-nova-compute/tasks/main.yml new file mode 100644 index 00000000..0e34393f --- /dev/null +++ b/roles/whitebox-nova-compute/tasks/main.yml @@ -0,0 +1,9 @@ +- name: Install numactl + package: + name: numactl + state: present + become: yes + +- name: Allocate hugepages + shell: echo {{ num_hugepages }} > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages + become: yes