@@ -210,3 +210,59 @@ kubectl port-forward service/cwm-worker-operator-redis-internal 6379
210
210
` ` `
211
211
212
212
For more details, refer to the [CI workflow](./.github/workflows/ci.yml).
213
+
214
+ # # Local Development on real cluster
215
+
216
+ Follow the steps in Local Development section until Start Infrastructure, then continue with the following steps:
217
+
218
+ ` ` ` shell
219
+ # Set the cluster env vars depending on the cluster you want to connect to, you should only use dev / testing clusters
220
+ export CLUSTER_NAME=cwmc-eu-v2test
221
+ export CWM_ZONE=eu-test
222
+ export DNS_RECORDS_PREFIX=$CLUSTER_NAME
223
+
224
+ # Get a fresh token from Vault
225
+ export VAULT_TOKEN=
226
+
227
+ cd ../cwm-worker-cluster
228
+ eval " $( venv/bin/cwm-worker-cluster cluster connect $CLUSTER_NAME ) "
229
+ popd > /dev/null
230
+
231
+ # Optionally, enable full verbosity debugging
232
+ export DEBUG=yes
233
+ export DEBUG_VERBOSITY=10
234
+
235
+ # Set env vars to point to the Redis databases (we will start port-forwarding later)
236
+ export INGRESS_REDIS_PORT=6381
237
+ export INTERNAL_REDIS_PORT=6382
238
+ export METRICS_REDIS_PORT=6383
239
+ export INTERNAL_REDIS_DB=0
240
+ export METRICS_REDIS_DB=0
241
+ ` ` `
242
+
243
+ Start port-forwarding to the Redis databases (you can run this multiple times if a forward was stopped):
244
+
245
+ ` ` ` shell
246
+ lsof -i:6381 > /dev/null || kubectl -n cwm-worker-ingress port-forward service/cwm-worker-ingress-operator-redis 6381:6379 > /dev/null 2>&1 &
247
+ lsof -i:6382 > /dev/null || kubectl -n cwm-operator port-forward service/cwm-worker-operator-redis-internal 6382:6379 > /dev/null 2>&1 &
248
+ lsof -i:6383 > /dev/null || kubectl -n cwm-operator port-forward service/cwm-worker-operator-redis-metrics 6383:6379 > /dev/null 2>&1 &
249
+ ` ` `
250
+
251
+ Stop the relevant operator daemones running on the cluster to prevent conflicts. First, disable argocd autosync,
252
+ then scale the relevant deployments to 0, for example:
253
+
254
+ ` ` ` shell
255
+ kubectl -n cwm-operator scale deployment deployer --replicas=0
256
+ ` ` `
257
+
258
+ Now you can run operator commands for the relevant daemons, for example:
259
+
260
+ ` ` `
261
+ cwm-worker-operator deployer start_daemon --once
262
+ ` ` `
263
+
264
+ When done, terminate the background jobs:
265
+
266
+ ` ` `
267
+ kill $( jobs -p)
268
+ ` ` `
0 commit comments