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

Adding Monitoring Script Option #28

Open
wants to merge 9 commits into
base: main
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
15 changes: 15 additions & 0 deletions manual-workflows/resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function show_help {
echo " --ip-range block/range of acceptable IPs e.g. 172.16.0.0/24 or a single IP address e.g. 172.16.5.9/32 or a comma-seperated list of IPs/CIDRs."
echo " --gc-region DEFAULT='us-central1'. For other regions, check: https://cloud.google.com/compute/docs/regions-zones"
echo " --retention DEFAULT is none. For more option, check: https://cloud.google.com/storage/docs/gsutil/commands/mb#retention-policy"
echo " --ms-path DEFAULT=\"\". Monitoring script path is relative to \$BUCKET. If none provided then no monitoring log."
echo ""
}

Expand Down Expand Up @@ -91,6 +92,14 @@ while test $# -gt 0; do
shift
fi
;;
--ms-path*)
if [ ! "$2" ]; then
MS_PATH=""
else
MS_PATH=$2
shift
fi
;;
*)
break
;;
Expand All @@ -116,6 +125,9 @@ fi
if [ -z $RETENTION ]; then
RETENTION=""
fi
if [ -z $MS_PATH ]; then
MS_PATH=""
fi

COMPUTE_NAME="cromwell-compute"
SERVER_NAME="cromwell-server"
Expand All @@ -138,6 +150,9 @@ EOF
"preemptible": 1,
"maxRetries": 2
},
$(if [ "$MS_PATH" != "" ]; then
echo "\"monitoring_script\": \"gs://$BUCKET/$MS_PATH\","
fi)
"final_workflow_log_dir": "gs://$BUCKET/final-logs",
"final_call_logs": "gs://$BUCKET/call-logs"
}
Expand Down
2 changes: 1 addition & 1 deletion manual-workflows/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ EOF
exit 1
fi

# $@ indicates the ability to add any of the other flags that come with gcloud compute instances creat
# $@ indicates the ability to add any of the other flags that come with "gcloud compute instances create"
# for a full account, visit https://cloud.google.com/sdk/gcloud/reference/compute/instances/create
gcloud compute instances create $INSTANCE_NAME \
--project $PROJECT \
Expand Down