Tutorial: Managed Runtime for Micro Focus - Mainframe Modernization

Tutorial: Managed Runtime for Micro Focus

This tutorial shows how to deploy and run the BankDemo sample application in a AWS Mainframe Modernization managed runtime environment with the Micro Focus runtime engine.

Prerequisites

Before you start the tutorial, make sure you complete the following prerequisites:

Create and configure an AWS Key Management Service key and AWS Secrets Manager secret

An AWS KMS key is required in order to create a secret in Secrets Manager. Follow these steps to securely store the credentials for the Amazon RDS database instance you created for this tutorial. For more information, see Prerequisites.

  1. To create the key, follow the steps in Creating keys in the AWS Key Management Service Developer Guide. You will need to update the key policy to grant Mainframe Modernization decrypt permissions. To add these permissions, add the following policy statements:

    { "Effect" : "Allow", "Principal" : { "Service" : "m2.amazonaws.com" }, "Action" : "kms:Decrypt", "Resource" : "*" }
  2. To store the database credentials as a secret in Secrets Manager, follow the steps in Create a secret in the AWS Secrets Manager User Guide. You will specify the key you created in the previous steps for the encryption key.

  3. During the key creation process, choose Resource permissions - optional, then choose Edit permissions. In the editor, add a resource-based policy, such as the following, to retrieve the content of the encrypted fields.

    { "Effect" : "Allow", "Principal" : { "Service" : "m2.amazonaws.com" }, "Action" : "secretsmanager:GetSecretValue", "Resource" : "*" }
  4. Choose Save.

Step 1: Create a runtime environment

  1. Open the Mainframe Modernization console.

    
                        Modernize mainframe applications with replatform with the replatform pattern 
                            selected.
  2. In Modernize mainframe applications, choose Replatform with Micro Focus, then choose Get started.

  3. On the Get started page, under How would you like to start with AWS Mainframe Modernization?, choose Deploy and Create runtime environment, and then choose Continue.

    
                        How would you like to start AWS Mainframe Modernization with deploy
                            and create runtime environment selected.
  4. Specify a name and optional description for the runtime environment. You can also specify tags, which are optional, and choose Next.

    
                        The runtime environment name and description section .
  5. Under Availability, choose High availability cluster. Under Resources, choose either M2.c5.large or M2.m5.large for the instance type and the number of instances (up to two) that you want. Make sure you choose at least two subnets, and choose Allow applications deployed to this environment to be publicly accessible. Then choose Next.

    
                        The specify configurations page with high availability selected. The M2.m5.large instance type is also selected.
  6. On the Attach storage page, optionally specify either an Amazon EFS or Amazon FSx file system. You can specify one file system of each type. Then choose Next.

    
                        The optional attach storage page with an Amazon EFS file system specified.
  7. On the Review and create page, review all the configurations you provided for the runtime environment and choose Create Environment.

    
                        The review and create page showing the previous selections.
  8. Wait until environment creation succeeds and the status changes to Available. It might take up to two minutes.

    
                        The environment created successfully message.

Step 2: Create an application

  1. In the navigation pane, choose Applications. Then choose Create application.

    
                        The applications page with the Create application shown.
  2. On the Specify basic information page, specify the application name and an optional description. You can also provide optional tagging information. Then choose Next.

    
                        The create applications page with the Micro Focus engine type
                            selected.
  3. On the Specify resources and configurations page, choose whether you want to specify the application definition using the inline editor or provide an Amazon S3 bucket where the application definition file is stored. Either type the application definition or provide the Amazon S3 location. Then choose Next.

    
                        The specify resources and configurations page with a JSON file displayed in the online editor.

    You can use the following sample application definition file. Make sure to replace $SECRET_ARN, $S3_BUCKET, and $S3_PREFIX with the correct values for you.

    { "resources": [ { "resource-type": "vsam-config", "resource-id": "vsam-1", "properties": { "secret-manager-arn": "$SECRET_ARN" } }, { "resource-type": "cics-resource-definition", "resource-id": "resource-definition-1", "properties": { "file-location": "${s3-source}/RDEF", "system-initialization-table": "BNKCICV" } }, { "resource-type": "cics-transaction", "resource-id": "transaction-1", "properties": { "file-location": "${s3-source}/transaction" } }, { "resource-type": "mf-listener", "resource-id": "listener-1", "properties": { "port": 6000, "conversation-type": "tn3270" } }, { "resource-type": "xa-resource", "resource-id": "xa-resource-1", "properties": { "name": "XASQL", "module": "${s3-source}/xa/ESPGSQLXA64.so", "secret-manager-arn": "$SECRET_ARN" } }, { "resource-type": "jes-initiator", "resource-id": "jes-initiator-1", "properties": { "initiator-class": "A", "description": "initiator...." } }, { "resource-type": "jcl-job", "resource-id": "jcl-job-1", "properties": { "file-location": "${s3-source}/jcl" } } ], "source-locations": [ { "source-id": "s3-source", "source-type": "s3", "properties": { "s3-bucket": "$S3_BUCKET", "s3-key-prefix": "$S3_PREFIX" } } ] }
    Note

    This file is subject to change.

  4. On the Review and create page, review the information you provided and choose Create application.

    
                        The Review and create page showing the previous selections.
  5. Wait until the application creation operation succeeds and the status changes to Available.

    
                        The Application created successfully message.

