Deploying OpenShift Origin 1.3 on CentOS 7

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so this is going to be a demonstration on how to get OpenShift origin 1 3 running on a on a machine and get an actual application hosted in that and it's going to be in two end I find that a lot of the demonstrations I find are either operate at a very high level on an already operational cluster or do very trivial things but don't link it in to end into something that you could actually use so I'm going to start from the very beginning and work my way all the way through it using a new feature in origin 1 3 call in the OC command called OC cluster up which will set up a containerized version of OpenShift on the local machine automatic automatically all in all in command it's really convenient for getting up and running with a basic open shift environment so the first thing I've done and I've already done this because I tried this tried to include this in the demo just to do it completely in the end but it took too long so I'm here in digitalocean I've started up a new droplet it's a CentOS 7 droplet and I just started up I've never logged into it also in digital ocean I own this domain here and I'm going to use it for this demo and so we've got to cname set up routing to this new droplet so we're going to log into this thing alright and we're just going to we're already route so worried about sudo and all I got stuff first thing we're going to do is we're going to install few packages so we need yet they're installed docker because the OC command is going to do a containerized installation of openshift so a doctor needs to be set up i want to install w get and get just because w get to pull down the client the openshift client tools and then get for later on in the demonstration so we're going to go ahead and do that and again this hopefully won't take very long but I didn't want to cut here just to show a seamless install experience that you know what we can go ahead and look at what we're going to do next here in openshift origin under a Doc's cluster up down you can see the installation instructions for doing OC cluster up on Linux there's just a few preparation steps which involve a changing one docker configuration file and pulling down the OC client binary and so we're going to do that next so that way I this installed we're going to go and change that docker configuration file the line you want to change is right here insecure registry OpenShift uses an embedded docker registry and so you have to tell docker to trust the the embedded registry that OpenShift has because you don't know what the IP address is of the the registry runs in a pod in the OpenShift environment and it could get an address anywhere in this range so we just tell it to trust any registry that falls in that range and after that we can start up docker ok the next thing we needed to do is download the client tools so here step three if we click here it's going to take us to the release page and if we scroll down you can see client tools for Linux 64-bit that's what I want so I'm going to copy that come over here and have you get pull that down extract that alright now get this openshift client tools folder and the OC pioneer is what we want just to make it easy to put it on something that's already on the path I'm going to copy OC to user bin a user local bin and after that I can remove these all right we've read an OC now it's on the path we're getting it here so after that we can actually do the if we go back to the tutorial here step four is running OC cluster up I'm going to run it with a slight variation because I have a DNS resolver bull name just to make this whole presentation look prettier I'm going to tell it what my public resolvable name is and then it will use that coming up so I got OC cluster up and then public hostname is open shift as Jane sent me so you'll see it going through the steps here it's basically pulling down the different components of openshift from the doctor hub and then doing the configuration and setting up certificates creating all of the internal resources and then it will bring up the cluster it also starts out by logging you in as a default user called developer who's password is developer and you don't have admin access there you can log in as the admin but we're not going to do that because we're kind of going through the developer workflow here most there yes this is one of those things that if you run it again it happens much more quickly because all this stuff's already configured and all the images have already been cached and things like that again I wanting you no no no hand waviness I just wanted to go through the whole thing so if I do see ooh am i you can see I am logged in as developer it also creates a initial project for you so if you go OC projects you can see that I'm on my project so from here what we can do is we can start a sample application so already digging this out but Ruby X there we go so OpenShift has a number of sample applications that you can pull down just make sure that everything is working right so these are not docker these are not docker images these are actual source code so this is a ruby application and you'll see that there's no docker file here there's and there's no instructions on how for how OpenShift knows how to make this into a container image so they can be deployed and OpenShift OpenShift uses something called STI that's source to source to I'm blanking on it now what basically turns a source code into a container and so what we could do here is run this command so this is going to create a new application it's going to use this sty image and it's going to build the Ruby example app from github so if we hit that we see a lot of output come out and so you can see here that it is going to use the ruby 2.0 builder and that this is the image that's a SS 2i source to image I don't know I couldn't think of that anyway um and it creates a number of resources which I'm going to go I'm going to go through one by one in a subsequent video for now just this is just going to be an overview video but you can say Oh see get all and you can see all the resources that were created basically as an in response to that new app call if we do OC get pods and watch we can see that the Ruby builder is running right now if we stick here for long enough the Builder will complete and it will push the image to our integrated docker wrote docker image registry so if we can do this fast enough OC you log follow build you can see that it's it's done the done building and it's now pushing the ruby example image that it built from source to the integrated dr registry so when this completes it gets to like nine of ten i'm going to exit out so we can watch what it's doing at a pod level soon the way this is set up the doctor uses a loopback LVM volume so it's not the quickest but if we go in here you can see the deploy um pod going out and it sets up the environment for the ruby application and you can see the actual ruby pod running here and in the end only the ruby pod ends up running and so the the build this is finished and if you want to see you know what the bill what the log from the build was that's OC logs the name of the build container you can see how your build went if it failed you can look in here to find out why so if we go to OC get services you can see that we've got our Ruby application here now if you're familiar with kubernetes the at this point if you want to access this application you'd have to set up some sort of a node port or have a you know an H a proxy h a proxy pod running that would proxy your traffic from outside the cluster to inside OpenShift has that built in so into something called the open chef router and so all you have to do is do an OC expose and so you'd say that's export expose service ruby example and I'm going to go ahead and give it a host name to use by default it's going to use a prefix that you could have defined when you did your OC cluster up but I'm gonna say my app alright so when we do that we can do OC kit route and see that there's now now a rap route when the router receives traffic that's destined for this hostname it's going to route that traffic to our Ruby example application inside the cluster so we can go ahead and give that a try if we want to stay here so we hit that here's the Ruby application that's running inside OpenShift and you can see that there's lots of demos use XP IO in wildcard DNS and stuff like that this can really show you how you can actually use you know what people use in real life real host names real subdomains - host applications also along with this the the open shift console actually functions - it's got a self-signed certificate so you'll have to go in here but you can log in with your developer credentials that OC cluster up creates which is just developer and developer by default again and here we can go into that default project that was created for us and here's our example ruby application with our route right here if we click on that then it brings us up to that page there so you can see you know this is actually a legitimate way to do that and I did it and I don't share along this video as know but probably around five minutes from starting up an instance in the cloud to actually having openshift running and having my application running on it and having a real sub-domain route to it so it's really really nice
Info
Channel: Seth Jennings
Views: 12,799
Rating: 4.9175258 out of 5
Keywords: red hat, openshift, origin, centos, fedora, container, docker, paas
Id: aQ3Nta2WR94
Channel Id: undefined
Length: 12min 23sec (743 seconds)
Published: Thu Sep 29 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.