 Hello everyone, this is Grant your friendly neighborhood OpenShift team member today I wanted to show you how to install Red Hat code ready workspaces on the OpenShift Online Pro System so what I'm going to do as I just went to OpenShift comm I'm I'll click on log in and it's going to take me to the login wizard I'm going to authenticate to the pro tier, so I'll click on open that web console here and I have already authenticated to it and so you see I have four or four projects running over here So the first thing I want to do is download code ready workspaces So to do that. I'm going to actually go to access dot red hat comm Then I'm going to click on products and services View all products and then select code ready workspaces for OpenShift And on this page you can see that you have access to release notes administration guide as well as to Download the latest code ready workspaces. So I'm going to click on that and it should say your download just start automatically So you can see I'm using the windows operating system here And this is going to download a tar file for me What I want to do is actually just copy this link address because I'm going to use my Linux system to do this. So let me clear the screen here And I'm going to make a directory called temp and inside of that directory. I'm going to curl The url and I'm going to dash o for output and I'm just going to call this workspace tar And that will download the necessary files that I need and then I'll move that into my temp directory Because I forgot to change into that directory and I'm on a tar xvf workspace tar That gives me a couple of things that gives me a config script a deploy script and a readme script To actually run this you first want to log in to the OpenShift container platform that you want to deploy to So I am going to Go back to my OpenShift console and click on my username And select copy login command and then I'll go back to my terminal paste that in And now I'm logged in. Okay, you can see the same four projects there Now what we want to do is actually run that deploy script if I run deploy.sh-help Let's see. I got to go into that directory run that command again It'll list all of the available options for me and you can dig into the different options and whatnot Or read through the administration guide But right now all I want to do is pass in the Deploy command and this is going to give me an error message and I wanted to show this to explain why Because by default if you don't pass in a namespace or a project It's going to use code ready now because I'm on the online pro tier And it's a multi-tenant environment. Someone has obviously already used code ready on that Luckily, you can pass in a dash p equals and then your own project name. So I'm going to say G ship Lee And this will create a new project or a namespace called G ship Lee and then deployed the code ready workspace And cha operator inside of that project and this takes about three or four minutes to complete Okay, it looks like the deployment has finished correctly. So let's just run through what actually happened here When I ran the deploy script it actually installed postgres It installed key cloak, which is the authentication system that we're going to be using and it deployed cha So now let's take a look at the open shift console And we can see that we have a project called G ship Lee. That is where My instance of cha Was created. So the first thing we want to do is click the route for code ready workspaces And we're going to register a user So I'll just click in register and you can set this up Using oauth or other things. So let's just G ship Lee at redhat.com username g ship Lee Put a password in here Register, okay. So now I have an account on cha Um, so what we want to do is actually load up the key cloak dashboard at this time And we want to go to the administration console and the password and username is admin admin Okay, so the first thing we want to do is change that password, right? So if we go down to users View all users we can see admin. I'll click on him credentials. We want to make that Turn that off and change this to a secure password And we're going to change the password Now we can go back to the users And you'll also probably want to turn off Um registration, right and so let's see how we do that here log in Registration is set to on let's change that to off and save those changes Okay So now if we go back to our other tab, we can see that I am in code ready workspace So let's go ahead and start coding. I'm going to select a spring boot application So I'll just use the spring boot quick start And then I'll click on add or import projects and select get And I am going to go over to get hub And I'm going to pull down a spring boot project here that I've been working on which is The back end for a game. So I'm going to Get that url come over here and paste it in And click on add and then scroll down and select create and open So what this is going to do is is actually going to spin up a unique workspace for me Running inside of red hat code ready workspaces. That's a an actual container Inside of my open shift account. So if we go down here You can see that it's making a workspace right now and this takes just a few seconds to complete Okay, it looks like our workspace is up and running. We can see that it's uh importing the project over here It's doing some initial um stuff starting the java language server So this is eclipse uh chatty inside of red hat code ready workspaces So we can look at our source code here if we go down to source main java May expand all of this And look at the wild west application Um a few cool things you can do here first you can come over to your terminal And let's cd into our application. I can maven clean package And remember this is all running inside of my open shift account on open shift online pro And so I can you know access this workspace from anywhere. I had a built success there Um, so now let's actually run this spring boot application. I can do java dash jar target and I want to Run the wild west 1o dot jar. We'll start that up and this will start up this spring boot application And it also creates a route for me so that I can access This application from inside my browser. So let's look at that real quick. I'll click this plus arrow and then click on servers And this is the route for my workspace for my application That's deployed on my code ready workspace inside of the container on open shift So I'll click that and this is expected. This is just a back end api So if I throw in like, oh, I don't know egg We can see that this says every game needs an easter egg. That's the uh rest api call and so let's go ahead and make a change to that and See how the flow works. So let's see. I don't know where I put the um test Or the egg. It's been a while. So let me find it here. Here it is Request mapping equals egg. So let's just change this to say Code ready workspaces And then I'm going to save that And now my flow Is uh pretty similar to what I would expect as a java developer. I keep There we go Start a new terminal up here. Okay cd into that And let's do a maven clean package. So we're going to recompile the application And do a java dash jar and then target wild west And we'll start up our application here And let's refresh this page And we can see that it says code ready workspaces. So it's a pretty good Um ide an environment. It has everything that you would expect including including code completion So if I type in new game here and uh want to set game mode It'll complete all of that for me, but I don't want to do that. So let's delete that line Now let's take a look at the open ship web console again You can see inside of my project. I have uh eclipse chay running I have key cloak and I have postgres and then here is the docker image for my workspace Okay, and here's all the available routes and traffic. We can see it's using 1.6 gigs of memory But what is super nice about this is I now have access to my ide From anywhere in the world. Um deployed on my online pro account just based on the user credentials that I created All right, that's it for this video. I hope you enjoyed it and I also hope you enjoy red hat code ready workspaces