From ad78fd7838c54ee59e3071cc8a56c8221bc98e2a Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Mon, 5 Aug 2019 09:42:15 -0400 Subject: [PATCH 1/2] Add MachineCIDR definition to install-config.yaml openshift/installer#2140 adds validation that the VIPs are a) in the MachineCIDR and b) not in ClusterNetworks or ServiceNetworks. This patch defines the MachineCIDR to EXTERNAL_SUBNET in order to satisfy the first requirement. --- ocp_install_env.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocp_install_env.sh b/ocp_install_env.sh index 5b0b35ce2..344754f9f 100644 --- a/ocp_install_env.sh +++ b/ocp_install_env.sh @@ -63,6 +63,8 @@ function generate_ocp_install_config() { cat > "${outdir}/install-config.yaml" << EOF apiVersion: v1beta4 baseDomain: ${BASE_DOMAIN} +networking: + machineCIDR: ${EXTERNAL_SUBNET} metadata: name: ${CLUSTER_NAME} compute: From 7f69288e114ba07ef1916749612f818109df87bc Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 9 Aug 2019 09:43:58 -0400 Subject: [PATCH 2/2] Allow overriding EXTERNAL_SUBNET variable. --- README.md | 2 ++ ocp_install_env.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c63f112f9..3e13fbec3 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ BASE_DOMAIN=your.valid.domain.com CLUSTER_NAME=clustername # Set your valid DNS VIP, such as 1.1.1.1 for 'ns1.example.com' DNS_VIP="1.1.1.1" +# Set to the subnet in use on the external (baremetal) network +EXTERNAL_SUBNET="192.168.111.0/24" ``` ## Installation diff --git a/ocp_install_env.sh b/ocp_install_env.sh index 344754f9f..b1d62dfd5 100644 --- a/ocp_install_env.sh +++ b/ocp_install_env.sh @@ -6,7 +6,7 @@ export BASE_DOMAIN=${BASE_DOMAIN:-test.metalkube.org} export CLUSTER_NAME=${CLUSTER_NAME:-ostest} export CLUSTER_DOMAIN="${CLUSTER_NAME}.${BASE_DOMAIN}" export SSH_PUB_KEY="${SSH_PUB_KEY:-$(cat $HOME/.ssh/id_rsa.pub)}" -export EXTERNAL_SUBNET="192.168.111.0/24" +export EXTERNAL_SUBNET=${EXTERNAL_SUBNET:-"192.168.111.0/24"} export DNS_VIP=${DNS_VIP:-"192.168.111.2"} #