 Hi again Red Hat Developers, this is Jason with the Red Hat Developers program. I'm here with Charlotte M. Ellett and she's going to show us how to quickly deploy a .NET app on OpenShift. So I'm Charlotte M. Ellett. I'm a game developer working on the OpenShift team at Red Hat, working on .NET projects. Today, I want to talk about some really quick tips for getting your ASP.NET application up on OpenShift. This is a subject that I've covered in an ongoing series of blog posts that are up on the OpenShift blog currently, including a tutorial going into how to make a really simple app in Visual Studio 2015 and get it up on OpenShift Online. You can find these blogs and other amazing projects and news for my teammates at blog.openshift.com. You also may want to sign up for OpenShift Online account at OpenShift.com if you'd like to try everything out the quick way about having to install anything on your machine, or you can also find downloads at OpenShift.org if you want to experiment locally on your own machine instead. All that you should need in either case is a GitHub account. So again, here are the three most important things that you must do with your ASP.NET app. There's some code that you must add to get your app working on OpenShift. So I show this in more depth in my tutorials, but I will go over it briefly here in this talk. You will have to change the port from the default that Visual Studio picks to 8080 in your project. So you have to be listening to 48080. When using an S2I or Source2Image in your OpenShift project, keep in mind that all images are not built the same. Just because it says it's a .NET image doesn't mean it will work for your app. If your S2I is failing, I recommend looking for one from an official source or one that others have recommended because they had success with it. For using .NET Core 1.0 and 1.1 in OpenShift, I recommend looking up the S2I .NET Core from Red Hat-Developer on GitHub. So if you put up your app and at first it seems like it's not working, it may not necessarily be your app, it may be an issue with the S2I. Finally, make sure that you're using the correct version of .NET Core. You need 1.0 for apps developed in 2015 editions of Visual Studio and .NET Core 1.1 for 2017. For my tutorial project that's up on the OpenShift blog, I made a quick little app that allows you to create and name a horde of some text-based cats and tell them what to say. You can get a list of your cats and view the sound that they make by going to the URL that's created for them. This is a really fast little project that goes over some of the fundamentals and will have you completing your first ASP .NET project in a very short time depending upon your skills in C-Sharp. And you can have something up on OpenShift in just a few more minutes after that. However, you need to make a few changes to your code to get it ready. So I have some code snippets that were taken from my tutorial that I've highlighted here to help point out. There's really only a few lines that you need to add. So I created my project with templates in Visual Studio Community 2015. I selected this based on its popularity. So that's where my code snippets are taken from and it's the program .cs file that's created with my modifications to it. So you can see on the first one, we make sure that we're using the Microsoft.extensions.configuration. The second change is you want to have configuration builder and add environment variables. It's hard to explain, but you can see it in the slide there. This one is important for making sure that you're listening to port 8080. That will be needed for OpenShift and when you first create your project in Visual Studio, it selects a port for you that I don't know what it's based on, but it has some interesting selections. They're not 8080. This is the final step. Make sure you have UZRLs, parentheses URL in there. Now your ASP.NET app should be configured to listen to port 8080. Next when putting your app on GitHub, make sure that the base directory of your Git repo is the one that contains your project.json file. OpenShift will need to be able to find this, otherwise it's going to tell you that that file does not exist. It can't build and so on. That's important to make sure your file structure has that on the base of your repo. Now you should be ready to create your project on OpenShift. Next you'll be telling it which S2I that you want to use. Again, I recommend checking for a release from Red Hat-Developer-GitHub account or something else that is officially recommended or that others have had success with. If everything has gone correctly so far, you should now be able to navigate to Add to Project if you're looking at OpenShift to the web console view. And you should see .NET as an option in the Languages menu. Again, choose the .NET Core 1.0 if you have 2015 projects or 1.1 for 2017. So make sure that you're using the correct version of .NET Core or your app is not going to build. Now everything should be building and deploying automatically. It'll be up and running soon. It's that simple. This process lets you quickly put your .NET app out there on the web. That's one of the things I like about OpenShift online. And you can take advantage of all the features that it has as a container platform as well. You can scale up the number of pods, scale them down, implement health checks, metrics, quotas, and more. You have the option of using a web console interface or CLI. And the web interface, you can even easily open a terminal into your pod and poke around in there to see how your app is working. Like I did in the screenshot here with my Cat Horde app. Just to quickly do C-U-R-L, make sure that everything's working in there. That's it, really quick, easy tips for getting up your .NET app up on OpenShift. And thank you for me and the rest of the OpenShift team.