diff --git a/sysadmin/T3592-elastic-workers/worker/README.md b/sysadmin/T3592-elastic-workers/worker/README.md index 00a6c5c..8eb2141 100644 --- a/sysadmin/T3592-elastic-workers/worker/README.md +++ b/sysadmin/T3592-elastic-workers/worker/README.md @@ -1,22 +1,81 @@ # Goal - autoscaling workers depending on repositories to load and allocated resources. # keda -Install KEDA - K(ubernetes) E(vents)-D(riven) A(utoscaling): +This uses KEDA - K(ubernetes) E(vents)-D(riven) A(utoscaling): ``` $ helm repo add kedacore https://kedacore.github.io/charts $ helm repo update swhworker@poc-rancher:~$ kubectl create namespace keda namespace/keda created swhworker@poc-rancher:~$ helm install keda kedacore/keda --namespace keda NAME: keda LAST DEPLOYED: Fri Oct 8 09:48:40 2021 NAMESPACE: keda STATUS: deployed REVISION: 1 TEST SUITE: None ``` source: https://keda.sh/docs/2.4/deploy/ + +# helm + +Install the worker declaration from this directory in the cluster +``` +$ export KUBECONFIG=export KUBECONFIG=staging-workers.yaml +$ helm install -f ../loader-git.staging.values.yaml workers-git ../worker +``` + +Where: +``` +$ cat ../loader-git.staging.values.yaml +# Default values for worker. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +amqp: + username: + password: + host: scheduler0.internal.staging.swh.network + queue_threshold: 10 # spawn worker per increment of `value` messages + queues: + - swh.loader.git.tasks.UpdateGitRepository + - swh.loader.git.tasks.LoadDiskGitRepository + - swh.loader.git.tasks.UncompressAndLoadDiskGitRepository + +storage: + host: storage1.internal.staging.swh.network +``` + +# secrets + +This now uses metadata fetcher credentials `metadata-fetcher-credentials` installed as +secret within the cluster. + +More details: +``` +$ kubectl describe secrets/metadata-fetcher-credentials +``` + +Installed through: +``` +$ kubectl -f loader-git-metadata-fetcher-credentials.yaml apply +# secret file +$ cat loader-git-metadata-fetcher-credentials.yaml +apiVersion: v1 +kind: Secret +metadata: + name: metadata-fetcher-credentials +type: Opaque +stringData: + data: | + metadata_fetcher_credentials: + github: + github: + - username: + password: + - ... +```