click2cloud-page-loader

Role of Docker in Publishing .NET Applications to Red Hat Linux/OpenShift 3 Cloud PaaS

24-May, 2016
click2cloud blogs- Role of Docker in Publishing .NET Applications to Red Hat Linux/OpenShift 3 Cloud PaaS

Red Hat OpenShift 3 is a great technology that uses Docker Container and Kubernetes. The OpenShift 3 has evolved and gained a very good momentum since its launch in 2015. It uses a Git Repository to store the application source code and Docker registry to manage Docker Images.

What is Docker?

What is Docker?

Docker is software which lets you create an image (which is a lot like a template for a virtual machine) and then run instances of that image in a container.

Docker maintains a vast repository of images, called the Docker Hub, which you can use as starting points or as free storage for your own images. You can install Docker, choose an image you’d like to use, then run an instance of it in a container.

 

How to Install Docker?

 

You can refer the installation guide to choose your platform, docs.docker.com/engine/installation.

Use this command:

docker run -it centos 

After some processing, you’ll see a prompt like this:

root@719059da250d:/# 

Try few other commands and then exit the container:

root@719059da250d:/# lsb_release -a 

No LSB modules are available. 

Distributor ID:    Centos 

Description:    Centos 6.6

Release:    7.0 

Codename:    trusty 

root@719059da250d:/# exit

 

With above commands, you will see is the bash shell of an isolated container running Centos, on your machine.

Here’s a diagram and a breakdown of what is the result of this Docker installation:

Docker installation

  1. First, we issue a dockercommand:

docker: run the dockerclient

run: the command to run a new container

-it: option to give the container an interactive terminal

centos: the image to base the container on

  1. Then the docker service runs on the host (i.e. our machine) to check if we have a copy of the requested image locally
  2. Then the docker service check the public registry (the docker hub) to see if there’s an image named Centos available- which there is.
  3. The docker service downloads the image and stores it in its local cache of images (ready for next time).
  4. The docker service creates a new container, based on the centos

Accessibility constraints with Docker

Red Hat OpenShift 3 has adopted Docker Commands which are accessible via a OpenShift Web Console and Command Line Tools and Interfaces. But, managing these tools and remembering the various commands using CLI’s need good expertise and training, which making it difficult for developers to use it.

 

The best solutions

The best solutions that address these constraints “Click2Cloud’s OpenShift 3, Docker Container and Kubernetes based Dev-Ops Extension for Microsoft Visual Studio 2015

You can publish ASP.NET Application to Linux in 5 minutes with Docker Container and Kubernetes based DevOps Visual Studio 2015 Extension.

The One-Click-Solution from Click2Cloud allow developers to connect your various OpenShift 3 environments and deploy the applications in less than 3 seconds. This extension uses the Docker Hub to Pull & Push the Docker images and build the application.

5 Step Installation of Click2Cloud Extension and .NET Application Deployment

Step 1 – Download and Install the extension from the Microsoft Visual Studio Gallery

Download and Install the extension

Step 2 – Launch the extension and Sing-in to OpenShift 3 environment

OpenShift 3 environment

Step 3 – Create Project, .Net application from custom templates or open existing project

Create Project

Step 4 – View Webhook URL for the newly created application or for a running one and trigger a new build by sending a request to OpenShift API endpoint.

OpenShift API endpoin

Step 5 – View Pod, Build Logs from OpenShift 3 and Start Build

Please Note: Users can use Click2Cloud’s ASP.NET 5.0 Docker builder image to create a .NET based application in OpenShift 3.

 

 

What is Docker Explorer?

The ‘Docker Explorer’ is a feature developed by Click2Cloud for its ‘Visual Studio 2015 Extension that provides developer various functionalities within the Visual Studio IDE;

  • Searching of Docker Images on the fly from Docker Hub in Single Click

A search is performed only on the official Docker registry. If a user needs to download an image from a private registry, then the full specification of the image, including registry, needs to be made manually in the initial Wizard text box.

What is Docker Explorer?

 

  • Port forwarding
  • Running Containers on Local Host
  • Managing containers; Start, Stop, Restart, Kill Containers
  • Pulling Docker Images on the local Docker Server
  • Running Docker Images
  • Pushing Local Docker Images on Docker Hub
  • Build Own Docker Images and Pushing to Docker Hub

Building an Image takes an existing Image and modifies it to create a new Image. Typically, this involves installing new packages. The specification of the new Docker Image is done via a special file which is always named: “Dockerfile”. Clicking on the Build Image icon starts the Build Image Wizard:

Docker Images and Pushing to Docker Hub

 

  • Port forwarding
  • Running Containers on Local Host
  • Managing containers; Start, Stop, Restart, Kill Containers
  • Pulling Docker Images on the local Docker Server
  • Running Docker Images
  • Pushing Local Docker Images on Docker Hub
  • Build Own Docker Images and Pushing to Docker Hub

Building an Image takes an existing Image and modifies it to create a new Image. Typically, this involves installing new packages. The specification of the new Docker Image is done via a special file which is always named: “Dockerfile”. Clicking on the Build Image icon starts the Build Image Wizard:

Docker Explorer View

Docker Explorer View

So, go ahead and deploy this Extension from Microsoft Visual Studio Gallery

If you face any issue, please feel free to contact us @ contact@click2cloud.net  or ring at +1 425-784-9666. We have a dedicated support team ready to help you.

 

To close on this note, we would like to discuss about Orchestration method used in the OpenShift 3 that is based on the Kubernetes technology. The Other Blog will give you more details.

 

You may also be interested in reading;

Red Hat’s (Chris Morgen – Product Management Director) blogs explaining OpenShift2 and .Net integration;

And trying your hands on extensions at Microsoft Visual Studio Extension Gallery

We are located at 👉

  USA Office:

Click2Cloud Inc. , Suite #05-143, 800 Bellevue Way NE Bellevue, WA, 98004, USA.

Phone: +1-425-784-9666

Email: contact@click2cloud.net 

Website: https://www.click2cloud.com/

 

   India Offices:

Nagpur

locationW-Building, C-Wing, 1st Floor, Central Facility, MIHAN, Dahegaon, Maharashtra 441108

Hyderabad

locationB-wing 1006, The Platina, Gachibowli, Hyderabad - 500032

Phone: +91 7263985000/+91 9022932787

Email: contact@click2cloud.net 

Website: https://www.click2cloud.com/

 

  China Office:

No.401, Unit 8, Building 8, Area 5, HeYiDongLi, Fengtai District, Beijing, China, 100076

Ph: +86 173 4656 0417

Email: contact@click2cloud.net

Website: https://www.click2cloud.com/

Recent Posts

role of docker .net applications to red hat linux openshift 3 cloud paas openshift 3 red hat openshift 3 docker container and kubernetes docker registry to manage docker images how to install docker accessibility constraints with docker