 Hi, my name is Brian Tannis, and I'm part of the OpenShift Cloud Platforms business unit. As you can see, we're looking at code ready containers, the way to run OpenShift 4 on your laptop. We're going to show how to install code ready containers on a Mac. So to begin, we clicked on the code ready containers getting started guide. It's on top of the GitHub page. And we really need to, you know, first kind of read through some of this instruction so that you could kind of understand what the difference is between maybe a production OpenShift install is and some of the requirements that you need to install OpenShift code ready containers. You need four VCPUs. So you need to have at least four CPUs on your machine and you definitely need to make sure that you have at least eight gigs of RAM or memory, as well as 35 gigs of free space. There are also requirements to have an updated version of Mac OS. You could see the requirements on this page. If we were running Linux or what have you, there would be some packages that we needed to install. But since we have a Mac, we just need to make sure that we're updated and good to go. We're going to click the button to download code ready containers, and I'm going to go ahead and log into my account. This is just the Red Hat portal account. So we're going to go ahead again, open that official documentation, which is the same page we just started at, and then we're going to download the version of code ready containers for our for hyper kit for our Mac. While that's downloading, it's about a two gig download right now that might, you know, change while you're watching this video. But while we're downloading, we're also going to download the pool secret. The pool secret is something that's important for us to use whenever we provision and set up code ready containers so that we have access to the repository to be able to download, you know, certain aspects of of OpenShift 4 so we could run this. So I'm going to go ahead and jump forward while this is downloading. Now CRC has been downloaded and we opened a terminal in our downloads directory, and we're going to extract the tar.gz that downloaded. This will extract the license, a PDF of the documentation at the current time when we download as well as the CRC executable. I'm going to go ahead and move the CRC executable into my a folder within my path. So in here, I like to place things in user local bin. So I just echoed out my path so that we could validate that user local bin is within the path. If it's not, feel free to go ahead and put CRC within another folder that makes sense for your environment or add user local bin into your path. I'm going to go ahead and just move that into my path. And this is something that you need to use sudo4 since it's an elevated command. So now instead of typing dot slash CRC, I could just type CRC and be able to access code ready containers. So I typed CRC dash dash help to be able to see what the command CRC provides. So in here, we could see we've got configuration, console, delete, help. A lot of things that we're going to end up using and you'll see them throughout the video. The first one that we need to do though is as per the getting started guide is do the CRC setup. So I just did the dash dash help here to see what's available and you could see there's a VM driver string. That's kind of important. We're just going to end up using hyperkit and that's what the default is. And Mac OS comes with the hypervisor, hyperkit available by default and that's what we're going to end up using. But we could end up using something like virtual box. So if we wanted to use virtual box instead, we could. And if you didn't get it by now, code ready containers will go ahead and provision a virtual machine on our Mac. It's gonna go ahead and provision one VM that is going to have the requirements that are listed previously, 8 gigs of RAM, 35 gigs of hard drive space, etc on the Mac. And it's going to run OpenShift all within that one virtual machine. So we ran the CRC setup and you could see it will go ahead and set up a few things that it needs so that we could go and provision code ready containers on the Mac. It might ask for a restart. I don't think I've seen this in Mac OS. I think I might have seen that in Windows before. But just read the output there and follow the instructions. And if it asks for a restart, feel free to restart your Mac and then do CRC setup again and it will go ahead and validate everything's okay. You could run that CRC setup twice if you wanna make sure that everything's okay. But if you didn't need to restart and there weren't any issues, then feel free to continue on. The next part is following the getting started guide would be CRC start. And you could see I pass dash H, that's just short for dash dash help. So in here, there are a couple different command line flags that are important. So we could set a bundle which allows us to define which deployment of OpenShift we want to run on this virtual machine. We're just gonna use the default here, but you can also specify CPUs or memory, right? So maybe you have more hardware available on your Mac and you wanna run a heavy workload on code ready containers on OpenShift on your Mac. You could go and specify multiple CPUs if they're available to you. The same with the memory, right? By default, the minimum requirement is eight gigs of RAM. But if you have more available to you and you're running a heavy workload, feel free to increase that. And that way you'll have more memory available to OpenShift. And whenever you're not using the code ready containers, you just do CRC stop and it will stop the VM and it's not using those resources and the memory or CPU anymore. So don't worry about it. Use what you think you're gonna need. The defaults are okay for good starting projects and things like that. And if you start running out of memory, you'll figure it out quick. The next thing that's really important that we're gonna end up using a part of this would be the pull secret file. We downloaded that from the same page we downloaded code ready containers. But you need to make sure that you have that pull secret available to you. So if we were using maybe a different VM, like virtual box, for example, right now, we could choose that here. The same with a new DNS provider or something like that. By default, we're gonna use 8.8.8, which is Google DNS. All right, so now we went through the flags that are available at the current state of CRC, feel free to do the dash H to validate and make sure that everything's set up the way that you need it to be set up. We're then going to run the start command. So CRC start and then we're gonna do dash P because we wanna provide our pull secret and that's in our downloads folder. Just where the CRC tar file was, the pull secret's right next to it. So downloads slash pull secret and if you don't have this, then go back to that getting started guide and make sure you download the pull secret so that you can have that with you. If you don't have it and you don't run it, the CRC command will still run, but it'll pause and it will ask you to paste in the pull secret for you. So you're gonna have to provide that at some point. So it's important to just download it ahead of time and use it for whenever you need it as that command line, so which it makes it easy. So what's gonna happen now is CRC is going to go ahead and download the bundle, get everything set up, extract it. It's gonna go ahead and provision the VM and it's gonna go ahead and make sure OpenShift is up and running the right way and do a couple different setup and configuration steps. And this is all just handled by this one command. So this one command might run for quite a few minutes. And by quite a few minutes, I mean on the magnitude of maybe 10, 20, maybe even 30 minutes, it's gonna depend on your machine and how quickly your hard drive is or your solid state disk. As well as how much CPU you've got available. If you have maybe a lot of workloads or a lot of tabs or a lot of things in your browser open or a lot of apps open. Obviously this is gonna run a little bit slower. So maybe use or have open what you need just as a personal recommendation. That way this might run a little bit quicker. But it's your machine, feel free to go for it. So yeah, while this is going on, I'm gonna go ahead and skip ahead. This is gonna go ahead and do everything that I mentioned. And I'll see you back once this is done and ready to go. All right, so we're back and the CRC start is now done. It took about 10 minutes on my Mac, nothing crazy. And we checked everything. The first thing is to check everything for any errors or what have you. And you can see I didn't have any, so everything worked good. I'm gonna go ahead and first start and follow the instructions. And it says first set up your environment by following and running the CRC OC ENV, which gives me access to the OpenShift command. So I ran that and in there we could see run this command to configure your shell. So I did that as well. And now I have access to the OC, the OpenShift CLI command. The next step in there says log in. So using the developer and developer credentials. So I did that, followed the instructions. But if I wanted to log in as an admin, I could. And you could see that here's the kube admin username and the password is listed there. The next thing that I'm gonna do is run CRC console to be able to access the OpenShift console. If I wanted to log in as admin, I could. I could choose the kube admin provider and pass in the password and all that stuff. But I'm gonna log in as a regular user, the developer. So I clicked HT Password and chose the developer log in and typed all that in following the same thing, developer-developer as the username and password. So the first step is to create a project. So once we're logged in in the developer console, I click the drop down box and hit new project under that project section. I'm gonna specify a name and a description. The project is basically a place to house our project, makes sense. So from here, I'm gonna deploy something. I could use from get if I had a get repo or from an image, right? If I wanted to use an already built container image, I could do that. But I'm gonna use the developer catalog and I'm gonna use an HTTP web server. I just wanna use Apache to just show that I could run Apache in a container on OpenShift using code ready containers on my Mac. So in the instantiate template dialog, I could specify some configuration. One example would be memory limit. Maybe I wanted to specify different memory requests, I could do that. I could also specify a new get repo URL. So maybe I wanted a different application source code for Apache to read my HTTP files, right? I could specify a different get repo there. But I'm gonna leave everything default and click on create. What's gonna happen now is OpenShift is going to initiate a source to image build and build out Apache using my get repo and other things that are specified in that default configuration that it didn't change. Once this is done, I'm gonna go ahead and skip ahead, we'll be on the topology tab. So make sure you click on that and we'll continue from there. So source to image built our application and you could see that the application is up defined by the blue circle surrounding our app, right? If it's light blue, then that means that we've requested one instance and OpenShift needs to provision that. There might be an out of memory issue or some other issue that it's deploying. Or maybe it's just taking a little bit of time. If there's no blue around that circle, then that means that the build is still continuing on in our example. So I'm gonna click on the little dot, the circle at the top right of our circle to launch the route to be able to access our application. And there you go, you could see, welcome to OpenShift. Our HTTP web server is up and running. So there we go. There's an application running on OpenShift, which is provisioned by code ready containers and it's all running on our Mac. From now, you could go and build out your own applications and deploy things the OpenShift way and test it out locally. So now that the application's up and running, I'm gonna show the OC CLI, right, the OpenShift CLI. So I'm gonna first specify the project. So OC project web app to choose the project that we created already. And I'm gonna just do OC get all. And in here we could see that our pod example one NZN8N, which is one of one, it's ready and it's running, right? And that's been up for a couple of minutes. In here, we could see all the other things that the S2I build created, right? We could specify and see the route. We could see the URL so that we could access this from the console or our web browser if we want to. Now that the application's good to go and we showed the console as well as the CLI, I'm gonna go ahead and stop my code ready containers instance. So I'm gonna run CRC-H and see what available commands there are. And stop is definitely the one that I wanna use. I'm gonna run CRC stop-H to see all the different flags. And you can see there aren't very many because everything's already configured already from the start command. So I'm gonna run CRC stop and this will take a couple minutes. It's gonna talk to my hypervisor that I specified and stop the CRC VM. Now the code ready containers VM is stopped. And if I wanna use this again later, I could just leave it as is and come back and run CRC start to restart the VM and not wait on provisioning again. But I'm gonna show how to delete it from the system. So I run CRC delete-H to see the flags that are available. And you could see there aren't very many there either. So I just run CRC delete and we go ahead and see that the code ready containers VM has been deleted from our machine. Thank you for watching. To find out more about OpenShift 4 and specifically the developer side of OpenShift, check out developers.redhat.com slash OpenShift.