Skip to content

Commit

Permalink
extra static ip for deploying 2 spokes
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Oct 16, 2024
1 parent 633a4d8 commit f5ba407
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions paramfiles/lab_ipv6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ static_ips:
- 2620:52:0:1302::21
- 2620:52:0:1302::22
- 2620:52:0:1302::23
- 2620:52:0:1302::24

spokes:
- name: mgmt-spoke1
Expand Down
8 changes: 8 additions & 0 deletions ztp/scripts/03_spokes_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ export SSH_PUB_KEY=$(cat /root/.ssh/id_rsa.pub)
BAREMETAL_IP=$(ip -o addr show eth0 | head -1 | awk '{print $4}' | cut -d'/' -f1)
echo $BAREMETAL_IP | grep -q ':' && BAREMETAL_IP=[$BAREMETAL_IP]
export BAREMETAL_IP

{% for spoke in spokes %}
{% if spoke.get('virtual_nodes', 0) > 0 %}
kcli delete iso -y {{ spoke.name }}.iso || true
{% endif %}
{% endfor %}


envsubst < /root/ztp/scripts/requirements.sample.yml > /root/ztp/scripts/requirements.yml
envsubst < /root/ztp/scripts/siteconfig.sample.yml > /root/ztp/scripts/siteconfig.yml

Expand Down
5 changes: 0 additions & 5 deletions ztp/scripts/04_spokes_wait.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ export PYTHONUNBUFFERED=true
{% set spoke_deploy = spoke.get('deploy', spoke_deploy) %}
{% set spoke_ctlplanes_number = spoke.get('ctlplanes', 1) %}
{% set spoke_workers_number = spoke.get('workers', 0) %}
{% set virtual_nodes_number = spoke.get('virtual_nodes', 0) %}
{% if spoke_deploy and spoke.get('wait', spoke_wait) %}
{% set spoke_wait_time = spoke.get('wait_time', spoke_wait_time) %}
SPOKE={{ spoke.name }}
{% if virtual_nodes_number > 0 %}
kcli delete iso -y $SPOKE.iso || true
{% endif %}
timeout=0
installed=false
failed=false
Expand Down Expand Up @@ -40,6 +36,5 @@ elif [ "$failed" == "true" ] ; then
else
echo Timeout waiting for spoke cluster $SPOKE to be deployed
fi

{% endif %}
{% endfor %}

0 comments on commit f5ba407

Please sign in to comment.