Containerize and migrate - AWS Prescriptive Guidance

Containerize and migrate

If the application server meets all the prerequisites and can run all the AWS App2Container (A2C) tasks, follow the instructions in the App2Container documentation.

If the application server can’t run all the App2Container tasks, use a worker machine. Split the App2Container tasks between the application server and the worker machine.

On the application server, you install and initialize App2Container. Then you analyze the Java applications that are running on the application server. The analysis generates the analysis.json file. Then generate the archive and upload it to an Amazon Simple Storage Service (Amazon S3) bucket or manually copy the archive to the worker machine.

On the worker machine, containerize the application to generate a Docker image. Based on the application type, App2Container takes a conservative approach, known as process mode, to identify dependencies. In process mode, all nonsystem files on the application server are included in the container image. In such cases, it is possible that a large image is generated. Then deploy the application to Amazon ECS or Amazon EKS. During containerization, a deployment.json file is created, which is then used by the generate-app-deployment command.

For more information on splitting the tasks between the application server and a worker machine, see the App2Container documentation.

If the application server can only be accessed remotely, run App2Container tasks from a worker machine using remote commands. For more information, see the Migrate on-premises Java applications to AWS using AWS App2Container pattern.

Solution architecture

The following diagram shows the process and an example architecture for containerizing Java applications using App2Container:

  1. On the application servers, set up prerequisites, install App2Container, discover applications, and extract applications.

  2. On the worker machine, set up prerequisites, install App2Container, copy extracted applications to the worker machine, containerize, generate deployment, deploy the AWS CloudFormation template and the CI/CD pipeline.

  3. App2Container uploads the image to Amazon Elastic Container Registry (Amazon ECR), provisions Amazon ECS, and provisions the pipeline.

  4. AWS CodePipeline pulls the code from AWS CodeCommit.

    Notice

    AWS CodeCommit is no longer available to new customers. Existing customers of AWS CodeCommit can continue to use the service as normal. Learn more

  5. CodePipeline pushes the code to AWS CodeBuild.

  6. The CI/CD pipeline pushes the Docker images to Amazon ECR.

Diagram of the data center and the CI/CD pipeline and VPC in the AWS Cloud.