Containerize mainframe workloads that have been modernized by Blu Age
Created by Richard Milner-Watts (AWS)
Code repository: Blu Age Application Container Example | Environment: Production | Source: Mainframe workloads |
Target: Containers | R Type: Re-architect | Workload: IBM; All other workloads |
Technologies: Mainframe; Containers & microservices; Migration; Modernization | AWS services: Amazon ECS; Amazon ECR |
Summary
This pattern provides a sample container environment for running mainframe workloads that have been modernized by using the Blu Age
For more information about modernizing your workloads by using Blu Age and AWS services, see these AWS Prescriptive Guidance publications:
For assistance with using Blu Age to modernize your mainframe workloads, contact the Blu Age team by choosing Contact our experts on the Blu Age website
Prerequisites and limitations
Prerequisites
A modernized Java application that was created by Blu Age. For testing purposes, this pattern provides a sample Java application that you can use as a proof of concept.
A Docker
environment that you can use to build the container.
Limitations
Depending on the container orchestration platform that you use, the resources that can be made available to the container (such as CPU, RAM, and storage) might be limited. For example, if you’re using Amazon ECS with AWS Fargate, see the Amazon ECS documentation for limits and considerations.
Architecture
Source technology stack
Blu Age
Java
Target technology stack
Docker
Target architecture
The following diagram shows the architecture of the Blu Age application within a Docker container.
The entry point for the container is the wrapper script. This bash script is responsible for preparing the runtime environment for the Blu Age application and processing outputs.
Environment variables within the container are used to configure variables in the wrapper script, such as the Amazon Simple Storage Service (Amazon S3) bucket names and database credentials. Environment variables are supplied by either AWS Secrets Manager or Parameter Store, a capability of AWS Systems Manager. If you’re using Amazon ECS as your container orchestration service, you can also hardcode the environment variables in the Amazon ECS task definition.
The wrapper script is responsible for pulling any input files from the S3 bucket into the container before you run the Blu Age application. The AWS Command Line Interface (AWS CLI) is installed within the container. This provides a mechanism for accessing objects that are stored in Amazon S3 through the gateway virtual private cloud (VPC) endpoint.
The Java Archive (JAR) file for the Blu Age application might need to communicate with other data sources, such as Amazon Aurora.
After completion, the wrapper script delivers the resulting output files into an S3 bucket for further processing (for example, by Amazon CloudWatch logging services). The pattern also supports delivering zipped log files to Amazon S3, if you’re using an alternative to standard CloudWatch logging.
Tools
AWS services
Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service that’s secure, scalable, and reliable.
Amazon Elastic Container Service (Amazon ECS) is a fast and scalable container management service that helps you run, stop, and manage containers on a cluster.
Tools
Docker
is a software platform for building, testing, and deploying applications. Docker packages software into standardized units called containers , which have everything the software needs to run, including libraries, system tools, code, and runtime. You can use Docker to deploy and scale applications into any environment. Bash
is a command language interface (shell) for the GNU operating system. Java
is the programming language and development environment used in this pattern. Blu Age
is an AWS mainframe modernization tool that converts legacy mainframe workloads, including application code, dependencies, and infrastructure, into modern workloads for the cloud.
Code repository
The code for this pattern is available in the GitHub Blu Age sample container repository
Best practices
Externalize the variables for altering your application’s behavior by using environment variables. These variables enable the container orchestration solution to alter the runtime environment without rebuilding the container. This pattern includes examples of environment variables that can be useful for Blu Age applications.
Validate any application dependencies before you run your Blu Age application. For example, verify that the database is available and credentials are valid. Write tests in the wrapper script to verify dependencies, and fail early if they are not met.
Use verbose logging within the wrapper script. Interacting directly with a running container can be challenging, depending on the orchestration platform and how long the job takes. Make sure that useful output is written to
STDOUT
to help diagnose any issues. For example, output might include the contents of the application’s working directory both before and after you run the application.
Epics
Task | Description | Skills required |
---|---|---|
Option 1 - Work with Blu Age to obtain your application's JAR file. | The container in this pattern requires a Blu Age application. Alternatively, you can use the sample Java application that’s provided with this pattern for a prototype. Work with the Blu Age team to obtain a JAR file for your application that can be baked into the container. If the JAR file isn’t available, see the next task to use the sample application instead. | Cloud architect |
Option 2 - Build or use the supplied sample application JAR file. | This pattern provides a prebuilt sample JAR file. This file outputs the application’s environment variables to This file is named If you want to alter the code and build your own version of the JAR file, use the source code located at ./java_sample/src/sample_java_app.java | App developer |
Task | Description | Skills required |
---|---|---|
Clone the GitHub repository. | Clone the sample code repository by using the command:
| AWS DevOps |
Use Docker to build the container. | Use Docker to build the container before you push it to a Docker registry such as Amazon ECR:
| AWS DevOps |
Test the Blu Age container. | (Optional) If necessary, test the container locally by using the command:
| AWS DevOps |
Authenticate to your Docker repository. | If you plan to use Amazon ECR, follow the instructions in the Amazon ECR documentation to install and configure the AWS CLI and authenticate the Docker CLI to your default registry. We recommend that you use the get-login-password command Note: The Amazon ECR console
If you don’t plan to use Amazon ECR, follow the instructions provided for your container registry system. | AWS DevOps |
Create a container repository. | Create a repository in Amazon ECR. For instructions, see the pattern Deploy an environment for containerized Blu Age applications by using Terraform. If you’re using another container registry system, follow the instructions provided for that system. | AWS DevOps |
Tag and push your container to the target repository. | If you're using Amazon ECR:
For more information, see Pushing a Docker image in the Amazon ECR User Guide. | AWS DevOps |
Related resources
AWS resources
Additional resources