-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathocp_testing.yaml
105 lines (89 loc) · 3.59 KB
/
ocp_testing.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
- name: Cleanup the OCP setup and prepare the environment for testing OCP on OpenStack 18
hosts: localhost
gather_facts: yes
vars_files:
- "../configs/global.yml"
pre_tasks:
- name: Cleanup workspace flags - Remove the stage_unstable_flag if it exists
ansible.builtin.file:
path: "{{ stage_unstable_flag }}"
state: absent
- name: Update ocp_deployment_topology with overrides if defined
# Apply ocp_deployment_topology_override on top of the base topology
# The base configuration comes from `configs/global.yml`
ansible.builtin.set_fact:
ocp_deployment_topology: "{{ ocp_deployment_topology | combine(ocp_deployment_topology_override, recursive=True) }}"
when: ocp_deployment_topology_override is defined
tasks:
- name: Discover the OSP version
ansible.builtin.include_role:
name: shiftstack.tools.tools_get_deploy_info
tasks_from: discover_osp_version.yml
- name: Cleanup the setup
ansible.builtin.include_role:
name: shiftstack.stages.cleanup
when: "'cleanup' in stages"
- name: Restore the OpenStack original config directory (includes the clouds.yaml and secure.yaml)
ansible.builtin.copy:
src: "{{ home_dir }}/.original-config/openstack/"
dest: "{{ home_dir }}/.config/openstack/"
remote_src: yes
mode: u=rwx,g=rwx,o=rwx
when: "'cleanup' in stages or 'prepare' in stages"
- name: Prepare the OpenShift environment
hosts: localhost
gather_facts: no
vars_files:
- "../configs/global.yml"
- "../configs/secret.yaml"
tasks:
- name: Prepare setup for OCP installation
ansible.builtin.include_role:
name: shiftstack.stages.prepare
when: "'prepare' in stages"
- name: Update the Ansible inventory in case not deploying an installer host
ansible.builtin.include_role:
name: shiftstack.tools.tools_ansible_inventory
tasks_from: create_installer_group.yml
when: "not deploy_installer_host"
- name: Prepare the OpenShift installer
ansible.builtin.import_playbook: plays/prepare.yaml
when: "'prepare' in stages"
- name: Install OpenShift
ansible.builtin.import_playbook: plays/install.yaml
when: "'install' in stages"
- name: Discover OCP version and networkType
hosts: installer
gather_facts: no
vars_files:
- "../configs/global.yml"
tasks:
- name: Discover OCP version and networkType
ansible.builtin.include_role:
name: shiftstack.tools.tools_get_deploy_info
tasks_from: discover_ocp_version.yml
- name: Post-Installation
ansible.builtin.import_playbook: plays/post_install.yaml
when: "'post' in stages"
- name: Run OpenShift Verification stage
ansible.builtin.import_playbook: plays/verification.yaml
when: "'verification' in stages"
- name: Day2ops OpenShift stage
ansible.builtin.import_playbook: plays/day2ops.yaml
when: "'day2ops' in stages"
- name: Run Openstack-Test on OpenShift
ansible.builtin.import_playbook: plays/openstack_test.yaml
when: "'openstack_test' in stages"
- name: Run LB-Test on OpenShift
ansible.builtin.import_playbook: plays/lb_tests.yaml
when: "'lb_tests' in stages"
- name: Run Openshift Conformance Test on OpenShift
ansible.builtin.import_playbook: plays/conformance_test.yaml
when: "'conformance_test' in stages"
- name: Run Openshift Cinder CSI Tests on OpenShift
ansible.builtin.import_playbook: plays/cinder_csi.yaml
when: "'cinder_csi_tests' in stages"
- name: Run Openshift Manila CSI Tests on OpenShift
ansible.builtin.import_playbook: plays/manila_csi.yaml
when: "'manila_csi_tests' in stages"