From eb35b406354a0d3abdf28fe3388992306ec985fb Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Wed, 11 Mar 2026 12:13:49 -0700 Subject: [PATCH] fix run_demo.sh scripts to ensure that otel is started earlier than plano --- demos/advanced/currency_exchange/run_demo.sh | 11 ++++++----- demos/advanced/multi_turn_rag/run_demo.sh | 19 ++++++++++--------- demos/advanced/stock_quote/run_demo.sh | 11 ++++++----- .../multi_agent_crewai_langchain/run_demo.sh | 19 ++++++++++--------- .../travel_agents/run_demo.sh | 19 ++++++++++--------- demos/filter_chains/http_filter/run_demo.sh | 19 ++++++++++--------- demos/filter_chains/mcp_filter/run_demo.sh | 19 ++++++++++--------- demos/getting_started/llm_gateway/run_demo.sh | 11 ++++++----- .../weather_forecast/run_demo.sh | 19 ++++++++++--------- demos/integrations/ollama/run_demo.sh | 11 ++++++----- .../spotify_bearer_auth/run_demo.sh | 11 ++++++----- .../preference_based_routing/run_demo.sh | 11 ++++++----- 12 files changed, 96 insertions(+), 84 deletions(-) diff --git a/demos/advanced/currency_exchange/run_demo.sh b/demos/advanced/currency_exchange/run_demo.sh index 2f862768..e430a1cd 100644 --- a/demos/advanced/currency_exchange/run_demo.sh +++ b/demos/advanced/currency_exchange/run_demo.sh @@ -18,15 +18,16 @@ start_demo() { echo ".env file created with OPENAI_API_KEY." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml } # Function to stop the demo diff --git a/demos/advanced/multi_turn_rag/run_demo.sh b/demos/advanced/multi_turn_rag/run_demo.sh index 95744f27..5bec6368 100644 --- a/demos/advanced/multi_turn_rag/run_demo.sh +++ b/demos/advanced/multi_turn_rag/run_demo.sh @@ -18,19 +18,20 @@ start_demo() { echo ".env file created with OPENAI_API_KEY." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Start agents natively - echo "Starting agents..." - bash start_agents.sh & - - # Step 5: Optionally start UI services (AnythingLLM) + # Step 3: Optionally start UI services (AnythingLLM) + # UI services must start before Plano to avoid OTEL port conflicts if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 5: Start agents natively + echo "Starting agents..." + bash start_agents.sh & } # Function to stop the demo diff --git a/demos/advanced/stock_quote/run_demo.sh b/demos/advanced/stock_quote/run_demo.sh index 2f862768..e430a1cd 100644 --- a/demos/advanced/stock_quote/run_demo.sh +++ b/demos/advanced/stock_quote/run_demo.sh @@ -18,15 +18,16 @@ start_demo() { echo ".env file created with OPENAI_API_KEY." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml } # Function to stop the demo diff --git a/demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh b/demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh index 2e08950b..35bbbbdd 100755 --- a/demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh +++ b/demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh @@ -18,19 +18,20 @@ start_demo() { echo ".env file created with API keys." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Start agents natively - echo "Starting agents..." - bash start_agents.sh & - - # Step 5: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 5: Start agents natively + echo "Starting agents..." + bash start_agents.sh & } # Function to stop the demo diff --git a/demos/agent_orchestration/travel_agents/run_demo.sh b/demos/agent_orchestration/travel_agents/run_demo.sh index 956cb544..643a0aa2 100755 --- a/demos/agent_orchestration/travel_agents/run_demo.sh +++ b/demos/agent_orchestration/travel_agents/run_demo.sh @@ -23,19 +23,20 @@ start_demo() { echo ".env file created with API keys." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Start agents natively - echo "Starting agents..." - bash start_agents.sh & - - # Step 5: Optionally start UI services (Open WebUI, Jaeger) + # Step 3: Optionally start UI services (Open WebUI, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (Open WebUI, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 5: Start agents natively + echo "Starting agents..." + bash start_agents.sh & } # Function to stop the demo diff --git a/demos/filter_chains/http_filter/run_demo.sh b/demos/filter_chains/http_filter/run_demo.sh index e366f939..f203f5b1 100755 --- a/demos/filter_chains/http_filter/run_demo.sh +++ b/demos/filter_chains/http_filter/run_demo.sh @@ -18,19 +18,20 @@ start_demo() { echo ".env file created with OPENAI_API_KEY." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Start agents natively - echo "Starting agents..." - bash start_agents.sh & - - # Step 5: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 5: Start agents natively + echo "Starting agents..." + bash start_agents.sh & } # Function to stop the demo diff --git a/demos/filter_chains/mcp_filter/run_demo.sh b/demos/filter_chains/mcp_filter/run_demo.sh index e366f939..f203f5b1 100755 --- a/demos/filter_chains/mcp_filter/run_demo.sh +++ b/demos/filter_chains/mcp_filter/run_demo.sh @@ -18,19 +18,20 @@ start_demo() { echo ".env file created with OPENAI_API_KEY." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Start agents natively - echo "Starting agents..." - bash start_agents.sh & - - # Step 5: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 5: Start agents natively + echo "Starting agents..." + bash start_agents.sh & } # Function to stop the demo diff --git a/demos/getting_started/llm_gateway/run_demo.sh b/demos/getting_started/llm_gateway/run_demo.sh index 2f862768..e430a1cd 100644 --- a/demos/getting_started/llm_gateway/run_demo.sh +++ b/demos/getting_started/llm_gateway/run_demo.sh @@ -18,15 +18,16 @@ start_demo() { echo ".env file created with OPENAI_API_KEY." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml } # Function to stop the demo diff --git a/demos/getting_started/weather_forecast/run_demo.sh b/demos/getting_started/weather_forecast/run_demo.sh index 1abfe21d..c77f2d83 100644 --- a/demos/getting_started/weather_forecast/run_demo.sh +++ b/demos/getting_started/weather_forecast/run_demo.sh @@ -72,19 +72,20 @@ start_demo() { exit 1 fi - # Step 4: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 5: Start agents natively - echo "Starting agents..." - bash start_agents.sh & - - # Step 6: Optionally start UI services (AnythingLLM, Jaeger, etc.) + # Step 4: Optionally start UI services (AnythingLLM, Jaeger, etc.) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ] || [ "$2" == "--with-ui" ]; then echo "Starting UI services with $COMPOSE_FILE..." docker compose -f "$COMPOSE_FILE" up -d fi + + # Step 5: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 6: Start agents natively + echo "Starting agents..." + bash start_agents.sh & } # Function to stop the demo diff --git a/demos/integrations/ollama/run_demo.sh b/demos/integrations/ollama/run_demo.sh index 870273df..5bbf183b 100644 --- a/demos/integrations/ollama/run_demo.sh +++ b/demos/integrations/ollama/run_demo.sh @@ -24,16 +24,17 @@ start_demo() { echo ".env file created with API keys." fi - # Step 3: Start Plano - echo "Starting Plano with arch_config_with_aliases.yaml..." - planoai up arch_config_with_aliases.yaml - - # Step 4: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + # Step 4: Start Plano + echo "Starting Plano with arch_config_with_aliases.yaml..." + planoai up arch_config_with_aliases.yaml + echo "" echo "Plano started successfully." echo "Please run the following CURL command to test model alias routing. Additional instructions are in the README.md file." diff --git a/demos/integrations/spotify_bearer_auth/run_demo.sh b/demos/integrations/spotify_bearer_auth/run_demo.sh index 2f862768..e430a1cd 100644 --- a/demos/integrations/spotify_bearer_auth/run_demo.sh +++ b/demos/integrations/spotify_bearer_auth/run_demo.sh @@ -18,15 +18,16 @@ start_demo() { echo ".env file created with OPENAI_API_KEY." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml } # Function to stop the demo diff --git a/demos/llm_routing/preference_based_routing/run_demo.sh b/demos/llm_routing/preference_based_routing/run_demo.sh index 94e259a2..30e0c67b 100755 --- a/demos/llm_routing/preference_based_routing/run_demo.sh +++ b/demos/llm_routing/preference_based_routing/run_demo.sh @@ -24,15 +24,16 @@ start_demo() { echo ".env file created with API keys." fi - # Step 3: Start Plano - echo "Starting Plano with config.yaml..." - planoai up config.yaml - - # Step 4: Optionally start UI services (AnythingLLM, Jaeger) + # Step 3: Optionally start UI services (AnythingLLM, Jaeger) + # Jaeger must start before Plano so it can bind the OTEL port (4317) if [ "$1" == "--with-ui" ]; then echo "Starting UI services (AnythingLLM, Jaeger)..." docker compose up -d fi + + # Step 4: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml } # Function to stop the demo