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
4 changes: 4 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -375,3 +375,7 @@ fi

# Defaults the variable to enable testing a custom machine-api-operator image
export TEST_CUSTOM_MAO=${TEST_CUSTOM_MAO:-false}

# Set to configure bootstrap VM baremetal network with static IP
# (Currently this just expects a non-empty value, the IP is fixed to .9)
export ENABLE_BOOTSTRAP_STATIC_IP=${ENABLE_BOOTSTRAP_STATIC_IP:-}
5 changes: 5 additions & 0 deletions config_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ set -x
#export EXTERNAL_SUBNET_V4="11.0.0.0/24"
#export EXTERNAL_SUBNET_V6="fd2e:6f44:5dd8:c956::/120"

# ENABLE_BOOTSTRAP_STATIC_IP -
# Configure a static IP for the bootstrap VM external NIC
# (Currently this just expects a non-empty value, the IP is fixed to .9)
# export ENABLE_BOOTSTRAP_STATIC_IP=true

################################################################################
## VM Settings
##
Expand Down
13 changes: 13 additions & 0 deletions ocp_install_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@ cat <<EOF
provisioningBridge: ${PROVISIONING_NETWORK_NAME}
provisioningNetworkCIDR: $PROVISIONING_NETWORK
provisioningNetworkInterface: $CLUSTER_PRO_IF
EOF
fi

if [ -n "${ENABLE_BOOTSTRAP_STATIC_IP}" ]; then
if [[ "${IP_STACK}" = "v6" ]]; then
BOOTSTRAP_IP=$(nth_ip $EXTERNAL_SUBNET_V6 $((idx + 9)))
else
# Note we assume v4 for dual-stack v4v6 since it's the primary network
BOOTSTRAP_IP=$(nth_ip $EXTERNAL_SUBNET_V4 $((idx + 9)))
fi
cat <<EOF
bootstrapExternalStaticIP: "${BOOTSTRAP_IP}"
bootstrapExternalStaticGateway: "${PROVISIONING_HOST_EXTERNAL_IP}"
EOF
fi
}
Expand Down