forked from karmab/kcli-ztp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkcli_plan_infra.yml
98 lines (94 loc) · 3.13 KB
/
kcli_plan_infra.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
{% set virtual_disks = [{'size': disk_size, 'interface': 'scsi'}] + extra_disks %}
{% if lab %}
{{ baremetal_net }}:
type: network
cidr: {{ baremetal_cidr }}
{% if lab_domain is defined %}
domain: {{ lab_domain }}
{% endif %}
{% if (dualstack or dual_force|default(False)) and dualstack_cidr != None %}
dual_cidr: {{ dualstack_cidr }}
{% endif %}
{% if provisioning_enable %}
{{ provisioning_net }}:
type: network
cidr: {{ provisioning_cidr }}
dhcp: false
{% endif %}
{% endif %}
{% 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.apps.{{ cluster }}.{{ domain }}
- canary-openshift-ingress-canary.apps.{{ cluster }}.{{ domain }}
- assisted-service-open-cluster-management.apps.{{ cluster }}.{{ domain }}
- assisted-service-assisted-installer.apps.{{ 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' or not provisioning_enable else 'false' }}
uefi_legacy: {{ uefi_legacy }}
memory: {{ virtual_masters_memory }}
nets:
{% if provisioning_enable %}
- name: {{ provisioning_net }}
mac: {{ virtual_masters_mac_prefix + ":" + "%02.d" | format(num + 1)| string }}
{% endif %}
- name: {{ baremetal_net }}
{% if baremetal_macs and baremetal_macs|length > num %}
mac: {{ baremetal_macs[num] }}
{% elif not provisioning_enable %}
mac: {{ virtual_masters_baremetal_mac_prefix + ":" + "%02.d" | format(num + 1)| string }}
{% endif %}
{% if lab and baremetal_ips and baremetal_ips|length > num %}
ip: {{ baremetal_ips[num] }}
reserveip: true
{% endif %}
disks: {{ virtual_disks }}
{% 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' or not provisioning_enable else 'false' }}
uefi_legacy: {{ uefi_legacy }}
memory: {{ virtual_workers_memory }}
nets:
{% if provisioning_enable %}
- name: {{ provisioning_net }}
mac: {{ virtual_workers_mac_prefix + ":" + "%02.d" | format(num + 1)| string }}
{% endif %}
- name: {{ baremetal_net }}
{% if baremetal_macs and baremetal_macs|length > virtual_masters_number + num %}
mac: {{ baremetal_macs[virtual_masters_number + num] }}
{% elif not provisioning_enable %}
mac: {{ virtual_workers_baremetal_mac_prefix + ":" + "%02.d" | format(num + 1)| string }}
{% endif %}
{% if lab and baremetal_ips and baremetal_ips|length > virtual_masters_number + num %}
ip: {{ baremetal_ips[virtual_masters_number + num] }}
reserveip: true
{% endif %}
disks: {{ virtual_disks }}
{% endfor %}
{% endif %}