1313 IMAGE_REPO : ' {{ .IMAGE_REPO | default "ghcr.io/agntcy" }}'
1414 SLIM_IMAGE_TAG : ' {{ .SLIM_IMAGE_TAG | default "0.4.0" }}'
1515 MCP_PROXY_IMAGE_TAG : ' {{ .MCP_PROXY_IMAGE_TAG | default "0.1.5" }}'
16- SLIM_CHART_TAG : ' {{ .SLIM_CHART_TAG | default "v0.1.8 " }}'
16+ SLIM_CHART_TAG : ' {{ .SLIM_CHART_TAG | default "v0.1.9 " }}'
1717 SLIM_CONFIG : ' {{ .SLIM_CONFIG | default "base" }}'
1818
19+ SLIM_CONTROLLER_CHART_TAG : ' {{ .SLIM_CONTROLLER_CHART_TAG | default "0.1.2" }}'
20+ SLIM_CONTROLLER_IMAGE_TAG : ' {{ .SLIM_CONTROLLER_IMAGE_TAG | default "0.1.0" }}'
21+ SLIM_CONTROLLER_ENDPOINT : ' {{ .SLIM_CONTROLLER_ENDPOINT | default "http://slim-control:50052" }}'
22+ SLIM_CONTROLLER_LOCAL_ENDPOINT : ' {{ .SLIM_CONTROLLER_LOCAL_ENDPOINT | default "localhost:50051" }}'
23+ SLIMCTL_VERSION : ' {{ .SLIMCTL_VERSION | default "v0.2.1" }}'
24+ SLIMCTL_PATH : ' {{ .SLIMCTL_PATH | default "./bin/slimctl" }}'
25+
26+
1927 IMAGE_BAKE_OPTS : ' {{ .IMAGE_BAKE_OPTS | default "--set *.platform=linux/arm64" }}'
2028 LANGCHAIN_APP_TAG : ' {{ .LANGCHAIN_APP_TAG | default "v0.0.16" }}'
2129 AUTOGEN_APP_TAG : ' {{ .AUTOGEN_APP_TAG | default "v0.0.16" }}'
3442
3543 SPIRE_NAMESPACE : ' {{ .SPIRE_NAMESPACE | default "spire-server" }}'
3644
45+ TOPOLOGY_CONFIG : ' {{ .TOPOLOGY_CONFIG | default "config/fire-and-forget.yaml" }}'
3746
3847tasks :
3948 k8s:port-forward:setup :
@@ -47,6 +56,15 @@ tasks:
4756 cmds :
4857 - kill -9 $(ps aux | grep port-forward | grep agntcy-slim | awk '{print $2}') || true
4958
59+ k8s:port-forward:controller:setup :
60+ cmds :
61+ - kubectl port-forward svc/slim-control -n {{ .HELM_NAMESPACE }} 50051:50051 &
62+ - sleep 1
63+
64+ k8s:port-forward:controller:teardown :
65+ cmds :
66+ - kill -9 $(ps aux | grep port-forward | grep slim-control | awk '{print $2}') || true
67+
5068 test-env:deploy :
5169 desc : Deploy agntcy slim test env
5270 cmds :
@@ -62,7 +80,63 @@ tasks:
6280 --install \
6381 --wait \
6482 --wait-for-jobs \
65- --timeout "15m"
83+ --timeout "15m"
84+
85+ test-env:generate:configs :
86+ desc : Generates test environment configuration(s) for agntcy slim based on the provided test-setup descriptor
87+ cmd : |
88+ TOPOLOGY_CONFIG={{.TOPOLOGY_CONFIG}} SLIM_CONTROLLER_ENDPOINT={{ .SLIM_CONTROLLER_ENDPOINT }} go run ./tests/config/main/
89+
90+ test-env:deploy:controller :
91+ desc : Deploy slim controller
92+ cmds :
93+ - |
94+ helm upgrade slim-controller \
95+ oci://{{ .IMAGE_REPO }}/slim/helm/slim-control-plane \
96+ --version {{ .SLIM_CONTROLLER_CHART_TAG }} \
97+ --set image.tag="{{ .SLIM_CONTROLLER_IMAGE_TAG }}" \
98+ --namespace {{ .HELM_NAMESPACE }} \
99+ --create-namespace \
100+ --install \
101+ --wait \
102+ --wait-for-jobs \
103+ --timeout "15m"
104+
105+ test-env:cleanup:contoroller :
106+ desc : Remove agent slim test env
107+ cmds :
108+ - task k8s:port-forward:controller:teardown
109+ - helm delete --namespace {{ .HELM_NAMESPACE }} slim-controller
110+
111+ test-env:deploy:generated :
112+ desc : Deploy agntcy slim test env for each values file in config/.generated
113+ deps :
114+ - test-env:generate:configs
115+ cmd : |
116+ #!/bin/sh
117+ for file in "./config/.gen"/*.yaml ;do
118+ helm upgrade agntcy-$(basename "$file" .yaml) \
119+ oci://{{ .IMAGE_REPO }}/slim/helm/slim \
120+ --version {{ .SLIM_CHART_TAG }} \
121+ --set slim.image.tag="{{ .SLIM_IMAGE_TAG }}" \
122+ -f "$file" \
123+ --namespace {{ .HELM_NAMESPACE }} \
124+ --create-namespace \
125+ --install \
126+ --wait \
127+ --wait-for-jobs \
128+ --timeout "15m"
129+ echo "Deployed agntcy-slim-$(basename "$file" .yaml) with config $(basename "$file")"
130+ done
131+
132+ test-env:cleanup:generated :
133+ desc : Undeploy agntcy slim test env for each values file in config/.generated
134+ cmd : |
135+ #!/bin/sh
136+ for file in "./config/.gen"/*.yaml ;do
137+ helm delete --namespace {{ .HELM_NAMESPACE }} agntcy-$(basename "$file" .yaml)
138+ echo "Deleted agntcy-slim-$(basename "$file" .yaml) with config $(basename "$file")"
139+ done
66140
67141 test-env:cleanup :
68142 desc : Remove agent slim test env
@@ -121,8 +195,8 @@ tasks:
121195 spire:remove :
122196 desc : Remove SPIRE server
123197 cmds :
124- - helm delete spire -n {{ .SPIRE_NAMESPACE }}
125- - helm delete spire-crds -n {{ .SPIRE_NAMESPACE }}
198+ - helm delete spire -n {{ .SPIRE_NAMESPACE }}
199+ - helm delete spire-crds -n {{ .SPIRE_NAMESPACE }}
126200
127201 build:agentic-apps :
128202 desc : Build agentic containers
@@ -135,6 +209,34 @@ tasks:
135209 cmds :
136210 - SLIM_CONFIG={{ .SLIM_CONFIG }} NAMESPACE={{.HELM_NAMESPACE}} IMAGE_REPO={{.IMAGE_REPO}} LANGCHAIN_APP_TAG={{.LANGCHAIN_APP_TAG}} AUTOGEN_APP_TAG={{.AUTOGEN_APP_TAG}} go test ./tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 30m -timeout 30m -ginkgo.v -ginkgo.focus "Agntcy slim sanity test" --ginkgo.json-report=../reports/report-slim-sanity.json --ginkgo.junit-report=../reports/report-slim-sanity.xml
137211
212+ test:slimctl-download :
213+ desc : Download slimctl executable for current OS and architecture
214+ cmds :
215+ - |
216+ set -e
217+ SLIMCTL_ARCH=$(arch)
218+ SLIMCTL_OS=$(echo $(uname -s) | tr '[:upper:]' '[:lower:]')
219+ # Map x86_64 to amd64 for Linux
220+ if [[ "$SLIMCTL_ARCH" == "x86_64" && "$SLIMCTL_OS" == "linux" ]]; then
221+ SLIMCTL_ARCH="amd64"
222+ fi
223+ echo "Detected OS: $SLIMCTL_OS, Architecture: $SLIMCTL_ARCH"
224+ SLIMCTL_URL="https://github.com/agntcy/slim/releases/download/slimctl-{{.SLIMCTL_VERSION}}/slimctl-$SLIMCTL_OS-$SLIMCTL_ARCH"
225+ echo "Downloading slimctl from $SLIMCTL_URL"
226+ TARGET_DIR=$(dirname {{ .SLIMCTL_PATH }})
227+ mkdir -p $TARGET_DIR
228+ curl -L -o {{ .SLIMCTL_PATH }} $SLIMCTL_URL
229+ chmod +x {{ .SLIMCTL_PATH }}
230+ echo "slimctl downloaded to {{ .SLIMCTL_PATH }}"
231+
232+ test:topology :
233+ desc : Slim topology test
234+ deps :
235+ - test:slimctl-download
236+ cmds :
237+ - task k8s:port-forward:controller:setup
238+ - NAMESPACE={{.HELM_NAMESPACE}} SLIMCTL_PATH=../{{.SLIMCTL_PATH}} TOPOLOGY_CONFIG=../{{.TOPOLOGY_CONFIG}} SLIM_CONTROLLER_LOCAL_ENDPOINT={{.SLIM_CONTROLLER_LOCAL_ENDPOINT}} go test ./tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 30m -timeout 30m -ginkgo.v -ginkgo.focus "Slim topology test"
239+
138240 test:mcp-server :
139241 desc : Test MCP over Slim
140242 cmds :
@@ -151,4 +253,4 @@ tasks:
151253 - NAMESPACE={{.HELM_NAMESPACE}} IMAGE_REPO={{.IMAGE_REPO}} MCP_SERVER_TIME_TAG={{.MCP_SERVER_TIME_TAG}} LLAMAINDEX_TIME_AGENT_TAG={{.LLAMAINDEX_TIME_AGENT_TAG}} go test ./tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 30m -timeout 30m -ginkgo.v -ginkgo.focus "MCP server via MCP proxy" --ginkgo.json-report=../reports/report-slim-mcp-proxy.json --ginkgo.junit-report=../reports/report-slim-mcp-proxy.xml
152254
153255 default :
154- cmd : task -l
256+ cmd : task -l
0 commit comments