|
1 | 1 | # smartclide-context |
2 | 2 | SmartCLIDE Context Handling Component |
| 3 | + |
| 4 | +## Preconditions to build and run Context Handling |
| 5 | + |
| 6 | +To build and run Context Handling, the following software is required: |
| 7 | + |
| 8 | +- Java (at least version 11) |
| 9 | +- Apache Maven (at least version 3.5.4) |
| 10 | +- Docker (for running tests and deploying Context Handling on the SmartCLIDE cluster) |
| 11 | +- docker-compose (for running local sample instance only) |
| 12 | + |
| 13 | +## How to build Context Handling |
| 14 | + |
| 15 | +Context Handling can be built using maven with the following command: |
| 16 | + |
| 17 | + ```shell |
| 18 | + mvn install |
| 19 | + ``` |
| 20 | + |
| 21 | +In order to build and push a container image that can be deployed, the following command can be used: |
| 22 | + |
| 23 | + ```shell |
| 24 | + mvn install |
| 25 | + mvn jib:build -pl smartclide-monitoring -Djib.to.image="${IMAGE_NAME:IMAGE_TAG}" -Djib.to.auth.username="${CONTAINER_REGISTRY_USERNAME}" -Djib.to.auth.password="${CONTAINER_REGISTRY_TOKEN}" |
| 26 | + ``` |
| 27 | + |
| 28 | +## How to run Context Handling |
| 29 | + |
| 30 | +A sample configuration and docker-compose file can be found in the [samples folder](samples). |
| 31 | + |
| 32 | +You can run the sample with the following command: |
| 33 | + |
| 34 | + ```shell |
| 35 | + docker-compose -f samples/docker-compose.yml up |
| 36 | + ``` |
| 37 | + |
| 38 | +## How to configure Context Handling |
| 39 | + |
| 40 | +### Monitoring Config |
| 41 | + |
| 42 | +**monitoring-config.xml** |
| 43 | + |
| 44 | +An example monitoring configuration can be found here: [monitoring-config.xml](samples/config/monitoring-config.xml) |
| 45 | + |
| 46 | +**monitoring-config.xsd** |
| 47 | + |
| 48 | +The corresponding XSD file can be found here: [monitoring-config.xsd](samples/config/monitoring-config.xsd) |
| 49 | + |
| 50 | +### Description |
| 51 | + |
| 52 | +#### indexes |
| 53 | + |
| 54 | +Each index entry has the following mandatory attributes |
| 55 | + |
| 56 | +- id: The unique name of the index |
| 57 | +- location: The URI of the location the index is stored |
| 58 | + |
| 59 | +#### datasources |
| 60 | + |
| 61 | +Each datasource entry has the following mandatory attributes |
| 62 | + |
| 63 | +- id:The unique name of the datasource |
| 64 | +- type:The type of the datasource. Possible values are: filesystem, webservice, database, messageBroker |
| 65 | +- monitor:The class of the monitor to be used. Possible values are: |
| 66 | + - package de.atb.context.monitoring.monitors.database.DatabaseMonitor |
| 67 | + - package de.atb.context.monitoring.monitors.file.FileSystemMonitor |
| 68 | + - package de.atb.context.monitoring.monitors.file.FilePairSystemMonitor |
| 69 | + - package de.atb.context.monitoring.monitors.file.FileTripletSystemMonitor |
| 70 | + - package de.atb.context.monitoring.monitors.webservice.MessageBrokerMonitor |
| 71 | + - package de.atb.context.monitoring.monitors.webservice.WebServiceMonitor |
| 72 | + - package de.atb.context.monitoring.monitors.GitlabCommitMonitor |
| 73 | + - package de.atb.context.monitoring.monitors.GitMonitor |
| 74 | +- options: Options for the datasource can be entered using this value. The options are dependent on the datasource to be used |
| 75 | +- uri:The uri of the data source to be monitored |
| 76 | +- class:The following datasource implementations are available |
| 77 | + - package de.atb.context.monitoring.config.models.datasources.DatabaseDataSource |
| 78 | + - package de.atb.context.monitoring.config.models.datasources.FilePairSystemDataSource |
| 79 | + - package de.atb.context.monitoring.config.models.datasources.FileSystemDataSource |
| 80 | + - package de.atb.context.monitoring.config.models.datasources.FileTripletSystemDataSource |
| 81 | + - package de.atb.context.monitoring.config.models.datasources.MessageBrokerDataSource |
| 82 | + - package de.atb.context.monitoring.config.models.datasources.WebServiceDataSource |
| 83 | + - package de.atb.context.monitoring.config.models.datasources.GitlabDataSource |
| 84 | + |
| 85 | +#### interpreters |
| 86 | + |
| 87 | +Each interpreter entry has the following mandatory attributes |
| 88 | + |
| 89 | +- id: The unique name of the interpreter |
| 90 | +- configuration |
| 91 | + - analyser: The analyser class to be used. The following implementations are available: |
| 92 | + - package de.atb.context.monitoring.analyser.database.DatabaseAnalyser |
| 93 | + - package de.atb.context.monitoring.analyser.file.FileAnalyser |
| 94 | + - package de.atb.context.monitoring.analyser.file.FilePairAnalyser |
| 95 | + - package de.atb.context.monitoring.analyser.file.FileTripletAnalyser |
| 96 | + - package de.atb.context.monitoring.analyser.webservice.MessageBrokerAnalyser |
| 97 | + - package de.atb.context.monitoring.analyser.webservice.WebServiceAnalyser |
| 98 | + - package de.atb.context.monitoring.analyser.webserviceGitAnalyser |
| 99 | + - package de.atb.context.monitoring.analyser.webservice.GitlabCommitAnalyser |
| 100 | + - parser: The parser class to be used. The following implementations are available: |
| 101 | + - package de.atb.context.monitoring.parser.database.DatabaseParser |
| 102 | + - package de.atb.context.monitoring.parser.file.FileParser |
| 103 | + - package de.atb.context.monitoring.parser.file.FilePairParser |
| 104 | + - package de.atb.context.monitoring.parser.file.FileTripletParser |
| 105 | + - package de.atb.context.monitoring.parser.webservice.MessageBrokerParser |
| 106 | + - package de.atb.context.monitoring.parser.webservice.WebServiceParser |
| 107 | + - package de.atb.context.monitoring.parser.GitlabCommitParser |
| 108 | + - package de.atb.context.monitoring.parser.GitParser |
| 109 | + |
| 110 | + - type: Currently only used for File analyser and parser. Defines the file extensions to be used. |
| 111 | + |
| 112 | +#### monitors |
| 113 | + |
| 114 | +Each monitor entry has the following mandatory attributes |
| 115 | + |
| 116 | +- id: The unique name of the monitor |
| 117 | +- datasource: The id of one previously defined datasource (see above) |
| 118 | +- interpreter: The id of one previously defined interpreter (see above) |
| 119 | +- index: The id of one previously defined index (see above) |
0 commit comments