Skip to content

Commit f16e2a8

Browse files
authored
Updated running Eiffel-Intelligence documentation. (#333)
1 parent 3e7fe6c commit f16e2a8

8 files changed

+91
-22
lines changed

wiki/markdown/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration
22

3-
The configuration for RabbitMQ, MongoDB etc. can be set in the [application.properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties) file. You can also set them as system properties using the -D flags when starting Eiffel Intelligence.
3+
The configuration for RabbitMQ, MongoDB etc. can be set in the [application.properties](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/application.properties) file. You can also set them as system properties using the -D flags when starting Eiffel Intelligence.
44

55
## Setting up multiple EI instances
66

@@ -26,13 +26,13 @@ This situation may be needed when the events throughput is very high. In this ca
2626
## Configure Eiffel Intelligence with extraction rules for specific Eiffel protocol version
2727

2828
Extraction rules for a specific Eiffel protocol versions is configured by
29-
setting "rules.path" property in [application.properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties)
29+
setting "rules.path" property in [application.properties](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/application.properties)
3030
to point to the correct extraction rules json file.
3131

3232
Eiffel Intelligence provides default extractions rules json files for
3333
different Eiffel protocol versions inside the war artifact file and in the
3434
source code repository. All default extraction rules json files can be
35-
found here: [extraction rules](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/rules)
35+
found here: [extraction rules](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/rules)
3636

3737
Example of setting "rules.path" property in application.properties using default extraction rules json files provided in eiffel-intelligence war file:
3838
- rules.path: /rules/ArtifactRules-Eiffel-Agen-Version.json

wiki/markdown/existing-rules-files.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Existing rules
2+
3+
We have created some rules that represent some use cases triggering the development of the Eiffel Intelligence. The files containing the rules can be found [**here.**](https://github.com/eiffel-community/eiffel-intelligence/tree/master/src/main/resources)
4+
5+
We have also drawn the flows that the existing rules need to perform the aggregation. The drawings contain the events and how they are linked together.
6+
7+
## Flow with the events required for Artifact object flow.
8+
9+
10+
<img src="images/ArtifactRules.png">
11+
</img>
12+
13+
14+
## Flow with the events required for SourceChange object flow.
15+
16+
17+
<img src="images/SourceChangeRules.png">
18+
</img>
19+
20+
21+
## Flow with the events required for TestExecution object flow.
22+
23+
24+
<img src="images/test-executionRules.png">
25+
</img>

wiki/markdown/history-rules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ JSON object from "HistoryExtractionRules" in aggregated object, same as
1515
returned from ER. The path for merging history data will get as long as the
1616
depth of the tree where your historical event exists.
1717

18-
A step by step example will be presented using [artifact aggregation rules](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/rules/ArtifactRules-Eiffel-Agen-Version.json).
18+
A step by step example will be presented using [artifact aggregation rules](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/rules/ArtifactRules-Eiffel-Agen-Version.json).
1919

2020
Assume that an EiffelArtifactCreatedEvent is received and the upstream response
21-
tree looks like [this](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/test/resources/upStreamResultFile.json).
21+
tree looks like [this](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/test/resources/upStreamResultFile.json).
2222

2323
The starting aggregated object is :
2424

wiki/markdown/query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ all aggregated objects from the database. The aggregated objects will be
116116
returned from specific collection (which name is defined by property
117117
aggregated.collection.name) that is stored in specific database (which name is
118118
defined by property spring.data.mongodb.database). Read more about the
119-
different properties in [application's properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties)
119+
different properties in [application's properties](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/application.properties)
120120
or in the [documentation](https://github.com/eiffel-community/eiffel-intelligence/blob/master/wiki/markdown/configuration.md).
121121

122122
Example:

wiki/markdown/rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ StartEvent is "YES" then it will be the first processed event in the aggregation
9090
sequence. If StartEvent is "NO" then Eiffel event of this type will be used to
9191
append information to existing aggregated object. If no aggregated object exist
9292
then it will wait a certain time as defined by property
93-
_waitlist.collection.ttlValue_ in [application's properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties)
93+
_waitlist.collection.ttlValue_ in [application's properties](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/application.properties)
9494
until wanted aggregated object has been created. If no aggregated object is
9595
created in time then the event will no longer be processed and it will be
9696
removed from the wait list.

wiki/markdown/running-eiffel-intelligence.md

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22

33
## _Prerequisites_
44

5-
Eiffel intelligence is Spring microservice distributed in a war file. To start
6-
the service download the war file from
7-
[jitpack.io](https://jitpack.io/#Ericsson/eiffel-intelligence) and look for the
5+
Eiffel Intelligence is a Spring microservice distributed in a war file.
6+
7+
Eiffel Intelligence release war files can be downloaded from Jitpack:
8+
[jitpack.io](https://jitpack.io/#eiffel-community/eiffel-intelligence) and look for the
89
latest version. Now replace the latest version in the link below:
910

10-
https://jitpack.io/com/github/Ericsson/eiffel-intelligence/<version>/eiffel-intelligence-<version>.war
11+
https://jitpack.io/com/github/eiffel-community/eiffel-intelligence/<version>/eiffel-intelligence-<version>.war
12+
13+
## Running with Maven command
1114

1215
If you want to test the latest code in github clone the project and compile it
1316
with:
14-
17+
1518
mvn clean install
1619

1720
append **_-DskipTests_** if you want to skip the tests since the latest on
@@ -26,23 +29,64 @@ With properties added to the maven command, e.g:
2629

2730
mvn spring-boot:run -Dlogging.level.com.ericsson.ei=DEBUG -Dspring.data.mongodb.port=27019
2831

29-
Or you can run the executable war file (located in target folder, if running from source code):
32+
## Running with Java command
3033

31-
java -jar eiffel-intelligence-<version>.war
34+
Another option is to run the executable war file with java command.
35+
If running from source code, war file is generated and produced by maven command (mvn install command can be used as well):
36+
37+
mvn package -DskipTests
38+
39+
This command should produce an `eiffel-intelligence-<version>.war` file in target folder, `target/eiffel-intelligence-<version>.war`.
3240

33-
if you want to run with default configuration for local message buss and
34-
Mongo DB.
41+
The war file is executed by the following command and with default configuration:
42+
43+
java -jar eiffel-intelligence-<version>.war
3544

3645
Own configuration can be provided with
3746

38-
java -jar eiffel-intelligence-<version>.war --spring.config.location=file:<path to own application.properties>
47+
java -jar eiffel-intelligence-<version>.war --spring.config.location=<path to own application.properties>
3948

4049
remember to keep the name of the properties file if you are a beginner to
4150
Spring. More advanced Spring user can look [here](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html)
4251
for more information about using external configuration.
4352

44-
If only few properties need to be overridden then use java opts, for example
53+
If a few properties need to be overridden, then use java opts, for example:
4554

4655
java -jar eiffel-intelligence-<version>.war -Dspring.data.mongodb.port=27019
4756

48-
All available Eiffel-Intelligence properties can be found in [application.properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties) example file.
57+
## Running in Tomcat instance
58+
59+
To run Eiffel Intelligence in Tomcat, the war file must be put into the webapp folder in tomcat installation folder, also called catalina home folder:
60+
61+
(catalina home)/webapp/
62+
63+
If Eiffel Intelligence should be run without any context-path in the url address, then overwrite ROOT.war file in webapp folder with `eiffel-intelligence-<version>.war`:
64+
65+
cp eiffel-intelligence-<version>.war (catalina home)/webapp/ROOT.war
66+
67+
Remove "ROOT" folder in webapp folder:
68+
69+
rm -rf (catalina home)/webapp/ROOT/
70+
71+
Create "config" folder in catalina home folder, if it doesn't exist. Spring and Eiffel Intelligence will look for the application.properties configuration file in config folder:
72+
73+
mkdir (catalina home)/config
74+
75+
Copy the application.properties file into the newly created config folder:
76+
77+
cp application.properties (catalina home)/config
78+
79+
Start Tomcat and Eiffel Intelligence in background/daemon mode by executing command:
80+
81+
(catalina home)/bin/catalina.sh start
82+
83+
To run Tomcat and Eiffel Intelligence with logs printed to console:
84+
85+
(catalina home)/bin/catalina.sh run
86+
87+
## Eiffel Intelligence configurations and properties
88+
89+
All available Eiffel Intelligence properties can be found in [application.properties](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/application.properties) example file.
90+
91+
More documentation of each Eiffel Intelligence property and configurations can be found in [Configuration page](https://github.com/eiffel-community/eiffel-intelligence/blob/master/wiki/markdown/configuration.md)
92+

wiki/markdown/running-rules-on-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ should be set to true:
2727

2828
testaggregated.enabled: true
2929

30-
A GUI is also implemented in [Eiffel Intelligence Frontend](https://github.com/Ericsson/eiffel-intelligence-frontend) but only visible when above property is set to true in the backend (this application).
30+
A GUI is also implemented in [Eiffel Intelligence Frontend](https://github.com/eiffel-community/eiffel-intelligence-frontend) but only visible when above property is set to true in the backend (this application).
3131

3232
## Check if testRules are enabled on the selected instance
3333

@@ -151,4 +151,4 @@ Examples of this endpoint using curl
151151

152152
curl -X POST -H "Content-type: application/json" --data @body.json http://localhost:8090/rules/rule-check/aggregation
153153

154-
For demo you can use following list of [events](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/test/resources/AggregateListEvents.json) and list of [rules](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/test/resources/AggregateListRules.json). They can be used to create a json with the structure as above and when send as body to the endpoint you should get following [aggregation result](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/test/resources/AggregateResultObject.json)
154+
For demo you can use following list of [events](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/test/resources/AggregateListEvents.json) and list of [rules](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/test/resources/AggregateListRules.json). They can be used to create a json with the structure as above and when send as body to the endpoint you should get following [aggregation result](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/test/resources/AggregateResultObject.json)

wiki/markdown/subscription-with-email-notification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _**OBS! Comments are only for documentation purposes and a subscription should
77
not contain them. The subscription will be rejected at this moment if it
88
contains comments like below.**_
99

10-
_**Subscription templates can be found [here](https://github.com/Ericsson/eiffel-intelligence/tree/master/src/main/resources/templates).**_
10+
_**Subscription templates can be found [here](https://github.com/eiffel-community/eiffel-intelligence/tree/master/src/main/resources/templates).**_
1111

1212
{
1313
// The name of the subscription to make it easy to search for it.

0 commit comments

Comments
 (0)