2024-12-06 14:37:33 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
# Function to start the demo
|
|
|
|
|
start_demo() {
|
|
|
|
|
# Step 1: Check if .env file exists
|
|
|
|
|
if [ -f ".env" ]; then
|
|
|
|
|
echo ".env file already exists. Skipping creation."
|
|
|
|
|
else
|
|
|
|
|
# Step 2: Create `.env` file and set OpenAI key
|
|
|
|
|
if [ -z "$OPENAI_API_KEY" ]; then
|
|
|
|
|
echo "Error: OPENAI_API_KEY environment variable is not set for the demo."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Creating .env file..."
|
|
|
|
|
echo "OPENAI_API_KEY=$OPENAI_API_KEY" > .env
|
|
|
|
|
echo ".env file created with OPENAI_API_KEY."
|
|
|
|
|
fi
|
|
|
|
|
|
Rename all arch references to plano across the codebase
Complete rebrand from "Arch"/"archgw" to "Plano" including:
- Config files: arch_config_schema.yaml, workflow, demo configs
- Environment variables: ARCH_CONFIG_* → PLANO_CONFIG_*
- Python CLI: variables, functions, file paths, docker mounts
- Rust crates: config paths, log messages, metadata keys
- Docker/build: Dockerfile, supervisord, .dockerignore, .gitignore
- Docker Compose: volume mounts and env vars across all demos/tests
- GitHub workflows: job/step names
- Shell scripts: log messages
- Demos: Python code, READMEs, VS Code configs, Grafana dashboard
- Docs: RST includes, code comments, config references
- Package metadata: package.json, pyproject.toml, uv.lock
External URLs (docs.archgw.com, github.com/katanemo/archgw) left as-is.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:15:37 -08:00
|
|
|
# Step 3: Start Plano
|
|
|
|
|
echo "Starting Plano with config.yaml..."
|
2025-12-23 19:26:51 -08:00
|
|
|
planoai up config.yaml
|
2024-12-06 14:37:33 -08:00
|
|
|
|
2024-12-20 13:25:01 -08:00
|
|
|
# Step 4: Start developer services
|
2024-12-06 14:37:33 -08:00
|
|
|
echo "Starting Network Agent using Docker Compose..."
|
|
|
|
|
docker compose up -d # Run in detached mode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Function to stop the demo
|
|
|
|
|
stop_demo() {
|
|
|
|
|
# Step 1: Stop Docker Compose services
|
|
|
|
|
echo "Stopping Network Agent using Docker Compose..."
|
|
|
|
|
docker compose down
|
|
|
|
|
|
Rename all arch references to plano across the codebase
Complete rebrand from "Arch"/"archgw" to "Plano" including:
- Config files: arch_config_schema.yaml, workflow, demo configs
- Environment variables: ARCH_CONFIG_* → PLANO_CONFIG_*
- Python CLI: variables, functions, file paths, docker mounts
- Rust crates: config paths, log messages, metadata keys
- Docker/build: Dockerfile, supervisord, .dockerignore, .gitignore
- Docker Compose: volume mounts and env vars across all demos/tests
- GitHub workflows: job/step names
- Shell scripts: log messages
- Demos: Python code, READMEs, VS Code configs, Grafana dashboard
- Docs: RST includes, code comments, config references
- Package metadata: package.json, pyproject.toml, uv.lock
External URLs (docs.archgw.com, github.com/katanemo/archgw) left as-is.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:15:37 -08:00
|
|
|
# Step 2: Stop Plano
|
|
|
|
|
echo "Stopping Plano..."
|
2025-12-23 19:26:51 -08:00
|
|
|
planoai down
|
2024-12-06 14:37:33 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Main script logic
|
|
|
|
|
if [ "$1" == "down" ]; then
|
|
|
|
|
stop_demo
|
|
|
|
|
else
|
|
|
|
|
# Default action is to bring the demo up
|
|
|
|
|
start_demo
|
|
|
|
|
fi
|