{"id":81,"date":"2023-11-28T13:58:52","date_gmt":"2023-11-28T18:58:52","guid":{"rendered":"https:\/\/chrisj.cloud\/?p=81"},"modified":"2023-11-28T13:59:47","modified_gmt":"2023-11-28T18:59:47","slug":"all-in-3-openshift-ocp-cluster-with-ocs-storage-and-cnv-virtualization","status":"publish","type":"post","link":"https:\/\/chrisj.cloud\/index.php\/2023\/11\/28\/all-in-3-openshift-ocp-cluster-with-ocs-storage-and-cnv-virtualization\/","title":{"rendered":"All-in-3 Openshift (OCP) cluster with OCS (storage) and CNV (Virtualization)"},"content":{"rendered":"\n<p>Another day, another &#8220;Edge&#8221; Architecture. This time let&#8217;s see how the minimum all-in-one OCP\/OCS\/CNV would have to look like.<\/p>\n\n\n\n<p>But first what are the key benefits:<\/p>\n\n\n\n<ul>\n<li>Small footprint<\/li>\n\n\n\n<li>High Availability<\/li>\n\n\n\n<li>Virtualization with VM HA<\/li>\n\n\n\n<li>HCI storage<\/li>\n\n\n\n<li>Best containers platform there is<\/li>\n<\/ul>\n\n\n\n<p>Okay, I got you this far, let me reward you now with a short 2 minutes demo on how this is going to work once you&#8217;re done: https:\/\/www.youtube.com\/embed\/8Xe1bJIda3c<\/p>\n\n\n\n<p>I have to warn you, this is not a fully approved\/tested setup and you would likely need a support exception if you wanted Red Hat to support you on this design.<\/p>\n\n\n\n<p>Also don&#8217;t <strong>one <\/strong>in all-in-<strong>one<\/strong> be misleading. We really need to start with 4 hosts (1x bootstrap and 3x masters\/workers). By the end of this example we get to run it all on just 3 nodes.<\/p>\n\n\n\n<p>Red Hat official documentation:<\/p>\n\n\n\n<p><a href=\"https:\/\/openshift-kni.github.io\/baremetal-deploy\/4.7\/Deployment\">https:\/\/openshift-kni.github.io\/baremetal-deploy\/4.7\/Deployment<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites:<\/h2>\n\n\n\n<p>You need to start with pre-defining your hardware. This is a minimum spec that worked for me:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Role<\/strong><\/td><td><strong>RAM<\/strong><\/td><td><strong>CPU<\/strong><\/td><td><strong>NIC<\/strong><\/td><td><strong>Disk<\/strong><\/td><\/tr><tr><td>1x Bootstrap<\/td><td>20G<\/td><td>6<\/td><td>1x pxe 1x baremetal<\/td><td>100GB<\/td><\/tr><tr><td>3x Master\/worker<\/td><td>52GB<\/td><td>24<\/td><td>1x pxe 1x baremetal<\/td><td>150GB +250GB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Bootstrap Configuration<\/h2>\n\n\n\n<ol>\n<li>Log into Bootstrap machine (I configured my based on registered RHEL8 with dedicated kni user)<\/li>\n<\/ol>\n\n\n\n<p>ssh kni@&lt;ip-learned-from-horizon&gt;&nbsp;&nbsp;<\/p>\n\n\n\n<ol start=\"2\">\n<li>Updating system<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo yum update -y<\/strong><\/p>\n\n\n\n<p>Query to see if bootstrap node needs restarted:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>[kni@bootstrap ~]$ <strong>needs-restarting -r<\/strong> Core libraries or services have been updated since boot-up: &nbsp;&nbsp;* dbus &nbsp;&nbsp;* dbus-daemon &nbsp;&nbsp;* kernel &nbsp;&nbsp;* linux-firmware &nbsp; Reboot is required to fully utilize these updates. More information: <a href=\"https:\/\/access.redhat.com\/solutions\/27943\">https:\/\/access.redhat.com\/solutions\/27943<\/a> &nbsp; ** needs-restarting is part of the yum-utils package<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo reboot&nbsp; (if needed ^)<\/strong><\/p>\n\n\n\n<ol start=\"3\">\n<li>Installing the KNI Packages<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo dnf install -y libvirt qemu-kvm mkisofs python3-devel jq ipmitool<\/strong><\/p>\n\n\n\n<p>\u2014<\/p>\n\n\n\n<ol start=\"4\">\n<li>Modify the user to add the libvirt group to the newly created user.<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo usermod &#8211;append &#8211;groups libvirt kni<\/strong><\/p>\n\n\n\n<ol start=\"5\">\n<li>Start and enable libvirtd<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo systemctl enable libvirtd &#8211;now<\/strong><\/p>\n\n\n\n<ol start=\"6\">\n<li>Create the default storage pool and start it.<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo virsh pool-define-as &#8211;name default &#8211;type dir &#8211;target \/var\/lib\/libvirt\/images<\/strong><\/p>\n\n\n\n<p>Pool default defined<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo virsh pool-start default<\/strong><\/p>\n\n\n\n<p>Pool default started<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo virsh pool-autostart default<\/strong><\/p>\n\n\n\n<p>Pool default marked as autostarted<\/p>\n\n\n\n<ol start=\"7\">\n<li>Set up networking<\/li>\n<\/ol>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<strong>export PROV_CONN=&#8221;eth1&#8243;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con down &#8220;$PROV_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con delete &#8220;$PROV_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con down &#8220;System $PROV_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con delete &#8220;System $PROV_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli connection add ifname provisioning type bridge con-name provisioning<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con add type bridge-slave ifname &#8220;$PROV_CONN&#8221; master provisioning<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli connection modify provisioning ipv4.addresses 10.10.0.10\/24 ipv4.method manual<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con down provisioning<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con up provisioning<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;export BM_CONN=&#8221;eth2&#8243;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con down &#8220;$BM_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con delete &#8220;$BM_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con down &#8220;System $BM_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con delete &#8220;System $BM_CONN&#8221;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli connection add ifname baremetal type bridge con-name baremetal<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con add type bridge-slave ifname &#8220;$BM_CONN&#8221; master baremetal<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli connection modify baremetal ipv4.addresses 10.20.0.10\/24 ipv4.method manual<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con down baremetal<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;sudo nmcli con up baremetal<\/strong><\/p>\n\n\n\n<ol start=\"8\">\n<li>Verify the networking looks similar to this:<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>nmcli con show<\/strong><\/p>\n\n\n\n<p>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UUID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TYPE&nbsp; &nbsp; &nbsp; DEVICE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>System eth0&nbsp; &nbsp; &nbsp; &nbsp; 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03&nbsp; ethernet&nbsp; eth0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>baremetal&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7a452607-2196-49d2-a145-6cd760a526eb&nbsp; bridge&nbsp; &nbsp; baremetal&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>provisioning &nbsp; &nbsp; &nbsp; 6089a4a6-d3d3-4fff-8d99-04ec920d2754&nbsp; bridge&nbsp; &nbsp; provisioning&nbsp;<\/p>\n\n\n\n<p>bridge-slave-eth1&nbsp; 40e4e145-a948-4832-b51a-9373ef5f0d45&nbsp; ethernet&nbsp; eth1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>bridge-slave-eth2&nbsp; 7f73af05-d3e7-4564-8212-9a66a8f1f347&nbsp; ethernet&nbsp; eth2&nbsp;&nbsp;<\/p>\n\n\n\n<ol start=\"9\">\n<li>Create a pull-secret.txt file.<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>vi pull-secret.txt<\/strong><\/p>\n\n\n\n<p>In a web browser, navigate to Install on <a href=\"https:\/\/cloud.redhat.com\/openshift\/install\/metal\/user-provisioned\">Bare Metal with user-provisioned infrastructure<\/a>, and scroll down to the Downloads section. Click Copy pull secret. Paste the contents into the pull-secret.txt file and save the contents in the kni user\u2019s home directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Openshift Installation<\/h2>\n\n\n\n<ol>\n<li>Retrieving OpenShift Installer GA<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>export VERSION=latest-4.7<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>export RELEASE_IMAGE=$(curl -s https:\/\/mirror.openshift.com\/pub\/openshift-v4\/clients\/ocp\/$VERSION\/release.txt | grep &#8216;Pull From: quay.io&#8217; | awk -F &#8216; &#8216; &#8216;{print $3}&#8217;)<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>export cmd=openshift-baremetal-install<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>export pullsecret_file=~\/pull-secret.txt<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>export extract_dir=$(pwd)<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>curl -s https:\/\/mirror.openshift.com\/pub\/openshift-v4\/clients\/ocp\/$VERSION\/openshift-client-linux.tar.gz | tar zxvf &#8211; oc<\/strong><\/p>\n\n\n\n<p>oc<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo cp oc \/usr\/local\/bin<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$<strong> oc adm release extract &#8211;registry-config &#8220;${pullsecret_file}&#8221; &#8211;command=$cmd &#8211;to &#8220;${extract_dir}&#8221; ${RELEASE_IMAGE}<\/strong><\/p>\n\n\n\n<ol start=\"2\">\n<li>Verify the installer file has been downloaded<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>ls<\/strong><\/p>\n\n\n\n<p>GoodieBag&nbsp; nohup.out&nbsp; oc&nbsp; openshift-baremetal-install&nbsp; pull-secret.txt<\/p>\n\n\n\n<ol start=\"3\">\n<li>Create install-config.yaml.<\/li>\n<\/ol>\n\n\n\n<p>4. Here is a good template on how your all-in-3 install-config shold look like:<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>vi GoodieBag\/install-config.yaml<\/strong><\/p>\n\n\n\n<p>apiVersion: v1<\/p>\n\n\n\n<p>basedomain: hexo.lab<\/p>\n\n\n\n<p>metadata:<\/p>\n\n\n\n<p>&nbsp;&nbsp;name: &#8220;kni-aio&#8221;<\/p>\n\n\n\n<p>networking:<\/p>\n\n\n\n<p>&nbsp;&nbsp;machineCIDR: 10.20.0.0\/24<\/p>\n\n\n\n<p>&nbsp;&nbsp;networkType: OVNKubernetes<\/p>\n\n\n\n<p>compute:<\/p>\n\n\n\n<p>&#8211; name: worker<\/p>\n\n\n\n<p>&nbsp;&nbsp;replicas: 0<\/p>\n\n\n\n<p>controlPlane:<\/p>\n\n\n\n<p>&nbsp;&nbsp;name: master<\/p>\n\n\n\n<p>&nbsp;&nbsp;replicas: 3<\/p>\n\n\n\n<p>&nbsp;&nbsp;platform:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;baremetal: {}<\/p>\n\n\n\n<p>platform:<\/p>\n\n\n\n<p>&nbsp;&nbsp;baremetal:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;apiVIP: 10.20.0.200<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;ingressVIP: 10.20.0.201<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;provisioningNetworkCIDR: 10.10.0.0\/24<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;provisioningNetworkInterface: ens3<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;hosts:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; name: &#8220;kni-worker1&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bootMACAddress: &#8220;fa:16:3e:50:10:bf&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#role: worker<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rootDeviceHints:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceName: &#8220;\/dev\/vda&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hardwareProfile: default<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmc:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address: &#8220;ipmi:\/\/X.X.X.X&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username: &#8220;kni-aio&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;password: &#8220;Passw0rd&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; name: &#8220;kni-worker2&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bootMACAddress: &#8220;fa:16:3e:46:fd:6c&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#role: worker<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rootDeviceHints:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceName: &#8220;\/dev\/vda&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hardwareProfile: default<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmc:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address: &#8220;ipmi:\/\/X.X.X.X&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username: &#8220;kni-aio&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;password: &#8220;Passw0rd&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; name: &#8220;kni-worker3&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bootMACAddress: &#8220;fa:16:3e:4c:6f:18&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#role: worker<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rootDeviceHints:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceName: &#8220;\/dev\/vda&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hardwareProfile: default<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmc:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address: &#8220;ipmi:\/\/X.X.X.X&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username: &#8220;kni-aio&#8221;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;password: &#8220;Passw0rd&#8221;<\/p>\n\n\n\n<p>pullSecret: &#8216;&lt;pull_secret&gt;&#8217;<\/p>\n\n\n\n<p>sshKey: &#8216;&lt;ssh_pub_key&gt;&#8217;<\/p>\n\n\n\n<p>5. You pull secret should be available in home directory<\/p>\n\n\n\n<p>(kni-test) [kni@bootstrap ~]$ <strong>cat pull-secret.txt&nbsp;<\/strong><\/p>\n\n\n\n<p>{&#8220;auths&#8221;:{&#8220;cloud.openshift.com&#8221;:{&#8220;auth&#8221;:&#8230;..<\/p>\n\n\n\n<p>6. The ssh key should be in your default directory, but feel free to generate on if it\u2019s not there<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>ssh-keygen&nbsp;<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cat .ssh\/id_rsa.pub&nbsp;<\/strong><\/p>\n\n\n\n<p>7. Openshift Baremetal IPI also requires you to provide DHCP and DNS. This is what I have used in my lab for that&#8221;<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cat GoodieBag\/hosts<\/strong><br>127.0.0.1 &nbsp; localhost localhost.localdomain localhost4 localhost4.localdomain4<br>::1 &nbsp; &nbsp; &nbsp; &nbsp; localhost localhost.localdomain localhost6 localhost6.localdomain6<br>10.20.0.10 bootstrap.kni-aio.hexo.lab bootstrap<br>10.20.0.31 kni-worker1.kni-aio.hexo.lab kni-worker1<br>10.20.0.32 kni-worker2.kni-aio.hexo.lab kni-worker2<br>10.20.0.33 kni-worker3.kni-aio.hexo.lab kni-worker3<\/p>\n\n\n\n<p>10.20.0.200 &nbsp;api.kni-aio.hexo.lab api<br>10.20.0.10 ns1.kni-aio.hexo.lab ns1<br>&nbsp;<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cat GoodieBag\/kni.dns<\/strong><br>domain-needed<br>bind-dynamic<br>bogus-priv<br>domain=kni-aio.hexo.lab<br>dhcp-range=10.20.0.100,10.20.0.149<br>dhcp-option=3,10.20.0.1<br>resolv-file=\/etc\/resolv.conf.upstream<br>interface=baremetal<br>server=10.20.0.10<\/p>\n\n\n\n<p>#Wildcard for apps &#8212; make changes to cluster-name (openshift) and domain (example.com)<br>address=\/.apps.kni-aio.hexo.lab\/10.20.0.201<\/p>\n\n\n\n<p>#Static IPs for Masters<br>#dhcp-host=&lt;NIC2-mac-address&gt;,provisioner.openshift.example.com,&lt;ip-of-provisioner&gt;<br>dhcp-host=fa:16:3e:b4:c4:36,kni-worker1.kni-aio.hexo.lab,10.20.0.31<br>dhcp-host=fa:16:3e:f6:05:c9,kni-worker2.kni-aio.hexo.lab,10.20.0.32<br>dhcp-host=fa:16:3e:98:11:00,kni-worker3.kni-aio.hexo.lab,10.20.0.33<br>&nbsp;<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cat GoodieBag\/resolv.conf.upstream<\/strong><br>search hexo.lab<br>nameserver&nbsp;&lt;my_public_dns&gt;<br>&nbsp;<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cat GoodieBag\/resolv.conf<\/strong><br>search hexo.lab<br>nameserver 10.20.0.10<br>nameserver&nbsp;&lt;my_public_dns&gt;<\/p>\n\n\n\n<p>[kni@bootstrap ~]$<strong> sudo cp GoodieBag\/hosts \/etc\/<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo cp GoodieBag\/kni.dns \/etc\/dnsmasq.d\/<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo cp GoodieBag\/resolv.conf.upstream \/etc\/<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo cp GoodieBag\/resolv.conf \/etc\/<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo systemctl enable &#8211;now dnsmasq<\/strong><\/p>\n\n\n\n<p>Created symlink \/etc\/systemd\/system\/multi-user.target.wants\/dnsmasq.service \u2192 \/usr\/lib\/systemd\/system\/dnsmasq.service.<\/p>\n\n\n\n<p>8. Finally we should be ready to deploy Openshift cluster<\/p>\n\n\n\n<p>Cleanup first if this is not your first attempt<\/p>\n\n\n\n<p><strong>for i in $(sudo virsh list | tail -n +3 | grep bootstrap | awk {&#8216;print $2&#8217;});<\/strong><\/p>\n\n\n\n<p><strong>do<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;sudo virsh destroy $i;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;sudo virsh undefine $i;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;sudo virsh vol-delete $i &#8211;pool default;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;sudo virsh vol-delete $i.ign &#8211;pool default;<\/strong><\/p>\n\n\n\n<p><strong>done<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>rm -rf ~\/clusterconfigs\/auth ~\/clusterconfigs\/terraform* ~\/clusterconfigs\/tls ~\/clusterconfigs\/metadata.json<\/strong><\/p>\n\n\n\n<ol start=\"12\">\n<li>Create working directory<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>mkdir ~\/clusterconfigs<\/strong><\/p>\n\n\n\n<ol start=\"13\">\n<li>Deploy (in tmux)<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cp GoodieBag\/install-config.yaml clusterconfigs\/<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>.\/openshift-baremetal-install &#8211;dir ~\/clusterconfigs &#8211;log-level debug create cluster<\/strong><\/p>\n\n\n\n<ol start=\"14\">\n<li>You can monitor your deployment in another window<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo virsh list<\/strong><\/p>\n\n\n\n<p>&nbsp;Id &nbsp; Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; State<\/p>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<p>&nbsp;1&nbsp; &nbsp; kni-test2-ntpgv-bootstrap &nbsp; running<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>sudo console &lt;bootstrap-vm&gt;<\/strong><\/p>\n\n\n\n<p>Some other commands that will come in handy in the later state of the deployment<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ export KUBECONFIG=\/home\/kni\/clusterconfigs\/auth\/kubeconfig<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ oc get clusteroperators<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>oc get nodes<\/strong><\/p>\n\n\n\n<p>(kni-aio) [kni@bootstrap ~]$ <strong>oc get nodes<\/strong><\/p>\n\n\n\n<p>NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS &nbsp; ROLES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGE &nbsp; VERSION<\/p>\n\n\n\n<p>kni-worker1 &nbsp; Ready&nbsp; &nbsp; master,worker &nbsp; 49m &nbsp; v1.19.0+2f3101c<\/p>\n\n\n\n<p>kni-worker2 &nbsp; Ready&nbsp; &nbsp; master,worker &nbsp; 48m &nbsp; v1.19.0+2f3101c<\/p>\n\n\n\n<p>kni-worker3 &nbsp; Ready&nbsp; &nbsp; master,worker &nbsp; 48m &nbsp; v1.19.0+2f3101c<\/p>\n\n\n\n<ol start=\"15\">\n<li>&nbsp;I hope it works! If it has, then at the end of the deployment you will see something like this:<\/li>\n<\/ol>\n\n\n\n<p>INFO Install complete!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>INFO To access the cluster as the system:admin user when using &#8216;oc&#8217;, run &#8216;export KUBECONFIG=\/home\/kni\/clusterconfigs\/auth\/kubeconfig&#8217;&nbsp;<\/p>\n\n\n\n<p>INFO Access the OpenShift web-console here: https:\/\/console-openshift-console.apps.kni-aio.hexo.lab&nbsp;<\/p>\n\n\n\n<p>INFO Login to the console with user: &#8220;kubeadmin&#8221;, and password: &#8220;ss4nv-kmhMP-dM6c7-edSVb&#8221;&nbsp;<\/p>\n\n\n\n<p>DEBUG Time elapsed per stage:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>DEBUG &nbsp; &nbsp; Infrastructure: 50m41s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>DEBUG Bootstrap Complete: 12m39s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>DEBUG&nbsp; Bootstrap Destroy: 13s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>DEBUG&nbsp; Cluster Operators: 38m12s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>INFO Time elapsed: 1h42m24s&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Deploying OCS (storage)<\/h2>\n\n\n\n<p>Official docs -&gt; <a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_openshift_container_storage\/4.4\/html\/deploying_openshift_container_storage\/deploying-openshift-container-storage-using-local-storage-devices_aws-vmware#creating-openshift-container-storage-cluster-on-bare-metal_aws-vmware\">https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_openshift_container_storage\/4.4\/html\/deploying_openshift_container_storage\/deploying-openshift-container-storage-using-local-storage-devices_aws-vmware#creating-openshift-container-storage-cluster-on-bare-metal_aws-vmware<\/a><\/p>\n\n\n\n<ol>\n<li>Install local storage operator<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-0-1024x545.png\" alt=\"\" class=\"wp-image-83\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-0-1024x545.png 1024w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-0-300x160.png 300w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-0-768x409.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-0-1536x818.png 1536w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-0.png 1600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol start=\"2\">\n<li>Keep the defaults and just hit install<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"678\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-1-1024x678.png\" alt=\"\" class=\"wp-image-84\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-1-1024x678.png 1024w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-1-300x199.png 300w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-1-768x509.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-1.png 1310w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol start=\"3\">\n<li>I have preconfigured worker nodes &nbsp;with 250GB secondary drives<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>ssh core@kni-worker1<\/strong><\/p>\n\n\n\n<p>Red Hat Enterprise Linux CoreOS 46.82.202010301241-0<\/p>\n\n\n\n<p>&nbsp;&nbsp;Part of OpenShift 4.6, RHCOS is a Kubernetes native operating system<\/p>\n\n\n\n<p>&nbsp;&nbsp;managed by the Machine Config Operator (`clusteroperator\/machine-config`).<\/p>\n\n\n\n<p>WARNING: Direct SSH access to machines is not recommended; instead,<\/p>\n\n\n\n<p>make configuration changes via `machineconfig` objects:<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.openshift.com\/container-platform\/4.6\/architecture\/architecture-rhcos.html\">https:\/\/docs.openshift.com\/container-platform\/4.6\/architecture\/architecture-rhcos.html<\/a><\/p>\n\n\n\n<p>&#8212;<\/p>\n\n\n\n<p>[core@kni-worker1 ~]$ <strong>sudo fdisk -l | grep vdb<\/strong><\/p>\n\n\n\n<p>Disk \/dev\/vdb: 250&nbsp;GiB, 107374182400 bytes, 209715200 sectors<\/p>\n\n\n\n<ol start=\"4\">\n<li>Create local disk<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cat localstorage.yaml&nbsp;<\/strong><br>apiVersion: &#8220;local.storage.openshift.io\/v1&#8221;<br>kind: &#8220;LocalVolume&#8221;<br>metadata:<br>&nbsp; name: &#8220;local-disks&#8221;<br>&nbsp; namespace: &#8220;openshift-local-storage&#8221;&nbsp;<br>spec:<br>&nbsp; nodeSelector:&nbsp;<br>&nbsp; &nbsp; nodeSelectorTerms:<br>&nbsp; &nbsp; &#8211; matchExpressions:<br>&nbsp; &nbsp; &nbsp; &nbsp; &#8211; key: kubernetes.io\/hostname<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; operator: In<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; values:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; kni-worker1<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; kni-worker2<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; kni-worker3<br>&nbsp; storageClassDevices:<br>&nbsp; &nbsp; &#8211; storageClassName: &#8220;localblock-sc&#8221;<br>&nbsp; &nbsp; &nbsp; volumeMode: Block &nbsp;<br>&nbsp; &nbsp; &nbsp; devicePaths:&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &#8211; \/dev\/vdb<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>oc create -f localstorage.yaml&nbsp;&nbsp;<\/strong><\/p>\n\n\n\n<ol start=\"5\">\n<li>Verify local storage has been create<\/li>\n<\/ol>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>oc get all -n openshift-local-storage<\/strong><\/p>\n\n\n\n<p>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; READY &nbsp; STATUS&nbsp; &nbsp; RESTARTS &nbsp; AGE<\/p>\n\n\n\n<p>pod\/diskmaker-discovery-jpcxt&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 6m6s<\/p>\n\n\n\n<p>pod\/diskmaker-discovery-lv7m7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 6m6s<\/p>\n\n\n\n<p>pod\/diskmaker-discovery-x66cs&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 6m6s<\/p>\n\n\n\n<p>pod\/local-disks-local-diskmaker-ccmsx&nbsp; &nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 91s<\/p>\n\n\n\n<p>pod\/local-disks-local-diskmaker-gqxm9&nbsp; &nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 92s<\/p>\n\n\n\n<p>pod\/local-disks-local-diskmaker-sz9p7&nbsp; &nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 91s<\/p>\n\n\n\n<p>pod\/local-disks-local-provisioner-bkt2b&nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 92s<\/p>\n\n\n\n<p>pod\/local-disks-local-provisioner-lw7t7&nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 92s<\/p>\n\n\n\n<p>pod\/local-disks-local-provisioner-rjt2c&nbsp; &nbsp; &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 92s<\/p>\n\n\n\n<p>pod\/local-storage-operator-fdbb85956-2bb85 &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10m<\/p>\n\n\n\n<p>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TYPE&nbsp; &nbsp; &nbsp; &nbsp; CLUSTER-IP&nbsp; &nbsp; EXTERNAL-IP &nbsp; PORT(S) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGE<\/p>\n\n\n\n<p>service\/local-storage-operator-metrics &nbsp; ClusterIP &nbsp; 172.30.3.92 &nbsp; &lt;none&gt;&nbsp; &nbsp; &nbsp; &nbsp; 8383\/TCP,8686\/TCP &nbsp; 9m45s<\/p>\n\n\n\n<p>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DESIRED &nbsp; CURRENT &nbsp; READY &nbsp; UP-TO-DATE &nbsp; AVAILABLE &nbsp; NODE SELECTOR &nbsp; AGE<\/p>\n\n\n\n<p>daemonset.apps\/diskmaker-discovery &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;none&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 6m6s<\/p>\n\n\n\n<p>daemonset.apps\/local-disks-local-diskmaker &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;none&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 92s<\/p>\n\n\n\n<p>daemonset.apps\/local-disks-local-provisioner &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;none&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 92s<\/p>\n\n\n\n<p>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; READY &nbsp; UP-TO-DATE &nbsp; AVAILABLE &nbsp; AGE<\/p>\n\n\n\n<p>deployment.apps\/local-storage-operator &nbsp; 1\/1 &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10m<\/p>\n\n\n\n<p>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DESIRED &nbsp; CURRENT &nbsp; READY &nbsp; AGE<\/p>\n\n\n\n<p>replicaset.apps\/local-storage-operator-fdbb85956 &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; 10m<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>oc get pv<\/strong><\/p>\n\n\n\n<p>NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAPACITY &nbsp; ACCESS MODES &nbsp; RECLAIM POLICY &nbsp; STATUS&nbsp; &nbsp; &nbsp; CLAIM &nbsp; STORAGECLASS&nbsp; &nbsp; REASON &nbsp; AGE<\/p>\n\n\n\n<p>local-pv-109d302d &nbsp; 250Gi&nbsp; &nbsp; &nbsp; RWO&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delete &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Available &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; localblock-sc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3m45s<\/p>\n\n\n\n<p>local-pv-b5506d82&nbsp; &nbsp;250Gi&nbsp; &nbsp; &nbsp; RWO&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delete &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Available &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; localblock-sc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3m45s<\/p>\n\n\n\n<p>local-pv-dd42bba8&nbsp; &nbsp;250Gi&nbsp; &nbsp; &nbsp; RWO&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delete &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Available &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; localblock-sc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3m45s<\/p>\n\n\n\n<ol start=\"6\">\n<li>Install \u2018OpenShift Container Storage\u2019 operator (leave all defaults)<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"534\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-2-1024x534.png\" alt=\"\" class=\"wp-image-85\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-2-1024x534.png 1024w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-2-300x157.png 300w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-2-768x401.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-2-1536x802.png 1536w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/pasted-image-2.png 1600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol start=\"7\">\n<li>Create OCS cluster<\/li>\n<\/ol>\n\n\n\n<p>For the All-in-one use case we need to label the nodes so they are available to OCS<\/p>\n\n\n\n<p><strong>for NODE in {1..3};do<\/strong><\/p>\n\n\n\n<p><strong>oc label nodes kni-worker$NODE cluster.ocs.openshift.io\/openshift-storage=&#8221;<\/strong><\/p>\n\n\n\n<p><strong>done<\/strong><\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>cat localstorage.yaml<\/strong>&nbsp;<br>apiVersion: &#8220;local.storage.openshift.io\/v1&#8221;<br>kind: &#8220;LocalVolume&#8221;<br>metadata:<br>&nbsp; name: &#8220;local-disks&#8221;<br>&nbsp; namespace: &#8220;openshift-local-storage&#8221;&nbsp;<br>spec:<br>&nbsp; nodeSelector:&nbsp;<br>&nbsp; &nbsp; nodeSelectorTerms:<br>&nbsp; &nbsp; &#8211; matchExpressions:<br>&nbsp; &nbsp; &nbsp; &nbsp; &#8211; key: kubernetes.io\/hostname<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; operator: In<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; values:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; kni-worker1<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; kni-worker2<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; kni-worker3<br>&nbsp; storageClassDevices:<br>&nbsp; &nbsp; &#8211; storageClassName: &#8220;localblock-sc&#8221;<br>&nbsp; &nbsp; &nbsp; volumeMode: Block &nbsp;<br>&nbsp; &nbsp; &nbsp; devicePaths:&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &#8211; \/dev\/vdb<br>[kni@bootstrap ~]$ cat ocs-storage.yaml&nbsp;<br>apiVersion: ocs.openshift.io\/v1<br>kind: StorageCluster<br>metadata:<br>&nbsp; name: ocs-storagecluster<br>&nbsp; namespace: openshift-storage<br>spec:<br>&nbsp; manageNodes: false<br>&nbsp; monDataDirHostPath: \/var\/lib\/rook<br>&nbsp; storageDeviceSets:<br>&nbsp; &#8211; count: 1<br>&nbsp; &nbsp; dataPVCTemplate:<br>&nbsp; &nbsp; &nbsp; spec:<br>&nbsp; &nbsp; &nbsp; &nbsp; accessModes:<br>&nbsp; &nbsp; &nbsp; &nbsp; &#8211; ReadWriteOnce<br>&nbsp; &nbsp; &nbsp; &nbsp; resources:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requests:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; storage: 250Gi<br>&nbsp; &nbsp; &nbsp; &nbsp; storageClassName: localblock-sc<br>&nbsp; &nbsp; &nbsp; &nbsp; volumeMode: Block<br>&nbsp; &nbsp; name: ocs-deviceset<br>&nbsp; &nbsp; placement: {}<br>&nbsp; &nbsp; portable: false<br>&nbsp; &nbsp; replica: 3<br>&nbsp; &nbsp; resources: {}<\/p>\n\n\n\n<p>[kni@bootstrap ~]$ <strong>oc create -f ocs-storage.yaml <\/strong>&nbsp; &nbsp;<\/p>\n\n\n\n<p>Configuring container registry on OCS -&gt;&nbsp;<a href=\"https:\/\/docs.openshift.com\/container-platform\/4.7\/registry\/configuring_registry_storage\/configuring-registry-storage-baremetal.html\">https:\/\/docs.openshift.com\/container-platform\/4.7\/registry\/configuring_registry_storage\/configuring-registry-storage-baremetal.html<\/a><\/p>\n\n\n\n<p>Configuring CNV -&gt;&nbsp;<a href=\"https:\/\/docs.openshift.com\/container-platform\/4.7\/virt\/install\/preparing-cluster-for-virt.html\">https:\/\/docs.openshift.com\/container-platform\/4.7\/virt\/install\/preparing-cluster-for-virt.html<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>It might feel like a lot of steps, but most of the work has been presented in here, so you&#8217;re welcome \ud83d\ude42<\/p>\n\n\n\n<p>At the end you will enjoy really powerful 3 node cluster that can host not just your legacy apps in VMs, but also set you up on the road to running in containers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another day, another &#8220;Edge&#8221; Architecture. This time let&#8217;s see how the minimum all-in-one OCP\/OCS\/CNV would have to look like. But first what are the key benefits: Okay, I got you ","protected":false},"author":1,"featured_media":82,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts\/81"}],"collection":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":1,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":86,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions\/86"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/media\/82"}],"wp:attachment":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}