This is Part 2 of my blog on the OpenShift CDK - You can find Part 1 here > Productive Developer Tools - Deploying OpenShift “Container Development Kit”. Now it’s time to start looking at some real application use cases that we can test inside our CDK environment. Let’s talk about ASP.NET and give it a test drive using the CDK.
So I know many people said this would never happen… back in the day we did some crazy stuff using WINE but let’s be honest it never really caught on. Personally I feel the recent announcement of being able to run your Microsoft Windows ASP.NET applications on RHEL inside OpenShift containers is going to be a real game changer for organizations. Arctiq plans to get ahead of this curve as we feel the business case is very strong and the timing is perfect.
Many customers we work with have lots of .NET applications they want to modernize and benefit from the same level of automation as their Linux based workloads. Most of those same customers also maintain lots of dedicated infrastructure for these applications. This not only requires lots of capital but also makes it very difficult to move those applications to cloud based services. The resource requirements are just too demanding to drive real cost efficiency, not to mention the Windows OS license requirements.
Since we can now deploy our ASP.NET applications inside OpenShift the game has changed. We can benefits for all the platform automation and integration that OpenShift provides. Continuous Delivery and Integration can be achieved with little effort and your perviously “Windows Only” based workloads can now be managed just like your Linux based applications.
Ok now let’s get into the technical aspect of this Blog post so you can try it yourself:
Go ahead and install Git command line tools, follow this guide :
Let go into the same directory we used in the last blog:
Go ahead and run this command, if you don’t have xcode installed it will prompt you.
Let’s run -
git clone :
After logging into an OpenShift environment and creating or using an existing project, create a new application which combines the ASP.NET S2I builder and the sample application from this repository
Build scheduled, use ‘oc logs -f bc/aspnet-app’ to track its progress. Run ‘oc status’ to view your app. Create a new route so that the application is accessible outside the OpenShift environment
Login to the OpenShift WebUi and have a look at your new project: Go into your dotnet project and you will see the build happening. You can also view the log.
Also have a look at the Events
Use a template to build and deploy a sample application
A template has been provided to simplify the build and deployment of a ASP.NET application on OpenShift. The template is located in the templates folder in a file called
After logging into an OpenShift environment and creating or using an existing project, add the template to the project
Alternately, the template can be added to the openshift project so that it will be visible by all users. Using a user with permissions to modify resources in the openshift project, execute the following command:
Have a look at your application (Note the service link provided in the UI)
You can go ahead and scale your “pods” to 3
You can also now see you aspnet application container part of your project list:
Have a look at your application (click on the link provided in the UI we noted above) WOW - You are running a .NET application inside a Linux Container
Let’s go ahead and create another project from your new template:
Now using project “dotdotnet” on server “https://10.1.2.2:8443”. Deploy your new application:
Build scheduled, use ‘oc logs -f bc/aspnet-app’ to track its progress. Run ‘oc status’ to view your app.
You can see you new application in the OpenShift UI.
I hope you enjoyed seeing the possibilities of what you can now do containerizing you ASP.NET applications. If you experienced any issues just let me know.