Skip to content

Commit

Permalink
Setup deployment of OONI Run v2
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Mar 12, 2024
1 parent a4d18c3 commit 95ba31b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions tf/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -225,29 +225,29 @@ module "ooniapi_cluster" {

#### OONI Tier1 dataapi service

module "oonidataapi_deployer" {
module "ooniapi_oonirun_deployer" {
source = "../../modules/ooniapi_service_deployer"

service_name = "dataapi"
service_name = "oonirun"
repo = "ooni/backend"
branch_name = "master"
buildspec_path = "api/fastapi/buildspec.yml"
buildspec_path = "ooniapi/services/oonirun/buildspec.yml"
codestar_connection_arn = aws_codestarconnections_connection.ooniapi.arn

codepipeline_bucket = aws_s3_bucket.ooniapi_codepipeline_bucket.bucket

ecs_service_name = module.oonidataapi.ecs_service_name
ecs_service_name = module.ooniapi_oonirun.ecs_service_name
ecs_cluster_name = module.ooniapi_cluster.cluster_name
}

module "oonidataapi" {
module "ooniapi_oonirun" {
source = "../../modules/ooniapi_service"

vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id

service_name = "dataapi"
docker_image_url = "ooni/dataapi:latest"
service_name = "oonirun"
docker_image_url = "ooni/api-oonirun:latest"
stage = local.stage
dns_zone_ooni_io = local.dns_zone_ooni_io
key_name = module.adm_iam_roles.oonidevops_key_name
Expand All @@ -264,7 +264,7 @@ module "oonidataapi" {

tags = merge(
local.tags,
{ Name = "ooni-tier1-dataapi" }
{ Name = "ooni-tier0-oonirun" }
)
}

Expand All @@ -277,7 +277,7 @@ module "ooniapi_frontend" {
subnet_ids = module.network.vpc_subnet[*].id

oonibackend_proxy_target_group_arn = module.ooni_backendproxy.alb_target_group_id
oonidataapi_target_group_arn = module.oonidataapi.alb_target_group_id
ooniapi_oonirun_target_group_arn = module.ooniapi_oonirun.alb_target_group_id

ooniapi_service_security_groups = [
module.ooniapi_cluster.web_security_group_id
Expand Down
2 changes: 1 addition & 1 deletion tf/modules/ooniapi_frontend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resource "aws_lb_listener_rule" "oonidataapi_rule" {

action {
type = "forward"
target_group_arn = var.oonidataapi_target_group_arn
target_group_arn = var.ooniapi_oonirun_target_group_arn
}

condition {
Expand Down
4 changes: 2 additions & 2 deletions tf/modules/ooniapi_frontend/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ variable "oonibackend_proxy_target_group_arn" {
description = "aws_alb_target_group.oonibackend_proxy.id"
}

variable "oonidataapi_target_group_arn" {
description = "aws_alb_target_group.oonidataapi.id"
variable "ooniapi_oonirun_target_group_arn" {
description = "arn for the target group of the oonirun module"
}

variable "dns_zone_ooni_io" {
Expand Down
2 changes: 1 addition & 1 deletion tf/modules/ooniapi_service_deployer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "aws_iam_policy" "codebuild" {
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::codepipeline-${var.aws_region}-*"
"arn:aws:s3:::codepipeline-ooniapi-${var.aws_region}-*"
]
},
{
Expand Down

0 comments on commit 95ba31b

Please sign in to comment.