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

Modifying the UNITY_OUTPUT_DATA_BUCKET to recognize deployment & venue #93

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion airflow/dags/sbg_L1_to_L2_e2e_cwl_step_by_step_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from datetime import datetime

import boto3
from airflow.models import Variable
from airflow.models.baseoperator import chain
from airflow.models.param import Param
from airflow.operators.python import PythonOperator
Expand All @@ -30,7 +31,8 @@
# SSM keys for venue-dependent parameters
UNITY_DAPA_CLIENT_ID = "/unity/shared-services/dapa/client-id"
UNITY_DAPA_API_URL = "/unity/shared-services/dapa/api-url"
UNITY_OUTPUT_DATA_BUCKET = "/unity/ds/data/bucket/primary-data-bucket"
UNITY_IDENTIFIER = f"""{Variable.get("unity_deployment_name")}/{Variable.get("unity_venue")}-{Variable.get("unity_counter")}"""
UNITY_OUTPUT_DATA_BUCKET = f"/unity/ds/data/bucket/{UNITY_IDENTIFIER}/primary-data-bucket"

# Resources needed by each Task
# EC2 r6a.xlarge 4vCPU 32GiB
Expand Down
12 changes: 12 additions & 0 deletions terraform-unity/modules/terraform-unity-sps-airflow/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,18 @@ resource "aws_ssm_parameter" "ogc_processes_api_url" {
})
}

resource "aws_ssm_parameter" "unity_output_data_bucket" {
name = format("/unity/ds/data/bucket/%s/%s-%s/primary-data-bucket", var.deployment_name, var.venue, var.counter)
description = "The S3 Address of the primary DS data bucket."
type = "String"
value = "sps-${var.venue}-ds-storage"
tags = merge(local.common_tags, {
Name = format(local.resource_name_prefix, "endpoints-output_data_bucket")
Component = "SSM"
Stack = "SSM"
})
}

resource "kubernetes_manifest" "karpenter_node_class" {
manifest = {
apiVersion = "karpenter.k8s.aws/v1beta1"
Expand Down