cloudrun.sh


Overview

cloudrun.sh is a shell script designed to automate the deployment of the Zoo Animal MCP server to Google Cloud Run in an unauthenticated mode. Its purpose is to deploy the service such that it is publicly accessible without requiring any authentication tokens or identity verification. This enables open, unrestricted HTTP access to the Zoo Animal Query API, facilitating scenarios such as demos, public APIs, or internal testing environments.

The script uses the Google Cloud CLI (gcloud) to perform the deployment with specific flags and options that:

This file plays a critical role within the larger Cloud Run Deployment Automation framework, providing a streamlined and repeatable command for deploying the MCP server publicly.


File Content and Explanation

echo "Deploying Cloud Run Endpoint in Unauthenticated Mode"

gcloud run deploy zoo-mcp-server \
    --allow-unauthenticated \
    --region=europe-west1 \
    --source=. \
    --labels=dev-tutorial=codelab-gde-medium-open

Script Breakdown


Usage

This script is typically executed after initializing the environment and project setup using supporting scripts such as init.sh and set_env.sh. It assumes that the user has appropriate permissions and that the Google Cloud SDK (gcloud) is installed and authenticated.

Example Usage

./cloudrun.sh

This command will:

  1. Print the deployment mode message.

  2. Deploy the Zoo MCP server to Cloud Run with public access enabled.


Important Implementation Details


Interaction with Other Parts of the System

This deployment script is part of a suite of shell scripts in the deployment automation process:


Deployment Workflow Diagram

flowchart TD
A[User Executes cloudrun.sh] --> B[Echo Deployment Mode]
B --> C[gcloud run deploy Command]
C --> D[Build Container from Source]
D --> E[Deploy to Cloud Run Service: zoo-mcp-server]
E --> F[Service Deployed with Public Access]
F --> G[API Available Without Authentication]

This flowchart visualizes the straightforward deployment process enabled by cloudrun.sh, emphasizing the public, unauthenticated access mode and source-based container build.


References to Related Topics


This file (cloudrun.sh) encapsulates a minimal yet effective deployment command tailored for public, unauthenticated hosting of the Zoo MCP server on Google Cloud Run, serving as a key component in the overall deployment automation ecosystem.