Skip to content
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

updating docs and workflows to incorporate db password #91

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
awsCredentials:
description: 'AWS Credentials'
required: true
auth0:
description: 'Auth0'
environmentVariables:
description: 'Environment Variables'
required: true


Expand All @@ -29,6 +29,6 @@ jobs:
- name: Deploy to AWS
run: |
eval "${{ github.event.inputs.awsCredentials }}"
eval "${{ github.event.inputs.auth0 }}"
eval "${{ github.event.inputs.environmentVariables }}"
terraform init
terraform apply -auto-approve
6 changes: 3 additions & 3 deletions .github/workflows/teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
awsCredentials:
description: 'AWS Credentials'
required: true
auth0:
description: 'Auth0'
environmentVariables:
description: 'Environment Variables'
required: true


Expand All @@ -24,6 +24,6 @@ jobs:
- name: Teardown to AWS
run: |
eval "${{ github.event.inputs.awsCredentials }}"
eval "${{ github.event.inputs.auth0 }}"
eval "${{ github.event.inputs.environmentVariables }}"
terraform init
terraform destroy -auto-approve
8 changes: 5 additions & 3 deletions docs/DEPLOY_TEARDOWN.MD
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ Access to this is restricted to the team. Please contact the team for the passwo
### Workflow

1. After completing the requirements, go to the Github Actions and find the ```Manual AWS Deployment``` or ```Manual AWS Teardown``` workflow.
2. When prompted paste in the credentials and run the workflow off the main branch
3. The deployment will take a few minutes to complete.
4. Once the deployment is complete, you will be able to access the application at [Link](http://g6.g6.csse6400.xyz:3000/).
2. When prompted paste in the credentials into the credentials box
3. When prompted paste the Auth0 credentials and the database password into the box, in the format.
```export TF_VAR_auth0_domain=xxx \ export TF_VAR_auth0_client_id=xxx \ export TF_VAR_auth0_client_secret=xxx \ export TF_VAR_database_password=xxx```
4. The deployment will take a few minutes to complete.
5. Once the deployment is complete, you will be able to access the application at [Link](http://g6.g6.csse6400.xyz:3000/).

### Local

Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ resource "aws_ecs_service" "unibasement_frontend" {

# Autoscaling for frontend
resource "aws_appautoscaling_target" "unibasement_frontend" {
max_capacity = 1 #
max_capacity = 8#6
min_capacity = 1
resource_id = "service/${aws_ecs_cluster.unibasement.name}/${aws_ecs_service.unibasement_frontend.name}"
scalable_dimension = "ecs:service:DesiredCount"
Expand Down Expand Up @@ -386,7 +386,7 @@ resource "aws_ecs_task_definition" "unibasement_backend" {

# Autoscaling for backend
resource "aws_appautoscaling_target" "unibasement_backend" {
max_capacity = 1
max_capacity = 8#6
min_capacity = 1
resource_id = "service/${aws_ecs_cluster.unibasement.name}/${aws_ecs_service.unibasement_backend.name}"
scalable_dimension = "ecs:service:DesiredCount"
Expand Down
Loading