Step 3: Deploy an application

  1. In the navigation pane, choose Applications, then choose BankDemo. Choose Actions, then choose Deploy application.

    
                        The BankDemo application details page with Deploy application selected on the Actions menu.
  2. Choose the Tutorial environment and then choose Deploy.

    
                        The Deploy Application page with the Tutorial environment selected.
  3. Wait until the BankDemo application deployment succeeds and the status changes to Ready.

    
                        The applications page showing the Ready status.

Step 4: Import data sets

  1. In the navigation pane, choose Applications, then choose BankDemo. Choose the Data sets tab. Then choose Import. You can either specify the data set configuration values individually using the console, or provide the location of an Amazon S3 bucket that contains a data set configuration JSON file.

    
                        The Import data set page with specify the data set configuration values separately selected.
  2. Choose Add new item to add each data set and choose Submit after you provide the information for each data set.

    The following table lists the data sets that you need to import. Replace $S3_DATASET_PREFIX with your Amazon S3 bucket that contains the catalog data. For example, S3_DATASET_PREFIX=s3://m2-tutorial/catalog.

    Name Location External Amazon S3 location

    MFI01V.MFIDEMO.BNKACC

    sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKACC.DAT?folder=/DATA

    $S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKACC.DAT

    MFI01V.MFIDEMO.BNKATYPE

    sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKATYPE.DAT?folder=/DATA

    $S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKATYPE.DAT

    MFI01V.MFIDEMO.BNKCUST

    sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKCUST.DAT?folder=/DATA

    $S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKCUST.DAT

    MFI01V.MFIDEMO.BNKHELP

    sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKHELP.DAT?folder=/DATA

    $S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKHELP.DAT

    MFI01V.MFIDEMO.BNKTXN

    sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKTXN.DAT?folder=/DATA

    $S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKTXN.DAT

    Alternatively, you can specify the data set configuration in a JSON file, such as the following. This file shows all the required data sets. Replace $S3_DATASET_PREFIX with your Amazon S3 bucket that contains the catalog data. For example, m2-tutorial/catalog.

    { "dataSets": [{ "dataSet": { "location": "sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKACC.DAT?folder=/DATA", "name": "MFI01V.MFIDEMO.BNKACC" }, "externalLocation": { "s3Location": "$S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKACC.DAT" } }, { "dataSet": { "location": "sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKATYPE.DAT?folder=/DATA", "name": "MFI01V.MFIDEMO.BNKATYPE" }, "externalLocation": { "s3Location": "$S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKATYPE.DAT" } }, { "dataSet": { "location": "sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKCUST.DAT?folder=/DATA", "name": "MFI01V.MFIDEMO.BNKCUST" }, "externalLocation": { "s3Location": "$S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKCUST.DAT" } }, { "dataSet": { "location": "sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKHELP.DAT?folder=/DATA", "name": "MFI01V.MFIDEMO.BNKHELP" }, "externalLocation": { "s3Location": "$S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKHELP.DAT" } }, { "dataSet": { "location": "sql://ESPACDatabase/VSAM/MFI01V.MFIDEMO.BNKTXN.DAT?folder=/DATA", "name": "MFI01V.MFIDEMO.BNKTXN" }, "externalLocation": { "s3Location": "$S3_DATASET_PREFIX/data/MFI01V.MFIDEMO.BNKTXN.DAT" } } ] }
  3. Wait until the data set import process completes, the status changes to Completed, and there are zero failed records.

    
                        The BankDemo application page with the Data sets tab selected and the completed status displayed.

Step 5: Start an application

  1. In the navigation pane, choose Applications, then choose BankDemo. Choose Actions, then choose Start application.

    
                        The BankDemo application page with the Definition tab selected and Start application selected on the Actions menu.
  2. Wait until the BankDemo application starts successfully and the status changes to Running.

    
                        The Application start succeeded message.

Step 6: Connect to the BankDemo sample application

Before you connect, make sure that the VPC and security group specified are the same as the ones applied to your network interface. Also, you will need to get the DNS hostname of the network interface to configure the TN3270 connection.

To locate the DNS hostname for configuration, complete the following steps:

  1. Open the Mainframe Modernization console and choose Applications.

  2. Choose the application you are using and display the details page.

  3. Note the string of characters under DNS Hostname.

    
                        The BankDemo application page with the Definition tab selected and the ARN and DNS Hostname fields shown.
Note

To ensure that your connection is not silently dropped by the Network Load Balancer, configure the keepalive setting on your TN3270 terminal to at least 180 seconds.

Continue with connecting to the BankDemo sample application, as follows:

  1. Start the terminal emulator you want. This tutorial uses Micro Focus Rumba+.

    
                        The terminal emulator welcome screen.
  2. Choose Connection, then Configure, then TN3270.

    
                        The Connection menu with the Configure option selected.

    Choose Insert to add the DNS hostname address you noted earlier, and specify 6000 for the Telnet Port.

    
                        The Session Configuration page with the DNS hostname added.
  3. Enter the BANK transaction name.

    
                        The terminal emulator screen with the BANK transaction name entered.
  4. Type B0001 for the username and A for the password.

    
                        The sample application login screen with B0001 entered for the username.
  5. After you log in successfully, you can navigate through the BankDemo application.

    
                        The BankDemo application main screen.
    
                        The BankDemo application account balance screen.

Clean up resources

If you no longer need the resources you created for this tutorial, delete them so that you won't continue to be charged for them. Complete the following steps:

Next steps

If you would like to continue learning, you can explore the following tutorials: