• About Us
  • Contact Us

Unleashing Efficiency: Application Containerization Patterns with VMware Cloud on AWS

Introduction

In this advancing world, almost every other enterprise is looking for ways to have their infrastructures optimized for efficiency, flexibility and scalability. Application containerization proved to be a transformative technology, assisting organizations to deploy and manage various applications in portable and lightweight containers. To top this, VMware Cloud utilizes and combines the power of AWS cloud services’ scalability with VMware’s virtualization. In this article, we will be discussing about streamlining the workflows by using application containerization patterns with VMware Cloud on AWS.

Understanding Application Containerization

Let us take a start by discussing the fundamentals of application containerization. Containers are one of the most important fundamentals to discuss. They are basically used to encapsulate application code, dependencies, runtime and libraries. When the environments get diverse, they allow consistent deployments across every environment. Containers are different from virtual machines in a way that containers share the kernel resulting in efficient resource utilization, faster startup times and enhanced portability. Two most important technologies, Docker and Kubernetes, have made it possible to experience automated deployment, automated scaling and the management of containerized applications.

Benefits of VMware Cloud on AWS

When VMware’s virtualization is combined with AWS cloud then a seamless hybrid cloud experience can be witnessed. With the help of VMware APIs and tools, the organizations can modernize their existing workloads. Let’s jump to the benefits of VMware Cloud on AWS.

Consistent Operations

VMware Cloud on AWS provides a consistent experience when it comes to operations, on cloud environments and on-premises both. This encourages enterprises to make use of existing tools and skill sets.

Scalability

Organizations can meet the fluctuating demand by using scaling capabilities. It ensures optimal performance without over using or under using the resources.

Integration with AWS Services

Enterprises can integrate AWS services like Amazon DynamoDB, Amazon S3 and Amazon RDS with VMware workloads.

Disaster Recovery

Robust disaster recovery and business continuity solutions can be used by integrating VMware Site Recovery into VMware Cloud on AWS. It ensures data protection and high availability.

Application Containerization Patterns

Application containerization patterns within VMware Cloud on AWS can be used to enhance operational efficiency and optimize deployment workflows.

Lift and Shift with Containers

Lift and shift approach is used to migrate the existing monolithic applications to VM Cloud with the help of containers. Containerizing legacy applications help enterprises to break the monoliths into microservices.

Cloud Native Development

VMware Cloud on AWS also allows cloud-native development practices. Developers can build and deploy containerized applications by using DevOps tools. One of the most famous DevOps tool is Kubernetes. It can be combined with VMware Tanzu Kubernetes Grid to allow organizations to orchestrate containerized workloads.

Hybrid Cloud Deployment

Enterprises have a free hand to utilize VMware Cloud on AWS to implement a hybrid cloud deployment model. It results in resource optimization, seamless workload mobility and disaster recovery capabilities.

Microservices Architecture

Microservices means that the overall complex application can easily be broken down into smaller services that can be developed, deployed and scaled independently. VMware cloud on AWS supports the efficient management of microservices-based applications.

Serverless Computing Integration

To leverage the serverless computing capabilities, you will have to integrate VMware Cloud on AWS with AWS Lambda. It will result in cost-efficiency, greater scalability and operational simplicity.

Best Practices for Application Containerization on VMware Cloud on AWS

Organizations must adhere to the best practices while adopting application containerization patterns within VMware Cloud. It will ensure reliability, optimal performance and security.

Container Security

Security risks are associated with containerized workloads. You need to implement strong security measures such as network segmentation, image scanning and access controls to minimize the risk level.

Resource Management

Make sure to optimize the resource utilization by monitoring performance metrics, right-sizing the containers and implementing auto-scaling policies. These policies adjust resource allocation according to the fluctuating workload demands.

High Availability

Make the application available by deploying the workloads across various availability zones present within VMware Cloud. Take help of the features such as VMware Site Recovery.

Automation and Orchestration

Make use of automation and orchestration tools including VMware vRealize Automation and Kubernetes Operators. They help in streamlining the scaling, deployment and management of containerized applications.

Conclusion

