Skip to content

Commit

Permalink
use aicli
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Jan 25, 2024
1 parent 1ba5d8e commit 0fa68a7
Show file tree
Hide file tree
Showing 33 changed files with 230 additions and 557 deletions.
46 changes: 46 additions & 0 deletions aicli_parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% set virtual_ctlplanes_nodes = [] %}
{% set virtual_workers_nodes = [] %}
{% if virtual_ctlplanes %}
{% for num in range(0, virtual_ctlplanes_number) %}
{% do virtual_ctlplanes_nodes.append({}) %}
{% endfor %}
{% endif %}
{% if virtual_workers and virtual_workers_deploy %}
{% for num in range(0, virtual_workers_number) %}
{% do virtual_workers_nodes.append({}) %}
{% endfor %}
{% endif %}
{% set nodes = ctlplanes + workers + virtual_ctlplanes_nodes + virtual_workers_nodes %}

base_dns_domain: {{ domain }}
manifests: manifests
version: {{ tag }}
api_vip: {{ api_ip }}
ingress_vip: {{ ingress_ip }}
{% if ':' in api_ip %}
cluster_networks:
- cidr: fd01::/48
hostPrefix: 64
service_networks:
- fd02::/112
{% endif %}
bmc_user: {{ bmc_user }}
bmc_password: {{ bmc_password }}
hosts:
{% for node in nodes %}
{% set num = loop.index0|string %}
{% set role = 'ctlplane' if num|int < (ctlplanes + virtual_ctlplanes_nodes)|length else 'worker' %}
{% set url = node["redfish_address"]|default("http://127.0.0.1:9000/redfish/v1/Systems/kcli/%s-%s-%s" % (cluster, role, num)) %}
- name: {{ cluster }}-{{ role }}-{{ num }}
role: {{ 'master' if role == 'ctlplane' else 'worker' }}
bmc_url: {{ url }}
{% if 'bmc_user' in node %}
bmc_user: {{ node['bmc_user'] }}
{% endif %}
{% if 'bmc_password' in node %}
bmc_password: {{ node['bmc_password'] }}
{% endif %}
{% if 'disk' in node %}
disk: "/dev/{{ node ['disk'] | basename }}"
{% endif %}
{% endfor %}
3 changes: 0 additions & 3 deletions bin/clean.sh

This file was deleted.

12 changes: 2 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,9 @@ 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
export AI_URL=127.0.0.1:8090
246 changes: 0 additions & 246 deletions install-config.yaml

This file was deleted.

1 change: 1 addition & 0 deletions kcli_pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,4 @@ if [ ! -z "$POOLS" ] ; then
kcli -C $CLIENT delete pool --yes $POOL
done
fi
kcli delete iso --yes $CLUSTER.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
4 changes: 1 addition & 3 deletions paramfiles/lab_ztp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ domain: karmalabs.corp
baremetal_cidr: 192.168.130.0/24
baremetal_net: lab-baremetal
virtual_ctlplanes_memory: 16384
virtual_ctlplanes_numcpus: 8
virtual_ctlplanes_numcpus: 16
api_ip: 192.168.130.253
ingress_ip: 192.168.130.252
baremetal_ips:
Expand All @@ -27,8 +27,6 @@ ztp_spokes:
ctlplanes_number: 1
workers_number: 0
virtual_nodes_number: 1
disk_size: 60
installer_disk_size: 200
lab_extra_dns:
- assisted-service-multicluster-engine
- assisted-service-assisted-installer
Expand Down
4 changes: 1 addition & 3 deletions paramfiles/lab_ztp_ipv6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ domain: karmalabs.corp
baremetal_cidr: 2620:52:0:1302::/64
baremetal_net: lab-baremetal
virtual_ctlplanes_memory: 16384
virtual_ctlplanes_numcpus: 8
virtual_ctlplanes_numcpus: 16
api_ip: 2620:52:0:1302::2
ingress_ip: 2620:52:0:1302::3
baremetal_ips:
Expand All @@ -32,8 +32,6 @@ ztp_spokes:
ctlplanes_number: 1
workers_number: 0
virtual_nodes_number: 1
disk_size: 60
installer_disk_size: 200
lab_extra_dns:
- assisted-service-multicluster-engine
- assisted-service-assisted-installer
Expand Down
Loading

0 comments on commit 0fa68a7

Please sign in to comment.