MEG: Mock Event Generator¶
MEG is a tool used to insert mock events inside graceDB.
Deployment of the mock-event-generator¶
Deploy in igwn-kube¶
To have a local k8s deployment of the mock-event-generator using the locally provided Helm chart:
The first command will prompt you your ligo credential that are needed to establish a ssh connection between the container and the repository containers.ligo.org.Deploy in igwm-k3s¶
on a local k3s deployment:
helm --kubeconfig /etc/rancher/k3s/k3s.yaml upgrade --install -n default \
--set storageClassName=local-path \
meg meg
helm upgrade --install -n default \
--set storageClassName=local-path \
--set gracedb.hostAlias.hostname="gracedb-dev.ldas.cit" \
--set gracedb.hostAlias.ip="10.14.150.23" \
meg meg
MEG usage examples¶
Create a mock events¶
Once installed, you may access the mock-event-generatiom entering the meg-0 pod with the command
gracedb.default.svc.cluster.local
alternatevely, the target instance may be specified using the command
where
is the name of the server hosting graceDB, for a local deployment it
is
gracedb.default.svc.cluster.localwhile on CIT server it is
gracedb-dev.ldas.cit`
Generate a ca-certificate bundle (including the certiufication for teh local instance) and copy to the¶
local directory
kubectl exec -it meg-0 -- bash
meg ca-certificate /tmp/ca.crt
cat $(python -m requests.certs) /tmp/ca.crt > cacerts.pem
REQUESTS_CA_BUNDLE=cacerts.pem gracedb -s https://<graceDB name server>/api credentials server
ligo-proxy-init albert.einstein
exit
# outside MEG copy the server certificate on the local directory
kubectl cp default/meg-0:cacerts.pem cacerts.pem
albert.einstein
is your albert.einstein LIGO username and <graceDB name server>
is the name of the server hosting graceDB, for a local deployment it is gracedb.default.svc.cluster.local
while on CIT server it is gracedb-dev.ldas.cit
See accessible topics on kafka listeners¶
Inside the meg-0 container (that may be started with the command),
The basic fuctionality may be tested giving the commands:pip install hop-client igwn-alert
.local/bin/hop list-topics --no-auth kafka://hopskotch:9092
.local/bin/hop list-topics --no-auth kafka://<graceDB name server>:9092
.local/bin/igwn-alert --no-auth -g default -s kafka://<graceDB name server>:9092 topics
<graceDB name server>
is the name of the server hosting graceDB, for a local deployment it is gracedb.default.svc.cluster.local
while on CIT server it is gracedb-dev.ldas.cit