2024-08-09 02:01:43 +02:00
|
|
|
# StatoolInfosWeb
|
2020-09-13 01:28:27 +02:00
|
|
|
|
2024-08-09 02:01:43 +02:00
|
|
|
StatoolInfosWeb is a webapp to value the data from StatoolInfos protocol.
|
2020-09-13 01:28:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
## LICENSE
|
|
|
|
|
2024-08-09 02:01:43 +02:00
|
|
|
StatoolInfosWeb is released under the GNU AGPL+ license. Enjoy!
|
2020-09-13 01:28:27 +02:00
|
|
|
|
2020-10-02 18:38:10 +02:00
|
|
|
Authors:
|
|
|
|
* Christian Pierre MOMON <christian.momon@devinsy.fr>
|
|
|
|
|
2023-02-24 01:14:21 +01:00
|
|
|
Contributors : Angie, MrFlos, Quentin Duchemin, Fabrice61, Thomas TConstans, labecasse, Antoine Jaba, setop, Jérémy Collot, Pilou, Kepon, Laurent Sleto, Rodinux…
|
2020-10-02 18:38:10 +02:00
|
|
|
|
|
|
|
### Cat Avatar Generator images
|
|
|
|
|
|
|
|
I am glad to use the beautiful artwork of David Revoy (http://www.peppercarrot.com).
|
|
|
|
* Graphics CC-BY http://creativecommons.org/licenses/by/4.0/
|
|
|
|
* Service: https://www.peppercarrot.com/extras/html/2016_cat-generator/
|
|
|
|
* Source: https://framagit.org/Deevad/cat-avatar-generator
|
|
|
|
* Originally inspired of the code for "MonsterID" by Andreas Gohr http://www.splitbrain.org/go/monsterid.
|
|
|
|
|
2022-09-18 16:32:03 +02:00
|
|
|
### Circle-icons
|
2020-10-02 18:38:10 +02:00
|
|
|
|
|
|
|
I am glad to use the generous artwork of ElegantThemes.com :
|
|
|
|
|
|
|
|
* https://www.elegantthemes.com/blog/freebie-of-the-week/beautiful-flat-icons-for-free
|
|
|
|
* "These icons are completely free and Open Source under the GPL".
|
|
|
|
|
|
|
|
|
|
|
|
### Logo
|
|
|
|
|
|
|
|
Author: Christian Pierre MOMON <christian.momon@devinsy.fr>
|
|
|
|
|
2022-09-18 16:32:03 +02:00
|
|
|
License: Creative Commons CC BY-SA last version.
|
2020-10-02 18:38:10 +02:00
|
|
|
|
2020-09-13 01:28:27 +02:00
|
|
|
|
2021-01-21 06:01:04 +01:00
|
|
|
### Other stuff
|
|
|
|
|
|
|
|
License of other stuff:
|
2021-01-23 17:32:38 +01:00
|
|
|
* csv-logo.svg, json-logo.svg, ods-icon.svg:
|
|
|
|
* Author: Christian P. Momon
|
2022-09-18 16:32:03 +02:00
|
|
|
* License: CC BY-SA 3+.
|
|
|
|
* other: without any specific information, default license of images is CC BY-SA 3+.
|
2021-01-21 06:01:04 +01:00
|
|
|
|
2020-09-13 01:28:27 +02:00
|
|
|
|
|
|
|
## DOCUMENTATION
|
|
|
|
|
|
|
|
Read CONCEPT.md and ONTOLOGY.md files.
|
|
|
|
|
2020-09-13 01:57:25 +02:00
|
|
|
## Requirements
|
|
|
|
|
2024-08-09 02:01:43 +02:00
|
|
|
- Java 17
|
|
|
|
- Eclipse 4.29 (2023-09).
|
2020-09-13 01:57:25 +02:00
|
|
|
|
2020-09-13 01:28:27 +02:00
|
|
|
## INSTALL
|
|
|
|
|
2024-08-13 03:05:47 +02:00
|
|
|
### Requirements
|
2022-02-23 02:47:47 +01:00
|
|
|
Install Java :
|
|
|
|
|
|
|
|
```
|
2024-08-09 02:01:43 +02:00
|
|
|
apt-get install openjdk-17-jre-headless
|
2022-02-23 02:47:47 +01:00
|
|
|
```
|
|
|
|
|
2024-08-09 02:01:43 +02:00
|
|
|
Download the last release: https://forge.devinsy.fr/statool/statoolinfosweb/releases
|
2022-02-23 02:47:47 +01:00
|
|
|
|
2024-08-13 03:05:47 +02:00
|
|
|
### Apache Web Server
|
2021-12-15 17:25:52 +01:00
|
|
|
|
2024-08-13 03:05:47 +02:00
|
|
|
Add a JK section:
|
|
|
|
```
|
|
|
|
# Configure du mod-jk.
|
|
|
|
JkUnMount /.well-known/statoolinfos/* ajp13_worker
|
|
|
|
JkUnMount /.well-known/acme-challenge/* ajp13_worker
|
|
|
|
JkMount /* ajp13_worker
|
|
|
|
```
|
|
|
|
|
|
|
|
Enable the JK module:
|
|
|
|
```
|
|
|
|
a2enmod jk
|
|
|
|
```
|
|
|
|
|
|
|
|
### Tomcat Server
|
|
|
|
Create a dedicated directory:
|
|
|
|
|
|
|
|
```
|
|
|
|
mkdir /srv/infos.mydomain.eu/
|
|
|
|
```
|
|
|
|
|
|
|
|
Create a log configuration file:
|
|
|
|
|
|
|
|
```
|
|
|
|
cd /srv/infos.mydomain.eu/
|
|
|
|
wget https://forge.devinsy.fr/statool/statoolinfosweb/src/branch/main/webapp/WEB-INF/log4j2.properties
|
|
|
|
```
|
|
|
|
|
|
|
|
Edit the `/srv/infos.mydomain.eu/log4j2.properties`:
|
|
|
|
|
|
|
|
```
|
|
|
|
appender.logfile.fileName = /var/log/tomcat10/statoolinfosweb.log
|
|
|
|
appender.logfile.filePattern = /var/log/tomcat10/statoolinfosweb-%i.log.gz
|
|
|
|
```
|
|
|
|
|
|
|
|
Create a directory dedicated to webapps:
|
|
|
|
|
|
|
|
```
|
|
|
|
mkdir /var/log/tomcat10# cd /var/lib/tomcat10/webapps/statoolinfoweb
|
|
|
|
cd /srv/infos.mydomain.eu/
|
|
|
|
ln -s /var/log/tomcat10# cd /var/lib/tomcat10/webapps/statoolinfoweb webapps
|
|
|
|
```
|
|
|
|
|
|
|
|
Put the StatoolInfosWeb WAR file in `/srv/infos.mydomain.eu/` and create a link into the webapps directory:
|
|
|
|
|
|
|
|
```
|
|
|
|
cd /srv/infos.mydomain.eu/webapps/
|
|
|
|
ln -s /srv/infos.mydomain.eu/SIW.ar ROOT.war
|
|
|
|
```
|
|
|
|
|
|
|
|
Create a context file:
|
|
|
|
|
|
|
|
```
|
|
|
|
cd /etc/tomcat10/Catalina
|
|
|
|
mkdir infos.mydomain.eu
|
|
|
|
cd infos.mydomain.eu
|
|
|
|
wget https://forge.devinsy.fr/statool/statoolinfosweb/src/branch/main/webapp/META-INF/context.xml -o ROOT.xml
|
|
|
|
```
|
|
|
|
|
|
|
|
Edit it:
|
|
|
|
|
|
|
|
```
|
|
|
|
<Environment name="kiss4web.environment.name" value="PROD" type="java.lang.String" override="true"/>
|
|
|
|
<Environment name="kiss4web.website.url" value="https://infos.mydomain.eu/" type="java.lang.String" override="true"/>
|
|
|
|
<Environment name="kiss4web.log4j2.path" value="/srv/infos.mydomain.eu/log4j2.properties" type="java.lang.String" override="true"/>
|
|
|
|
<Environment name="statoosinfosweb.configuration.file" value="/srv/statoolinfos/conf/mydomain.eu.conf" type="java.lang.String" override="true"/>
|
|
|
|
```
|
|
|
|
|
|
|
|
Add a dedicated `host` section in `/etc/tomcat10/server.xml`:
|
|
|
|
|
|
|
|
```
|
|
|
|
<Host name="infos.libre-service.eu" appBase="webapps/infoslibreserviceeu"
|
|
|
|
unpackWARs="true" autoDeploy="true">
|
|
|
|
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
|
|
|
prefix="infos.libre-service.eu-access_log" suffix=".txt"
|
|
|
|
pattern="%h %l %u %t "%r" %s %b" />
|
|
|
|
</Host>
|
|
|
|
```
|
|
|
|
|
|
|
|
### StatoolInfos
|
2021-12-15 17:25:52 +01:00
|
|
|
|
2024-08-13 03:05:47 +02:00
|
|
|
The `cache` directory must be readable by Tomcat.
|
2021-12-15 17:25:52 +01:00
|
|
|
|
2024-08-19 00:17:27 +02:00
|
|
|
## About page caching
|
|
|
|
|
|
|
|
The web pages are put in a HTML cache so they are not build again at each request.
|
|
|
|
|
|
|
|
The HTML cache is automatically clear when the data directory is modified. The reload is quick.
|
|
|
|
|
|
|
|
However, the organizations and services metrics pages are in cache. Just because the combinatorial is too large!
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
- (Summary,Generic,Specific,Web) x (Month, Weeks) x (ALL, last months, year1-year4) = 48 pages by item
|
|
|
|
- 100 organizations + 300 services = 400 items
|
|
|
|
- 400 items x 48 pages => ~20 000 pages
|
|
|
|
- 200kB/page => 4GB in memory
|
|
|
|
|
|
|
|
Metrics pages are so numerous than they have to build on demand.
|
|
|
|
|
|
|
|
|