Skip to content

Commit

Permalink
Update staging deploy (#301)
Browse files Browse the repository at this point in the history
* modify staging deploy

* workflows update main deploy

* update entities deploys

* formatting terraform
  • Loading branch information
rzlim08 authored Apr 19, 2024
1 parent 8126fda commit 75f5b84
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 56 deletions.
11 changes: 3 additions & 8 deletions entities/.happy/terraform/envs/dev/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Auto-generated by 'happy infra'. Do not edit
# Make improvements in happy, so that everyone can benefit.
module "stack" {
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=rlim/ephemeral-volume-support"
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=main"
image_tag = var.image_tag
stack_name = var.stack_name
k8s_namespace = var.k8s_namespace
Expand All @@ -11,6 +11,7 @@ module "stack" {
deployment_stage = "dev"
services = {
entities = {
cache_volume_mount_dir = "/var/policies"
aws_iam = {
policy_json = data.aws_iam_policy_document.entities.json,
}
Expand Down Expand Up @@ -56,13 +57,7 @@ module "stack" {
WORKERS = "2"
}
create_dashboard = false
emptydir_volumes = [{
name = "policies"
parameters = {
size_limit = "100Mi"
}
}]
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/czid-platformics/entities/scripts/migrate.sh"]
Expand Down
2 changes: 1 addition & 1 deletion entities/.happy/terraform/envs/prod/iam_policies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data "aws_iam_policy_document" "entities" {
]
resources = ["*"]
}
statement {
statement {
effect = "Allow"
actions = [
"s3:PutObject",
Expand Down
11 changes: 3 additions & 8 deletions entities/.happy/terraform/envs/prod/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Auto-generated by 'happy infra'. Do not edit
# Make improvements in happy, so that everyone can benefit.
module "stack" {
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=rlim/ephemeral-volume-support"
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=main"
image_tag = var.image_tag
stack_name = var.stack_name
k8s_namespace = var.k8s_namespace
Expand All @@ -11,6 +11,7 @@ module "stack" {
deployment_stage = "prod"
services = {
entities = {
cache_volume_mount_dir = "/var/policies"
aws_iam = {
policy_json = data.aws_iam_policy_document.entities.json,
}
Expand Down Expand Up @@ -55,13 +56,7 @@ module "stack" {
WORKERS = "2"
}
create_dashboard = false
emptydir_volumes = [{
name = "policies"
parameters = {
size_limit = "100Mi"
}
}]
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/czid-platformics/entities/scripts/migrate.sh"]
Expand Down
11 changes: 3 additions & 8 deletions entities/.happy/terraform/envs/sandbox/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Auto-generated by 'happy infra'. Do not edit
# Make improvements in happy, so that everyone can benefit.
module "stack" {
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=rlim/ephemeral-volume-support"
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=main"
image_tag = var.image_tag
stack_name = var.stack_name
k8s_namespace = var.k8s_namespace
Expand All @@ -11,6 +11,7 @@ module "stack" {
deployment_stage = "sandbox"
services = {
entities = {
cache_volume_mount_dir = "/var/policies"
aws_iam = {
policy_json = data.aws_iam_policy_document.entities.json,
}
Expand Down Expand Up @@ -56,13 +57,7 @@ module "stack" {
WORKERS = "2"
}
create_dashboard = false
emptydir_volumes = [{
name = "policies"
parameters = {
size_limit = "100Mi"
}
}]
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/czid-platformics/entities/scripts/migrate.sh"]
Expand Down
2 changes: 1 addition & 1 deletion entities/.happy/terraform/envs/staging/iam_policies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data "aws_iam_policy_document" "entities" {
]
resources = ["*"]
}
statement {
statement {
effect = "Allow"
actions = [
"s3:PutObject",
Expand Down
11 changes: 3 additions & 8 deletions entities/.happy/terraform/envs/staging/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Auto-generated by 'happy infra'. Do not edit
# Make improvements in happy, so that everyone can benefit.
module "stack" {
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=rlim/ephemeral-volume-support"
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=main"
image_tag = var.image_tag
stack_name = var.stack_name
k8s_namespace = var.k8s_namespace
Expand All @@ -10,6 +10,7 @@ module "stack" {
app_name = var.app
deployment_stage = "staging"
services = {
cache_volume_mount_dir = "/var/policies"
entities = {
aws_iam = {
policy_json = data.aws_iam_policy_document.entities.json,
Expand Down Expand Up @@ -56,13 +57,7 @@ module "stack" {
WORKERS = "2"
}
create_dashboard = false
emptydir_volumes = [{
name = "policies"
parameters = {
size_limit = "100Mi"
}
}]
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/czid-platformics/entities/scripts/migrate.sh"]
Expand Down
4 changes: 2 additions & 2 deletions workflows/.happy/terraform/envs/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module "stack" {
}
name = "workflows"
health_check_path = "/graphql"
period_seconds = 10
period_seconds = 10
platform_architecture = "arm64"
port = 8042
cpu = "2"
Expand Down Expand Up @@ -90,7 +90,7 @@ module "stack" {
SERVICE_NAME = "workflows"
}
create_dashboard = false
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/workflows/scripts/migrate.sh"]
Expand Down
16 changes: 7 additions & 9 deletions workflows/.happy/terraform/envs/prod/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Auto-generated by 'happy infra'. Do not edit
# Make improvements in happy, so that everyone can benefit.
module "stack" {
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=rlim/ephemeral-volume-support"
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=main"
image_tag = var.image_tag
stack_name = var.stack_name
k8s_namespace = var.k8s_namespace
Expand All @@ -11,11 +11,13 @@ module "stack" {
deployment_stage = "prod"
services = {
workflows = {
cache_volume_mount_dir = "/var/policies"
aws_iam = {
policy_json = data.aws_iam_policy_document.workflows.json,
}
name = "workflows"
health_check_path = "/graphql"
period_seconds = 10
platform_architecture = "arm64"
port = 8042
cpu = "8"
Expand Down Expand Up @@ -47,14 +49,16 @@ module "stack" {
},

workflows-worker = {
cache_volume_mount_dir = "/var/policies"
aws_iam = {
policy_json = data.aws_iam_policy_document.workflows.json,
}
health_check_command = ["true"] # Placeholder - we probably want a healthcheck that does something real.
cpu = "4"
memory = "4000Mi"
name = "workflows-worker"
platform_architecture = "arm64"
service_type = "PRIVATE"
service_type = "CLI"
cmd = ["python3", "api/loader/run_loader.py"]
port = 8000
init_containers = {
Expand Down Expand Up @@ -88,13 +92,7 @@ module "stack" {
SERVICE_NAME = "workflows"
}
create_dashboard = false
emptydir_volumes = [{
name = "policies"
parameters = {
size_limit = "100Mi"
}
}]
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/workflows/scripts/migrate.sh"]
Expand Down
2 changes: 1 addition & 1 deletion workflows/.happy/terraform/envs/sandbox/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module "stack" {
SERVICE_NAME = "workflows"
}
create_dashboard = false
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/workflows/scripts/migrate.sh"]
Expand Down
16 changes: 6 additions & 10 deletions workflows/.happy/terraform/envs/staging/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Auto-generated by 'happy infra'. Do not edit
# Make improvements in happy, so that everyone can benefit.
module "stack" {
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=rlim/ephemeral-volume-support"
source = "[email protected]:chanzuckerberg/happy//terraform/modules/happy-stack-eks?ref=main"
image_tag = var.image_tag
stack_name = var.stack_name
k8s_namespace = var.k8s_namespace
Expand All @@ -11,6 +11,7 @@ module "stack" {
deployment_stage = "staging"
services = {
workflows = {
cache_volume_mount_dir = "/var/policies"
aws_iam = {
policy_json = data.aws_iam_policy_document.workflows.json,
}
Expand Down Expand Up @@ -48,16 +49,17 @@ module "stack" {
},

workflows-worker = {
cache_volume_mount_dir = "/var/policies"
aws_iam = {
policy_json = data.aws_iam_policy_document.workflows.json,
}
health_check_command = ["true"] # Placeholder - we probably want a healthcheck that does something real.
cpu = "2"
memory = "1000Mi"
name = "workflows-worker"
platform_architecture = "arm64"
service_type = "PRIVATE"
service_type = "CLI"
cmd = ["python3", "api/loader/run_loader.py"]
port = 8000
init_containers = {
private-key = {
cmd = ["python3", "/workflows/platformics/scripts/make_private_key_pem.py", "staging"]
Expand Down Expand Up @@ -89,13 +91,7 @@ module "stack" {
SERVICE_NAME = "workflows"
}
create_dashboard = false
emptydir_volumes = [{
name = "policies"
parameters = {
size_limit = "100Mi"
}
}]
routing_method = "CONTEXT"
routing_method = "CONTEXT"
tasks = {
migrate = {
cmd = ["/workflows/scripts/migrate.sh"]
Expand Down

0 comments on commit 75f5b84

Please sign in to comment.