Files related to the deployment of ipi
The steps below are currently written for an environment where you have a DNS/DHCP server, a provisioning server and then 3 master and 3 worker nodes for the actual cluster. If you use a different setup than this, further customization is required than is described below. NOTE: we are currently working on further parameterizing this repo so that it supports a wider variety of baremetal environments.
DNS/DHCP Server
- SSH to server as root
- Create a "baremetal" bridge with IP 10.0.1.2/24 and make your baremetal network interface its slave
- ifup baremetal
- git clone https://github.com/redhat-nfvpe/kni-ipi-deploy.git
- cd kni-ipi-deploy
- vi settings.sh (set appropriate values for your environment)
- cd iptables
- ./gen_iptables.sh
- cd ../dns
- ./start.sh
- cd ../dhcp
- ./start.sh
- podman ps (to verify dnsmaq and coredns containers are running)
Provisioning Host
- Install RHEL 8.1 on provisioning host
- SSH to provisioning host as root
- Register the system with subscription-manager and attach to appropriate pool
- Create non-root user and give it password-less sudo
- su - < non-root user >
- Create your install-config.yaml with appropriate values for your environment
- Copy your install-config.yaml to your home dir
- mkdir -p ~/clusterconfigs/openshift
- sudo yum install -y jq
- git clone https://github.com/openshift-kni/baremetal-deploy.git
- cd openshift-kni/baremetal-prep
- vi baremetal-prep.sh (add baremetal "no peer DNS" -- sudo nmcli con mod baremetal ipv4.ignore-auto-dns yes)
- ./baremetal-prep.sh -p < provisioning interface > -b < baremetal interface > -m
- cd
- cp ~/clusterconfigs/openshift/99-metal3-config.yaml ~/.
- sudo ifdown baremetal
- sudo ifup baremetal
- Make sure your /etc/resolv.conf points to your DNS/DHCP server
- Download your pull secret from https://cloud.redhat.com/openshift/install/metal/user-provisioned and place it in your home dir as "pull-secret.json"
- git clone https://github.com/redhat-nfvpe/kni-ipi-deploy.git
- cd kni-ipi-deploy
- vi settings.sh (set appropriate values for your environment)
- cd hacks
- Rename the 99-ifcfg-eno2-*.yaml and 99-ifcfg-ens1f0-*.yaml files to match your provisioning and baremetal interfaces, respectively. You will also need to decode the base64 string inside these files, change the device name, re-encode the data and then replace the base64 string inside the files.
- cd ../install
- ./preinstall.sh
- ./install.sh
The installer may time-out at various stages of the deployment. If this happens, you probably need to run clean.sh and re-deploy again with install.sh. However, if you get a timeout in the final stage of the installer ("DEBUG Still waiting for the cluster to initialize: Working towards 4.3.0-0.nightly-2020-01-16-031402: XX% complete"), you might still succeed. Monitor the "oc get nodes" and "oc get co" output (and you can also SSH into nodes to examine journalctl and/or crictl containers). You may also find that CSRs get stuck in the pending state (seen via "oc get csr"). Our advice is to manually approve any CSR in the pending state.