Skip to content

Commit

Permalink
feat: oonimeasurements service deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
DecFox committed May 17, 2024
1 parent 7b32154 commit 09a51d4
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions tf/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,52 @@ module "ooniapi_ooniprobe" {
)
}

#### OONI Measurements service

module "ooniapi_oonimeasurements_deployer" {
source = "../../modules/ooniapi_service_deployer"

service_name = "oonimeasurements"
repo = "ooni/backend"
branch_name = "master"
buildspec_path = "ooniapi/services/oonimeasurements/buildspec.yml"
codestar_connection_arn = aws_codestarconnections_connection.oonidevops.arn

codepipeline_bucket = aws_s3_bucket.ooniapi_codepipeline_bucket.bucket

ecs_service_name = module.ooniapi_oonimeasurements.ecs_service_name
ecs_cluster_name = module.ooniapi_cluster.cluster_name
}

module "ooniapi_oonimeasurements" {
source = "../../modules/ooniapi_service"

vpc_id = module.network.vpc_id
public_subnet_ids = module.network.vpc_subnet_public[*].id
private_subnet_ids = module.network.vpc_subnet_private[*].id

service_name = "oonimeasurements"
default_docker_image_url = "ooni/api-oonimeasurements:latest"
stage = local.environment
dns_zone_ooni_io = local.dns_zone_ooni_io
key_name = module.adm_iam_roles.oonidevops_key_name
ecs_cluster_id = module.ooniapi_cluster.cluster_id

task_secrets = {
CLICKHOUSE_URL = aws_secretsmanager_secret_version.ooniclickhouse_url.arn
JWT_ENCRYPTION_KEY = aws_secretsmanager_secret_version.jwt_secret.arn
PROMETHEUS_METRICS_PASSWORD = aws_secretsmanager_secret_version.prometheus_metrics_password.arn
}

ooniapi_service_security_groups = [
module.ooniapi_cluster.web_security_group_id
]

tags = merge(
local.tags,
{ Name = "ooni-tier0-oonimeasurements" }
)
}

#### OONI Run service

Expand Down

0 comments on commit 09a51d4

Please sign in to comment.