First‐Time Setup for Deployment - SWU-Karabast/forceteki-infra GitHub Wiki

This guide explains how to set up your environment and tools for deploying updates to Karabast.

AWS Access

You must have admin access on the AWS account to be able to do these operations. Reach out to the project leads for details.

Tools Installation

Install the following tools on your system:

  • Node and npm utility
  • Docker, typically via Docker Desktop on Windows
  • AWS CLI
  • CDK CLI: npm install -g aws-cdk to install it globally
  • Some version of Python 3.x for running the image download and conversion scripts

Repos

Clone the forceteki, forceteki-infra, and forceteki-client repos.

IMPORTANT: the repos must be in the same folder and the forceteki repo must be in a folder named "forceteki" so that the tools in the infra repo can find it.

Run npm install in both repos if setting up for the first time.

Enable SSO

For security, we use single-sign-on (SSO) for the AWS CLI. This means that you must regularly log in with the aws command line tool before doing operations. To configure this on your local machine, use the following steps:

  1. Open our IAM Identity Center resource. There is information in the "Settings Summary" pane that you will need in the next step.

  2. Follow the instructions at this link under "Configure your profile with the aws configure sso wizard", getting the region and start URL values from #1 above: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html#cli-configure-sso-configure

Testing and Timing CDK

Use the following steps to get basic confirmation that the infra repo is working.

  1. Open a terminal in the forceteki-infra repo
  2. Run aws sso login. You should be directed to a browser page that will log you in.
  3. If you have run any previous CDK operations in the infra repo, delete the cdk.out folder if it exists
  4. Run cdk synthesize ForcetekiInfraStack in the infra repo. This operation can take quite a long time (10 - 20 minutes). Take note of roughly how long it runs for so you can be aware of what to expect for a real deployment.