Skip to content

Commit

Permalink
Prepare for prod deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky committed Dec 7, 2023
1 parent 71a861d commit 976b736
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
5 changes: 5 additions & 0 deletions automate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Deploying a Flow
1. Take a look at `create_new_flow.py` and make and neccessary adjustments to the title and other settings.
2. Run `python create_new_flow.py` to create a new flow.
3. Note the flow id and scope that is printed to the console.
4. Update the `FLOW_ID` and `FLOW_SCOPE` variables in `lambda_environment_vars.tf` in the infra directory with the values from the previous step.
13 changes: 6 additions & 7 deletions aws/globus_automate_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,16 @@ def update_flow(self, flow_def: GlobusAutomateFlowDef):
print(self.runAsScopes)

def _deploy_mdf_flow(self, mdf_flow_def: GlobusAutomateFlowDef):
flow_deploy_res = self.flows_client.deploy_flow(
flow_definition=mdf_flow_def.flow_definition,
flow_deploy_res = self.flows_client.create_flow(
definition=mdf_flow_def.flow_definition,
title=mdf_flow_def.title,
subtitle=mdf_flow_def.subtitle,
description=mdf_flow_def.description,
visible_to=mdf_flow_def.visible_to,
runnable_by=mdf_flow_def.runnable_by,
administered_by=mdf_flow_def.administered_by,
flow_viewers=mdf_flow_def.visible_to,
flow_starters=mdf_flow_def.runnable_by,
flow_administrators=mdf_flow_def.administered_by,
# TODO: Make rough schema outline into JSONSchema
input_schema=mdf_flow_def.input_schema,
validate_definition=True
input_schema=mdf_flow_def.input_schema
)
self.flow_id = flow_deploy_res["id"]
self.flow_scope = flow_deploy_res["globus_auth_scope"]
Expand Down
10 changes: 5 additions & 5 deletions infra/mdf/lambda_environment_vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
variable "prod_env_vars" {
type = map
default = {
DYNAMO_STATUS_TABLE="MDF-Connect-test"
DYNAMO_STATUS_TABLE="MDF-Connect-prod"
GDRIVE_EP="f00dfd6c-edf4-4c8b-a4b1-be6ad92a4fbb"
GDRIVE_ROOT="/Shared With Me"
MANAGE_FLOWS_SCOPE="https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows"
MONITOR_BY_GROUP="urn:globus:groups:id:5fc63928-3752-11e8-9c6f-0e00fd09bf20"
PORTAL_URL="https://acdc.alcf.anl.gov/mdf/detail/"
RUN_AS_SCOPE="0c7ee169-cefc-4a23-81e1-dc323307c863"
SEARCH_INDEX_UUID="ab71134d-0b36-473d-aa7e-7b19b2124c88"
SEARCH_INDEX_UUID="1a57bbe5-5272-477f-9d31-343b8258b7a5"
TEST_DATA_DESTINATION="globus://f10a69a9-338c-4e5b-baa1-0dc92359ab47/mdf_testing/"
TEST_SEARCH_INDEX_UUID="ab71134d-0b36-473d-aa7e-7b19b2124c88"
FLOW_ID="0c7ee169-cefc-4a23-81e1-dc323307c863"
FLOW_SCOPE= "https://auth.globus.org/scopes/0c7ee169-cefc-4a23-81e1-dc323307c863/flow_0c7ee169_cefc_4a23_81e1_dc323307c863_user"
TEST_SEARCH_INDEX_UUID="5acded0c-a534-45af-84be-dcf042e36412"
FLOW_ID="5b016e00-4518-4a94-b2f0-2724cab7ca08"
FLOW_SCOPE= "https://auth.globus.org/scopes/5b016e00-4518-4a94-b2f0-2724cab7ca08/flow_5b016e00_4518_4a94_b2f0_2724cab7ca08_user"
}
}
#These are the env vars provided to the testlambda functions
Expand Down

0 comments on commit 976b736

Please sign in to comment.