1212 # # Image config
1313 IMAGE_REPO : ' {{ .IMAGE_REPO | default "ghcr.io/agntcy" }}'
1414 GATEWAY_IMAGE_TAG : ' {{ .GATEWAY_IMAGE_TAG | default "0.3.2" }}'
15- DIRECTORY_IMAGE_TAG : ' {{ .DIRECTORY_IMAGE_TAG | default "v0.2.0 " }}'
15+ DIRECTORY_IMAGE_TAG : ' {{ .DIRECTORY_IMAGE_TAG | default "v0.2.1 " }}'
1616
1717 IMAGE_BAKE_OPTS : ' {{ .IMAGE_BAKE_OPTS | default "--set *.platform=linux/arm64" }}'
1818 TEST_APP_TAG : ' {{ .TEST_APP_TAG | default "v0.0.3" }}'
2121 AZURE_OPENAI_ENDPOINT : ' {{ .AZURE_OPENAI_ENDPOINT | default "" }}'
2222
2323 HELM_NAMESPACE : ' {{ .HELM_NAMESPACE | default "default" }}'
24-
2524 REMOVE_CONTAINERS : ' {{ .REMOVE_CONTAINERS | default "true" }}'
25+ REGCRED_CREATE : ' {{ .REGCRED_CREATE | default "false" }}'
26+
2627
2728 RUNNER_TYPE : ' {{ .RUNNER_TYPE | default "docker" }}'
2829
4849 else
4950 printf $DIRCTL_BIN_PATH
5051 fi
51- DIRCTL_BIN_VERSION : ' {{ .DIRCTL_BIN_VERSION | default "v0.2.0 " }}'
52+ DIRCTL_BIN_VERSION : ' {{ .DIRCTL_BIN_VERSION | default "v0.2.1 " }}'
5253
5354tasks :
5455 kind:create :
8687
8788 test:env:directory:deploy :
8889 desc : Deploy Agntcy directory test env
89- vars :
90- REGCRED_CREATE : ' {{ .REGCRED_CREATE | default "false" }}'
9190 cmds :
9291 - |
9392 helm dependency build ./agntcy-dir/components/helm
@@ -102,6 +101,64 @@ tasks:
102101 --wait-for-jobs \
103102 --timeout "15m"
104103
104+ test:env:directory:bootstrap:deploy :
105+ desc : Deploy Directory network peers
106+ deps :
107+ - download:dirctl-bin
108+ env :
109+ DIRECTORY_LOGGER_LOG_LEVEL : ERROR
110+ cmds :
111+ - |
112+ test -f /tmp/node.privkey || openssl genpkey -algorithm ED25519 -out /tmp/node.privkey
113+ bootstrap_peerid=$(./agntcy-dir/tests/.bin/dirctl network info /tmp/node.privkey)
114+ echo "PEER ID: ${bootstrap_peerid}"
115+ echo BOOTSTRAP_PEER_ID="${bootstrap_peerid}" > .env
116+ helm dependency build ./agntcy-dir/components/helm
117+ helm upgrade agntcy-dir \
118+ ./agntcy-dir/components/helm \
119+ --set dir.apiserver.image.tag="{{ .DIRECTORY_IMAGE_TAG }}" \
120+ --set regcred.create="{{ .REGCRED_CREATE }}" \
121+ --set dir.apiserver.privKey="$(cat /tmp/node.privkey)" \
122+ -f ./agntcy-dir/components/config/bootstrap.yaml \
123+ --namespace bootstrap \
124+ --create-namespace \
125+ --install \
126+ --wait \
127+ --wait-for-jobs \
128+ --timeout "15m"
129+
130+ test:env:directory:network:deploy :
131+ desc : Deploy Directory network peers
132+ deps :
133+ - test:env:directory:bootstrap:deploy
134+ cmds :
135+ - for :
136+ matrix :
137+ PEER : [ "peer1", "peer2", "peer3" ]
138+ cmd : |
139+ export $(cat .env)
140+ helm upgrade agntcy-dir \
141+ ./agntcy-dir/components/helm \
142+ --set dir.apiserver.image.tag="{{ .DIRECTORY_IMAGE_TAG }}" \
143+ --set regcred.create="{{ .REGCRED_CREATE }}" \
144+ --set dir.apiserver.config.routing.bootstrap_peers[0]="/dns4/agntcy-dir-apiserver-routing.bootstrap.svc.cluster.local/tcp/8999/p2p/${BOOTSTRAP_PEER_ID}" \
145+ --namespace "{{ .ITEM.PEER }}" \
146+ --create-namespace \
147+ --install \
148+ --wait \
149+ --wait-for-jobs \
150+ --timeout "15m"
151+
152+ test:env:directory:network:cleanup :
153+ desc : Remove Directory network peers
154+ cmds :
155+ - for :
156+ matrix :
157+ PEER : [ "bootstrap", "peer1", "peer2", "peer3" ]
158+ cmd : |
159+ helm delete --namespace {{ .ITEM.PEER }} agntcy-dir
160+
161+
105162 test:env:directory:cleanup :
106163 desc : Remove agntcy directory test env
107164 cmds :
0 commit comments