B2B Integration

 View Only

Sterling Openshift Certified Containers in the Cloud series: Part 2 - Autoscaling

By Carlos Chivardi posted Fri December 04, 2020 12:51 PM

  

Co-authored by Adolfo Loustaunau and Brian Hall

Make your business more agile, efficient and resilient with IBM Sterling OpenShift Certified Containers


As shared in our post last week, this is the second part in a series of blog posts that describe the different use cases and set up for the Sterling Red Hat OpenShift (RHOS) Certified containers. This series will provide you with an overview of the different technology aspects of these containers, and how you can take advantage of the new capabilities provided by the RHOS platform.  

This post will focus on Autoscaling, which is one of the major advantages of running Sterling solutions in a Kubernetes environment.  Through this post you’ll get to understand the setup, execution, delivery, benefits and functional advantages of Autoscaling capabilities with B2B integration (B2Bi)/Secure File Gateway(SFG) RHOS containers.  

First, a quick background if you’re not already familiar with containers and Kubernetes. Let’s start with the question: What is a Container?

“Containers are an executable unit of software in which application code is packaged, along with its libraries and dependencies, in common ways so that it can be run anywhere, whether it be on desktop, traditional IT, or the cloud… Containers are small, fast, and portable because unlike a virtual machine, containers do not need include a guest OS in every instance and can, instead, simply leverage the features and resources of the host OS” [1] .

Our certified containers offer a new type of installation within the OpenShift Container Platform so they can be deployed as a container-based Hybrid-Cloud solution (both on-premises or in the cloud) orchestrated and managed by Kubernetes. 

"Kubernetes—also known as ‘k8s’ or ‘kube’—is a container orchestration platform for scheduling and automating the deployment, management, and scaling of containerized applications… Today, Kubernetes and the broader container ecosystem are maturing into a general-purpose computing platform and ecosystem that rivals—if not surpasses—virtual machines (VMs) as the basic building blocks of modern cloud infrastructure and applications. This ecosystem enables organizations to deliver a high-productivity Platform-as-a-Service (PaaS) that addresses multiple infrastructure- and operations-related tasks and issues surrounding cloud native development so that development teams can focus solely on coding and innovation[2].   

There are significant benefits, both financial and operational, when using B2Bi/SFG with K8. Elements like speed and flexibility, lower maintenance cost, and lower risk are just a few factors that make its adoption an easy decision. The next section describes the context and a specific scenario in which B2Bi Certified Containers (RHOC) can be used and prove these benefits.


Autoscaling Scenario:

B2Bi RHOC relies on Kubernetes functionality and one of its key features is the Horizontal Pod Autoscaler (HPA). The HPA automatically scales the number of pods in a replication controller, deployment, replica set or stateful set. This automated scaling is based on custom metrics usage support (i.e. CPU Percentage Utilization, CPU Requests and other application-provided metrics). It is important to mention that B2BI RHOC’s HPA does not apply to objects that cannot be scaled (i.e. Network paths, Daemon sets, Databases, and others).

There are two main components in an HPA: a Kubernetes API Resource and a Controller[3]. The Resource drives the behavior of the Controller while the Controller checks and adjusts the number of pods replicas to meet the actual custom metric (i.e. CPU Utilization).  This check and validation are an iterative loop executed within a period. The default period is every 15 seconds.

Figure 1 displays a visual on how the B2Bi RHOC HPA Controller works with the Resources (Deployments or Stateful Sets).

Figure 1 How SI HPA works

Figure 1 How SI HPA works


IBM B2Bi Demonstration Flow and Results Analysis:
 

These demonstration instructions require the following two components to be pre-installed:

  • B2Bi RHOC 6.1 installed on an IBM Public Cloud RHOS Cluster.
  • A set of tools to apply stress tests to the B2Bi RHOC 6.1 install

The first part of this section provides a description of the B2BI RHOC install (1st component). For the second part, a list of three different methods to perform an effective Stress Test which will cause HPA to scale up.  

 

The B2BI RHOC Servers and Platform settings are in Figure 2 which displays the current setup of the IBM Public Cloud Cluster.

Figure 2 IBM Public Cloud Cluster Overview Dashboard



Figure 3 shows the number of Worker Nodes setup. In order to deliver an effective Autoscaling Demonstration, there should be at least 4 Worker Nodes available.

Figure 3 IBM Public Cloud Worker Nodes



Figure 4 includes the main RHOS Dashboard where B2Bi RHOC install is setup.

Figure 4 RHOS Overview Dashboard



The Workloads Menu option includes a view of the B2Bi RHOC Project and Pods available which are displayed in Figure 5.

Figure 5 RHOS Workloads Menu Option and Project and its Containers



The RHOS Dashboard perspective is setup on Administrator View. The Workloads Menu option includes an HPA setting, just below the replication Controllers (see Figure 6). If there is no HPA, then one can be created by selecting the option “Create Horizontal Pod Autoscaler”.

Figure 6 RHOS HPA Settings



A YAML Definition file template is created and ready to be customized which can be seen in Figure 7. Notice the four Key settings: Replicas Minimum and Maximum, Metric Usage and its Target Average Utilization.

Figure 7 HPA YAML Settings

 

For the purpose of an effective Autoscaling Proof of Technology (PoT) demonstration, it is important to set these values as:

minReplicas: 1

maxReplicas: 4

Resource name: cpu

targetAverageUtilization: 60

 

In order to have a good grasp of what is happening in terms of the resource usage, the Monitoring Menu option provides access to a set of prebuilt Grafana Dashboards which are supported with a Prometheus Database as shown in Figure 8.

Figure 8 How to access RHOS Monitoring Dashboard




Once you login to the Grafana Dashboard, a set of pre-built dashboards can be displayed by just selecting the Home option which are shown in Figures 9 and 10.

Figure 9 Grafana Dashboard Access

 

 

Figure 10 Grafana Compute Resources Workload Dashboard



For purposes of this Autoscaling Demonstration, the Kubernetes/Compute Resource/ Workload Dashboard is used as reference, making sure the correct namespace (project name) is selected. my-release-b2bi-asi-server-0 , which is the B2BI RHOC Application Server, is the pod to upscale(See Figure 11).

Figure 11 Grafana Compute Resources Workload Dashboard CPU Usage



In the next blog post, you can get to learn how to configure Sterling B2Bi/SFG to allow for Autoscale functionality.  In addition, you can get to learn how to simulate some high transaction volumes to be able to see the HPA in action and see autoscaling of the Sterling pods.

[1] https://www.ibm.com/cloud/learn/containers

[2] https://www.ibm.com/cloud/learn/kubernetes

[3] https://kubernetes.io/docs/home/




#B2BIntegration
#SupplyChain
#Featured-area-1-home
#Featured-area-1
0 comments
157 views

Permalink