Deploy Micro Focus Enterprise Server 4.0 to AKS
Published May 29 2019 02:10 PM 7,865 Views
Brass Contributor

In a previous blog post I outlined the steps to run Micro Focus Enterprise Server 4.0 in a Docker Container.  As a follow up to that, I’d like to show you how to take it one step further and deploy that Docker image you created to Azure Kubernetes Service (AKS).

 

Azure Kubernetes service is a managed orchestration service based on Kubernetes. It allows you to deploy, scale and managed Docker Containers (and other container-based applications) across a cluster of container host.

 

This will be a 3-step process. You will need to:

  1. Create an Azure Container Registry to store your Docker image
  2. Create an Azure Kubernetes cluster to run the Docker image.
  3. Run the application

This will allow you to scale-out (and scale-down) your Mainframe Modernization workloads in Azure taking true advantage of the Cloud platform.

Ready, let’s get started.

 

Create the Azure Container Registry

From the Azure Portal, select Create a Resource in the top left corner. From the Marketplace Dashboard, select Containers then Container Registry. This will take you to the Create container registry pane where you will need to fill in the Registry Name, Azure Subscription, Resource Group and Azure Region. The Registry Name needs resolve so it should be unique. Select the Resource Group you used from the previous blog and the same corresponding Region. Select Enable for Admin User and Basic for the SKU. Once you have everything filled in click the Create button the bottom.

 

 

AKS-MF1.png

 

After the Registry has been deployed, click the Go to Resource button. This will take you to the main blade for the Container Registry. A nice feature here is the Quick Start menu option. Select it and you will see instructions for what needs to be done to Push and Pull images to and from the Registry. Let’s go though these:

 

  1. Install Docker – You do not need to worry about this since it has already been done.
  2. Run the “hello – world” base image – Again, not necessary, but feel free to try it out.
  3. Login to your container registry – this you will need to do from the VM. Copy the command to the clipboard or notepad.
    1. For the registry I created, the command is: docker login acrmf40.azurecr.io
  4. Push to your registry – You will need to do this as well for the Micro Focus image once we have logged into the VM
  5. Pull from your registry – Not relevant for this walk-through, but good to know if you need to run another Docker image.

Before we leave the portal, we need to get the credentials for the registry so we can log in. Exit out of the Quick Start blade and select Access Keys from the Registry Menu. Copy the Username and one of the Passwords (there are 2) to the clipboard or notepad. You will need them later to login.

Now that you know what needs to be done, log into the VM.

 

RDP to the Virtual Machine you used to create the Docker image.

Since you already created the Docker image on a Windows 2016 Server, we need to log into that VM. From this VM, we will push the image to the Container Registry we just created. Navigate to the VM in the Azure Portal then select Overview and then Connect. This will allow you to connect to the VM via RDP. You will need to use the credentials from when you created the VM.

 

Login and push the image to the registry

Once you have logged in, open a Command Prompt and initiate the following Docker commands:

 

  • docker images – this will show a list of all the currently installed images on the VM. Take note of the microfocus/es-acctdemo since this is the one, we will be working with.
  • docker login acrmf40.azurecr.io – The correct format here is docker login <registry name>. Substitute whatever name you used when you created the registry.
    • You will need the Username and Password that you copied from the Azure Portal. You should see something like the image below.

 

AKS-MF2.png

 

  • docker tag microfocus/es-acctdemo acrmf40.azurecr.io/es-acctdemo – This will tag the appropriate image with the name of the repository. NOTE: If the name <microfocus/es-acctdemo> does not work, try using the full Image ID. After you have executed the command, type docker images –no-trunc. You should see something like the image below. Notice our image has been properly tagged.

 

AKS-MF3.png

 

  • docker push acrmf40.azurecr.io/es-acctdemo – This will kick off the actual push to your repository. Because the size is 15GB, it will take a couple of minuets to run. If everything goes right, you should see something like the image below.

 

AKS-MF4.png

 

Now go back to the Azure Portal , specifically to the Repository. In the menu for the Repository select Repositories and you should see es-acctdemo listed. Now we need to create the AKS Cluster.

 

Create the Azure Kubernetes (AKS) Cluster

From the Portal, select Create a resource and then Containers / Kubernetes Service from the Marketplace menu. Next, you will need to fill out the Create Kubernetes cluster blade. Be sure to keep the cluster in the same region and Resource Group we have been using. You can accept the rest of the defaults, except for the Node count which only needs to be 1. When you are done click the Review + Create button.

 

AKS-MF5.png

 

When complete, the deploy will place the Kubernetes Service artifacts in the Resource Group you selected on the blade. However, the actual Cluster will have its own resource group created during the deployment. If you select Resource groups from the menu on the left, you will be able to find it based on the naming convention.   Here’s an image of mine – it’s the last one in the list.

 

 

AKS-MF6.png

 

Run the Image

Now it’s time to pull the image and run it in AKS. The easiest way to do this from the Azure Portal is to use the Cloud Shell. You will find the icon at the top right of the Portal.  Note for this walkthrough, I will be using the Bash shell.

 

AKS-MF7.png

 

Once the shell has loaded. Type the following command

 

kubectl run es-acctdemo --image acrmf40.azurecr.io/es-acctdemo --port=9040

 

This pulls the image from the acrmf40.azurecr.io Repository and loads it into AKS. It then runs it with port 9040 open. You may recall that that was the port we had open for our Docker image. We will need that to access Enterprise Server.

 

Kubernetes should respond with the message that the deployment was created.

 

CaptureAKS6.JPG

 

To see if the Container is actually running , type in.

 

kubectl get pods

 

You should see es-acctdemo as a running pod as in the image below.

 

AKS-MF8.png

 

Congratulations, you are now running Enterprise Server in Azure Kubernetes Service.  In the next blog we will look at how to access the Enterprise Server Administrative Console and also how to we can leverage Kubernetes to scale out your deployment.

 

 

 

 

Version history
Last update:
‎May 29 2019 02:19 PM
Updated by: