Set up the SimSpace Weaver distribution package for Amazon Linux 2 (AL2) in Windows Subsystem for Linux (WSL)
This section provides instructions for setting up your SimSpace Weaver distribution zip with an AL2 environment in Windows Subsystem for Linux (WSL). For instructions to set up AL2 in Docker, see Set up the SimSpace Weaver distribution package for Amazon Linux 2 (AL2) in Docker.
Important
This section describes a solution that uses a version of AL2 that is not owned, developed, or supported by Amazon. This solution is provided for your convenience only, if you choose not to use Docker. Amazon and AWS assume no liability if you choose to use this solution.
Requirements
-
Third-party open source AL2 distribution for WSL (download version 2.0.20200722.0-update.2
) (see the instructions ) Important
Our WSL instructions use the 2.0.20200722.0-update.2
version of the AL2 distribution for WSL. You might experience errors if you use any other version.
To set up the SimSpace Weaver distibution zip with AL2 in WSL
-
At a Windows command prompt, start your AL2 environment in WSL.
wsl -d Amazon2
Important
While you are running in WSL, include the
--al2
option when running one of thequick-start.py
Python helper scripts located atsdky-folder/Samples/sample-name/tools/cloud/quick-start.py
. -
At a Linux shell prompt, update your yum package manager.
yum update -y
Important
If this step times-out, you might need to switch to WSL1 and retry these procedures. Exit your WSL AL2 session and enter the following at your Windows command prompt:
wsl --set-version Amazon2 1
-
Install the unzip tool.
yum install -y unzip
-
Remove any AWS CLI that
yum
installed. Try both of the following commands if you are unsure ifyum
installed an AWS CLI.yum remove awscli
yum remove aws-cli
-
Make a temporary directory and go to it.
mkdir ~/temp cd ~/temp
-
Download and install the AWS CLI:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip ./aws/install
-
You can remove the temporary directory.
cd ~ rm -rf temp
-
Restart the shell session to update the path in the environment.
exec
-
Configure your AWS credentials for the AWS CLI in your AL2 environment. For more information, see Configuring the AWS CLI. If you use AWS IAM Identity Center, see Configuring the AWS CLI to use AWS IAM Identity Center in the AWS Command Line Interface User Guide.
aws configure
-
Install Git.
yum install -y git
-
Install
wget
.yum install -y wget
-
Create a folder for the SimSpace Weaver app SDK.
mkdir
sdk-folder
-
Go to your SDK folder.
cd
sdk-folder
-
Download the SimSpace Weaver app SDK distributable package. It contains the following:
-
Binaries and libraries for SimSpace Weaver app development
-
Helper scripts that automate parts of the development workflow
-
Sample applications that demonstrate SimSpace Weaver concepts
wget https://artifacts.simspaceweaver.us-east-2.amazonaws.com/latest/SimSpaceWeaverAppSdkDistributable.zip
-
-
Unzip the file.
unzip *.zip
-
Run the WSL setup script.
source ./setup-wsl-distro.sh
-
Enter the following command to install the required Python packages:
pip install -r PackagingTools/python_requirements.txt
-
Run the SimSpace Weaver distribution zip setup script:
python setup.py --samples --cloudformation
This command does the following:
-
Creates the CloudFormation resources required to launch a simulation.
-
The sample CloudFormation stack template can be found in
sdk-folder
/PackagingTools/sample-stack-template.yaml
-
-
Configures the provided sample projects with the correct paths for your local system.
-
Note
You only need to do this one time for your AL2 environment in WSL.