2025-10-22 14:13:16 -07:00
.. _deployment:
Deployment
==========
2025-12-23 17:14:50 -08:00
This guide shows how to deploy Plano directly using Docker without the `` plano `` CLI, including basic runtime checks for routing and health monitoring.
2025-10-22 14:13:16 -07:00
Docker Deployment
-----------------
2025-12-23 17:14:50 -08:00
Below is a minimal, production-ready example showing how to deploy the Plano Docker image directly and run basic runtime checks. Adjust image names, tags, and the `` plano_config.yaml `` path to match your environment.
2025-10-22 14:13:16 -07:00
.. note ::
2025-12-23 17:14:50 -08:00
You will need to pass all required environment variables that are referenced in your `` plano_config.yaml `` file.
2025-10-22 14:13:16 -07:00
2025-12-23 17:14:50 -08:00
For `` plano_config.yaml `` , you can use any sample configuration defined earlier in the documentation. For example, you can try the :ref: `LLM Routing <llm_router>` sample config.
2025-10-22 14:13:16 -07:00
Docker Compose Setup
~~~~~~~~~~~~~~~~~~~~
Create a `` docker-compose.yml `` file with the following configuration:
.. code-block :: yaml
# docker-compose.yml
services:
2025-12-23 17:14:50 -08:00
plano:
2026-01-28 20:45:10 -08:00
image: katanemo/plano:0.4.4
2025-12-23 17:14:50 -08:00
container_name: plano
2025-10-22 14:13:16 -07:00
ports:
2025-12-23 17:14:50 -08:00
- "10000:10000" # ingress (client -> plano)
- "12000:12000" # egress (plano -> upstream/llm proxy)
2025-10-22 14:13:16 -07:00
volumes:
2025-12-23 17:14:50 -08:00
- ./plano_config.yaml:/app/plano_config.yaml:ro
2025-10-22 14:13:16 -07:00
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY:?error}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:?error}
Starting the Stack
~~~~~~~~~~~~~~~~~~
2025-12-23 17:14:50 -08:00
Start the services from the directory containing `` docker-compose.yml `` and `` plano_config.yaml `` :
2025-10-22 14:13:16 -07:00
.. code-block :: bash
# Set required environment variables and start services
OPENAI_API_KEY=xxx ANTHROPIC_API_KEY=yyy docker compose up -d
Check container health and logs:
.. code-block :: bash
docker compose ps
2025-12-23 17:14:50 -08:00
docker compose logs -f plano
2025-10-22 14:13:16 -07:00
Runtime Tests
-------------
Perform basic runtime tests to verify routing and functionality.
Gateway Smoke Test
~~~~~~~~~~~~~~~~~~
Test the chat completion endpoint with automatic routing:
.. code-block :: bash
2025-12-23 17:14:50 -08:00
# Request handled by the gateway. 'model: "none"' lets Plano decide routing
2025-10-22 14:13:16 -07:00
curl --header 'Content-Type: application/json' \
--data '{"messages":[{"role":"user","content":"tell me a joke"}], "model":"none"}' \
http://localhost:12000/v1/chat/completions | jq .model
Expected output:
.. code-block :: json
2025-12-23 17:14:50 -08:00
"gpt-5.2"
2025-10-22 14:13:16 -07:00
Model-Based Routing
~~~~~~~~~~~~~~~~~~~
Test explicit provider and model routing:
.. code-block :: bash
curl -s -H "Content-Type: application/json" \
2025-12-23 17:14:50 -08:00
-d '{"messages":[{"role":"user","content":"Explain quantum computing"}], "model":"anthropic/claude-sonnet-4-5"}' \
2025-10-22 14:13:16 -07:00
http://localhost:12000/v1/chat/completions | jq .model
Expected output:
.. code-block :: json
2025-12-23 17:14:50 -08:00
"claude-sonnet-4-5"
2025-10-22 14:13:16 -07:00
Troubleshooting
---------------
Common Issues and Solutions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Environment Variables**
2025-12-23 17:14:50 -08:00
Ensure all environment variables (`` OPENAI_API_KEY `` , `` ANTHROPIC_API_KEY `` , etc.) used by `` plano_config.yaml `` are set before starting services.
2025-10-22 14:13:16 -07:00
**TLS/Connection Errors**
If you encounter TLS or connection errors to upstream providers:
- Check DNS resolution
- Verify proxy settings
2025-12-23 17:14:50 -08:00
- Confirm correct protocol and port in your `` plano_config `` endpoints
2025-10-22 14:13:16 -07:00
**Verbose Logging**
To enable more detailed logs for debugging:
2025-12-23 17:14:50 -08:00
- Run plano with a higher component log level
2025-10-22 14:13:16 -07:00
- See the :ref: `Observability <observability>` guide for logging and monitoring details
- Rebuild the image if required with updated log configuration
**CI/Automated Checks**
For continuous integration or automated testing, you can use the curl commands above as health checks in your deployment pipeline.