Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Network Type configurable #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 3 additions & 3 deletions .install_scripts/download_prepare.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo
echo
echo "#####################################################"
echo "### DOWNLOAD AND PREPARE OPENSHIFT 4 INSTALLATION ###"
echo "#####################################################"
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .install_scripts/process_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .install_scripts/show_help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
| -p, --pull-secret FILE | Location of the pull secret file<br>Default: /root/pull-secret |
| -c, --cluster-name NAME | OpenShift 4 cluster name<br>Default: ocp4 |
| -d, --cluster-domain DOMAIN | OpenShift 4 cluster domain<br>Default: local |
| -t, --network-type TYPE | OpenShift 4 cluster network type<br>Default: OpenShiftSDN |
| -m, --masters N | Number of masters to deploy<br>Default: 3 |
| -w, --worker N | Number of workers to deploy<br>Default: 2 |
| --master-cpu N | Number of CPUs for the master VM(s)<br>Default: 4 |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -158,7 +163,7 @@ for vm in $(virsh list --all --name --autostart | grep "<CLUSTER-NAME>"); do
done
~~~

Note: Replace `<CLUSTER-NAME>` 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 `<CLUSTER-NAME>` with the cluster name or any matching string to filter out VMs that you want to set/un-set to be auto-started.

___

Expand All @@ -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
Expand Down