Skip to content

Commit 0b86512

Browse files
authored
Documention of how run eiffel-intelligence improved (#548)
1 parent 6c12245 commit 0b86512

File tree

1 file changed

+37
-50
lines changed

1 file changed

+37
-50
lines changed

wiki/running-eiffel-intelligence.md

Lines changed: 37 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,82 @@
22

33
## Prerequisites
44

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
67

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
109

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
1214

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
1716

18-
mvn clean install
17+
Now the `war` file is available under `target` directory,
18+
named as `eiffel-intelligence-<VERSION>.war`.
1919

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.
2320

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
2523

2624
mvn spring-boot:run
2725

28-
With properties added to the maven command, e.g:
26+
Additional properties can be added to the `mvn` command directly
2927

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

3230
## 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.
3333

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
4235

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
4837

4938
java -jar eiffel-intelligence-<version>.war --spring.config.location=<path to own application.properties>
5039

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
5241
Spring. More advanced Spring user can look [here](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html)
5342
for more information about using external configuration.
5443

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
5645

57-
java -jar eiffel-intelligence-<version>.war -Dspring.data.mongodb.port=27019
46+
java -jar eiffel-intelligence-<VERSION>.war -Dspring.data.mongodb.port=27019
5847

5948
## 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:
6051

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/
6553

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`:
6856

69-
cp eiffel-intelligence-<version>.war (catalina home)/webapp/ROOT.war
57+
cp eiffel-intelligence-<VERSION>.war <CATALINA HOME>/webapp/ROOT.war
7058

71-
Remove "ROOT" folder in webapp folder:
59+
Remove `ROOT` folder in webapp folder
7260

73-
rm -rf (catalina home)/webapp/ROOT/
61+
rm -rf <CATALINA HOME>/webapp/ROOT/
7462

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
7765

78-
mkdir (catalina home)/config
66+
mkdir <CATALINA HOME>/config
7967

80-
Copy the application.properties file into the newly created config folder:
68+
Copy the `application.properties`file into the newly created `config` folder
8169

8270
cp application.properties (catalina home)/config
8371

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
8573

86-
(catalina home)/bin/catalina.sh start
74+
<CATALINA HOME>/bin/catalina.sh start
8775

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
9177

92-
## Eiffel Intelligence Configurations and Properties
78+
<CATALINA HOME>/bin/catalina.sh run
9379

80+
## Eiffel Intelligence Configurations and Properties
9481
All available Eiffel Intelligence properties can be found in [application.properties](../src/main/resources/application.properties) example file.
9582

9683
More documentation of each Eiffel Intelligence property and configurations

0 commit comments

Comments
 (0)