-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,46 @@ | ||
## Documentation | ||
<h1 align='center'>ETL-COTRIP-Incidents</h1> | ||
|
||
https://docs.google.com/document/d/1pVDW5iRiRsAWcixw5Z9umPFRspuOUJUdH2YLpYfltP4/edit | ||
<p align='center'>Bring COTRIP Data into the TAK System</p> | ||
|
||
## Development | ||
|
||
Note: [API Spec](https://docs.google.com/document/d/1pVDW5iRiRsAWcixw5Z9umPFRspuOUJUdH2YLpYfltP4) | ||
|
||
DFPC provided Lambda ETLs are currently all written in [NodeJS](https://nodejs.org/en) through the use of a AWS Lambda optimized | ||
Docker container. Documentation for the Dockerfile can be found in the [AWS Help Center](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html) | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
Add a .env file in the root directory that gives the ETL script the necessary variables to communicate with a local ETL server. | ||
When the ETL is deployed the `ETL_API` and `ETL_LAYER` variables will be provided by the Lambda Environment | ||
|
||
```json | ||
{ | ||
"ETL_API": "http://localhost:5001", | ||
"ETL_LAYER": "19" | ||
} | ||
``` | ||
|
||
To run the task, ensure the local [CloudTAK](https://github.com/dfpc-coe/CloudTAK/) server is running and then run with typescript runtime | ||
or build to JS and run natively with node | ||
|
||
``` | ||
ts-node task.ts | ||
``` | ||
|
||
``` | ||
npm run build | ||
cp .env dist/ | ||
node dist/task.js | ||
``` | ||
|
||
### Deployment | ||
|
||
Deployment into the CloudTAK environment for configuration is done via automatic releases to the DFPC AWS environment. | ||
|
||
Github actions will build and push docker releases on every version tag which can then be automatically configured via the | ||
CloudTAK API. | ||
|
||
Non-DFPC users will need to setup their own docker => ECS build system via something like Github Actions or AWS Codebuild. |