-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplitstack.yml
More file actions
121 lines (105 loc) · 3.89 KB
/
splitstack.yml
File metadata and controls
121 lines (105 loc) · 3.89 KB
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
112
113
114
115
116
117
118
119
120
121
---
- name: Gather facts from OC nodes
hosts: overcloud_nodes
gather_facts: no
any_errors_fatal: true
tasks:
- name: apply node hostnames
hostname:
name: "{{ inventory_hostname }}"
- setup:
- name: Prepare splitstack deployment templates
hosts: undercloud
any_errors_fatal: true
gather_facts: yes
vars:
template_base: "{{ ansible_user_dir }}/composable_roles"
role_substitutions:
"Compute": "ComputeDeployedServer"
"Controller": "ControllerDeployedServer"
"CephStorage": "CephDeployedServer"
"Database": "DatabaseDeployedServer"
"Networker": "NetworkerDeployedServer"
"Messaging": "MessagingDeployedServer"
tags:
- deploy_preparation
tasks:
- name: Append the network type
yedit:
src: "{{ ansible_user_dir }}/deploy_info.yml"
update: True
key: global
value:
splitstack: 'True'
- name: Create configuration directory
file:
path: "{{ template_base }}"
state: directory
- name: register tht packages
package:
list: openstack-tripleo-heat-templates
become: yes
register: tht
- set_fact:
roles_sshd: true
- name: include roles according to the topology
include: tasks/composable_roles/add_role_vars.yml
with_items: "{{ groups.overcloud_nodes }}"
loop_control:
loop_var: role
- name: create roles folder
file:
path: "{{ template_base }}/roles"
state: directory
- name: create the roles_data file
template:
src: composable_roles/roles_data.yaml.j2
dest: "{{ template_base }}/roles/roles_data.yaml"
force: yes
- name: create the network template file
vars:
ipv6_postfix: "{{ (install.network.protocol == 'ipv4') | ternary('', '-v6')}}"
ipv6_postfix_underscore: "{{ (install.network.protocol == 'ipv4') | ternary('', '_v6')}}"
deployment_folder_path: "{{ template_base }}"
nics_subfolder: "{{ (install.version|default(undercloud_version)|openstack_release > 10) | ternary('', 'legacy') }}"
template:
src: composable_roles/network-config.yaml.j2
dest: "{{ template_base }}/network-config.yaml"
force: yes
- name: Copy roles port config
template:
src: "splitstack/roles-port-config.yml.j2"
dest: "{{ template_base }}/roles-port-config.yml"
- name: Create heat agent template
template:
src: "splitstack/heat-agent.sh.j2"
dest: "~/heat-agent.sh"
mode: '0755'
- name: Create control plane network template
template:
src: "splitstack/ctrlplane-template.yml.j2"
dest: "{{ template_base }}/ctrlplane-template.yml"
- name: Modifying role data file to adjust role names
replace:
path: "{{ template_base }}/roles/roles_data.yaml"
regexp: "^(- name: ){{ item.key }}$"
replace: "- name: {{ item.value }}"
with_dict: "{{ role_substitutions }}"
- name: Modifying role names in network cofig file
replace:
path: "{{ template_base }}/network-config.yaml"
regexp: "{{ item.key }}"
replace: "{{ item.value }}"
with_dict: "{{ role_substitutions }}"
# Workaround for BZ1561544
- name: Fix get-occ-config.sh
lineinfile:
dest: '/usr/share/openstack-tripleo-heat-templates/deployed-server/scripts/get-occ-config.sh'
regexp: '(^\s*)(\(\(i\+\+\)\))'
line: '\1let i+=1'
backrefs: yes
become: yes
- name: Deploy the Overcloud with composable roles
include: "{{ overcloud_deploy | default('deploy.yml') }}"
tags:
- splitstack_deploy