-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
129 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% if virtual_ctlplanes %} | ||
{% set extra_ctlplanes = [] %} | ||
{% for num in range(0, virtual_ctlplanes_number) %} | ||
{% do extra_ctlplanes.append([]) %} | ||
{% endfor %} | ||
{% set ctlplanes = extra_ctlplanes + ctlplanes %} | ||
{% endif %} | ||
{% if virtual_workers and virtual_workers_deploy %} | ||
{% set extra_workers = [] %} | ||
{% for num in range(0, virtual_workers_number) %} | ||
{% do extra_workers.append([]) %} | ||
{% endfor %} | ||
{% set workers = extra_workers + workers %} | ||
{% endif %} | ||
base_dns_domain: {{ domain }} | ||
api_vip: {{ api_ip }} | ||
ingress_vip: {{ ingress_ip }} | ||
hosts: | ||
{% for ctlplane in ctlplanes %} | ||
{% set num = loop.index0|string %} | ||
- name: {{ cluster }}-ctlplane-{{ num }} | ||
role: master | ||
url: {{ ctlplane['redfish_address']|default("CHANGEME:9000/redfish/v1/Systems/kcli/%s-ctlplane-%s" % (cluster, num)) }} | ||
user: {{ ctlplane['bmc_user']|default(bmc_user) }} | ||
password: {{ ctlplane['bmc_password']|default(bmc_password) }} | ||
{% if 'disk' in ctlplane %} | ||
disk: "/dev/{{ ctlplane['disk'] | basename }}" | ||
{% endif %} | ||
{% endfor %} | ||
{% for worker in workers %} | ||
{% set num = loop.index0|string %} | ||
- name: {{ cluster }}-worker-{{ num }} | ||
role: worker | ||
url: {{ worker['redfish_address']|default("CHANGEME:9000/redfish/v1/Systems/kcli/%s-worker-%s" % (cluster, num)) }} | ||
user: {{ worker['bmc_user']|default(bmc_user) }} | ||
password: {{ worker['bmc_password']|default(bmc_password) }} | ||
{% if 'disk' in worker %} | ||
disk: "/dev/{{ worker['disk'] | basename }}" | ||
{% endif %} | ||
{% endfor %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
cd /root | ||
export PATH=/root/bin:$PATH | ||
export HOME=/root | ||
export KUBECONFIG=/root/kubeconfig.{{ cluster }} | ||
[ -d /root/manifests ] || mkdir -p /root/manifests | ||
|
||
{% for ctlplane in ctlplanes %} | ||
kcli stop baremetal-host -P url={{ ctlplane["redfish_address"]|default("127.0.0.1:9000/redfish/v1/Systems/kcli/%s-ctlplane-%s" % (cluster, num)) }} -P user={{ bmc_user }} -P password={{ bmc_password }} | ||
{% endfor %} | ||
{% for worker in workers %} | ||
kcli stop baremetal-host -P url={{ worker["redfish_address"]|default("127.0.0.1:9000/redfish/v1/Systems/kcli/%s-worker-%s" % (cluster, num)) }} -P user={{ bmc_user }} -P password={{ bmc_password }} | ||
{% if bmc_reset %} | ||
kcli reset baremetal-host -P url={{ worker["redfish_address"]|default("127.0.0.1:9000/redfish/v1/Systems/kcli/%s-worker-%s" % (cluster, num)) }} -P user={{ bmc_user }} -P password={{ bmc_password }} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if localhost_fix %} | ||
cp /root/machineconfigs/99-localhost-fix*.yaml /root/manifests | ||
{% endif %} | ||
{% if monitoring_retention != None %} | ||
cp /root/machineconfigs/99-monitoring.yaml /root/manifests | ||
{% endif %} | ||
find manifests -type f -empty -print -delete | ||
grep -q "{{ api_ip }} api.{{ cluster }}.{{ domain }}" /etc/hosts || echo {{ api_ip }} api.{{ cluster }}.{{ domain }} >> /etc/hosts | ||
|
||
aicli create deployment {{ cluster }} | ||
aicli download kubeconfig --path /root | ||
{% if virtual_ctlplanes %} | ||
for node in $(oc get nodes --selector='node-role.kubernetes.io/master' -o name) ; do | ||
oc label $node node-role.kubernetes.io/virtual="" | ||
done | ||
{% endif %} |
Oops, something went wrong.