This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
-
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
vggonzal
authored and
vggonzal
committed
Aug 2, 2023
1 parent
73ceb2e
commit 806fed4
Showing
28 changed files
with
1,644 additions
and
999 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
# Deploying the HYDROCRON | ||
|
||
|
||
## Dependencies | ||
There are a handful of dependencies needed to deploy the entire Feature Translation Service | ||
|
||
* Terraform - deployment technology. >= Terraform v0.12.7 | ||
* AWS CLI - Amazon Web Service command line interface. >= aws-cli/1.11.120 | ||
* python3 environment - tested with python 3.7, needed for packaging the lambda functions. | ||
|
||
## Soft dependencies | ||
These are dependencies for deploying the entire Feature Translation Service that exist outside of this build. | ||
|
||
* access key for NGAP environment | ||
* Terraform variables defined below | ||
|
||
## Terraform Variables | ||
|
||
| variable | Defined In | Example | Description | | ||
| --------------- | ------------ | ------------------------------------------------------- | ----------- | | ||
| stage | tf_vars | sit | staging environment to which we are deploying | | ||
| app_name | tf_vars | HYDROCRON | Name of the application being deployed - same for all environments| | ||
| credentials | command line | ~/.aws/credentials | AWS credential file to use for authentication | | ||
| profile | command line | ngap-services-sit | AWS Profile to use for authentication | | ||
| docker_tag | command line | podaac/podaac-cloud/podaac-hydrocron:1.0.0-alpha.3 | Name of docker image and tag as returned from `docker/build-docker.sh`. | | ||
| vpc_id | tf_vars | vpc-04d8fc64e8ce5cca8 | VPC Id for use. This is predefined by NGAP. | | ||
| private_subnets | tf_vars | ["subnet-0d15606f25bd4047b","subnet-0adee3417fedb7f05"] | private subnets for use within VPC. This is defined by NGAP | | ||
|
||
|
||
## Building the lambda images | ||
The lambda code needs to be built into a deployable image and uploaded to ECR before running terraform. Normally CI/CD handles this task but if you are trying to run terraform locally it needs to be done manually. | ||
|
||
Follow the instructions in the [docker README](../docker/README.md) to build the image | ||
|
||
|
||
## Build and deploy the application | ||
We use a pre-built docker container to do the deployment (Please do not use local terraform!) | ||
|
||
From the project root directory: | ||
``` | ||
export tf_venue=sit | ||
docker run -v ~/.aws:/home/dockeruser/.aws:ro -v ${PWD}:/home/dockeruser -w /home/dockeruser/terraform cae-artifactory.jpl.nasa.gov:16003/podaac/service/deploy-terraform-1.0.3:latest bash bin/deploy.sh -v ${tf_venue} -t ${docker_tag} | ||
``` | ||
|
||
## Destroying the Application | ||
Similarly, use the pre-built docker container to do the destroy (Please do not use local terraform!) | ||
|
||
From the project root directory: | ||
``` | ||
docker run -v ~/.aws:/home/dockeruser/.aws:ro -v ${PWD}:/home/dockeruser cae-artifactory.jpl.nasa.gov:16003/podaac/service/deploy-terraform-1.0.3:latest bash bin/destroy.sh -v ${tf_venue} -t ${docker_tag} | ||
``` | ||
This will take anywhere from 3-10 minutes. |
Oops, something went wrong.