Skip to content

Commit

Permalink
rename baremetal_ips static_ips
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Oct 12, 2024
1 parent 426cee6 commit 546b454
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 23 deletions.
8 changes: 0 additions & 8 deletions KMETA

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ Note that you can use the baseplan `kcli_plan_infra.yml` to deploy the infrastru
|apps |[] |
|apps_install_cr |False |
|baremetal_cidr |None |
|baremetal_ips |[] |
|baremetal_macs |[] |
|baseplan |kcli_plan_infra.yml |
|bmc_password |calvin |
Expand Down Expand Up @@ -178,6 +177,7 @@ Note that you can use the baseplan `kcli_plan_infra.yml` to deploy the infrastru
|spoke_wait_time |3600 |
|static_baremetal_dns |None |
|static_baremetal_gateway |None |
|static_ips |[] |
|static_network |False |
|tag |4.17 |
|users_admin |admin |
Expand Down
6 changes: 3 additions & 3 deletions agent-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
{% set virtual_workers_nodes = [] %}
{% if virtual_hub %}
{% for num in range(0, ctlplanes) %}
{% set new_ctlplane = {'ip': baremetal_ips[num]} if static_network and baremetal_ips|length > num else {} %}
{% set new_ctlplane = {'ip': static_ips[num]} if static_network and static_ips|length > num else {} %}
{% do virtual_ctlplanes_nodes.append(new_ctlplane) %}
{% endfor %}
{% endif %}
{% if virtual_hub and workers > 0 %}
{% for num in range(0, workers) %}
{% set new_worker = {'ip': baremetal_ips[num]} if static_network and baremetal_ips|length > ctlplanes + num else {} %}
{% set new_worker = {'ip': static_ips[num]} if static_network and static_ips|length > ctlplanes + num else {} %}
{% do virtual_workers_nodes.append(new_worker) %}
{% endfor %}
{% endif %}
Expand All @@ -27,7 +27,7 @@ apiVersion: v1alpha1
kind: AgentConfig
metadata:
name: {{ cluster }}
rendezvousIP: {{ rendezvous_ip|default(baremetal_ips[0]) }}
rendezvousIP: {{ rendezvous_ip|default(static_ips[0]) }}
hosts:
{% for host in hosts %}
- hostname: {{ host['name']|default(cluster + "-" + loop.index0|string) }}.{{ domain }}
Expand Down
4 changes: 2 additions & 2 deletions dnsmasq.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ host-record=registry.{{ cluster }}.{{ domain }},{{ installer_ip }}
{% if spoke.get('ctlplanes', 1) == 1 %}
{% if nodes|length > 0 and 'ip' in nodes[0] %}
{% set sno_ip = nodes[0].ip %}
{% elif baremetal_ips|length > ctlplanes + workers + total_number.value %}
{% set sno_ip = baremetal_ips[ctlplanes + workers + total_number.value] %}
{% elif static_ips|length > ctlplanes + workers + total_number.value %}
{% set sno_ip = static_ips[ctlplanes + workers + total_number.value] %}
{% else %}
{% set sno_ip = None %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion envfiles/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export PATH=/usr/local/bin:/root/bin:$PATH
export REGISTRY_PASSWORD={{ disconnected_password }}
export REGISTRY_USER={{ disconnected_user }}
export PYTHONUNBUFFERED=true
export AI_URL={{ rendezvous_ip|default(baremetal_ips[0])|ipv6_wrap }}:8090
export AI_URL={{ rendezvous_ip|default(static_ips[0])|ipv6_wrap }}:8090
4 changes: 2 additions & 2 deletions kcli_pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ echo no spoke_ingress_ip. This is mandatory for an HA spoke && exit 1
{% endif %}
{% set total_hub_nodes_number = total_ctlplanes + total_workers %}

{% if rendezvous_ip == None and baremetal_ips|length == 0 %}
echo You need to specify rendezvous_ip by either defining the variable or populating baremetal_ips array
{% if rendezvous_ip == None and static_ips|length == 0 %}
echo You need to specify rendezvous_ip by either defining the variable or populating static_ips array
exit 1
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion paramfiles/lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ baremetal_cidr: 192.168.130.0/24
baremetal_net: lab-baremetal
api_ip: 192.168.130.253
ingress_ip: 192.168.130.252
baremetal_ips:
static_ips:
- 192.168.130.20
- 192.168.130.21
- 192.168.130.22
Expand Down
2 changes: 1 addition & 1 deletion paramfiles/lab_ipv6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ baremetal_net: lab-baremetal
# static_baremetal_gateway: 2620:52:0:1302::1
api_ip: 2620:52:0:1302::2
ingress_ip: 2620:52:0:1302::3
baremetal_ips:
static_ips:
- 2620:52:0:1302::20
- 2620:52:0:1302::21
- 2620:52:0:1302::22
Expand Down
3 changes: 2 additions & 1 deletion plans/kcli_plan_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bmc_password: calvin
bmc_reset: false
baremetal_cidr:
baremetal_macs: []
baremetal_ips: []
static_ips: []
pull_secret: openshift_pull.json
notifyscript: scripts/notify.sh
notify: false
Expand Down Expand Up @@ -119,3 +119,4 @@ cluster_network_ipv6: "fd01::/48"
service_network_ipv4: "172.30.0.0/16"
service_network_ipv6: "fd02::/112"
apps_install_cr: false
rendezvous_ip:
2 changes: 1 addition & 1 deletion plans/kcli_plan_infra_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extra_disks: []
baremetal_net: baremetal
baremetal_cidr:
baremetal_macs: []
baremetal_ips: []
static_ips: []
baremetal_ctlplanes: []
baremetal_workers: []
model: dell
Expand Down
2 changes: 1 addition & 1 deletion scripts/07_deploy_hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ kcli start baremetal-host -P url={{ url }} -P user={{ user }} -P password={{ pas
{% endfor %}

{% if hosts|length == 1 %}
SNO_IP={{ rendezvous_ip|default(baremetal_ips[0]) }}
SNO_IP={{ rendezvous_ip|default(static_ips[0]) }}
sed -i /api.{{ cluster }}.{{ domain }}/d /etc/hosts
echo $SNO_IP api.{{ cluster }}.{{ domain }} >> /etc/hosts
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion ztp/scripts/siteconfig.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
{% if virtual_nodes_number > 0 %}
{% set extra_nodes = [] %}
{% for num in range(0, virtual_nodes_number) %}
{% set new_node = {'ip': baremetal_ips[ctlplanes + workers + total_number.value + num]} if static_network and baremetal_ips|length > ctlplanes + workers + total_number.value + num else {} %}
{% set new_node = {'ip': static_ips[ctlplanes + workers + total_number.value + num]} if static_network and static_ips|length > ctlplanes + workers + total_number.value + num else {} %}
{% do extra_nodes.append(new_node) %}
{% endfor %}
{% set nodes = extra_nodes + nodes %}
Expand Down

0 comments on commit 546b454

Please sign in to comment.