Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ baseDomain: $base_domain
featureSet: TechPreviewNoUpgrade
controlPlane:
name: "master"
replicas: 3
replicas: ${MASTER_REPLICAS}
platform:
vsphere:
zones:
Expand All @@ -117,7 +117,7 @@ controlPlane:
- "us-east-3"
compute:
- name: "worker"
replicas: 4
replicas: ${WORKER_REPLICAS}
platform:
vsphere:
zones:
Expand Down Expand Up @@ -186,6 +186,21 @@ networking:
EOF
fi

declare zone_worker_ips zone_master_ips
master_num=$((3 + $MASTER_REPLICAS))
for num in $(seq 4 $master_num); do
master_ip="192.168.${third_octet}.$num"
zone_master_ips+="\"$master_ip\"",
done

if [ ${WORKER_REPLICAS} -ne 0 ]; then
worker_num=$(($master_num + $WORKER_REPLICAS ))
for num in $(seq $(($master_num + 1)) $worker_num); do
worker_ips="192.168.${third_octet}.$num"
zone_worker_ips+="\"$worker_ips\"",
done
fi

echo "$(date -u --rfc-3339=seconds) - Create terraform.tfvars ..."
cat > "${SHARED_DIR}/terraform.tfvars" <<-EOF
machine_cidr = "192.168.${third_octet}.0/25"
Expand All @@ -201,8 +216,8 @@ compute_num_cpus = "4"
vm_dns_addresses = ["${dns_server}"]
bootstrap_ip_address = "192.168.${third_octet}.3"
lb_ip_address = "192.168.${third_octet}.2"
compute_ip_addresses = ["192.168.${third_octet}.7","192.168.${third_octet}.8","192.168.${third_octet}.9","192.168.${third_octet}.10"]
control_plane_ip_addresses = ["192.168.${third_octet}.4","192.168.${third_octet}.5","192.168.${third_octet}.6"]
compute_ip_addresses = [${zone_worker_ips%?}]
control_plane_ip_addresses = [${zone_master_ips%?}]
failure_domains = [
{
datacenter = "IBMCloud"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ ref:
from: upi-installer
grace_period: 10m
commands: upi-conf-vsphere-zones-commands.sh
env:
- name: MASTER_REPLICAS
default: "3"
- name: WORKER_REPLICAS
default: "4"
credentials:
- namespace: test-credentials
name: vsphere-vmc
Expand Down