Building relationship between the DevOps tools is important to achieve end to end trace ability across DevOps Lifecycle, Correlation concept has made this possible. With the help of this correlation the traceability dashboards can be built with ease. Correlation can only be built between tools which has common field values in it.
Step 1: Stop all the running Agents
- All the agents running to be stopped.
Step 2: Stop the PlatformEngine
- Check if all the queues in the RabbitMq is empty and stop the Platform Engine.
Step 3: Changes in the Server-Config file
- Open server-config.json file and add the following at the end of the file.
"correlations" : {
"correlationWindow" : 48,
"correlationFrequency" : 3 ,
"batchSize" : 2000
}
Step 4: Create co-relation.json file
The co-relation file is key file to build relationship. The source value of the key “fields” should contain same value as of the destination. The location of the co-relation.json file should be same as the Server-config.json file namely INSIGHTS_HOME/.Insights/ co-relation.json.
JIRA -> GIT
Jira → Git relationship is only possible if the commit message has the Jirakey.
In the co-relation.json file DO NOT CHANGE, key :“fields” value: “jiraKeys” ,Key:”fields” value “key ”
NEO4J the git property name should be “message”.
[
{
"destination": {
"toolName": "**toolname**",
"fields": [
"**fieldname**"
]
},
"source": {
"toolName" : "**toolname**",
"fields": [
"**fieldname**"
]
},
"relationName" : "**relationshipname**"
}
]
Properties | |
---|---|
destination | Destination tool |
source | Source tool |
fields | Common field between the source and destination tool |
relationName | Relationship Name which will appear as relationship label in the Neo4j |
[
{
"destination": {
"toolName": "JENKINS",
"fields": [
"scmCommitId"
]
},
"source": {
"toolName" : "GIT",
"fields": [
"commitId"
]
},
"relationName" : "FROM_GIT_TO_JENKINS"
},
{
"destination": {
"toolName": "GIT",
"fields": [
"jiraKeys"
]
},
"source": {
"toolName" : "JIRA",
"fields": [
"key"
]
},
"relationName" : "FROM_JIRA_TO_GIT"
},
{
"destination": {
"toolName": "HP",
"fields": [
"jiraKey"
]
},
"source": {
"toolName" : "JIRA",
"fields": [
"key"
]
},
"relationName" : "FROM_JIRA_TO_ALM"
}
]
Step 5: Indexing in Neo4j
All the fields required for the correlation needs to be indexed in Neo4j which includes all the fields mentioned in the co-relation.json file and correlation fields in label DATA - uuid, toolName, correlationTime, maxCorrelationTime, inSightsTime, inSightsTimeX. jiraKeys, jiraKeyProcessed.
Syntax to index the field in as follows:
create index on TOOLNAME(fieldname)
Mandatory fields
Label- DATA:uuid, toolName, correlationTime, maxCorrelationTime, inSightsTime, inSightsTimeX. jiraKeys, jiraKeyProcessed and all the fields in the co-relation.json file.
Example:
create index on :scm(jiraKeys)
create index on :JIRA(key)
create index on :DATA(uuid)
create index on : JENKINS(scmCommitId)
create index on : JENKINS(buildNumber)
Step 6: Start latest version of engine.
- Start the engine.
- The new relationship will be created in the Neo4j in few seconds.
Step 7: Start all the Agents
- Once all the expected relationships are created in neo4j, start all the agents.
Top Section