Skip to content

Files

Latest commit

 

History

History
82 lines (52 loc) · 3.38 KB

File metadata and controls

82 lines (52 loc) · 3.38 KB

Getting started

In order to deploy the solution in your AWS Account make sure that your build environment has the following tools installed:

Init

After the required tools are installed correctly, run the following from the repo root folder and make sure to have Docker running on your machine:

$ pnpm install

Before running the build, make sure you're logged into the Amazon ECR Public Gallery, which is where the base container image is hosted:

aws ecr-public get-login-password --region us-east-1 --profile [profile] | docker login --username AWS --password-stdin public.ecr.aws

note: change the [profile] with the one configured in your machine

then build the project:

$ pnpm run build:all

Configure

The application has a set of default settings that can be changed before deploying it into your AWS Account. Navigate to the ./src/utils//default-settings.ts to apply the changes you'd like before deploying it.

Cross Platform Images

This asset automatically build the Optimization Engine's docker image using arm64 architecture so that can be executed on Graviton. If you aren't running your script from a arm64 machine, you need to make sure that you can build cross-platform images.

check the available buildx platforms:

docker buildx ls

in case linux/arm64 is NOT present, you can install it (if you're not using Docker desktop):

docker run --privileged --rm tonistiigi/binfmt --install all

eventually, make sure that linux/arm64 is present in docker buildx:

docker buildx ls

more information can be found in the Docker's Multi-platform images documentation page.

Deploy

to deploy the project, move into the packages/infra-app folder (where this README is located) and run the following commands:

[Optional]: If you haven't done the CDK bootstrapping of your AWS Account yet, run the following commands (needed only once, in the region where you want to deploy it):

pnpm pdk bootstrap --profile [profile]

note: change the [profile] with the one configured in your machine

then deploy it with:

pnpm pdk deploy --parameters AdminUserEmail=admin@an-email-domain.com --parameters AdminUserName=admin --profile [profile]

note: change the [profile] with the one configured in your machine, and the values of AdminUserEmail and AdminUserName. You can append --require-approval=never to avoid providing approval

once deployed, you will receive an email to the specified account with the password to use to access the Web UI