From f7a5d4364f591780c1bcd5da02239f94be3cf074 Mon Sep 17 00:00:00 2001 From: Katayun Kamdin Date: Thu, 11 Dec 2025 11:40:24 -0800 Subject: [PATCH 1/4] updated endpoint ID for data7012 to cosmic phasis share collection id --- config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yml b/config.yml index e9936adc..e3a73fa2 100644 --- a/config.yml +++ b/config.yml @@ -99,7 +99,7 @@ globus: data7012: root_path: / uri: hpc.lbl.gov - uuid: 639c49be-604f-423c-9c5d-82a53afe1bf1 + uuid: 741b96e1-1b98-42a8-918d-daacc24c145f name: data7012 globus_apps: From 77c8d8914753b07d9e58b9eeb17a2094b41f41bd Mon Sep 17 00:00:00 2001 From: Katayun Kamdin Date: Thu, 11 Dec 2025 11:41:56 -0800 Subject: [PATCH 2/4] update the nersc7012 uuid to the correct nersc share collection ID --- config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yml b/config.yml index e3a73fa2..d0eec943 100644 --- a/config.yml +++ b/config.yml @@ -93,7 +93,7 @@ globus: nersc7012: root_path: /global/cfs/cdirs/als/gsharing/data_mover/7012 uri: nersc.gov - uuid: df82346e-9a15-11ea-b3c4-0ae144191ee3 + uuid: d40248e6-d874-4f7b-badd-2c06c16f1a58 name: nersc7012 data7012: From b44e3afc1d5a78c7c69e9b2698968c979301f8c8 Mon Sep 17 00:00:00 2001 From: Katayun Kamdin Date: Thu, 11 Dec 2025 13:08:28 -0800 Subject: [PATCH 3/4] comment out unused import --- orchestration/flows/bl7012/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestration/flows/bl7012/config.py b/orchestration/flows/bl7012/config.py index b4068fc2..69bd1b16 100644 --- a/orchestration/flows/bl7012/config.py +++ b/orchestration/flows/bl7012/config.py @@ -1,7 +1,7 @@ from globus_sdk import TransferClient from orchestration.globus import transfer -from ptycho_nersc import NerscPtychoClient +# from ptycho_nersc import NerscPtychoClient import os From 08eeef4e5f779d3ef6a7c4d14e5070c33742e63c Mon Sep 17 00:00:00 2001 From: Katayun Kamdin Date: Thu, 11 Dec 2025 13:20:35 -0800 Subject: [PATCH 4/4] updated deployment script --- create_deployments_7012.sh | 72 +++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/create_deployments_7012.sh b/create_deployments_7012.sh index 06953e63..3db20aa3 100755 --- a/create_deployments_7012.sh +++ b/create_deployments_7012.sh @@ -1,8 +1,72 @@ -export $(grep -v '^#' .env | xargs) +#!/bin/bash +# Create BL7012 deployment +# Works with both local Prefect server and remote deployments +set -e + +echo "Creating BL7012 deployment..." +echo "" + +# Load environment variables from .env +if [ ! -f .env ]; then + echo "Error: .env file not found" + echo "Please create a .env file with required variables" + exit 1 +fi + +export $(grep -v '^#' .env | xargs) 2>/dev/null || true +echo "✓ Loaded .env" + +# Use PREFECT_API_URL from .env if set, otherwise default to local +PREFECT_API_URL=${PREFECT_API_URL:-http://127.0.0.1:4200/api} +export PREFECT_API_URL + +# Use PREFECT_API_KEY from .env if set (not needed for local server) +if [ -n "$PREFECT_API_KEY" ]; then + export PREFECT_API_KEY + echo "✓ Using API key for authentication" +fi + +echo "Target: $PREFECT_API_URL" +echo "" + +# Check if server is running +if ! curl -s -f "$PREFECT_API_URL/health" > /dev/null 2>&1; then + echo "Error: Cannot connect to Prefect server at $PREFECT_API_URL" + if [ "$PREFECT_API_URL" = "http://127.0.0.1:4200/api" ]; then + echo "Start local server with: prefect server start" + else + echo "Check that the remote server is accessible" + fi + exit 1 +fi + +echo "✓ Server is running" +echo "" + +# Deploy using modern command +# Work pool: process_newdata7012_ptycho4 (production) +# Work queue: bl7012_ptycho4 +prefect deploy \ + --name bl7012-process-new-file \ + --pool process_newdata7012_ptycho4 \ + --work-queue bl7012_ptycho4 \ + orchestration/flows/bl7012/move.py:process_new_file + +echo "" +echo "✓ Deployment created!" +echo "" +echo "Deployment details:" +echo " Name: bl7012-process-new-file" +echo " Flow: process_newfile_7012_ptycho4" +echo " Work Pool: process_newdata7012_ptycho4" +echo " Work Queue: bl7012_ptycho4" +echo "" + +# Old version (deprecated commands - kept for reference): # prefect deployment build ./orchestration/flows/bl7012/move.py:process_new_file_ptycho4 -n 'process_newdata7012_ptycho4' -q bl7012_ptycho4 # prefect deployment apply process_new_file_ptycho4-deployment.yaml - -prefect deployment build ./orchestration/flows/bl7012/move_recon.py:transfer_auto_recon -n 'transfer_auto_recon' -q transfer_auto_recon -prefect deployment apply transfer_auto_recon-deployment.yaml +# +# Note: The flow function is 'process_new_file' but the @flow decorator names it 'process_newfile_7012_ptycho4' +# The function name is what matters for 'prefect deploy'