-
Notifications
You must be signed in to change notification settings - Fork 5
/
redeploy.yaml
111 lines (110 loc) · 3.21 KB
/
redeploy.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
106
107
108
109
110
111
---
#
# Redeploy an Overcloud
#
# Tasks as stack user
- hosts: undercloud
gather_facts: false
vars_files:
- vars/data.yaml
- vars/main.yaml
- vars/main.local.yaml
remote_user: stack
pre_tasks:
- name: Get timestamp
command: "date -u +%Y%m%d-%H%M%S"
delegate_to: localhost
register: current_ts
# Creates remote log directory
- name: Set log directory
set_fact:
log_dir: /home/stack/mccloud/log/{{current_ts.stdout}}
- name: Make sure {{log_dir}} exists
file:
path: "{{log_dir}}"
state: directory
owner: stack
group: stack
# Local artifact directory
- name: Set Artifact Directory
set_fact:
artifact_dir: artifacts/{{version}}-deploy{{deploy_scenario}}-{{current_ts.stdout}}
- name: Ensure artifact directory exists
file:
path: "{{artifact_dir}}"
state: directory
delegate_to: localhost
roles:
# Due to deploy_scenario potentially changing, we should setup browbeat
# with the specific deploy_scenario vars
- role: 010-browbeat-setup
when: deploy_browbeat
- role: 016-overcloud-deploy
when: deploy_overcloud
is_redeploy: true
- role: 017-browbeat-generate-overcloud-hosts
when: deploy_browbeat
- role: 018-browbeat-deploy-overcloud-collectd
when:
- deploy_browbeat
- deploy_overcloud_collectd
- role: 019-overcloud-disable-admin-quota
when: disable_quota
- role: 020-overcloud-create-keypair
when: create_keypair
- role: 021-overcloud-create-flavors
when: create_flavors
- role: 022-overcloud-upload-images
when: upload_guest_images
- role: 023-overcloud-create-security-group
when: create_security_group
- role: 024-overcloud-create-networks
when: create_networks
- role: 025-undercloud-route-external-traffic
when: route_external_traffic_from_undercloud
- role: 026-browbeat-workload-guests-config
when:
- create_networks
- deploy_browbeat
- browbeat_workload_guests
- role: 027-browbeat-install
when: deploy_browbeat
- role: 028-browbeat-deploy-grafana-dashboards
when:
- deploy_browbeat
- deploy_grafana_dashboards
- role: 029-browbeat-shaker-image-build
when:
- deploy_browbeat
- create_networks
- browbeat_shaker_build
- role: 030-browbeat-adjust-nova-allocation-ratios
when:
- deploy_browbeat
- ana_enabled
- role: 031-browbeat-collect-metadata
when:
- deploy_browbeat
- browbeat_collect_metadata
- role: 032-browbeat-install-microcode
when:
- deploy_browbeat
- update_microcode
- role: 033-browbeat-adjust-security
when:
- deploy_browbeat
- as_enabled
- role: 050-cloud-ready
when:
- deploy_browbeat
- browbeat_run
# Only on when microcode has been upodated as that initiates a reboot
- role: 051-cinder-remount-loopback
when:
- deploy_browbeat
- deploy_scenario|int not in deploy_scenarios_with_ceph
- update_microcode
- role: 100-browbeat-run
when:
- deploy_browbeat
- browbeat_run