AWS App2Container (A2C) - Overview.
Scope:
- Intro,
- Key Features,
- Supported Application Types,
- How AWS App2Container Works,
- Architecture,
- Output Artifacts,
- Deployment Targets,
- Benefits,
- Sample Use Case for A company with a legacy Java app running on EC2.
- Prerequisite & step-by-step commands to help use AWS App2Container (A2C) containerize twtech application.
Intro:
- AWS App2Container (A2C) is a command-line tool that helps twtech modernize legacy applications by containerizing existing applications running on virtual machines (VMs...whether it's on-premises or an EC2 VM.) or bare metal servers without requiring code changes.
Key Features
|
Feature |
Description |
|
Automated Containerization. |
Automatically identifies
application artifacts and dependencies. |
|
Supports Multiple Platforms. |
Works with Java and .NET
(Windows/Linux) applications. |
|
Generates Docker Artifacts. |
Produces Dockerfiles and container
images. |
|
Infrastructure-as-Code Output. |
Generates ECS, EKS, and App Runner
deployment artifacts. |
|
Integration with AWS Services. |
Integrated with AWS CodeBuild,
ECS, EKS, and App Runner. |
Supported Application
Types
- Java Applications:
- Standalone JARs
- Spring Boot
- Tomcat-based applications
- .NET Applications:
- .NET Framework (Windows only)
- .NET Core (Windows/Linux)
How AWS App2Container
Works
- Install A2C CLI
on the VM or server hosting the application.
- Inventory and Analyze
the application.
- Containerize:
- A2C creates a Dockerfile,
- container image,
- ECS/EKS/App Runner artifacts.
- Deploy:
- Deploy the container image to:
- ECS,
- EKS,
- App Runner using generated IaC templates.
Output Artifacts
- Dockerfile
- ECS Task Definition / EKS Kubernetes YAML / App Runner
config
- CloudFormation templates
- Container image (built locally or with CodeBuild)
Deployment Targets
|
Service |
Use Case |
|
Amazon ECS. |
Simple container orchestration |
|
Amazon EKS. |
Kubernetes-based orchestration |
|
App Runner. |
Serverless container deployments |
Benefits
- Speeds up container adoption.
- Reduces migration effort.
- Maintains application behavior.
- Simplifies deployment on AWS container services.
Sample Use Case for A company with a legacy Java app running on EC2:
- Installs A2C on the EC2 instance.
- Runs A2C to detect and containerize the app.
- Deploys it to ECS using generated CloudFormation
templates.
NB:
- step-by-step commands to help use AWS App2Container (A2C) containerize twtech application.
Prerequisites:
- EC2 instance or on-premise VM where twtech app is running.
- AWS CLI configured (aws configure)
- Admin privileges on the host
- Docker installed
- App2Container installed.
Step 1: Install App2Container
- twtech Downloads and install A2C on the application server: Linux instance
# bash
curl -O
https://d1.awsstatic.com/managed-files/AWS-App2Container-Installer.zip
unzip
AWS-App2Container-Installer.zip
sudo
./install.sh
- twtech Downloads and install A2C on the application server: Windows (PowerShell)
# powershell
Invoke-WebRequest
-Uri https://d1.awsstatic.com/managed-files/AWS-App2Container-Installer.zip
-OutFile A2C.zip
Expand-Archive
-Path A2C.zip -DestinationPath .
.\install.ps1
Step 2: Initialize A2C: twtech Initializes A2C to set up the workspace
# bash
app2container
init
# twtech will be prompted to
configure:
- Application artifact storage (e.g., twtech-S3-bucket)
- AWS Region (us-east-2)
- Container registry (ECR)
- IAM roles or profiles (ec2:assumeRule)
Step 3: Inventory the Running Applications: twtech Scan for running apps on the instance
# bash
app2container
inventory
NB:
- This returns a list of detected applications with an application-id.
Step 4: Analyze the Application: twtech Chooses an application ID from the inventory and analyze it
# bash
app2container
analyze --application-id app-id
This gathers dependencies, open
ports, and startup processes.
Step 5: Containerize the Application: twtech Generates Dockerfile, ECS/EKS/App Runner artifacts, and optionally build image:
# bash
app2container
containerize --application-id
app-id
twtech will get:
- Dockerfile
- Deployment YAML/JSON
- Image (if built locally)
Step 6:
- Deploy the Container (Optional), twtech deploys the application using one of the provided CloudFormation templates:To ECS
# bash
app2container
generate app-deployment --application-id app-id --deploy ECS
- Deploy the Container (Optional), twtech deploys the application using one of the provided CloudFormation templates:To EKS
# bash
app2container
generate app-deployment --application-id app-id --deploy EKS
- Deploy the Container (Optional), twtech deploys the application using one of the provided CloudFormation templates:To App Runner (only for web apps)
# bash
app2container
generate app-deployment --application-id app-id --deploy apprunner
- Then, twtech uses the generated CloudFormation template to deploy:
# bash
aws
cloudformation deploy --template-file twtech-a2c-template.yaml --stack-name
twtech-app-stack
After Deployment
- twtech application is now running in a container.
- Logs, health checks, and scaling are managed by the target AWS service.
No comments:
Post a Comment