-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from mentorpal/replace_w2v
replacing w2v
- Loading branch information
Showing
27 changed files
with
553 additions
and
80 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
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
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 +1 @@ | ||
3.10.9 | ||
3.10.7 |
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
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
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,6 @@ | ||
# Set common variables for the environment. This is automatically pulled in in the root terragrunt.hcl configuration to | ||
# feed forward to the child modules. | ||
locals { | ||
environment = "dev" | ||
namespace = "mentorpal" | ||
} |
5 changes: 5 additions & 0 deletions
5
infrastructure/aws/terraform/mentorpal/dev/us-east-1/region.hcl
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,5 @@ | ||
# Set common variables for the region. This is automatically pulled in in the root terragrunt.hcl configuration to | ||
# configure the remote state bucket and pass forward to the child modules as inputs. | ||
locals { | ||
aws_region = "us-east-1" | ||
} |
86 changes: 86 additions & 0 deletions
86
infrastructure/aws/terraform/mentorpal/dev/us-east-1/sbert-service/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
infrastructure/aws/terraform/mentorpal/dev/us-east-1/sbert-service/secret.hcl.template
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,6 @@ | ||
locals { | ||
cloudwatch_slack_webhook = "https://hooks.slack.com/services/<redacted>" | ||
sentry_dsn_sbert = "https://<redacted>@oingest.sentry.io/<redacted>" | ||
api_secret_key = "<api secret key redacted>" | ||
jwt_secret_key = "<secret jwt key redacted>" | ||
} |
84 changes: 84 additions & 0 deletions
84
infrastructure/aws/terraform/mentorpal/dev/us-east-1/sbert-service/terragrunt.hcl
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,84 @@ | ||
locals { | ||
# Automatically load environment-level variables | ||
environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl")) | ||
region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl")) | ||
account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl")) | ||
secret_vars = read_terragrunt_config("./secret.hcl") | ||
# Extract out common variables for reuse | ||
env = local.environment_vars.locals.environment | ||
aws_account_id = local.account_vars.locals.aws_account_id | ||
aws_region = local.region_vars.locals.aws_region | ||
cloudwatch_slack_webhook = local.secret_vars.locals.cloudwatch_slack_webhook | ||
sentry_dsn_sbert = local.secret_vars.locals.sentry_dsn_sbert | ||
api_secret_key = local.secret_vars.locals.api_secret_key | ||
jwt_secret_key = local.secret_vars.locals.jwt_secret_key | ||
secret_header_name = local.secret_vars.locals.secret_header_name | ||
secret_header_value = local.secret_vars.locals.secret_header_value | ||
allowed_origin = local.secret_vars.locals.allowed_origin | ||
} | ||
|
||
terraform { | ||
source = "${path_relative_from_include()}//modules/beanstalk" | ||
} | ||
|
||
# Include all settings from the root terragrunt.hcl file | ||
# include "root" { # VS code doesnt highlight this correctly | ||
include { | ||
path = find_in_parent_folders() | ||
} | ||
|
||
inputs = { | ||
aws_region = local.aws_region | ||
aws_availability_zones = ["us-east-1a", "us-east-1b"] | ||
vpc_cidr_block = "10.10.0.0/16" | ||
aws_acm_certificate_domain = "mentorpal.org" | ||
aws_route53_zone_name = "mentorpal.org" | ||
site_domain_name = "sbert-dev.mentorpal.org" | ||
eb_env_namespace = "mentorpal" | ||
eb_env_stage = local.env | ||
eb_env_name = "sbert" | ||
eb_env_instance_type = "c6i.xlarge" # compute-optimized, 120$/month, a1.xlarge, c6i.xlarge | ||
enable_alarms = true | ||
slack_channel = "ls-alerts-qa" | ||
slack_username = "uscictlsalerts" | ||
cloudwatch_slack_webhook = local.cloudwatch_slack_webhook | ||
secret_header_name = local.secret_header_name | ||
secret_header_value = local.secret_header_value | ||
allowed_origin = local.allowed_origin | ||
|
||
# scaling: | ||
eb_env_autoscale_min = 1 # | ||
eb_env_autoscale_max = 1 # | ||
# seems like there's no way to set desired capacity and it seems to be max by default? | ||
eb_env_autoscale_measure_name = "CPUUtilization" | ||
eb_env_autoscale_statistic = "Average" | ||
eb_env_autoscale_unit = "Percent" | ||
eb_env_autoscale_lower_bound = "20" | ||
eb_env_autoscale_lower_increment = "1" | ||
eb_env_autoscale_upper_bound = "80" | ||
eb_env_autoscale_upper_increment = "1" | ||
|
||
eb_env_env_vars = { | ||
STAGE = local.env, | ||
IS_SENTRY_ENABLED = "true", | ||
SENTRY_DSN_MENTOR_SBERT_SERVICE = local.sentry_dsn_sbert, | ||
LOG_LEVEL_SBERT_SERVICE = "DEBUG", | ||
API_SECRET_KEY = local.api_secret_key, | ||
JWT_SECRET_KEY = local.jwt_secret_key, | ||
|
||
} | ||
|
||
# logging: | ||
eb_env_enable_stream_logs = true | ||
eb_env_logs_delete_on_terminate = false | ||
eb_env_logs_retention_in_days = 30 | ||
eb_env_health_streaming_enabled = true | ||
eb_env_health_streaming_delete_on_terminate = false | ||
eb_env_health_streaming_retention_in_days = 7 | ||
eb_env_tags = { | ||
Terraform = "true" | ||
Environment = local.env | ||
Project = "mentorpal" | ||
Service = "sbert" | ||
} | ||
} |
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
Oops, something went wrong.