Deploying a pipeline
Deployments operate your pipelines on Kubernetes.
Navigate to Deployments in the UI and click Create your first deployment:

Define a name and select the pipeline that you want to execute:

Click Create deployment.
If you watch your Kubernetes cluster, you will see that a new Kubernetes Deployment has been created:
$ kubectl get pods --watch
NAME READY STATUS RESTARTS AGE
datacater-deployment-06a7a623-4025-4c0e-8c1f-4767e73fbb1f-l4wkq 2/2 Running 0 17s
...
Alternatively, you can also use our API to create a deployment. The following API call creates a deployment with the name
commits
that operates the pipeline with the UUID 3ca219bd-1552-4487-bcfa-132253ef5f28
:$ curl http://localhost:8080/api/v1/deployments/ \
-H'Authorization: Bearer YOUR_TOKEN' \
-XPOST \
-H'Content-Type:application/json' \
-d'{"spec":{"pipeline":"3ca219bd-1552-4487-bcfa-132253ef5f28"},"name":"commits"}'
DataCater provides three means for observing deployments: logs, health information, and metrics.
You can view the logs of a deployment by calling the endpoint
/deployments/{uuid}/logs
:$ curl http://localhost:8080/api/v1/deployments/06a7a623-4025-4c0e-8c1f-4767e73fbb1f/logs \
-H'Authorization: Bearer YOUR_TOKEN'
It returns the most recent lines of the logs of the Kubernetes Deployment in the JSON format.
If you are interested in attaching to the logs, you can call the endpoint
/deployments/{uuid}/watch-logs
, which uses Server Sent Events to stream the logs of the deployment to your client:$ curl http://localhost:8080/api/v1/deployments/06a7a623-4025-4c0e-8c1f-4767e73fbb1f/watch-logs \
-H'Authorization: Bearer YOUR_TOKEN'
You can fetch the health status of a deployment by calling the endpoint
/deployments/{uuid}/health
. The JSON key status indicates the health status and is set to OK
or KO
:$ curl http://localhost:8080/api/v1/deployments/06a7a623-4025-4c0e-8c1f-4767e73fbb1f/health \
-H'Authorization: Bearer YOUR_TOKEN'
You can fetch metrics of a deployment by calling the endpoint
/deployments/{uuid}/metrics
. It provides metrics in the Prometheus format and can be used to automatically gather metrics from your running pipelines:$ curl http://localhost:8080/api/v1/deployments/06a7a623-4025-4c0e-8c1f-4767e73fbb1f/metrics \
-H'Authorization: Bearer YOUR_TOKEN'
Last modified 9mo ago