|
2 | 2 |
|
3 | 3 | ## Prerequisites
|
4 | 4 |
|
5 |
| -Eiffel Intelligence is a Spring microservice distributed in a war file. |
| 5 | +Existing Eiffel Intelligence `war` file is expected. |
| 6 | +If the file doesn't exist it can be compiled using Maven |
6 | 7 |
|
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 |
9 |
| -latest version. Now replace the latest version in the link below: |
| 8 | + mvn clean package |
10 | 9 |
|
11 |
| - https://jitpack.io/com/github/eiffel-community/eiffel-intelligence/<version>/eiffel-intelligence-<version>.war |
| 10 | +Note, that this command starts series of test and some of them |
| 11 | +expect additional services available. |
| 12 | +Please, see [testing.md](Running Tests) for more details. |
| 13 | +To skip the tests append `-DskipTests` option |
12 | 14 |
|
13 |
| -## Running with Maven Command |
14 |
| - |
15 |
| -If you want to test the latest code in github clone the project and compile it |
16 |
| -with: |
| 15 | + mvn clean package -DskipTests |
17 | 16 |
|
18 |
| - mvn clean install |
| 17 | +Now the `war` file is available under `target` directory, |
| 18 | +named as `eiffel-intelligence-<VERSION>.war`. |
19 | 19 |
|
20 |
| -append **_-DskipTests_** if you want to skip the tests since the latest on |
21 |
| -master always has passed the tests. The war file should now be found under |
22 |
| -target folder in your cloned project. |
23 | 20 |
|
24 |
| -If you run from source code, you can run Eiffel-Intelligence front-end with maven command: |
| 21 | +## Running with Maven Command |
| 22 | +To start Eiffel-Intelligence using Maven command, enter |
25 | 23 |
|
26 | 24 | mvn spring-boot:run
|
27 | 25 |
|
28 |
| -With properties added to the maven command, e.g: |
| 26 | +Additional properties can be added to the `mvn` command directly |
29 | 27 |
|
30 | 28 | mvn spring-boot:run -Dlogging.level.com.ericsson.ei=DEBUG -Dspring.data.mongodb.port=27019
|
31 | 29 |
|
32 | 30 | ## Running with Java command
|
| 31 | +Another option is to use `war` and start it with `java` directly. |
| 32 | +See [Prerequisities](#prerequisites) how to build the `war` file. |
33 | 33 |
|
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 |
36 |
| -command (mvn install command can be used as well): |
37 |
| - |
38 |
| - mvn package -DskipTests |
39 |
| - |
40 |
| - This command should produce an `eiffel-intelligence-<version>.war` file in |
41 |
| - target folder, `target/eiffel-intelligence-<version>.war`. |
| 34 | + java -jar eiffel-intelligence-<VERSION>.war |
42 | 35 |
|
43 |
| -The war file is executed by the following command and with default configuration: |
44 |
| - |
45 |
| - java -jar eiffel-intelligence-<version>.war |
46 |
| - |
47 |
| -Own configuration can be provided with |
| 36 | +Own configuration can be provided, too |
48 | 37 |
|
49 | 38 | java -jar eiffel-intelligence-<version>.war --spring.config.location=<path to own application.properties>
|
50 | 39 |
|
51 |
| -remember to keep the name of the properties file if you are a beginner to |
| 40 | +Remember to keep the name of the properties file if you are a beginner to |
52 | 41 | Spring. More advanced Spring user can look [here](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html)
|
53 | 42 | for more information about using external configuration.
|
54 | 43 |
|
55 |
| -If a few properties need to be overridden, then use java opts, for example: |
| 44 | +If a few properties need to be overridden, `java`'s option `-D` can be used for this purpose |
56 | 45 |
|
57 |
| - java -jar eiffel-intelligence-<version>.war -Dspring.data.mongodb.port=27019 |
| 46 | + java -jar eiffel-intelligence-<VERSION>.war -Dspring.data.mongodb.port=27019 |
58 | 47 |
|
59 | 48 | ## Running in Tomcat Instance
|
| 49 | +To run Eiffel Intelligence in Tomcat, the `war` file must be put into the |
| 50 | +`webapp` folder in Tomcat installation folder, also called Catalina home folder: |
60 | 51 |
|
61 |
| -To run Eiffel Intelligence in Tomcat, the war file must be put into the |
62 |
| -webapp folder in tomcat installation folder, also called catalina home folder: |
63 |
| - |
64 |
| - (catalina home)/webapp/ |
| 52 | + <CATALINA HOME>/webapp/ |
65 | 53 |
|
66 |
| -If Eiffel Intelligence should be run without any context-path in the url address, |
67 |
| -then overwrite ROOT.war file in webapp folder with `eiffel-intelligence-<version>.war`: |
| 54 | +If Eiffel Intelligence should be run without any context-path in the URL address, |
| 55 | +then overwrite `ROOT.war` file in webapp folder with `eiffel-intelligence-<version>.war`: |
68 | 56 |
|
69 |
| - cp eiffel-intelligence-<version>.war (catalina home)/webapp/ROOT.war |
| 57 | + cp eiffel-intelligence-<VERSION>.war <CATALINA HOME>/webapp/ROOT.war |
70 | 58 |
|
71 |
| -Remove "ROOT" folder in webapp folder: |
| 59 | +Remove `ROOT` folder in webapp folder |
72 | 60 |
|
73 |
| - rm -rf (catalina home)/webapp/ROOT/ |
| 61 | + rm -rf <CATALINA HOME>/webapp/ROOT/ |
74 | 62 |
|
75 |
| -Create "config" folder in catalina home folder, if it doesn't exist. Spring and |
76 |
| -Eiffel Intelligence will look for the application.properties configuration file in config folder: |
| 63 | +Create `config` folder in catalina home, if it doesn't exist. Spring and |
| 64 | +Eiffel Intelligence will look for the `application.properties` configuration file in config folder |
77 | 65 |
|
78 |
| - mkdir (catalina home)/config |
| 66 | + mkdir <CATALINA HOME>/config |
79 | 67 |
|
80 |
| -Copy the application.properties file into the newly created config folder: |
| 68 | +Copy the `application.properties`file into the newly created `config` folder |
81 | 69 |
|
82 | 70 | cp application.properties (catalina home)/config
|
83 | 71 |
|
84 |
| -Start Tomcat and Eiffel Intelligence in background/daemon mode by executing command: |
| 72 | +Start Tomcat and Eiffel Intelligence in background/daemon mode by executing command |
85 | 73 |
|
86 |
| - (catalina home)/bin/catalina.sh start |
| 74 | + <CATALINA HOME>/bin/catalina.sh start |
87 | 75 |
|
88 |
| -To run Tomcat and Eiffel Intelligence with logs printed to console: |
89 |
| - |
90 |
| - (catalina home)/bin/catalina.sh run |
| 76 | +To run Tomcat and Eiffel Intelligence with logs printed to console |
91 | 77 |
|
92 |
| -## Eiffel Intelligence Configurations and Properties |
| 78 | + <CATALINA HOME>/bin/catalina.sh run |
93 | 79 |
|
| 80 | +## Eiffel Intelligence Configurations and Properties |
94 | 81 | All available Eiffel Intelligence properties can be found in [application.properties](../src/main/resources/application.properties) example file.
|
95 | 82 |
|
96 | 83 | More documentation of each Eiffel Intelligence property and configurations
|
|
0 commit comments