forked from karmab/kcli-ztp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkcli_plan.yml
170 lines (164 loc) · 4.48 KB
/
kcli_plan.yml
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
{% if lab %}
{{ baremetal_net }}:
type: network
cidr: {{ baremetal_cidr }}
{% if provisioning_enable %}
{{ provisioning_net }}:
type: network
cidr: {{ provisioning_cidr }}
dhcp: false
{% endif %}
{% endif %}
{{ image }}:
type: image
url: {{ image_url }}
{% if lab or (baremetal_ips and baremetal_ips|length >0) %}
api:
type: dns
net: {{ baremetal_net }}
ip: {{ api_ip }}
alias:
- api.{{ cluster }}.{{ domain }}
- api-int.{{ cluster }}.{{ domain }}
apps:
type: dns
net: {{ baremetal_net }}
ip: {{ ingress_ip }}
alias:
- console-openshift-console.apps.{{ cluster }}.{{ domain }}
- oauth-openshift.apps.{{ cluster }}.{{ domain }}
- prometheus-k8s-openshift-monitoring.{{ cluster }}.{{ domain }}
{% endif %}
{% if virtual_masters %}
{% for num in range(0, virtual_masters_number) %}
{{ cluster }}-master-{{ num }}:
pool: {{ pool }}
numcpus: {{ virtual_masters_numcpus }}
cloudinit: false
start: false
uefi: {{ 'true' if virtual_protocol == 'redfish' else 'false' }}
memory: {{ virtual_masters_memory }}
nets:
{% if provisioning_enable %}
- name: {{ provisioning_net }}
{% endif %}
mac: {{ virtual_masters_mac_prefix + ":" + "%02.d" | format(num + 1)| string }}
- name: {{ baremetal_net }}
{% if baremetal_macs and baremetal_macs|length >= num %}
mac: {{ baremetal_macs[num] }}
{% endif %}
{% if baremetal_ips and baremetal_ips|length >= num %}
ip: {{ baremetal_ips[num] }}
reserveip: true
{% endif %}
disks:
{% for size in [disk_size] + extra_disks %}
- size: {{ size }}
interface: scsi
{% endfor %}
{% endfor %}
{% endif %}
{% if virtual_workers %}
{% for num in range(0, virtual_workers_number) %}
{{ cluster }}-worker-{{ num }}:
pool: {{ pool }}
numcpus: {{ virtual_workers_numcpus }}
start: false
cloudinit: false
uefi: {{ 'true' if virtual_protocol == 'redfish' else 'false' }}
memory: {{ virtual_workers_memory }}
nets:
{% if provisioning_enable %}
- name: {{ provisioning_net }}
{% endif %}
mac: {{ virtual_workers_mac_prefix + ":" + "%02.d" | format(num + 1)| string }}
- name: {{ baremetal_net }}
disks:
{% for size in [disk_size] + extra_disks %}
- size: {{ size }}
interface: scsi
{% endfor %}
{% endfor %}
{% endif %}
{{ cluster }}-installer:
image: {{ image }}
playbook: {{ playbook }}
pool: {{ pool }}
wait: {{ installer_wait }}
numcpus: {{ numcpus }}
reservedns: {{ True if lab else False }}
keys: {{ keys }}
{% if 'rhel' in image %}
rhnregister: {{ rhnregister }}
networkwait: {{ rhnwait }}
{% endif %}
memory: {{ memory }}
privatekey: true
notify: {{ notify }}
{% if lab %}
notifycmd: echo machine $(hostname) ready at $(hostname -I)
{% elif deploy %}
notifyscript: {{ notifyscript }}
{% else %}
notifycmd: ls /root/bin/openshift-baremetal-install
{% endif %}
nets:
- name: {{ baremetal_net }}
{% if installer_mac != None %}
mac: {{ installer_mac }}
{% endif %}
{% if provisioning_enable %}
- name: {{ provisioning_net }}
noconf: yes
{% endif %}
disks:
- {{ disk_size }}
files:
- path: /etc/sushy.conf
origin: helpers/sushy.conf
- path: /root/00_virtual.sh
origin: {{ '00_virtual.sh.' + virtual_protocol }}
- 01_patch_installconfig.sh
- 02_packages.sh
- 03_network.sh
- 04_get_clients.sh
- 05_cache.sh
- 06_disconnected.sh
- 07_nbde.sh
- 08_ntp.sh
- 09_deploy_openshift.sh
- 10_nfs.sh
- 10_nfs.yml
- install-config.yaml
- clouds.yaml
- .bashrc
- extra_worker.yml
- origin: {{ pullsecret }}
path: /root/openshift_pull.json
- path: /root/bin/ipmi.py
origin: helpers/ipmi.py
- path: /root/bin/vbmc.py
origin: helpers/vbmc.py
- path: /root/bin/redfish.py
origin: helpers/redfish.py
- path: /root/bin/sushy.py
origin: helpers/sushy.py
- path: /usr/lib/systemd/system/sushy.service
origin: helpers/sushy.service
- path: /root/bin/clean.sh
origin: helpers/clean.sh
- path: /root/bin/set_ironic_creds.sh
origin: helpers/set_ironic_creds.sh
render: false
- path: /root/manifests
origin: manifests
- 99-openshift-tang-encryption-clevis.sample.yaml
- 99-openshift-tang-encryption-ka.sample.yaml
- 99-openshift-chrony.sample.yaml
{% if not lab %}
scripts:
{% if build %}
- helpers/build.sh
{% endif %}
- deploy.sh
{% endif %}