From b620a2e12ff85a334ab1a40adba9d3fa1b9b06df Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 10 Oct 2024 12:54:11 -0600 Subject: [PATCH] Update README --- README.md | 75 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2bbb74996..dbc44f6e3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,13 @@ ## Installation -Local installation can take advantage of the docker-compose workflow. +Testing locally can be done either running the server directly (recommended for development) or +by running the provided Docker Compose services (recommended for limited testing) + +Note that for full functionality, CloudTAK needs to be deployed into an AWS environment and that +many of the services it provides will initiate AWS API calls with no graceful fallback. + +### Docker Compose ``` docker-compose up --build @@ -15,6 +21,8 @@ docker-compose up --build Once the database and API service have built, the server will start on port 5000. In your webbrowser visit `http://localhost:5000` to view the ETL UI +### Local Development + Installation outside of the docker environment is also fairly straightforward. In the `./api`, perform the following @@ -31,7 +39,7 @@ npm run dev ## AWS Deployment -### Pre-Reqs +### 1. Pre-Reqs The ETL service assumes several pre-requisite dependencies are deployed before initial ETL deployment. @@ -39,11 +47,11 @@ The following are dependencies which need to be created: | Name | Notes | | --------------------- | ----- | -| `coe-vpc-` | VPC & networking to place tasks in - [repo](https://github.com/dfpc-coe/vpc) | -| `coe-ecs-` | ECS Cluster for API Service - [repo](https://github.com/dfpc-coe/ecs) | -| `coe-ecr-etl` | ECR Repository for storing API Images - [repo](https://github.com/dfpc-coe/ecr) | +| `coe-vpc-` | VPC & networking to place tasks in - [repo](https://github.com/dfpc-coe/vpc) | +| `coe-ecs-` | ECS Cluster for API Service - [repo](https://github.com/dfpc-coe/ecs) | +| `coe-ecr-etl` | ECR Repository for storing API Images - [repo](https://github.com/dfpc-coe/ecr) | | `coe-ecr-etl-tasks` | ECR Repository for storing Task Images - [repo](https://github.com/dfpc-coe/ecr) | -| `coe-elb-access` | Centralized ELB Logs - [repo](https://github.com/dfpc-coe/elb-logs) | +| `coe-elb-access` | Centralized ELB Logs - [repo](https://github.com/dfpc-coe/elb-logs) | An AWS ACM certificate must also be generated that covers the subdomain that CloudTAK is deployed to as well as the second level wildcard. Where in the example below CloudTAK is deployed to ie: `map.example.com` The second @@ -55,12 +63,6 @@ IE: *.map.example.com ``` -### Optional Dependencies that can be deployed at any time - -| Name | Notes | -| --------------------- | ----- | -| `coe-media-` | Task Definitions for Media Server Support - [repo](ttps://github.com/dfoc-coe/media-infra) | - **coe-ecr-etl** Can be created using the [dfpc-coe/ecr](https://github.com/dfpc-coe/ecr) repository. @@ -81,20 +83,27 @@ npm install npx deploy create etl-tasks ``` -### S3 Bucket Contents +### 2. Installing Dependencies -An S3 bucket will be created as part of the CloudFormatiom stack that contains geospatial assets -related to user files, missions, CoTs, etc. The following table is an overview of the prefixes -in the bucket and their purpose +From the root directory, install the deploy dependencies -| Prefix | Description | -| ------ | ----------- | -| `attachment/{sha256}/{file.ext}` | CoT Attachments by Data Package reported SHA | -| `data/{data sync id}/{file.ext}` | CloudTAK managed Data Sync file contents | -| `import/{UUID}/{file.ext}` | User Imports | -| `profile/{email}/{file.ext}` | User Files | +```sh +npm install +``` + +### 3. Building Docker Images & Pushing to ECR + +An script to build docker images and publish them to your ECR is provided and can be run using: -### ETL Deployment +``` +npm run build +``` + +from the root of the project. Ensure that you have created the necessary ECR repositories as descrived in the +previos 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 From the root directory, install the deploy dependencies @@ -144,3 +153,23 @@ Further help about a specific command can be obtained via something like: npx deploy info --help ``` +### Optional Dependencies that can be deployed at any time + +| Name | Notes | +| --------------------- | ----- | +| `coe-media-` | Task Definitions for Media Server Support - [repo](ttps://github.com/dfoc-coe/media-infra) | + + +### S3 Bucket Contents + +An S3 bucket will be created as part of the CloudFormatiom stack that contains geospatial assets +related to user files, missions, CoTs, etc. The following table is an overview of the prefixes +in the bucket and their purpose + +| Prefix | Description | +| ------ | ----------- | +| `attachment/{sha256}/{file.ext}` | CoT Attachments by Data Package reported SHA | +| `data/{data sync id}/{file.ext}` | CloudTAK managed Data Sync file contents | +| `import/{UUID}/{file.ext}` | User Imports | +| `profile/{email}/{file.ext}` | User Files | +