Skip to content

Commit 8253df9

Browse files
authored
Documentation improvements. (#324)
1 parent 3a671cc commit 8253df9

File tree

2 files changed

+44
-38
lines changed

2 files changed

+44
-38
lines changed

wiki/markdown/docker.md

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,32 @@ With the Docker image user can try-out the Eiffel-Intelligence on a Docker Host
1818

1919
## Follow these step to build the Docker image.
2020

21-
1. Build the Eiffel-intelligence war file:
22-
`mvn package -DskipTests`
21+
**1** Build the Eiffel-intelligence war file:
22+
23+
mvn package -DskipTests
2324

2425

2526
This will produce a war file in the "target" folder.
2627

27-
28-
2. Build the Docker image with the war file that was produced from previous step:
29-
30-
31-
`docker build -t eiffel-intelligence-backend:1.0.1 --build-arg URL=./target/eiffel-intelligence-1.0.1.war -f src/main/docker/Dockerfile .`
32-
28+
**2** Build the Docker image with the war file that was produced from previous step:
29+
30+
docker build -t eiffel-intelligence-backend:1.0.1 --build-arg URL=./target/eiffel-intelligence-1.0.1.war -f src/main/docker/Dockerfile .
3331

3432
Now docker image has build with tag "eiffel-intelligence-backend:1.0.1"
3533

3634
## Run Docker image on local Docker Host
3735
To run the produced docker image on the local Docker host, execute this command:
38-
39-
40-
`docker run -p 8070:8080 --expose 8080 -e server.port=8080 -e logging.level.log.level.root=DEBUG -e logging.level.org.springframework.web=DEBUG -e logging.level.com.ericsson.ei=DEBUG -e spring.data.mongodb.host=mongodb -e spring.data.mongodb.port=27017 eiffel-intelligence:1.0.1`
36+
37+
docker run -p 8070:8080 --expose 8080 -e server.port=8080 -e logging.level.log.level.root=DEBUG -e logging.level.org.springframework.web=DEBUG -e logging.level.com.ericsson.ei=DEBUG -e spring.data.mongodb.host=mongodb -e spring.data.mongodb.port=27017 eiffel-intelligence:1.0.1
4138

4239
MongoDB, RabbitMq and other Eiffel-Intelligence required components need to running and configured via these application properties that is provided to the docker command above. See the application.properties file for all available/required properties:
43-
[application.properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties)
40+
[application.properties](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/application.properties)
4441

4542

46-
# Some info of all flags to this command
43+
## Some info about all flags to this command
4744

4845

49-
## Eiffel Intelligence Spring Properties
46+
### Eiffel Intelligence Spring Properties
5047

5148

5249
<B>"-e server.port=8080"</B> - Is the Spring property setting for Eiffel-Intelligence applications web port.
@@ -58,11 +55,10 @@ logging.level.com.ericsson.ei=DEBUG"</B> - These Spring properties set the loggi
5855

5956
It is possible to set all Spring available properties via docker envrionment "-e" flag. See the application.properties file for all available Eiffel-Intelligence Spring properties:
6057

58+
[application.properties](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/resources/application.properties)
6159

62-
[application.properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties)
6360

64-
65-
## Docker flags
61+
### Docker flags
6662

6763

6864
<B>"--expose 8080"</B> - this Docker flag tells that containers internal port shall be exposed to outside of the Docker Host. This flag do not set which port that should be allocated outside Docker Host on the actual server/machine.
@@ -75,17 +71,18 @@ When Eiffel-Intelligence container is running on your local Docker host, Eiffel-
7571

7672

7773
Another option to configure Eiffel-Intelligence is to provide the application properties file into the container, which can be made in two ways:
78-
1. Put application.properties file in Tomcat Catalina config folder in container and run Eiffe-Intelligence:
79-
80-
`docker run -p 8070:8080 --expose 8080 --volume /path/to/application.properties:/usr/local/tomcat/config/application.properties eiffel-intelligence:0.0.19`
8174

82-
2. Put application.properties file in a different folder in container and tell EI where the application.properties is located in the container:
75+
**1** Put application.properties file in Tomcat Catalina config folder in container and run Eiffel-Intelligence:
76+
77+
docker run -p 8070:8080 --expose 8080 --volume /path/to/application.properties:/usr/local/tomcat/config/application.properties eiffel-intelligence:0.0.19
8378

84-
`docker run -p 8070:8080 --expose 8080 --volume /path/to/application.properties:/tmp/application.properties -e spring.config.location=/tmp/application.properties eiffel-intelligence:0.0.19`
79+
**2** Put application.properties file in a different folder in container and tell EI where the application.properties is located in the container:
80+
81+
docker run -p 8070:8080 --expose 8080 --volume /path/to/application.properties:/tmp/application.properties -e spring.config.location=/tmp/application.properties eiffel-intelligence:0.0.19
8582

8683

8784
# Run Docker image with provided docker-compose file
88-
This docker-compose file includes these components, [docker-compose.yml](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/docker/docker-compose.yml):
85+
This docker-compose file includes these components, [docker-compose.yml](https://github.com/eiffel-community/eiffel-intelligence/blob/master/src/main/docker/docker-compose.yml):
8986
- mongodb
9087
- rabbitmq
9188
- eiffel-er
@@ -97,31 +94,30 @@ The variable EI_BACKEND_IMAGE needs to be updated to the value of your
9794
recently built image: "eiffel-intelligence:1.0.1".
9895

9996
Then run following docker-compose command to startup all components:
100-
101-
`docker-compose -f src/main/docker/docker-compose.yml up -d`
97+
98+
docker-compose -f src/main/docker/docker-compose.yml up -d
10299

103100
It will take some minutes until all components has started. When all components has loaded, you should be able to access EI-Backend REST-interfaces with address:
104101
http://localhost:8080/\<EI rest-api endpoint\>
105102

106103
Curl command can be used to make request to EI-Backend REST API, example for getting all subscriptions:
107-
108-
109-
`curl -X GET http://localhost:8080/subscriptions`
104+
105+
curl -X GET http://localhost:8080/subscriptions
110106

111107
It is also possible to access these Rest-Api addresses in web-browser and get result present in a Json view in web-browser.
112108

113109
Following command can be used to get the logs from the EI-Backend container/service:
114-
115-
`docker-compose -f src/main/docker/docker-compose.yml logs ei-backend`
110+
111+
docker-compose -f src/main/docker/docker-compose.yml logs ei-backend
116112

117113
All service names can be retreived with following command:
114+
115+
docker-compose -f src/main/docker/docker-compose.yml config --services
118116

119-
`docker-compose -f src/main/docker/docker-compose.yml config --services`
120-
121-
It is also possible to retrieve the logs by only using "docker logs <container_id or container_name>" command:
122-
123-
`docker logs <container_id or container_name>`
117+
It is also possible to retrieve the logs by using standard "docker" command:
118+
119+
docker logs <container_id or container_name>
124120

125121
Container id can be retrieved with docker command:
126-
127-
`docker ps`
122+
123+
docker ps

wiki/markdown/running-eiffel-intelligence.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ append **_-DskipTests_** if you want to skip the tests since the latest on
1818
master always has passed the tests. The war file should now be found under
1919
target folder in your cloned project.
2020

21-
Now that you have the executable run :
21+
If you run from source code, you can run Eiffel-Intelligence front-end with maven command:
22+
23+
mvn spring-boot:run
24+
25+
With properties added to the maven command, e.g:
26+
27+
mvn spring-boot:run -Dlogging.level.com.ericsson.ei=DEBUG -Dspring.data.mongodb.port=27019
28+
29+
Or you can run the executable war file (located in target folder, if running from source code):
2230

2331
java -jar eiffel-intelligence-<version>.war
2432

@@ -36,3 +44,5 @@ for more information about using external configuration.
3644
If only few properties need to be overridden then use java opts, for example
3745

3846
java -jar eiffel-intelligence-<version>.war -Dspring.data.mongodb.port=27019
47+
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.

0 commit comments

Comments
 (0)