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:
-
On the worker machine, open a web browser and download the AWSApp2Container Windows installer to your server
. -
The installer file is saved to the Downloads folder. Navigate to the Downloads folder and extract the
AWSApp2Container-installer-windows.zip
file. -
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 scriptNow you will perform the one-time initialization command for App2Container. This interactive command prompts for the information required to set up the App2Container environment.
-
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.
Create bucket dialog box
-
On your worker machine, run the following command.
app2container init
Run the
app2container init
commandTable 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) -
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 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.