Skip to content

Commit

Permalink
migrate to aicli
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Dec 21, 2023
1 parent 747b5c9 commit 2cbf495
Show file tree
Hide file tree
Showing 27 changed files with 155 additions and 572 deletions.
50 changes: 50 additions & 0 deletions aicli_parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% 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 }}
bmc_user: {{ bmc_user }}
bmc_password: {{ bmc_password }}
hosts:
{% for ctlplane in ctlplanes %}
{% set num = loop.index0|string %}
- name: {{ cluster }}-ctlplane-{{ num }}
role: master
bmc_url: {{ ctlplane['redfish_address']|default("http://CHANGEME:9000/redfish/v1/Systems/kcli/%s-ctlplane-%s" % (cluster, num)) }}
{% if 'bmc_user' in ctlplane %}
bmc_user: {{ ctlplane['bmc_user'] }}
{% endif %}
{% if 'bmc_password' in ctlplane %}
bmc_password: {{ ctlplane['bmc_password'] }}
{% endif %}
{% 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
bmc_url: {{ worker['redfish_address']|default("http://CHANGEME:9000/redfish/v1/Systems/kcli/%s-worker-%s" % (cluster, num)) }}
{% if 'bmc_user' in worker %}
bmc_user: {{ worker['bmc_user'] }}
{% endif %}
{% if 'bmc_password' in worker %}
bmc_password: {{ worker['bmc_password'] }}
{% endif %}
{% if 'disk' in worker %}
disk: "/dev/{{ worker['disk'] | basename }}"
{% endif %}
{% endfor %}
3 changes: 0 additions & 3 deletions bin/clean.sh

This file was deleted.

14 changes: 4 additions & 10 deletions envfiles/bashrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# .bashrc
{% set libvirt_user = 'root' if config_user == 'apache' else config_user %}
{% set libvirt_ip = config_host if config_host not in ['127.0.0.1', 'localhost'] else baremetal_net|local_ip %}
{% set libvirt_ip = libvirt_ip|replace(':', '-') + '.sslip.io' %}
{% set libvirt_url = 'qemu+ssh://' + libvirt_user + '@' + libvirt_ip + '/system' %}

# User specific aliases and functions

Expand All @@ -14,13 +10,11 @@ alias mv='mv -i'
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export KUBECONFIG=/root/ocp/auth/kubeconfig
export OS_CLOUD=metal3-bootstrap
export KUBECONFIG=/root/kubeconfig.{{ cluster }}
export PATH=/usr/local/bin:/root/bin:$PATH
export LIBVIRT_DEFAULT_URI={{ libvirt_url }}
export REGISTRY_PASSWORD={{ disconnected_password }}
export REGISTRY_USER={{ disconnected_user }}

alias hypershift='podman run -it --rm --security-opt label=disable --entrypoint=/usr/bin/hypershift -e KUBECONFIG=/k/kubeconfig -v /root/ocp/auth:/k quay.io/hypershift/hypershift-operator:latest'

export PYTHONUNBUFFERED=true
{% if disconnected or not saas %}
export AI_URL=127.0.0.1:8090
{% elif %}
243 changes: 0 additions & 243 deletions install-config.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions kcli_pre.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bash

# OFFLINE TOKEN
{% if saas %}
[ ! -f {{ offlinetoken }} ] && echo offlinetoken not found in {{ offlinetoken }} && exit 1
{% endif %}

# NETWORK CHECK
{% if baremetal_cidr == None %}
echo baremetal_cidr not set. No network, no party!
Expand Down Expand Up @@ -192,3 +197,5 @@ if [ ! -z "$POOLS" ] ; then
kcli -C $CLIENT delete pool --yes $POOL
done
fi
kcli delete disk --yes full.iso || true
kcli delete disk --yes minimal.iso || true
1 change: 0 additions & 1 deletion paramfiles/lab_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ localhost_fix: true
virtual_ctlplanes_static_network: true
lab_dhcp: false
installer_ip: 192.168.130.250
baremetal_bootstrap_ip: 192.168.130.251
notify: true
nfs: true
1 change: 0 additions & 1 deletion paramfiles/lab_static_bonding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ baremetal_macs:
localhost_fix: true
lab_dhcp: false
installer_ip: 192.168.130.250
baremetal_bootstrap_ip: 192.168.130.251
notify: true
nfs: true
vmrules:
Expand Down
Loading

0 comments on commit 2cbf495

Please sign in to comment.