Skip to content

Deployment From a Local Machine

If you want to deploy the Central CDN from your local machine (MacOS or Linux) - e.g. for development or testing purposes -, have a look at the prerequisites and run the pnpm cli deploy script as described below.

Prerequisites

Deploying an environment

# Set your AWS credentials for the CDN's AWS account
# You can get them from here: https://statista.awsapps.com/start#/ and click on 'Command line or programmatic access'.
# Copy them and paste into terminal.
export AWS_ACCESS_KEY_ID="xxxxxxxxx"
export AWS_SECRET_ACCESS_KEY="yyyyy"
export AWS_SESSION_TOKEN="zzzzzzzzz"
export AWS_REGION="eu-central-1"

# Clone this GitHub repo and change into it:
git clone git@github.com:PIT-Shared/central-cdn.git
cd central-cdn

# Run the deployment script (make sure you replace '<env-name>' with your choice)
pnpm cli deploy -e <env-name>

That's it! You can also check the process in AWS CloudFormation and search for stacks whose names are starting with <env-name>.

For destroying afterwards simply run

pnpm cli deploy -w destroy -e <env-name>

More Options

Call

pnpm cli --help

to see more options.