This repository has been archived by the owner on Dec 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 371
/
ovirt-infra-vars.yaml
221 lines (207 loc) · 6.56 KB
/
ovirt-infra-vars.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
---
###########################
# Common
###########################
compatibility_version: 4.2
# Data center
data_center_name: Default
##########################
# VM infra
##########################
template_cluster: "{{ rhv_cluster }}"
template_name: centos7
template_memory: 8GiB
template_cpu: 1
template_disk_storage: "{{ rhv_data_storage }}"
template_disk_size: 60GiB
template_nics:
- name: nic1
profile_name: ovirtmgmt
interface: virtio
##########################
# Other top scope vars
##########################
debug_vm_create: true
wait_for_ip: true
vm_infra_wait_for_ip_retries: 10
vm_infra_wait_for_ip_delay: 40
master_vm:
cluster: "{{ rhv_cluster }}"
template: "{{ template_name }}"
memory: 16GiB
cores: 2
high_availability: true
disks:
- size: 15GiB
storage_domain: "{{ rhv_data_storage }}"
name: docker_disk
interface: virtio
- size: 30GiB
storage_domain: "{{ rhv_data_storage }}"
name: localvol_disk
interface: virtio
- size: 25GiB
storage_domain: "{{ rhv_data_storage }}"
name: etcd_disk
interface: virtio
state: running
node_vm:
cluster: "{{ rhv_cluster }}"
template: "{{ template_name }}"
memory: 8GiB
cores: 2
disks:
- size: 15GiB
storage_domain: "{{ rhv_data_storage }}"
name: docker_disk
interface: virtio
- size: 30GiB
storage_domain: "{{ rhv_data_storage }}"
name: localvol_disk
interface: virtio
state: running
##########################
# Cloud Init Script
##########################
# Use the following if RHEL 7.4 or below VMs are being created on a RHV 4.2 or above engine
# - sed -i 's@^# device =.*@device = /dev/virtio-ports/ovirt-guest-agent.0@' /etc/ovirt-guest-agent.conf
# - sed -i '[email protected]@ovirt-guest-agent.0@' /etc/udev/rules.d/55-ovirt-guest-agent.rules
# - 'udevadm trigger --subsystem-match="virtio-ports"'
cloud_init_script_master: |
runcmd:
- mkdir -p '/var/lib/origin/openshift.local.volumes'
- mkdir -p '/var/lib/etcd'
- /usr/sbin/mkfs.xfs -L localvol /dev/vdc
- /usr/sbin/mkfs.xfs -L etcd /dev/vdd
- sleep "$(($RANDOM % 60))"
- sync
- reboot
mounts:
- [ '/dev/vdc', '/var/lib/origin/openshift.local.volumes', 'xfs', 'defaults,gquota' ]
- [ '/dev/vdd', '/var/lib/etcd', 'xfs', 'defaults' ]
rh_subscription:
username: {{vault_rhsub_user}}
password: {{vault_rhsub_password}}
add-pool: [{{vault_rhsub_pool}}]
server-hostname: {{vault_rhsub_server}}
enable-repo: ['rhel-7-server-rpms', 'rhel-7-server-extras-rpms', 'rhel-7-fast-datapath-rpms', 'rhel-7-server-ose-3.9-rpms']
disable-repo: []
cloud_init_script: |
runcmd:
- mkdir -p '/var/lib/origin/openshift.local.volumes'
- /usr/sbin/mkfs.xfs -L localvol /dev/vdc
- sleep "$(($RANDOM % 60))"
- sync
- reboot
mounts:
- [ '/dev/vdc', '/var/lib/origin/openshift.local.volumes', 'xfs', 'defaults,gquota' ]
rh_subscription:
username: {{vault_rhsub_user}}
password: {{vault_rhsub_password}}
add-pool: [{{vault_rhsub_pool}}]
server-hostname: {{vault_rhsub_server}}
enable-repo: ['rhel-7-server-rpms', 'rhel-7-server-extras-rpms', 'rhel-7-fast-datapath-rpms', 'rhel-7-server-ose-3.9-rpms']
disable-repo: []
vms:
# Master VMs
- name: "master0.{{ public_hosted_zone }}"
profile: "{{ master_vm }}"
tag: openshift_master
cloud_init:
host_name: "master0.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script_master }}"
- name: "master1.{{ public_hosted_zone }}"
tag: openshift_master
profile: "{{ master_vm }}"
cloud_init:
host_name: "master1.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script_master }}"
- name: "master2.{{ public_hosted_zone }}"
tag: openshift_master
profile: "{{ master_vm }}"
cloud_init:
host_name: "master2.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script_master }}"
# Infra VMs
- name: "infra0.{{ public_hosted_zone }}"
tag: openshift_infra
profile: "{{ node_vm }}"
cloud_init:
host_name: "infra0.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script }}"
- name: "infra1.{{ public_hosted_zone }}"
tag: openshift_infra
profile: "{{ node_vm }}"
cloud_init:
host_name: "infra1.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script }}"
- name: "infra2.{{ public_hosted_zone }}"
tag: openshift_infra
profile: "{{ node_vm }}"
cloud_init:
host_name: "infra2.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script }}"
# Node VMs
- name: "app0.{{ public_hosted_zone }}"
tag: openshift_node
profile: "{{ node_vm }}"
cloud_init:
host_name: "app0.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script }}"
- name: "app1.{{ public_hosted_zone }}"
tag: openshift_node
profile: "{{ node_vm }}"
cloud_init:
host_name: "app1.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script }}"
- name: "app2.{{ public_hosted_zone }}"
tag: openshift_node
profile: "{{ node_vm }}"
cloud_init:
host_name: "app2.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script }}"
# Load balancer
- name: "lb.{{ public_hosted_zone }}"
tag: openshift_lb
profile: "{{ node_vm }}"
cloud_init:
host_name: "lb.{{ public_hosted_zone }}"
authorized_ssh_keys: "{{ root_ssh_key }}"
custom_script: "{{ cloud_init_script }}"
affinity_groups:
- name: masters_ag
cluster: "{{ rhv_cluster }}"
vm_enforcing: false
vm_rule: negative
vms:
- "master0.{{ public_hosted_zone }}"
- "master1.{{ public_hosted_zone }}"
- "master2.{{ public_hosted_zone }}"
wait: true
- name: infra_ag
cluster: "{{ rhv_cluster }}"
vm_enforcing: false
vm_rule: negative
vms:
- "infra0.{{ public_hosted_zone }}"
- "infra1.{{ public_hosted_zone }}"
- "infra2.{{ public_hosted_zone }}"
wait: true
- name: app_ag
cluster: "{{ rhv_cluster }}"
vm_enforcing: false
vm_rule: negative
vms:
- "app0.{{ public_hosted_zone }}"
- "app1.{{ public_hosted_zone }}"
- "app2.{{ public_hosted_zone }}"
...