|
1 | | -# hls-orchestration |
| 1 | +# HLS Orchestration |
2 | 2 |
|
3 | 3 | AWS Stack for processing HLS data. |
4 | 4 |
|
5 | 5 |  |
6 | 6 |
|
7 | | -For more detailed data flow diagrams and architecture see [architecture](/docs/architecture.md). |
| 7 | +For more detailed data flow diagrams and architecture see |
| 8 | +[architecture](/docs/architecture.md). |
8 | 9 |
|
9 | | -For more details about all of the HLS project's components see [hls-project](https://github.com/nasa-impact/hls-project). |
| 10 | +For more details about all of the HLS project's components see |
| 11 | +[hls-project](https://github.com/nasa-impact/hls-project). |
10 | 12 |
|
| 13 | +## Requirements |
11 | 14 |
|
12 | | -### Requirements |
13 | | -Python>=3.7 \ |
14 | | -tox \ |
15 | | -aws-cli \ |
16 | | -jq \ |
17 | | -An IAM role with sufficient permissions for creating, destroying and modifying the relevant stack resources. |
| 15 | +- Python>=3.7 |
| 16 | +- tox |
| 17 | +- aws-cli |
| 18 | +- jq |
| 19 | +- An IAM role with sufficient permissions for creating, destroying, and |
| 20 | + modifying the relevant stack resources. |
18 | 21 |
|
19 | | -### Environment Settings |
20 | | -Environment variables are set in `environment.sh`. Copy `environment.sh.sample` to `environment.sh` and update the settings prior to running any commands. The following variables can be overridden from the calling shell's environment |
21 | | -``` |
22 | | -$ export HLS_STACKNAME=<Name of your stack> |
23 | | -$ export HLS_LAADS_TOKEN=<Token used for accessing the Laads Data> |
24 | | -$ export HLS_SENTINEL_OUTPUT_BUCKET_ROLE_ARN=<GCC Role for accessing output bucket> |
| 22 | +## Environment Settings |
| 23 | + |
| 24 | +Environment variables are set in `environment.sh`. Copy `environment.sh.sample` |
| 25 | +to `environment.sh` and update the settings prior to running any commands. The |
| 26 | +following variables can be overridden from the calling shell's environment: |
| 27 | + |
| 28 | +```plain |
| 29 | +export HLS_STACKNAME=<Name of your stack> |
| 30 | +export HLS_LAADS_TOKEN=<Token used for accessing the Laads Data> |
| 31 | +export HLS_SENTINEL_OUTPUT_BUCKET_ROLE_ARN=<GCC Role for accessing output bucket> |
25 | 32 | ``` |
26 | 33 |
|
27 | | -### Synth |
| 34 | +## Synth |
| 35 | + |
28 | 36 | Display generated cloud formation template that will be used to deploy. |
| 37 | + |
| 38 | +```plain |
| 39 | +source environment.sh && tox -e dev -r -- synth |
29 | 40 | ``` |
30 | | -$ source ./environment.sh && tox -e dev -r -- synth |
31 | | -``` |
32 | 41 |
|
33 | | -### Diff |
| 42 | +## Diff |
| 43 | + |
34 | 44 | Display a diff of the current deployment and any changes created. |
35 | | -``` |
36 | | -$ source ./environment.sh && tox -e dev -r -- diff |
37 | | -``` |
38 | 45 |
|
39 | | -### Deploy |
40 | | -Deploy current version of stack. |
41 | | -``` |
42 | | -$ source ./environment.sh && tox -e dev -r -- deploy |
| 46 | +```plain |
| 47 | +source environment.sh && tox -e dev -r -- diff |
43 | 48 | ``` |
44 | 49 |
|
45 | | -The repository is configured to create automatic deployments to the `hls-development` stack when PRs are merged into the `dev` branch. This deployment uses [Github Actions Environments](https://docs.github.com/en/actions/reference/environments) to manage the environment configuration rather than the `environment.sh`. |
| 50 | +## Deploy |
46 | 51 |
|
47 | | -Deployments to GCC have restrictions over creating VPCs and the types of AMIs which can be utilized. To deploy to GCC your shell will require the following environment settings. |
| 52 | +Deploy current version of stack: |
| 53 | + |
| 54 | +```plain |
| 55 | +source environment.sh && tox -e dev -r -- deploy |
48 | 56 | ``` |
| 57 | + |
| 58 | +The repository is configured to create automatic deployments to the |
| 59 | +`hls-development` stack when PRs are merged into the `dev` branch. This |
| 60 | +deployment uses |
| 61 | +[Github Actions Environments](https://docs.github.com/en/actions/reference/environments) |
| 62 | +to manage the environment configuration rather than the `environment.sh`. |
| 63 | + |
| 64 | +Deployments to GCC have restrictions over creating VPCs and the types of AMIs |
| 65 | +which can be utilized. To deploy to GCC your shell will require the following |
| 66 | +environment settings: |
| 67 | + |
| 68 | +```plain |
49 | 69 | export GCC=true |
50 | 70 | export AWS_DEFAULT_REGION=us-west-2 |
51 | 71 | export HLS_GCC_ACCOUNT=<The GCC account id> |
52 | 72 | export HLS_GCC_VPCID=<The vpc id provided by GCC administrators> |
53 | 73 | export HLS_GCC_BOUNDARY_ARN=<The boundary policy arn> |
54 | 74 | ``` |
55 | 75 |
|
| 76 | +## Setup Logging Database |
56 | 77 |
|
57 | | -### Setup Logging Database |
58 | | -After `deploy` is run and the stack is created run |
59 | | -``` |
60 | | -$ source ./environment.sh && ./scripts/setupdb.sh |
| 78 | +After `deploy` is run and the stack is created run: |
| 79 | + |
| 80 | +```plain |
| 81 | +source environment.sh && scripts/setupdb.sh |
61 | 82 | ``` |
| 83 | + |
62 | 84 | To bootstrap the logging database. |
63 | 85 |
|
64 | | -### Development |
65 | | -For active stack development run |
66 | | -``` |
67 | | -$ source ./environment.sh && tox -e dev -r -- version |
68 | | -``` |
69 | | -This creates a local virtualenv in the directory `devenv`. To use it for development |
| 86 | +## Development |
| 87 | + |
| 88 | +For active stack development run: |
| 89 | + |
| 90 | +```plain |
| 91 | +source environment.sh && tox -e dev -r -- version |
70 | 92 | ``` |
71 | | -$ source devenv/bin/activate |
| 93 | + |
| 94 | +This creates a local virtualenv in the directory `devenv`. To use it for development: |
| 95 | + |
| 96 | +```plain |
| 97 | +source devenv/bin/activate |
72 | 98 | ``` |
73 | 99 |
|
74 | | -### Tests |
| 100 | +## Tests |
| 101 | + |
75 | 102 | To run unit test for all included Lambda functions |
76 | | -``` |
| 103 | + |
| 104 | +```plain |
77 | 105 | tox -r |
78 | 106 | ``` |
0 commit comments