Step 5 : Deployment of the dashboarding service

We will now proceed with the deployment of our last element, the dashboard. This dashboard is a web application developed in python with the Dash framework. It retrieves the KPIs generated by the pipeline deployed in step 4, then displays them in graphical form.

A service is deployed in the same way as a job. The difference lays in the "published " key. of the manifest.json which defines, among other things, properties such as the URL through which our service will be accessible (key "prefix "), access restrictions (key "access ") or the icon (key "displayed_name ").

{
    "labels": "app:qsdashboard",
    "type": "service",
    "name": "qsdashboard",
    "published": {
        "access": "dtsbx2zr5s",
        "prefix": "/dtsbx2zr5s-dashboard-kpi/",
        "displayed_name": "Dashboard KPI"

    },
    "image-destination": "eu.gcr.io/dtsbx2zr5s/qsdashboard:0.1",
    "cmd": ["python3","/code/dashboard.py"],
    "replicas": 1,
    "container-port": 8050,
    "env" : [
        {"name": "PROJECT_ID", "value": "dtsbx2zr5s"}
    ],
    "svc-account-secret": "dtsbx2zr5s-251b50bccec4"
}

From the menu, click on Tasks → New Task and fill in the Directory field. the qs-dashboard folder. We select the namespace of our choice (in our case dtsbx2zr5s) then click on Deploy to deploy the service.