Install and initialize App2Container - Replatform .NET Applications with Windows Containers

This whitepaper is for historical reference only. Some content might be outdated and some links might not be available.

Install and initialize App2Container

Now that you have set up your environment for replatforming, you will install and initialize App2Container on your worker machine. App2Container can be run locally on the same machine as the application, or it can be run remotely from a separate machine. This walkthrough uses the latter approach, using App2Container’s remote functionality.

To install and initialize App2Container on your worker machine:

  1. On the worker machine, open a web browser and download the AWSApp2Container Windows installer to your server.

  2. The installer file is saved to the Downloads folder. Navigate to the Downloads folder and extract the AWSApp2Container-installer-windows.zip file.

  3. Run the install.ps1 PowerShell script and enter R when prompted by the command output. Then press y to accept the terms and conditions.

    install.ps1 PowerShell script

    install.ps1 PowerShell script

    Now you will perform the one-time initialization command for App2Container. This interactive command prompts for the information required to set up the App2Container environment.

  4. Go to Amazon S3 in the AWS Management Console and create an S3 bucket where App2Container will store artifacts during the containerization process. Enter a unique name for your bucket.

    Screen showing Create bucket dialog

    Create bucket dialog box

  5. On your worker machine, run the following command.

    app2container init
    Screen showing running the app2container init command

    Run the app2container init command

    Table 5 — App2Container PowerShell initialization parameter description

    Parameter Value
    Workspace directory path Leave default (C:\Users\Administrator\AppData\Local\app2container)
    AWS profile Y (Contains information needed to run App2Container)
    S3 bucket Enter the S3 bucket name that you created in the previous step (such as app2container-demo-artifacts-july-2021)
    AWS Region us-west-2 (default)
    Permission to collect metrics Leave default (allow App2Container to collect information about the host operating system, app type, and the commands run)
    Enforce signed images Leave default (optionally require that images are signed using Docker Content Trust)
  6. Now you need to give App2Container the information it needs to access your web server instance. You do this by running the following command and providing the following information in the command prompts.

    app2container remote configure

    Table 6 — App2Container web server access parameters

    Parameter Value
    Server IP address Web server Private IPv4 address (found at the EC2 > Source-NET-Webserver > Details > Private IPv4 Address)
    Server FQDN Leave blank
    Secret ARN ARN for the secret you created in AWS Secret Manager
    Continue to another server? n
    Screen showing configuring App2Container for remote access to IIS web server.

    Configuring App2Container for remote access to IIS web server

This concludes the prerequisite steps to run App2Container on your worker machine. In the next section, you will use App2Container to discover, analyze, and containerize the MvcMusicStore application that is running on the web server instance without directly touching the application server.