 Hello, my name is Daniel Helfan and I'm a Developer Advocate with Red Hat's OpenShift Container Platform. Today, what I want to talk about in this video is something that I recently wrote about in a blog post. It's about how you add a builder image to an OpenShift Developer Catalog and then deploy an application using that builder image out to OpenShift with OpenShiftDo, or ODO. For those unfamiliar with ODO, it is the Developer Focus CLI for OpenShift. So it will allow someone who is working with local source code to very quickly iterate on that source code and then just as quickly push that up to your OpenShift environment and verify that everything is running and working as expected. So to start, what I'm going to do is come out to my OpenShift 4 cluster and head on over to the Developer Catalog. And next, I'll click on Languages. And so what I'm showing you here are all of the different builder images that come preloaded in an OpenShift 4 cluster. What I wanted to see, though, despite how many language options we have available in OpenShift is how hard would it be to add something that is not supported by the catalogue. So to start, what I did was look for something that was not available. And I noticed that GoLang is not currently an option in the Developer Catalog. And so what I did in order to add this GoLang option was I created an image stream. For those unfamiliar with an image stream, what this basically will allow us to do is define properties of our builder image that will be displayed in the Developer Catalog web console that we were just looking at. But more importantly, what it does is it allows us to define different versions that we will support of a particular language or framework, and then ultimately where we can pull those container image definitions from. So to start, what you can do is define this kind property that specifies that we are creating an image stream. Next we can give it a display name, which will appear in the Developer Catalog web console, and I'll just give it the name Go. Then I can actually give our image stream a name, and I'll just call it GoLang. And then the next really important property of an image stream is this tags property. So underneath tags, I can define different versions of a builder image. And those tags should correspond to versions of a particular language or a framework that are supported by the container image that you are going to pull into that particular tag under the image stream. So you'll notice that I have this 1.10.2 tag, and this will correspond to a GoLang container that supports GoLang 1.10.2. And you'll see that I am pulling it from a Docker hub, and that I am specifying that it is a Docker image. And then the last part here is that we have this tags property underneath each tag. So I can here specify that this is a builder image, and that, and then this will basically be how we can use this with ODO. So the last part here that we need to do to actually add this to the Developer Catalog is that we can run the following command. So what this is going to do is take that image stream definition that I was just showing you on GitHub, and we'll pipe it into an OCApply command. And this OCApply will run and add it to the OpenShift namespace. So you can see by the output that our GoLang image stream was created successfully. So we can go back out to the Developer Catalog and see that now our filter is showing us we have this Go option available. So what I could do now is actually go through the web console and deploy GoLang source code using this builder image. But instead, what I'm going to do is show you how to do this with ODO from the command line. So we'll come back out to the terminal. And what I need to start with is some local source code. So I'm going to go ahead and clone a GoLang example. And then I will CD into the directory. And just to show you the application that we're going to deploy, it's really simple. All that will happen is when we visit the URL in the web browser, it will return hello, OpenShift. So nothing terribly complex. So to start, what I'm going to do is create a project on my OpenShift cluster. And I can do it with this command. So I will call it GoProject. So now we have a project that we are working with. And then the next step that I want to do is actually see what I have available in my developer catalog with ODO. So by running this command here, it will basically show me all of the builder images that are available to me to deploy an application in our developer catalog. And you'll see here that our GoLang option appears as the second option. And that under the tags property, we can see the versions that we defined in the image stream. So next, I want to actually use this component to deploy this sample application that I have so I can run the following command. And what this will do is it will create a GoLang component. And it will be associated with the local source in this directory. And then we're just going to specify a port that we can expose on the container. So now what has happened is we have created a local configuration. And if you run this ODO config view, you can actually see all of the properties that were created based on that first command that we just ran. So you can see that we are creating a type of GoLang, meaning that we're using that GoLang builder image that we added. We are going to be working with the project, GoProject. You can see the ports that were exposed. And then you can also see the name of the application that we defined. So next, what we need to do is add a URL. And I will specify that I want this to be associated with the GoLang example, and then specify a port. So now that we have these two commands run, we are going to create this GoLang application and have it running out on OpenShift. And we have a URL to expose it by. So the last command that we need to run is ODOPUSH. So for anyone who's familiar with Git, it's just like working with Git in the sense that you are working on your local changes. And then when you're ready to push them up, you just run this push command. So you have control of when everything is actually deployed out to OpenShift, just like you would in terms of how you would actually push source code up in Git. So now that I run this ODOPUSH command, you'll see that it is just taking everything that we have in our local configuration, and it is going to push it up to our OpenShift project on our OpenShift cluster. So to wait for this to finish, what I'm going to do is go ahead and pause the video for right now. So you can see by the results here in the output that our command ran successfully, and it pushed everything up from our local configuration up to our OpenShift cluster. So now we can actually go back out to the cluster and go into the project that was created using ODO. And you'll see that we have our application all set up here and that we have this URL available to expose the application. So we can go ahead and run this and it will display Hello OpenShift just as we expected. So what's really nice about using builder images is it allows us to encapsulate an infrastructure pattern so we can really focus on how we develop source code instead of how it's actually hosted. So we define it once and we can share it with anyone. But what's also really nice about a tool like ODO is it allows you to very easily use these builder image infrastructure patterns. And so you can very quickly iterate on what it is you're doing locally and push it up to your OpenShift environment to verify everything is running as expected. So I hope this video was helpful in introducing some useful workflows around how you can work with OpenShift with tools like Builder Images and ODO. And if you have any further questions, I'd encourage you to read this blog post and either respond in video comments or also in blog post comments. I'd be happy to dig further into anything that anyone might be wondering about. So thank you so much for your time.