diff --git a/.defaults.sh b/.defaults.sh index b417118..e73009b 100644 --- a/.defaults.sh +++ b/.defaults.sh @@ -54,6 +54,9 @@ export CLUSTER_NAME="ocp4" # -d, --cluster-domain DOMAIN export BASE_DOM="local" +# -t, --network-type TYPE +export NETWORK_TYPE="OpenShiftSDN" + # -z, --dns-dir DIR export DNS_DIR="/etc/NetworkManager/dnsmasq.d" diff --git a/.install_scripts/download_prepare.sh b/.install_scripts/download_prepare.sh index 718a7c8..742e54d 100644 --- a/.install_scripts/download_prepare.sh +++ b/.install_scripts/download_prepare.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo +echo echo "#####################################################" echo "### DOWNLOAD AND PREPARE OPENSHIFT 4 INSTALLATION ###" echo "#####################################################" @@ -29,7 +29,7 @@ elif [ -f "${SSH_PUB_KEY_FILE}" ]; then else err "Unable to select SSH public key!" fi - + echo -n "====> Downloading OCP Client: "; download get "$CLIENT" "$CLIENT_URL"; echo -n "====> Downloading OCP Installer: "; download get "$INSTALLER" "$INSTALLER_URL"; @@ -73,7 +73,7 @@ networking: clusterNetworks: - cidr: 10.128.0.0/14 hostPrefix: 23 - networkType: OpenShiftSDN + networkType: ${NETWORK_TYPE} serviceNetwork: - 172.30.0.0/16 platform: diff --git a/.install_scripts/process_args.sh b/.install_scripts/process_args.sh index 6987371..024ea93 100644 --- a/.install_scripts/process_args.sh +++ b/.install_scripts/process_args.sh @@ -52,6 +52,11 @@ case $key in shift shift ;; + -t|--network-type) + export NETWORK_TYPE="$2" + shift + shift + ;; -v|--vm-dir) export VM_DIR="$2" shift diff --git a/.install_scripts/show_help.sh b/.install_scripts/show_help.sh index 883e495..66c887b 100644 --- a/.install_scripts/show_help.sh +++ b/.install_scripts/show_help.sh @@ -31,6 +31,11 @@ Options: This will be used to populate .baseDomain in the install-config.yaml file that will be used to install the cluster. Default: ${BASE_DOM} +-t, --network-type TYPE + OpenShift 4 cluster network type. + This will be used to populate .networking.networkType in the install-config.yaml file that will be used to install the cluster. + Default: ${NETWORK_TYPE} + -m, --masters N Number of master nodes to deploy. Default: ${N_MAST} diff --git a/README.md b/README.md index a49ec6c..2cf5cdd 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ | -p, --pull-secret FILE | Location of the pull secret file
Default: /root/pull-secret | | -c, --cluster-name NAME | OpenShift 4 cluster name
Default: ocp4 | | -d, --cluster-domain DOMAIN | OpenShift 4 cluster domain
Default: local | +| -t, --network-type TYPE | OpenShift 4 cluster network type
Default: OpenShiftSDN | | -m, --masters N | Number of masters to deploy
Default: 3 | | -w, --worker N | Number of workers to deploy
Default: 2 | | --master-cpu N | Number of CPUs for the master VM(s)
Default: 4 | @@ -69,6 +70,10 @@ ./ocp4_setup_upi_kvm.sh --ocp-version 4.2.stable --libvirt-oct 155 ./ocp4_setup_upi_kvm.sh -O 4.2.stable -N 155 + # Deploy OpenShift 4.15.stable with OVNKubernetes network type + ./ocp4_setup_upi_kvm.sh --ocp-version 4.15.stable --network-type OVNKubernetes + ./ocp4_setup_upi_kvm.sh -O 4.15.stable -t OVNKubernetes + # Destory the already installed cluster ./ocp4_setup_upi_kvm.sh --cluster-name ocp43 --cluster-domain lab.test.com --destroy ./ocp4_setup_upi_kvm.sh -c ocp43 -d lab.test.com --destroy @@ -158,7 +163,7 @@ for vm in $(virsh list --all --name --autostart | grep ""); do done ~~~ -Note: Replace `` with the cluster name or any matching string to filter out VMs that you want to set/un-set to be auto-started. +Note: Replace `` with the cluster name or any matching string to filter out VMs that you want to set/un-set to be auto-started. ___ @@ -177,7 +182,7 @@ When the bootstrap process is complete, the script waits for clusterversion to b ~~~ ~~~ -====> Waiting for clusterversion: +====> Waiting for clusterversion: --> Working towards 4.3.12: 46% complete --> Unable to apply 4.3.12: an unknown error has occurred --> Working towards 4.3.12: 61% complete