-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcheck-status.sh
More file actions
executable file
Β·108 lines (95 loc) Β· 5.27 KB
/
Copy pathcheck-status.sh
File metadata and controls
executable file
Β·108 lines (95 loc) Β· 5.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# FoldRun Ecosystem Status Checker
# Use this script to check the deployment progress and health of your environment
# ==============================================================================
PROJECT_ID=${1:?'Usage: ./check-status.sh <PROJECT_ID> [REGION]'}
REGION=${2:-"us-central1"}
TERRAFORM_DIR="terraform"
# Switch to the correct account and project
gcloud config set project "$PROJECT_ID" >/dev/null 2>&1
echo "================================================================================"
echo "π FoldRun Ecosystem Status Checklist"
echo "================================================================================"
echo "Project: $PROJECT_ID"
echo "Region: $REGION"
echo "--------------------------------------------------------------------------------"
# 1. Check Terraform
if [ -d "$TERRAFORM_DIR/.terraform" ]; then
echo "β
[Terraform] Infrastructure is initialized"
BUCKET_NAME=$(cd $TERRAFORM_DIR && terraform output -raw gcs_bucket_name 2>/dev/null || echo "")
DB_BUCKET_NAME=$(cd $TERRAFORM_DIR && terraform output -raw databases_bucket_name 2>/dev/null || echo "")
else
echo "β [Terraform] Infrastructure is NOT initialized (run ./deploy-all.sh)"
fi
if [ -n "$BUCKET_NAME" ] && [[ ! "$BUCKET_NAME" == *"No outputs"* ]]; then
echo "β
[Storage] Bucket $BUCKET_NAME created"
else
echo "β [Storage] Bucket not found in Terraform state"
fi
# 2. Check Cloud Run Viewer
if gcloud run services describe foldrun-viewer --region="$REGION" --project="$PROJECT_ID" >/dev/null 2>&1; then
echo "β
[Cloud Run] foldrun-viewer service is deployed and active"
else
echo "β [Cloud Run] foldrun-viewer service is missing"
fi
# 2b. Check Cloud Run A2A Proxy (optional)
if gcloud run services describe foldrun-a2a --region="$REGION" --project="$PROJECT_ID" >/dev/null 2>&1; then
echo "β
[Cloud Run] foldrun-a2a A2A proxy is deployed and active"
else
echo "β οΈ [Cloud Run] foldrun-a2a A2A proxy is not deployed (optional β deploy with src/foldrun-a2a/deploy.sh)"
fi
# 3. Check Cloud Run Analysis Job
if gcloud run jobs describe foldrun-analysis-job --region="$REGION" --project="$PROJECT_ID" >/dev/null 2>&1; then
echo "β
[Cloud Run] foldrun-analysis-job is deployed"
else
echo "β [Cloud Run] foldrun-analysis-job is missing"
fi
# 4. Check Agent Runtime (via REST API since gcloud subcommand is not available)
ACCESS_TOKEN=$(gcloud auth print-access-token 2>/dev/null)
if [ -n "$ACCESS_TOKEN" ]; then
AGENT_RESULT=$(curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://$REGION-aiplatform.googleapis.com/v1beta1/projects/$PROJECT_ID/locations/$REGION/reasoningEngines" 2>/dev/null)
if echo "$AGENT_RESULT" | grep -q "FoldRun_Agent"; then
echo "β
[Agent Platform] FoldRun Agent Runtime is deployed"
else
echo "β [Agent Platform] FoldRun Agent Runtime is missing"
fi
else
echo "β οΈ [Agent Platform] Could not retrieve access token to check Agent Runtime"
fi
# 5. Check Data Download State
if [ -n "$DB_BUCKET_NAME" ] && [[ ! "$DB_BUCKET_NAME" == *"No outputs"* ]]; then
FOLDER_COUNT=$(gcloud storage ls "gs://$DB_BUCKET_NAME/" 2>/dev/null | grep -c "/$")
# Core databases required for AF2 + OF3 (uniref90, mgnify, pdb_seqres, etc.)
# Boltz-2 adds boltz2/ when configured β total varies by model selection
AF2_CORE_PRESENT=$(gcloud storage ls "gs://$DB_BUCKET_NAME/uniref90/" >/dev/null 2>&1 && echo yes || echo no)
OF3_PRESENT=$(gcloud storage ls "gs://$DB_BUCKET_NAME/of3/" >/dev/null 2>&1 && echo yes || echo no)
BOLTZ2_PRESENT=$(gcloud storage ls "gs://$DB_BUCKET_NAME/boltz2/" >/dev/null 2>&1 && echo yes || echo no)
if [ "$FOLDER_COUNT" -gt 0 ]; then
echo "β
[Data] Databases present ($FOLDER_COUNT folders)"
[ "$AF2_CORE_PRESENT" = "yes" ] && echo " β
AF2 core databases (uniref90 etc.)" || echo " β AF2 core databases missing"
[ "$OF3_PRESENT" = "yes" ] && echo " β
OF3 weights + CCD" || echo " β οΈ OF3 databases not downloaded"
[ "$BOLTZ2_PRESENT" = "yes" ] && echo " β
Boltz-2 cache (weights + mols)" || echo " β Boltz-2 databases not downloaded (run: setup_data.py --models boltz)"
elif gcloud storage objects describe "gs://$DB_BUCKET_NAME/.deploy-state/data-download-triggered" >/dev/null 2>&1; then
echo "β³ [Data] Database download triggered β check Cloud Batch for progress"
else
echo "β [Data] Databases have NOT been downloaded yet (run ./deploy-all.sh --steps data)"
fi
else
echo "β [Data] Cannot check data status without a valid DB bucket"
fi
echo "================================================================================"