Events¶
Use Argo Events to trigger workflows.
Setup¶
Configure Metaflow to connect to Argo Events.
{
"METAFLOW_ARGO_EVENTS_EVENT": "chowda",
"METAFLOW_ARGO_EVENTS_EVENT_BUS": "default",
"METAFLOW_ARGO_EVENTS_EVENT_SOURCE": "webhook",
"METAFLOW_ARGO_EVENTS_INTERNAL_WEBHOOK_URL": "http://webhook-eventsource-svc.argo-events.svc.cluster.local:12000",
"METAFLOW_ARGO_EVENTS_WEBHOOK_URL": "http://localhost:12000/chowda",
"METAFLOW_ARGO_EVENTS_SERVICE_ACCOUNT": "operate-workflow-sa",
...
}
If running locally, port-forward the webhook event source.
kubectl port-forward svc/webhook-eventsource-svc 12000:12000
Sync¶
Trigger the IngestFlow
to sync all assets from SonyCi to the Chowda database.
In [1]:
Copied!
from metaflow.integrations import ArgoEvent
sync = ArgoEvent('sync')
# trigger the event with publish()
# sync.publish()
from metaflow.integrations import ArgoEvent
sync = ArgoEvent('sync')
# trigger the event with publish()
# sync.publish()