CloudFormation managed infrastructure for TAK Server
Important
The TAK service assumes several pre-requisite dependencies are deployed before initial TAK Server deployment.
The following are dependencies which need to be created:
Name | Notes |
---|---|
coe-vpc-<name> |
VPC & networking to place tasks in - repo |
coe-ecs-<name> |
ECS Cluster for API Service - repo |
coe-ecr-tak |
ECR Repository for storing Server Images - repo |
From the root directory, install the deploy dependencies
npm install
An script to build docker images and publish them to your ECR is provided and can be run using:
npm run build
from the root of the project. Ensure that you have created the necessary ECR repositories as described in the
previous step and that you have AWS credentials provided in your current terminal environment as an aws ecr get-login-password
call will be issued.
Deployment to AWS is handled via AWS Cloudformation. The templates can be found in the ./cloudformation
directory. The deployment itself is performed by Deploy which
was installed in the previous step.
Note
The deploy tool can be run via the following
npx deploy
To install it globally - view the deploy README
Deploy uses your existing AWS credentials. Ensure that your ~/.aws/credentials
has an entry like:
[coe]
aws_access_key_id = <redacted>
aws_secret_access_key = <redacted>
The CloudFormation is split into two stacks to ensure consistent deploy results.
The first portion deploys the ELB, database and all necessary related filestore components. The second portion deploys the ECS Service itself.
Step 1: Create Network Portion:
npx deploy create <stack> --template ./cloudformation/network.template.js
Step 2: Setup a DNS CNAME from your desired hostname for the TAK server to the ELB hostname. The ELB hostname is one of the CloudFormation template outputs.
Step3: Create Service Portion (Once DNS been set & propagated)
npx deploy create <stack>
Note
Stacks can be created, deleted, cancelled, etc all via the deploy tool. For further information
information about deploy
functionality run the following for help.
npx deploy
Further help about a specific command can be obtained via something like:
npx deploy info --help