packstack/playbooks/packstack-multinode.yaml
Javier Pena b6df8c7ad0 Fix CI jobs
- Add jobs removed in [1] to the local configuration.
- Fix SSH key distribution in multinode job. It was broken on a
  recent Zuul update, it seems.
- Update puppetlabs-apache version to 5.4.0

[1] - https://review.opendev.org/730813

Closes-Bug: #1880681
Depends-On: https://review.opendev.org/730813
Change-Id: I2572d92cbaabc1f02fc0790896ccaa3edfc5e6c2
2020-05-28 06:11:35 +00:00

86 lines
2.4 KiB
YAML

- hosts: compute
name: setup RDO Trunk repositories
vars:
delorean_default: "https://trunk.rdoproject.org/centos7-master/current-passed-ci/delorean.repo"
delorean_deps_default: "https://trunk.rdoproject.org/centos7-master/delorean-deps.repo"
tasks:
- name: Fetch DLRN repo
get_url:
url: "{{ delorean | default(delorean_default) }}"
dest: /etc/yum.repos.d/delorean.repo
mode: 0640
become: true
- name: Fetch DLRN dependency repo
get_url:
url: "{{ delorean_deps | default(delorean_deps_default) }}"
dest: /etc/yum.repos.d/delorean-deps.repo
mode: 0640
become: true
- name: Update installed packages from RDO repos
package:
name: '*'
state: latest
become: true
- name: Disable selinux in Compute node
shell:
cmd: |
setenforce 0
become: true
when: not selinux_enforcing|default("true")|bool
- hosts: controller
name: packstack-ssh-preparation-1
tasks:
- name: Generate SSH key on controller
shell: ssh-keygen -t rsa -f /root/.ssh/id_rsa -P ""
args:
creates: /root/.ssh/id_rsa
become: true
- name: Fetch SSH key
shell: cat /root/.ssh/id_rsa.pub
become: true
register: ssh_key
- name: Deploy SSH key on controller
authorized_key:
user: root
state: present
key: "{{ ssh_key.stdout }}"
become: true
- name: Set SSH key fact to be used by the compute node
set_fact:
sshkey: "{{ ssh_key.stdout }}"
- hosts: compute
name: packstack-ssh-preparation-2
tasks:
- name: Deploy SSH key on compute node
authorized_key:
user: root
state: present
key: "{{ hostvars['controller'].sshkey }}"
become: true
- hosts: controller
name: packstack-multinode
tasks:
- name: Run Packstack
shell:
cmd: |
set -e
set -x
export SCENARIO='{{ scenario }}'
export DELOREAN='{{ delorean | default('') }}'
export DELOREAN_DEPS='{{ delorean_deps | default('') }}'
export CONTROLLER_NODE="{{ hostvars['controller'].nodepool.public_ipv4 }}"
export COMPUTE_NODE="{{ hostvars['compute'].nodepool.public_ipv4 }}"
export SELINUX_ENFORCING='{{ selinux_enforcing | default('true') }}'
./run_tests.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace/packstack'