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?
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:
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
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:
- 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
- Then the docker service runs on the host (i.e. our machine) to check if we have a copy of the requested image locally
- Then the docker service check the public registry (the docker hub) to see if there's an image named Centos available- which there is.
- The docker service downloads the image and stores it in its local cache of images (ready for next time).
- 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
Step 2 – Launch the extension and Sing-in to OpenShift 3 environment
Step 3 – Create Project, .Net application from custom templates or open existing 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.
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.
- 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
So, go ahead and deploy this Extension from Microsoft Visual Studio Gallery
If you face any issue, please feel free to contact us @ firstname.lastname@example.org or ring at +1 425 749 7495. 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;
- OpenShift IDE Integration - https://blog.openshift.com/openshift-ecosystem-ide-integration/
- Microsoft .NET Apps on OpenShift - https://blog.openshift.com/microsoft-dot-net-on-openshift/
And trying your hands on extensions at Microsoft Visual Studio Extension Gallery