Vous êtes sur la page 1sur 9

D.A.

T / Installation - ABS
Dossier d’Architecture Technique / Installation

 
 

Sujet :​ Ce document a pour but d’exposer l’architecture à mettre en place pour


l'installation d'ABS. Il expose l’ensemble des outils le composant et comment ceux-ci
interagissent entre eux.
Projet :​ ABS
TABLE DES MATIÈRES
Table des matières 2

Préambule 3

Lexique 3

Architecture Technique Générale 4


Schéma architecture 4
Plateforme techniques 4
Flux 4

Plateformes Matérielles 5
Serveur applicatif 5
Ressources 5
Composants 5
Serveur base de données 5
Ressources 5
Composants 5

Installation logiciels 5
Serveur base de données 5
Installation PostgreSQL 5
Serveur applicatif 6
Installation Java 6
Installation environnement client 6
Installation Apache Tomcat 8.5 6
Installation Nginx 6
Installer Axelor Business Suite 6
PRÉAMBULE
Axelor est une suite d’applications métiers intégrées entièrement modulaire,
ergonomique et évolutive.

LEXIQUE
ERP : Progiciel de Gestion intégré
GED : Gestion électronique de document
PostgresSql: Système de Gestion de Base de Données Relationnelles (
SGBDR ) open source
Apache Tomcat, Apache Http server, Nginx : Serveur WEB open source
ADK : Framework de développement Axelor Development Kit
ARCHITECTURE TECHNIQUE GÉNÉRALE
Schéma architecture

Plateforme techniques
Environnement Serveur Outils Type Logiciel Version

Serveur Linux ERP Serveur Web Apache2 ≥ 2.4


applicatif Nginx ≥ 1.4
Serveur Apache ≥ 8.5
d’application Tomcat
Langage Java 8

Serveur BDD Linux BDD Serveur de base de PostgreSQL ≥ 9.5


données

Flux
De Vers Visibilité / Protocole Port
Client Serveur applicatif: Apache Internet / HTTPS 443
Serveur applicatif: Serveur applicatif: Tomcat Intranet / HTTP 8080
Apache
Serveur applicatif: Serveur BDD: PostgreSQL Intranet / TCP 5432
Tomcat
PLATEFORMES MATÉRIELLES
Il est conseillé de scinder l’installation de l’application en deux éléments distincts. Le
premier sera utilisé pour l’applicatif, le second pour la base de données.

Serveur applicatif
Ressources
Processeur : Min 2 cœurs
RAM : Min 4 Go
Disque dur : Min 10 Go
Composants
Ubuntu Serveur 14.04 LTS
Open JDK 8
Conteneur WEB Apache Tomcat
Serveur HTTP Apache 2 ou Nginx

Serveur base de données


Ressources
Processeur : Min 2 cœurs
RAM : Min 4 Go
Disque dur : Min 10 Go
Composants
Ubuntu Serveur 14.04 LTS
PostgreSQL 9.5

INSTALLATION LOGICIELS

Serveur base de données


Installation PostgreSQL
sudo apt-get install postgresql
sudo su postgres
createuser --no-superuser --username postgres --pwprompt axelor
createdb --owner=axelor axelor

Serveur applicatif
Installation Java
sudo apt-get install openjdk-8-jre
ln -s /usr/lib/jvm/openjdk-8-jre /usr/lib/jvm/default-java
Installation environnement client
sudo adduser axelor
su axelor
cd
mkdir src
mkdir opt

Installation Apache Tomcat 8.5


cd ~/opt
wget
http://apache.mirrors.ovh.net/ftp.apache.org/dist/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.ta
r.gz
tar -xzf apache-tomcat-8.5.20.tar.gz
ln -s /home/axelor/opt/apache-tomcat-8.5.20 /home/axelor/default-tomcat
rm apache-tomcat-8.5.20.tar.gz
cd ~/opt/default-tomcat/bin
vi setenv.sh
chmod +x setenv.sh
sudo vi /etc/init.d/axelor-tomcat
sudo vi /etc/logrorate.d/axelor-tomcat
sudo update-rc.d axelor-tomcat defaults 99

