Voiced by Amazon Polly |
About the Blog
In this blog, we are going to have a brief overview of the App2Container CLI tool. This tool makes it easy to modernize, migrate and containerize legacy applications running on on-premises and virtualization machines. This blog is intended for Developers, DevOps engineers, Kubernetes administrators, and Cloud administrators. Prior knowledge of Java and .Net based applications, Docker and Kubernetes, and AWS CLI would help understand the contents of this blog.
Customized Cloud Solutions to Drive your Business Success
- Cloud Migration
- Devops
- AIML & IoT
Introduction to Application Modernization
Modernization is the new buzzword among organizations that are running legacy monolithic applications in a virtualized on-premises environment or on physical servers.
What is Modernization?
Modernization is the process of revamping & transitioning an organization’s infrastructure, processes, people, data management, and more important applications to newer ways by adopting a framework that addresses their business challenges like scaling, availability, quicker application release time, broader customer outreach, lesser overhead in maintenance, security, and cost optimization. Modernization makes it agile to manage applications written in different language stacks spread over different environments.
In keeping pace with this modernization bandwagon, AWS offers multiple services to help organizations in their Modernization journey. The below image gives an idea of the various areas in which AWS offers services that aid in app modernization. Containerization related services like AWS ECS, AWS Fargate, AWS EKS, AWS App2Container, and AWS AppRunner allow for the seamless deployment of applications onto AWS.
Image Source: https://stelligent.com/2019/03/07/app-modernization-on-aws-powered-by-devops/
Some advantages of converting monolithic legacy applications into containers are: they become portable, and hence they can be run anywhere by developers, who no longer need to set up complex environments with the required dependencies, thereby increasing their productivity. They can be integrated with CI/CD tools which allow for automation and standardization of the entire Software Development Lifecycle.
How App2Container helps in Modernization?
App2Container (A2C) is a CLI tool that was introduced by AWS on Jul 1, 2020, to help in modernizing and migrating Java and .Net based applications from on-premises to the AWS cloud. Among the 6’s Rs of Cloud Migration, A2C helps in “Life & Shift” or “Rehost” applications running on Physical or Virtual servers on-premises with little or no code change required.
The application code along with the dependencies, runtime environments, and artifacts are packaged into container images that can be deployed on other AWS services like EKS, ECS, and App Runner through AWS native CI/CD tools like Code Suit or Opensource tools like Jenkins.
Features of App2Container tool
Below are some key features of the App2Container utility:
- A2C makes an inventory listing of all the applications running on on-premises VMs. An admin needs just to select all the applications that need to be modernized, and A2C will take care of packaging the application into a portable container image.
- Before the inventory is made, A2C creates a detailed mapping of the application runtime dependencies, cooperating processes, and the port on which it will be exposed on. It identifies and allows for updating the various dependencies to newer versions.
- This tool extracts the application artifacts required for creating a Dockerfile and initiates the builds for the application container.
- App2container can be integrated to work with existing or new CI/CD pipelines using AWS services or third-party services.
- Applications running on different OS flavors of Linux or windows servers with web servers based on Java or .Net framework are supported by App2Container.
- Infrastructure provisioning is automated with CloudFormation templates working underneath for A2C to deploy the required services on AWS for application hosting.
- AWS Secrets Manager is used by A2C to manage application server connectivity to worker nodes on AWS which is encrypted to ensure security.
Prerequisites before installing A2C
- Application Server pre-requisites:
- Check for Supported OS for the Application
- Java (Tomcat, TomEE, JBoss) or ASP.Net (.Net Core 3.1, 6, 50 running on Linux (Ubuntu, CentOS, RHEL, Amazon Linux)
- Net application running on IIS on Windows Server 2016, Windows Server 2019, or Windows Server Core 2004
- Application Server pre-requisites:
- 20 GB Hard disk space
- Root Access
- tar utility to unzip files
- AWS pre-requisites:
- IAM roles, policies, and permissions relevant to where the application will be deployed (EKS, ECS, Fargate, AppRunner)
- Access and Secret access key to run aws configure using AWS CLI
- SSH enabled on Linux worker nodes (optional)/ WinRM for windows nodes
- AWS CLI / Windows PowerShell
- Docker RE
Steps for Installation and Setup of App2Container
Steps to setup App2Container on your Application Server:
- Set up your servers: ensure your application environment meets all of the requirements listed for your operating system (OS) under prerequisites.
- IAM Permissions & AWS CLI: Grant permissions to run AWS App2Container commands and configure your AWS profile using AWS CLI so that the tool can access AWS resources for containerization and deployment.
- Install Docker Engine: App2Container uses the Docker engine (Docker CE) to create container images and generate Dockerfiles that run the containers hosted on Amazon ECS, Amazon EKS, or AWS App Runner.
- Install App2Container: We are only focusing on Linux based application containerization below. For windows-based applications refer to the document below in FAQs.
- Use curl or browser to download the tar file onto the Linux based application server
1 2 3 |
$ curl -o AWSApp2Container-installer-linux.tar.gz https://app2container-release-us-east-1.s3.us-east-1.amazonaws.com/latest/linux/AWSApp2Container-installer-linux.tar.gz (or) download on the browser using the URL: https://app2container-release-us-east-1.s3.us-east-1.amazonaws.com/latest/linux/AWSApp2Container-installer-linux.tar.gz |
2. Extract the package to a local folder on the server.
1 |
$ sudo tar xvf AWSApp2Container-installer-linux.tar.gz |
3. Run the install script that you extracted from the package and follow the prompts.
1 |
$ sudo ./install.s |
- Initialize app2Container:
1 |
$ sudo app2container init |
- Create an Inventory and Analyze the application:
1 2 |
$ sudo app2container inventory $ sudo app2container analyze --application-id java-app-id |
- Transform the application into a container image:
1 |
$ sudo app2container containerize --application-id java-app-id |
- Deploy your application
1 |
$ sudo app2container generate app-deployment --application-id java-app-id |
When you run the generate app-deployment command, App2Container validates the properties in the deployment.json file and pushes the container image to Amazon ECR. The command generates a CloudFormation template (eks-master.yml) that creates an EKS cluster, pulls your application container images from Amazon ECR, and deploys your application to the cluster. It also generates Kubernetes manifests (eks_deployment.yaml, eks_service.yaml, and eks_ingress.yaml), for post-deployment customizations using a tool such as kubectl.
Conclusion
To implement application modernization with App2Container, a good understanding of Java and .Net framework is required along with some knowledge of AWS CLI, AWS container services, and docker. App2Container takes away the burden of containerizing applications, infrastructure provisioning, and automated deployments without access to source code. App2Container can be combined with other AWS services to make the entire Application Modernization roadmap for the organizations easily achievable.
Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.
- Cloud Training
- Customized Training
- Experiential Learning
About CloudThat
CloudThat is also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.
Drop a query if you have any questions regarding Ansible tool and I will get back to you quickly.
To get started, go through our Consultancy page and Managed Services Package that is CloudThat’s offerings.
FAQs
1. How is the App2Container pricing calculated?
ANS: – App2Container is offered at no additional charge. You are charged only when you use other AWS services to run your containerized application, such as Amazon ECR, Amazon ECS, Amazon EKS, and AWS App Runner.
2. What are the tasks that App2Container can carry out on AWS?
ANS: – When you initialize A2C with AWS credentials, it allows A2C to do the following things:
- Store artifacts in Amazon S3, if you configured it to do so.
- Create and deploy application containers using AWS services such as Amazon ECS, Amazon EKS, and AWS App Runner.
- Create CI/CD pipelines using AWS Code Pipeline.
3. Where can I find more details on how to manage and use App2Container?
ANS: – Reference link: AWS App2Container – User Guide (amazon.com)
WRITTEN BY Saritha Nagaraju
Saritha is a Subject Matter Expert - Kubernetes working as a lead at CloudThat. She has relentlessly kept upskilling with the latest trending technologies and delivering the best cloud-native solutions to Businesses in all sectors. She is a Microsoft Certified Solution Architect, Certified Windows Server Administrator, and Windows Networking professional and strives towards providing the best cloud experience to our customers through transparent communication, methodical approach, and diligence.
Click to Comment