Skip to main content
Glama

Multi-Cloud Infrastructure MCP Server

by nomadslayer
deploy.sh2.84 kB
#!/bin/bash set -e # MCP Orchestrator Deployment Script # This script automates the deployment of the MCP system echo "==========================================" echo "MCP Orchestrator Deployment" echo "==========================================" # Color codes for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color # Check if .env file exists if [ ! -f .env ]; then echo -e "${YELLOW}Warning: .env file not found${NC}" echo "Creating .env from template..." cp .env.example .env echo -e "${RED}Please edit .env file with your configuration before continuing${NC}" exit 1 fi echo -e "${GREEN}✓${NC} .env file found" # Check for required commands command -v docker >/dev/null 2>&1 || { echo -e "${RED}Error: docker is required but not installed${NC}" exit 1 } command -v docker-compose >/dev/null 2>&1 || { echo -e "${RED}Error: docker-compose is required but not installed${NC}" exit 1 } echo -e "${GREEN}✓${NC} Required commands found" # Load environment variables export $(grep -v '^#' .env | xargs) echo "" echo "Step 1: Building Docker images..." docker-compose build echo "" echo "Step 2: Starting ClickHouse and Redis..." docker-compose up -d clickhouse redis echo "Waiting for ClickHouse to be ready..." until docker-compose exec -T clickhouse clickhouse-client --query "SELECT 1" >/dev/null 2>&1; do echo -n "." sleep 2 done echo -e "\n${GREEN}✓${NC} ClickHouse is ready" echo "Waiting for Redis to be ready..." until docker-compose exec -T redis redis-cli ping >/dev/null 2>&1; do echo -n "." sleep 1 done echo -e "${GREEN}✓${NC} Redis is ready" echo "" echo "Step 3: Initializing ClickHouse database..." docker-compose exec -T clickhouse clickhouse-client --multiquery < scripts/init_clickhouse.sql if [ $? -eq 0 ]; then echo -e "${GREEN}✓${NC} ClickHouse database initialized" else echo -e "${RED}Error: Failed to initialize ClickHouse database${NC}" exit 1 fi echo "" echo "Step 4: Starting MCP services..." docker-compose up -d echo "" echo "Waiting for MCP API to be healthy..." until curl -f http://localhost:8000/health >/dev/null 2>&1; do echo -n "." sleep 2 done echo -e "\n${GREEN}✓${NC} MCP API is healthy" echo "" echo "==========================================" echo -e "${GREEN}Deployment Complete!${NC}" echo "==========================================" echo "" echo "Service URLs:" echo " - MCP API: http://localhost:8000" echo " - API Docs: http://localhost:8000/docs" echo " - ClickHouse: http://localhost:8123" echo " - Redis: localhost:6379" echo "" echo "To view logs:" echo " docker-compose logs -f" echo "" echo "To stop services:" echo " docker-compose down" echo "" echo "To view running containers:" echo " docker-compose ps" echo ""

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nomadslayer/infra-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server