generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 28
Created documentation for Incubator Deployment #677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RSkuma
wants to merge
5
commits into
develop
Choose a base branch
from
Adding-incubator/deployment-documentation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9f60d2f
Created documentation for Incubator Deployment
RSkuma 646e255
Added Infrastructure Diagram
RSkuma 59d0fb6
Update deployment-infra.md
RSkuma 6065369
Rename CTJ Infra Diagram.png to ctj-infra-diagram.png
RSkuma a68f832
Update deployment-infra.md image link
RSkuma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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,42 @@ | ||
_<p style="text-align: center;">Project deployment and hosting</p>_ | ||
|
||
|
||
|
||
 | ||
|
||
|
||
### Summary | ||
CivicTechJobs is hosted on the Incubator AWS account, which is managed by the DevOps CoP. The application is deployed through Fargate, which itself deploys the CivicTechJob docker image. This repo sends updates to the Incubator through a github action `deploy-stage.yml`. | ||
|
||
Incubator aws resources are managed using terraform files which are commited to the [Incubator Source](https://github.com/hackforla/incubator/tree/main/terraform/projects/civic-tech-jobs) | ||
|
||
The resources used by CTJ include the following: | ||
- A Database(shared with other projects) | ||
- DNS Entry | ||
- ECS Task Definition | ||
- A Fargate Task | ||
|
||
|
||
### Github Action | ||
Github actions are the mechanism used to convey changes in this CivicTechJobs repo to the AWS deployment. The deploy-stage action is set to run on any updates to the main branch. On run the action will assume an AWS credential, push the newest docker image to the ECR, then force a ECS-Fargate redeployment. This process will depend on OIDC to grant AWS permissions for its execution | ||
|
||
### Regarding Environment Variables | ||
The combination of Fargate(a managed service from AWS) and terraform means that environment variables are passed into the application differently than when the application is run locally. The environment variables are set in terraform at the following [location](https://github.com/hackforla/incubator/blob/main/terraform/projects/civic-tech-jobs/environment-stage.tf). | ||
Note that these variables are the same as those found in this repo's [env.example](https://github.com/hackforla/CivicTechJobs/blob/develop/dev/dev.env.example) | ||
|
||
Some values will come from the terraform modules, but in essense if you must add or edit environment variables for the application in deployment, you will need to change them in Incubator. | ||
|
||
### DNS | ||
The staging environment is current set to run at: https://stage.civictechjobs.org/ | ||
|
||
Domain management is done in AWS Route53, through terraform files found in Incubator | ||
|
||
### Fargate | ||
AWS Fargate is a managed service which allows CTJ to easily deploy it's containerized application. This is done by updating a AWS task definition and then restarting the associated Fargate service. | ||
|
||
Both of these steps are preformed automatically by the github action in `deploy-stage.yml` when new commits are merged into the `main` branch | ||
|
||
|
||
## Additional Resources | ||
|
||
[Incubator Repo](https://github.com/hackforla/incubator/tree/main/terraform/projects/civic-tech-jobs) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats ecr?