From 1942ed8ebc33d4ed8a07408582e8ac3c916a2224 Mon Sep 17 00:00:00 2001 From: karmab Date: Wed, 16 Oct 2024 01:24:07 +0200 Subject: [PATCH] fix 07_deploy_hub.sh --- scripts/07_deploy_hub.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/07_deploy_hub.sh b/scripts/07_deploy_hub.sh index f3aa3e0..da553bf 100755 --- a/scripts/07_deploy_hub.sh +++ b/scripts/07_deploy_hub.sh @@ -54,7 +54,7 @@ echo {{ api_ip }} api.$HUB.$DOMAIN >> /etc/hosts {% endif %} {% if virtual_hub %} -kcli delete iso --yes $CLUSTER.iso || true +kcli delete iso --yes $HUB.iso || true {% endif %} mkdir -p ocp/openshift @@ -68,9 +68,9 @@ fi openshift-install agent create image --dir ocp --log-level debug -mv -f ocp/agent.x86_64.iso /var/www/html/$CLUSTER.iso +mv -f ocp/agent.x86_64.iso /var/www/html/$HUB.iso restorecon -Frv /var/www/html -chown apache.apache /var/www/html/$CLUSTER.iso +chown apache.apache /var/www/html/$HUB.iso AI_TOKEN=$(jq '.["*image.Ignition"].Config.storage.files[] | select(.path == "/usr/local/share/assisted-service/assisted-service.env") | .contents.source' ocp/.openshift_install_state.json | cut -d, -f2 | sed 's/"//' | base64 -d | grep AGENT_AUTH_TOKEN | cut -d= -f2) [ "$AI_TOKEN" == "" ] || echo export AI_TOKEN=$AI_TOKEN >> /root/.bashrc @@ -84,13 +84,13 @@ echo $IP | grep -q ':' && IP=[$IP] {% set url = host["redfish_address"]|default("http://127.0.0.1:9000/redfish/v1/Systems/kcli/%s-%s-%s" % (cluster, role, num)) %} {% set user = host['bmc_user']|default(bmc_user) %} {% set password = host['bmc_password']|default(bmc_password) %} -kcli start baremetal-host -P url={{ url }} -P user={{ user }} -P password={{ password }} -P iso_url=http://$IP/$CLUSTER.iso +kcli start baremetal-host -P url={{ url }} -P user={{ user }} -P password={{ password }} -P iso_url=http://$IP/$HUBn.iso {% endfor %} {% if hosts|length == 1 %} SNO_IP={{ rendezvous_ip or static_ips[0] }} -sed -i "/api.$CLUSTER.$DOMAIN/d" /etc/hosts -echo $SNO_IP api.$CLUSTER.$DOMAIN >> /etc/hosts +sed -i "/api.$HUB.$DOMAIN/d" /etc/hosts +echo $SNO_IP api.$HUB.$DOMAIN >> /etc/hosts {% endif %} openshift-install --dir ocp --log-level debug wait-for install-complete || openshift-install --dir ocp --log-level debug wait-for install-complete