-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathkcli_plan.yml
167 lines (158 loc) · 5.04 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
{% set all_operators = [] %}
{% for operator in disconnected_operators %}
{% set operator_name = operator.name if operator.name is defined else operator %}
{{ all_operators.append(operator_name) or "" }}
{% endfor %}
{% if acm and 'advanced-cluster-management' not in all_operators %}
{{ disconnected_operators.append("advanced-cluster-management") or "" }}
{% endif %}
{% if acm and 'multicluster-engine' not in all_operators %}
{{ disconnected_operators.append("multicluster-engine") or "" }}
{% endif %}
{% if 'openshift-gitops-operator' not in all_operators %}
{{ disconnected_operators.append("openshift-gitops-operator") or "" }}
{% endif %}
{% if 'topology-aware-lifecycle-manager' not in all_operators %}
{{ disconnected_operators.append("topology-aware-lifecycle-manager") or "" }}
{% endif %}
{% if spokes|length > 0 and 'sriov-network-operator' not in all_operators %}
{{ disconnected_operators.append("sriov-network-operator") or "" }}
{% endif %}
{% if spokes|length > 0 and 'lvms-operator' not in all_operators %}
{{ disconnected_operators.append("lvms-operator") or "" }}
{% endif %}
{% set snoplus_spokes = [] %}
{% for spoke in spokes %}
{% set spoke_name = spoke.name %}
{% set spoke_ctlplanes_number = spoke.get('ctlplanes', 1) %}
{% set spoke_workers_number = spoke.get('workers', 0) %}
{% set spoke_snoplus = True if spoke_ctlplanes_number == 1 and spoke_workers_number == 1 else False %}
{% if spoke_snoplus %}
{% do snoplus_spokes.append(spoke_name) %}
{% endif %}
{% endfor %}
{{ cluster }}-installer:
image: {{ image }}
pool: {{ pool }}
wait: {{ installer_wait }}
numcpus: {{ installer_numcpus or numcpus }}
uefi: false
uefi_legacy: false
secureboot: false
keys: {{ keys }}
{% if 'rhel' in image %}
rhnregister: {{ rhnregister }}
{% endif %}
networkwait: {{ rhnwait }}
memory: {{ installer_memory or memory }}
privatekey: {{ virtual_hub and config_type == 'kvm' }}
notify: {{ notify }}
{% if deploy_hub %}
notifyscript: {{ notifyscript }}
{% elif launch_steps %}
notifycmd: oc get clusterversion
{% else %}
notifycmd: echo machine $(hostname) ready at $(hostname -I)
{% endif %}
nets:
- name: {{ baremetal_net }}
{% if installer_mac != None %}
mac: {{ installer_mac }}
{% endif %}
{% if installer_ip != None %}
ip: {{ installer_ip }}
mask: {{ baremetal_cidr.split('/')[1] }}
gateway: {{ static_baremetal_gateway or baremetal_cidr|network_ip(1 if fake_network else -2) }}
dns: {{ static_baremetal_dns or static_baremetal_gateway or baremetal_cidr|network_ip(1 if fake_network else -2) }}
{% endif %}
ipv6: {{ true if baremetal_cidr != None and ':' in baremetal_cidr else false }}
{% if baremetal_cidr != None and ':' in baremetal_cidr and (not dualstack or dualstack and dualstack_isolated) %}
- default
{% endif %}
disks:
- {{ installer_disk_size or disk_size }}
files:
{% if KUBECONFIG != None %}
- origin: {{ KUBECONFIG }}
path: /root/ocp/auth/kubeconfig
{% endif %}
- agent-config.yaml
- install-config.yaml
{% if disconnected or disconnected_url != None %}
- mirror-config.yaml
{% endif %}
{% if motd != None %}
- path: /etc/motd
origin: {{ motd }}
{% endif %}
- path: /root/.bashrc
origin: envfiles/bashrc
{% if not offline|default(False) and not workflow_installer %}
- path: /root/.kcli/config.yml
origin: bin/kcli_config.yml
{% endif %}
- origin: {{ pull_secret }}
path: /root/openshift_pull.json
- path: /etc/systemd/system/registry.service
origin: bin/registry.service
{% for ca in cas %}
{% set num = loop.index0 %}
- path: /etc/pki/ca-trust/source/anchors/RH-IT-Root-CA{{ num }}.crt
content: |
{{ ca |certificate | replace('\n', '\n ') }}
{% endfor %}
{% if http_proxy != None %}
- path: /root/scripts/proxy.sh
origin: envfiles/proxy.sh
mode: 644
{% endif %}
- path: /root/bin/mapping_to_icsp.py
origin: bin/mapping_to_icsp.py
render: false
- bin
- scripts
- machineconfigs
{% if manifests_dir|exists %}
- origin: {{ manifests_dir }}
path: /root/manifests
{% endif %}
{% if installer_mac != None and ':' in api_ip|default('') %}
- path: /etc/NetworkManager/conf.d/kcli-ipv6.conf
origin: envfiles/kcli-ipv6.conf
{% endif %}
{% if dns %}
- dnsmasq.conf
{% endif %}
- ztp/scripts/launch_steps.sh
- ztp/scripts/01_assisted-service.sh
- ztp/scripts/02_git.sh
- ztp/scripts/03_spokes_deploy.sh
- ztp/scripts/04_spokes_wait.sh
- ztp/scripts/05_snoplus.sh
- ztp/scripts/06_compliance.sh
- ztp/scripts/gitops
- ztp/scripts/generate_gitops.sh
- ztp/scripts/requirements.sample.yml
- ztp/scripts/siteconfig.sample.yml
- ztp/scripts/kustomization.yaml
- ztp/scripts/kube_compare.sh
- ztp/scripts/kube_compare_metadata.yaml
- path: /root/ztp/scripts/kubeconfig.sh
origin: ztp/scripts/kubeconfig.sh
- ztp/scripts/gitea.service
{% if snoplus_spokes %}
- path: /root/ztp/scripts/snoplus.txt
content: |
{% for spoke in snoplus_spokes %}
{{ spoke }}
{% endfor %}
{% endif %}
{% if spoke_policies_dir|exists %}
- origin: {{ spoke_policies_dir }}
path: /root/ztp/scripts/site-policies
render: false
{% endif %}
{% if launch_steps %}
cmds:
- bash /root/scripts/launch_steps.sh
{% endif %}