To modernize the legacy applications it is important to couple application containerization with VMware Cloud. Firstly, it accelerates cloud-native development and secondly it helps in achieving operational excellence. Enterprises can utilize VMware Cloud on AWS to its best extend by adopting containerization patterns tailored to specific requirements.

Use Case : Building a Record Management System with Messaging Facility on VMware Cloud on AWS (VMC) using Application Containerization Patterns

Introduction

In this section, we will talk about the process of building a record management system (hybrid) having messaging facility on VMware Cloud on AWS using application containerization patterns. There will be two containerized microservices. One will be responsible for managing records while the other for handling messaging functionalities. We will be performing the integration of VMware Cloud on AWS with Amazon Elastic Kubernetes Service for deploying and managing microservices.

Prerequisites

  • Access to a working AWS environment
  • Access to a VMC SDDC cluster that is being linked to an up and running AWS account
  • A VPC with L3 reachability to SDDC along with 2 public subnets
  • An EC2 Linux Bastion instance that is deployed in the same VPC

Step 1: Setting Up the Environment

1.1 Install Necessary Tools

  • Install “eksctl” for creating EKS clusters.
# install latest eksctl curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp sudo mv /tmp/eksctl /usr/local/bin 
  • Install “kubectl” having version 1.19
#install Kubectl (version 1.19) curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin 
  • Enable the Kubectl bash auto-completion option.
echo 'source <(kubectl completion bash)' >> ~/.bashrc 

1.2 Deploy and Prepare an Amazon EKS Managed Cluster

  • Create an EKS cluster with the help of eksctl.
eksctl create cluster --name my-cluster --region your-aws-region --nodegroup-name my-node-group --node-type t3.large --nodes 2 --vpc-public-subnets public-subnet-a-id,public-subnet-b-id --ssh-access --ssh-public-key your-ssh-pub-key --managed 
  • Verify cluster deployment.
eksctl get nodegroup --cluster my-cluster kubectl get nodes -o wide kubectl get pods --all-namespaces -o wide 

1.3 Optional Step: Install Kubernetes Metrics Server and Ingress Controller

  • Install Kubernetes Metrics Server.
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
  • Verify Metrics on Pods and nodes.
kubectl top nodes kubectl top pods --all-namespaces 
  • Install NGINX-based Kubernetes Ingress Controller.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.45.0/deploy/static/provider/aws/deploy.yaml 
  • Verify Ingress Controller deployment.
kubectl get pods -n ingress-nginx kubectl get svc -n ingress-nginx 

Step 2: Deploy PostgreSQL Database on a Linux VM (CentOS7/8) in VMC

2.1 Install PostgreSQL-12

  • Prepare a CentOS7/8 VM.
  • Execute the supplied bash script to install PostgreSQL-12.
chmod +x install-pgsql-centos7.sh ./install-pgsql-centos7.sh 

chmod +x install-pgsql-centos8.sh ./install-pgsql-centos8.sh

Step 3: Create DB Instance and Table for the Demo App

3.1 Set PostgreSQL Default Password

  • Set the PostgreSQL default password.
sudo su - postgres psql -c "alter user postgres with password 'your-postgres-default-password'" exit 

3.2 Create DB Instance

  • Use the initDB.sql script to create a DB instance.
psql -h postgres-vmc-ip -U postgres -f initDB.sql 

3.3 Create DB Table

  • Use the initTable.sql script to create a DB table.
psql -h postgres-vmc-ip -U vmcdba -d vmcdb -f initTable.sql 

Step 4: Deploy Microservices onto the EKS Cluster

4.1 Deploy the Record Management System Microservices

  • Create a Kubernetes namespace for the demo app.
kubectl create namespace record-management 
  • Update environment variables within the container spec.
  • Deploy the microservices.
kubectl apply -f record-management/ 

Verify pods and services.

kubectl get pods -n record-management kubectl get svc -n record-management 

Conclusion

If you have followed this guide correctly then it means you have successfully deployed a record management system having messaging facility on VMware Cloud using application containerization patterns. This setup ensures that efficient deployment along with management of containerized microservices is possible. Now it is up to you to customize your application further to meet other business requirements.