Installation Nginx
sudo apt-get install nginx
cd /etc/nginx
vi sites-available/exemple.axelor.com
ln -s /etc/nginx/sites-available/exemple.axelor.com /etc/nginx/sites-enabled/ exemple.axelor.com
sudo service nginx restart

Installer Axelor Business Suite


cd ~/src/
mkdir axelor-version_app
cp axelor-version_app
jar -xvf ../axelor.war
cd ~
ln -s /home/axelor/src/axelor-version_app /home/axelor/opt/default-tomcat/webapps/ROOT
service axelor-tomcat start

Exemple de fichier de configuration Nginx exemple.axelor.com :

server {
listen 80;
server_name exemple.axelor.com X.X.X.X ;
server_tokens off;

rewrite ^(.*) https://exemple .axelor.com​$1​ permanent;


}
server {
listen 443 ssl;
server_name exemple.axelor.com X.X.X.X;

server_tokens off;
ssl on;
ssl_certificate /etc/nginx/ssl/cert.crt;
ssl_certificate_key /etc/nginx/ssl/cert.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;


ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;

location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
}
}
Exemple de fichier setenv.sh :

export ​CATALINA_PID​="$CATALINA_BASE/tomcat.pid"

export ​JAVA_OPTS​="$JAVA_OPTS -Daxelor.ScriptCacheSize=500 -Daxelor.ScriptCacheExpireTime=10"

export ​CATALINA_OPTS​="$CATALINA_OPTS -Xms2048m"


export ​CATALINA_OPTS​="$CATALINA_OPTS -Xmx2048m"

export ​CATALINA_OPTS​="$CATALINA_OPTS -XX:+UseParallelGC"

export ​CATALINA_OPTS​="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500"

export ​CATALINA_OPTS​="$CATALINA_OPTS -XX:GCTimeRatio=9"

export ​CATALINA_OPTS​="$CATALINA_OPTS -server"

export ​CATALINA_OPTS​="$CATALINA_OPTS -XX:+DisableExplicitGC"

if​ [ -r "$CATALINA_BASE/bin/appenv.sh" ]; ​then


. "$CATALINA_BASE/bin/appenv.sh"
fi

echo​ "Using CATALINA_OPTS:"


for ​arg in ​$CATALINA_OPTS
do
​echo​ ">> " ​$arg
done
echo​ ""

echo​ "Using JAVA_OPTS:"


for ​arg in ​$JAVA_OPTS
do
​echo​ ">> " ​$arg
done
echo​ "_______________________________________________"
echo​ ""

Exemple de fichier de configuration logrotate axelor-tomcat :

/home/axelor/opt/default-tomcat/logs/*.log
/home/axelor/opt/default-tomcat/logs/*.out {
notifempty
copytruncate
dateext
daily
rotate 10
compress
missingok
}
Exemple de fichier de configuration init.d axelor-tomcat :

#!/bin/sh
### BEGIN INIT INFO
# Provides: Apache tomcat 8
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 016
# Short-Description: Start deamon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO

RUNNER​=axelor
CMD_ROOT​=/home/​$RUNNER​/opt/default-tomcat/bin

start()
{
​echo​ "Start tomcat with PID $RUNNER"
su ​$RUNNER​ -c "$CMD_ROOT/startup.sh"
}

stop()
{
​echo​ "Stop tomcat with PID $RUNNER"
su ​$RUNNER​ -c "$CMD_ROOT/shutdown.sh"
}

restart()
{
stop;
sleep 2;
start;
}
case​ ​$1​ in
start)
start;;
stop)
stop;;
restart)
restart;;
*)
​echo ​start|restart|stop
esac

Vous aimerez peut-être aussi