ITSMO & GitLab
You are using GitLab (GitHub is similar) as a devop platform.
You want to use a CMDB based on an RDF knowledge graph providing a SPARQL interface and you want to keep it updated when a IT service is deployed.
You could introduce some simple policies, leveraging the ITSMO semantic:
- each ConfigurationItem in the CMDB is represented with a GRAPH.
- each Deployment exposes a CI/CD pipeline (.gitlab-ci.yml) that defines some ITService metadata under the
variables
section, e.g.:
stages:
- deploy
deploy-ITservice:
stage: deploy
variables:
ITSERVICE_METADATA: |
{
"versionOf": "https://coach-660862.gitlab.io/",
"dependsOn": "https://gitlab.io/",
"hasScope": "BusinessService"
}
script:
- echo "here the deploy script..."
You need to write an integration webhook endpoint that traps the pipeline successful execution. The webhook code updates the CMDB using the data provided by GitLab in the pipeline event payload.
For example, your webhook, using the pipeline event payload, is supposed to be able to update the following graph in the CMDB endpoint using the Graph Store Protocol:
PUT /rdf-graph-store?graph=<https://gitlab.com/linkeddatacenter/coach/-/pipelines/1625977111> HTTP/1.1
Host: cmdb.example.com
Content-Type: text/turtle
@prefix : <https://w3id.org/itsmo#> .
@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix cmdb: <https://cmdb.example.com/> .
<https://coach-660862.gitlab.io/> a :Asset .
<https://gitlab.com/linkeddatacenter/coach/> a :ObjectRepository ;
schema:name "coach repository" ;
:owner <https://gitlab.com/linkeddatacenter> ;
:responsible <https://gitlab.com/ecows> ;
.
<https://coach-660862.gitlab.io/#1.0.0>a :ITService ;
schema:name "coach service 1.0.0 in staging" ;
:hasEndpoint <https://coach-660862.gitlab.io/> ;
:deployedFrom <https://gitlab.com/linkeddatacenter/coach/-/tree/1.0.0/#deployment> ;
:created "2025-01-12T15:23:35"^^xsd:dateTime ;
:requires <https://gitlab.io/#service> ;
:hasScope :BusinessService ;
prov:wasGeneratedBy <https://gitlab.com/linkeddatacenter/coach/-/pipelines/1625977111#activity> ;
.
<https://gitlab.com/linkeddatacenter/coach/-/tree/1.0.0/#deployment> a :Deployment ;
schema:name "coach deployment 1.0.0" ;
:versionOf <https://gitlab.com/linkeddatacenter/coach/> ;
:created "2025-01-12T15:23:28"^^xsd:dateTime ;
:versionTag "1.0.0"
.
<https://gitlab.com/linkeddatacenter/coach/-/pipelines/1625977111#activity> a prov:Activity, prov:Publish ;
prov:generated <https://coach-660862.gitlab.io/> ;
:uses <https://gitlab.com/linkeddatacenter/coach/-/tree/1.0.0/#deployment> ;
prov:startedAtTime "2025-01-12T15:23:28"^^xsd:dateTime ;
prov:endedAtTime "2025-01-12T15:23:35"^^xsd:dateTime
.
Now a semantic reasoner is free to infer the missing properties according with ITSMO reasoner requirements (see example)