Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
kind: deploy-kind-service.sh takes any service directory, moves to development/
Tomas Tormo796bca82588c
diff --git a/development/kind/deploy-kind-example.sh b/development/deploy-kind-service.shsimilarity index 50%rename from development/kind/deploy-kind-example.shrename to development/deploy-kind-service.shindex 36a534d8..386fb8f6 100755--- a/development/kind/deploy-kind-example.sh+++ b/development/deploy-kind-service.sh@@ -1,16 +1,21 @@#!/usr/bin/env bash-# Build, load and install a development/examples/<example> into the kind mesh.-# Extra args pass to helm, e.g.: deploy-kind-example.sh code-reviewer-pool/reviewer --set replicaCount=3+# Build, load and install a service into the kind mesh. Takes an example name+# under development/examples/ or a path to any directory with a Dockerfile and+# a charts/sam-node values.yaml. Extra args pass to helm, e.g. --set replicaCount=3set -euo pipefail-[[ $# -ge 1 ]] || { echo "usage: $(basename "$0") <example> [helm args...]" >&2; exit 1; }+[[ $# -ge 1 ]] || { echo "usage: $(basename "$0") <example|service-dir> [helm args...]" >&2; exit 1; }SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"-PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"-EXAMPLE="$1"; shift-DIR="${PROJECT_ROOT}/development/examples/${EXAMPLE}"-[[ -f "${DIR}/values.yaml" ]] || { echo "example '${EXAMPLE}' not found (no values.yaml in development/examples/${EXAMPLE})" >&2; exit 1; }-NAME="$(basename "${EXAMPLE}")"+PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"+SERVICE="$1"; shift+if [[ -d "${SERVICE}" ]]; then+ DIR="$(cd "${SERVICE}" && pwd)"+else+ DIR="${PROJECT_ROOT}/development/examples/${SERVICE}"+fi+[[ -f "${DIR}/values.yaml" ]] || { echo "no values.yaml in ${DIR} (pass an example name under development/examples/ or a path to a service directory)" >&2; exit 1; }+NAME="$(basename "${DIR}")"HELM="helm"if ! command -v helm >/dev/null 2>&1; thendiff --git a/development/kind/run.sh b/development/kind/run.shindex d3190ed8..775d221f 100755--- a/development/kind/run.sh+++ b/development/kind/run.sh@@ -267,7 +267,7 @@ echo " control plane: http://${MAIN_IP}"echo " dex: ${OIDC_ISSUER}"echoecho "To put a service on the mesh, deploy an example with charts/sam-node:"-echo " ./development/kind/deploy-kind-example.sh calc-mcp"+echo " ./development/deploy-kind-service.sh calc-mcp"echo "(it prints the docker build / kind load / helm install commands as it runs them)"echoecho "To drive the mesh, enroll a local node in another shell (it stays in the foreground):"diff --git a/development/kind/test-mesh-e2e.sh b/development/kind/test-mesh-e2e.shindex 86f0ca8a..2aad7ab3 100755--- a/development/kind/test-mesh-e2e.sh+++ b/development/kind/test-mesh-e2e.sh@@ -16,7 +16,7 @@set -euo pipefailecho "== Deploying calc-mcp via charts/sam-node =="-./development/kind/deploy-kind-example.sh calc-mcp+./development/deploy-kind-service.sh calc-mcp# If running locally, we might want to store logs in a temp dirLOG_DIR="${RUNNER_TEMP:-$(mktemp -d)}"diff --git a/site/content/docs/development/kubernetes-deployment.md b/site/content/docs/development/kubernetes-deployment.mdindex 3e12158b..178972cb 100644--- a/site/content/docs/development/kubernetes-deployment.md+++ b/site/content/docs/development/kubernetes-deployment.md@@ -69,14 +69,16 @@ helm --kube-context kind-sam-kind -n sam-kind install calc-mcp charts/sam-node \-f development/examples/calc-mcp/values.yaml```-`development/kind/deploy-kind-example.sh` wraps those commands (as+`development/deploy-kind-service.sh` wraps those commands (as`helm upgrade --install`, plus a rollout wait) and echoes each one as it-runs, so deploying — or redeploying after a code change — is one line.-Extra args pass through to helm:+runs, so deploying — or redeploying after a code change — is one line. It+takes an example name or a path to any directory holding a `Dockerfile` and+a `values.yaml`, and extra args pass through to helm:```bash-./development/kind/deploy-kind-example.sh calc-mcp-./development/kind/deploy-kind-example.sh code-reviewer-pool/reviewer --set replicaCount=3+./development/deploy-kind-service.sh calc-mcp+./development/deploy-kind-service.sh code-reviewer-pool/reviewer --set replicaCount=3+./development/deploy-kind-service.sh ~/src/my-service```To write your own service, copy an example folder: a backend listening on a