Deployment of gwcelery:¶
Define come variables:
export HELM_namespace=default
export GRACEDB_publicName=<hostname>
export HELM_gwcelery=`pwd`/gwcelery-helm/gwcelery
git clone https://git.ligo.org/emfollow/k8s/helm.git gwcelery-helm
<hostname>
must be the same defined during graceDB deployment.
We have first to define the gwcelery secrets.
Now that the secrets have been defined, we are ready to deploy GWCelery. The following command will deploy the current HEAD version of the main tree in the gwcelery repository.helm upgrade --install -n ${HELM_namespace} \
gwcelery ${HELM_gwcelery} \
--set storageClassName=local-path \
--set gracedbSandboxed.enabled=true \
--set gracedbSandboxed.gracedb_hostname=${GRACEDB_publicName} \
--set gracedbSandboxed.igwn_hostname=kafka://${GRACEDB_publicName} \
--set gracedbSandboxed.kafka_hostname=kafka://${GRACEDB_publicName} \
--set image.pullPolicy=Always
Run a specific GWCelery image.¶
It is possible to deploy any docker image present in git.ligo.org. There is an image associate to any merge request (refering to original repository and the branch associate to it) and to any TAG in the main repository. Here an example.
helm upgrade --install -n ${HELM_namespace} --reuse-values \
gwcelery ${HELM_gwcelery} \
--set image.repository=containers.ligo.org/roberto.depietri/gwcelery \
--set image.tag=mybranch \
--set image.pullPolicy=Always
Run some workers from the command line:¶
You may create a local deployment of gwcelery and having some of the worker running from the command line and some from the K8S deployment. Now you should use the same configuration used in the K8S deployment. Namely:
export GRACEDB_publicName="fluxuser2.ldas.cit"
export GRACEDB_HOSTNAME="${GRACEDB_publicName}"
export IGWN_HOSTNAME="kafka://${GRACEDB_publicName}"
export KAFKA_HOSTNAME="kafka://${GRACEDB_publicName}"
export CELERY_CONFIG_MODULE="gwcelery.conf.minikube"
1. Create a VIRTUAL ENVIRONMENT¶
source /cvmfs/software.igwn.org/conda/etc/profile.d/conda.sh
conda activate igwn-py311
python3.11 -m $HOME/venv-gwcelery
2. Activate the VIRTUAL ENVIRONMENT¶
3. Compile GWCelery¶
python3.11 -m ensurepip --upgrade
python3.11 -m pip install pipx
python3.11 -m pip install --upgrade pip
python3.11 -m pip install pipx
pipx ensurepath
pipx install poetry==1.8.1
pipx inject poetry poetry-dynamic-versioning
python3.11 -m pip install --no-deps -r <(poetry export --with dev)
python3.11 -m pip install --no-deps .
4. Run a worker from the command line:¶
Deactivate the worker running in the K8S instance
helm upgrade --install -n ${HELM_namespace} --reuse-values \
gwcelery ${HELM_gwcelery}
--set celery.enabled=false
5. Run your worker (from the command line)¶
gwcelery-helm/gwcelery/templates/voevent.yaml- - "voevent"
gwcelery-helm/gwcelery/templates/exttrig.yaml- - "exttrig"
gwcelery-helm/gwcelery/templates/embright.yaml- - "em-bright"
gwcelery-helm/gwcelery/templates/kafka.yaml- - "kafka"
gwcelery-helm/gwcelery/templates/superevent.yaml- - "superevent"
gwcelery-helm/gwcelery/templates/highmem.yaml- - "highmem"
gwcelery-helm/gwcelery/templates/multiprocessing.yaml- - "multiprocessing"
gwcelery-helm/gwcelery/templates/openmp.yaml- - "openmp"
gwcelery-helm/gwcelery/templates/celery.yaml- - "celery"