GUIDE: Install OpenShift 4 — The Easy Way - Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i wanted to create a video to go along with the guide i've written recently called install openshift4 the easy way the reason this guide came about is a couple of colleagues contacted me asking what is the easiest way to install openshift in our home labs so i wrote this guide that will explain how to install a three node ocp cluster using the bare metal assisted installer now each of these three nodes are assigned both the master and worker roles this installation method removes the need for a local dns server a load balancer and dedicated bootstrap node the reason we don't need a local dns server is because we're going to use public dns now here's an example of our network layout i use 60.1 for my router and the dhcp range is going to be 60 100 to 250. now we're going to need to add 2a records api.lab.mydc and starapps.lab.mydc.dev i picked 60.30 and 60.31 because they were out of the dhcp range and currently not in use now to simulate bare metal i'm going to use an esxi host and three virtual machines nodes one two and three each of these nodes have eight cpus 16 gigs of ram and 120 gig hard drive the ip addresses are going to be assigned by dhcp i don't have static reservations set but you can definitely do that in your environment so let's go ahead and create some a records we're going to set up dns by using namecheap and create two a records so the first one is starapps.lab.com and that's going to go to 60.31 and then our second a record is going to be api dot lab that's going to go to 60 30. we'll hit the check now this will take a little while to propagate but it'll be ready by the time we do the install now i picked lab for my cluster name and of course my domain name is what i purchased so your environment will be different you don't have to use lab you can call it whatever you like let's go ahead and go to the next section so next we need to log into cloud.redhat.com so before we do that i want to tell you if you don't have a free developer account you can get one from developers.redhat.com this will allow you to provision an ocp cluster for a 60-day trial period so in this window i've already logged into openshift cluster manager at cloud.redhat.com and we're going to create a cluster then we're going to click on data center and then under the assisted installer which is currently technology preview we're going to click create cluster now the cluster name is going to be lab and the base domain is going to be mydc.dev and we'll use the open shift version 4.7 and then we'll click next at this point we're going to create a discovery iso and we're going to use an ssh key so if you don't already have an ssh key you're going to do ssh keygen and you can just safely hit enter through these and that'll generate you an ssh key and we're going to want to copy this id underscore rsa.pub to our clipboard so you can cat ssh go ahead and copy that and we will just paste it here and generate the discovery iso and we'll click download discover iso now that the iso has completed downloading go ahead and go to our esxi host and our data store and upload the discovery iso now that's completed downloading we'll go ahead and create our virtual machines the first one we're going to create is node 1 and you need to change the compatibility to 6.5 for now linux and core os and we'll select this data store and we'll go with 8 cpus 16 gigs of ram 120 gig drive like month in provision we'll change the network to vmware network and the data store iso will select the discovery iso and then we'll hit next and finish now we'll do node 2 exactly the same way linux core os do 8 cpus 16 gigs of ram 120 gig drive and provision network iso and we'll select the discover iso now if you're using vsphere you can definitely clone these instead of just uh creating them manually do note three last 6.5 compatibility linux coreos and we will change the cpus to 8 16 gigs of ram 120 gig then provision drive network and we'll select iso next and then finish all right let's go ahead and power up node one we'll go ahead and power up node two and we'll power up node three just click on node one you can see it's booting same with two and the same with three now we just go back to our cloud.redhat.com and our host will pop up here shortly after a few minutes the nodes will pop up let's click on the first one this is localhost and the ip address is 225. so if we look at node 1 the ip address is 224. let's go back and change or find 224 and we'll rename the node to match there's 244 there's 224 so let's go ahead and name it node 1 dot lab.mydc.dev then 225 let's take a look at node 2. node 2 is 244. there's 244 like that node 2 click save and then that leaves this is node three and we'll click save all right so now these say ready it takes a little bit but let's click next and available submits let's go ahead and check virtual ips to allocate those virtually because we are going to specify those so the api virtual ip is going to be 30 and the ingress is 31. that's the star apps and then the api.lab.mydc.dev that we created earlier and we'll use the same ssh key and the subnet came up automatically as 60.0 and we'll just wait a minute while this says pending input now that the information is populated in the bottom we can go ahead and click next and we'll do install cluster and this will take quite a while it's been about five minutes since i started but i wanted to show you that node three the role is set to master but it says bootstrap in parentheses so the installation status for node one is five out of seven and node three has eight tasks instead of seven what's going to happen is the installer will reprovision node 3 from the bootstrap to a masternode also you can click on view cluster events and it will show you at what stage each of these hosts is at so 1 and two reached rebooting after they rebooted they're at the configuration stage so in my test this installation has taken an hour or more several different times so i'll just pause at this point all right all the nodes status say installed up here the installation progress assesses installing this will still take a while it'll say finalizing and eventually you'll have a console button here it'll say click here to log into the console so we'll continue to wait all right it looks like our install is finished i wanted to mention to make sure that you keep this cube admin username and password handy also download the cube config if you haven't already the installation from the point we hit click install cluster it took about 45 minutes your environment may be different so let's go ahead and click on this web console url and you're going to get a certificate error so let's click on not secure and we're going to export that certificate and add it to our manager certificates this is for chrome so you click on details ingress operator export and we'll just save it to downloads then we're going to go into chrome settings privacy and security security and then down to manage certificates we'll click on authorities and we will import the certificate you need to change this to any files or all files and click on this ingress operator we're going to trust this certificate for identifying websites now this point you can go back to the console page and hit reload and there goes your open shift dashboard at this point you've got a three node openshift cluster up and running successfully look forward to part two where we're going to install the simple authentication provider i'm going to configure persistent storage we'll configure the registry to use the persistent storage and we'll create a wordpress project and container i hope you found this video useful and the guide as well i wish you luck with your open shift cluster in the future bye for now
Info
Channel: cragr
Views: 831
Rating: 5 out of 5
Keywords: openshift, homelab, esxi, assisted installer, vmware, cluster, ocp
Id: ve_6yuOiXyc
Channel Id: undefined
Length: 12min 43sec (763 seconds)
Published: Tue Apr 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.