Merge branch 'master' of gitlab.factory.insight.doubletrade.com:scores/ansible

This commit is contained in:
benoitpotier 2017-03-22 09:33:48 +01:00
commit 49699338dc
92 changed files with 917 additions and 165 deletions

View File

@ -0,0 +1,102 @@
[production]
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.plugins.Auth = "Application_Controller_Plugin_Auth"
resources.frontController.plugins.Menu = "Application_Controller_Plugin_Menu"
resources.frontController.params.displayExceptions = 0
resources.layout.layoutPath = APPLICATION_PATH "/layouts/default"
resources.view.helperPath = APPLICATION_PATH "/layouts/helpers"
resources.view.basePath = APPLICATION_PATH "/views/default"
; Master Database
resources.db.adapter = mysqli
resources.db.params.host = 172.19.7.10
resources.db.params.username = backoffice
resources.db.params.password = BMsH9vSEExbu5JK6
resources.db.params.dbname = backoffice
resources.db.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8mb4"
resources.db.isDefaultTableAdapter = true
resources.session.use_only_cookies = true
resources.session.gc_maxlifetime = 864000
resources.session.remember_me_seconds = 864000
resources.session.saveHandler.class = "Zend_Session_SaveHandler_DbTable"
resources.session.saveHandler.options.name = "session"
resources.session.saveHandler.options.primary = "id"
resources.session.saveHandler.options.modifiedColumn = "modified"
resources.session.saveHandler.options.dataColumn = "data"
resources.session.saveHandler.options.lifetimeColumn = "lifetime"
; -= Scores configuration =-
profil.server.name = WebRecette
profil.mail.method = smtp
profil.mail.host = 192.168.3.200
profil.mail.config.port = 587
profil.mail.config.auth = login
profil.mail.config.username = batch1@srvbak01
profil.mail.config.password = test
profil.mail.email.support = supportdev@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.mail.email.contact = supportdev@scores-decisions.com
profil.mail.email.production = supportdev@scores-decisions.com
profil.wkhtmltopdf.path = "/usr/local/bin/wkhtmltopdf"
profil.path.shared = "/home/vhosts/backoffice/shared"
; Metier Database
profil.db.metier.adapter = mysqli
profil.db.metier.params.host = 172.19.7.10
profil.db.metier.params.username = backoffice
profil.db.metier.params.password = BMsH9vSEExbu5JK6
profil.db.metier.params.dbname = jo
profil.db.metier.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8"
; Slave Database
profil.db.slave.adapter = mysqli
profil.db.slave.params.host = 195.154.170.169
profil.db.slave.params.port = 3306
profil.db.slave.params.username = wsuser
profil.db.slave.params.password = wspass2012
profil.db.slave.params.dbname = backoffice
profil.db.slave.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8"
; Metier - Infogreffe
profil.infogreffe.wsdl = "infogreffe.wsdl"
profil.infogreffe.url = "https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE"
profil.infogreffe.uri = "https://webservices.infogreffe.fr/"
profil.infogreffe.user = 85000109
profil.infogreffe.password = 166
profil.infogreffe.cache.path = "PROJECT_DIR/shared/cache"
profil.infogreffe.cache.time = 8
profil.infogreffe.storage.path = "PROJECT_DIR/shared/datafile/greffes"
; Search Engine
profil.sphinx.ent.host = "172.19.7.12"
profil.sphinx.ent.port = 9312
profil.sphinx.ent.version = "2.2.11"
profil.sphinx.dir.host = "172.19.7.12"
profil.sphinx.dir.port = 9312
profil.sphinx.dir.version = "2.2.11"
profil.sphinx.act.host = "172.19.7.12"
profil.sphinx.act.port = 9312
profil.sphinx.act.version = "2.2.11"
profil.sphinx.histo.host = "172.19.7.12"
profil.sphinx.histo.port = 9312
profil.sphinx.histo.version = "2.2.11"
[staging : production]
resources.frontController.params.displayExceptions = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

View File

@ -24,7 +24,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -1 +1 @@
172.18.8.6 project_config=dev opcache=fcgi
172.18.8.6 project_env=dev opcache=fcgi

View File

@ -2,12 +2,12 @@ MAILTO=supportdev@scores-decisions.com
##############
# Backoffice #
##############
01 00 * * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --nocontrat --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/count.log 2>&1
09 00 * * * www-data php /home/vhosts/backoffice/current/scripts/jobs/seFluxCount.php --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/flux.log 2>&1
01 00 * * * www-data php /home/vhosts/backoffice/current/bin/logConsult.php --nocontrat --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/count.log 2>&1
09 00 * * * www-data php /home/vhosts/backoffice/current/bin/logFlux.php --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/flux.log 2>&1
01 06 * * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --filelogs --nocontrat --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/count.log 2>&1
01 05 1 * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --filefact --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/count.log 2>&1
01 06 1 * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --filelogs --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/count.log 2>&1
01 07 1 * * www-data php /home/vhosts/backoffice/current/scripts/jobs/seFluxCount.php --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/flux.log 2>&1
01 06 * * * www-data php /home/vhosts/backoffice/current/bin/logConsult.php --filelogs --nocontrat --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/count.log 2>&1
01 05 1 * * www-data php /home/vhosts/backoffice/current/bin/logConsult.php --filefact --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/count.log 2>&1
01 06 1 * * www-data php /home/vhosts/backoffice/current/bin/logConsult.php --filelogs --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/count.log 2>&1
01 07 1 * * www-data php /home/vhosts/backoffice/current/bin/logFlux.php --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/flux.log 2>&1
01 19 * * 1-5 www-data php /home/vhosts/backoffice/current/scripts/jobs/setOperatorStat.php --date $(date +\%Y\%m\%d) >> /home/vhosts/backoffice/shared/log/operator.log 2>&1
01 19 * * 1-5 www-data php /home/vhosts/backoffice/current/bin/statOperator.php --date $(date +\%Y\%m\%d) >> /home/vhosts/backoffice/shared/log/operator.log 2>&1

View File

@ -1 +1 @@
192.168.3.203 project_config=preprod opcache=fcgi
192.168.3.203 project_env=preprod opcache=fcgi

View File

@ -0,0 +1 @@
172.19.8.12 project_env=preprod opcache=fcgi

View File

@ -1,4 +1,5 @@
---
- name: BACKOFFICE | Restart PHP-FPM
become: yes
command: "service php5-fpm restart"
service: name=php5-fpm state=reloaded
when: opcache is defined and opcache == "fcgi"

View File

@ -10,7 +10,7 @@
- name: BACKOFFICE | Configure Project application.ini
become: yes
copy: src="./config/application.{{project_config}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
copy: src="./config/{{project_env}}/{{inventory_hostname}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
- name: BACKOFFICE | Set path in project config
become: yes
@ -18,7 +18,7 @@
- name: BACKOFFICE | Configuration PHP-FPM
become: yes
copy: src="./config/.user.{{project_config}}.ini" dest="{{ansistrano_release_path.stdout}}/public/.user.ini"
copy: src="./config/.user.{{project_env}}.ini" dest="{{ansistrano_release_path.stdout}}/public/.user.ini"
- name: BACKOFFICE | Set Permission "ansistrano_release_path"
become: yes

View File

@ -0,0 +1,38 @@
---
- name: BACKOFFICE | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: BACKOFFICE | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: BACKOFFICE | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'conso' }
- { src: 'export' }
- { src: 'import' }
- { src: 'log' }
- { src: 'stats' }
- { src: 'upload' }
- stat:
path: "{{ansistrano_deploy_to}}/shared/clients"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/clients"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)
- stat:
path: "{{ansistrano_deploy_to}}/shared/datafile"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/datafile"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)
- stat:
path: "{{ansistrano_deploy_to}}/shared/sources"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/sources"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)

View File

@ -0,0 +1,70 @@
[production]
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layoutPath = APPLICATION_PATH "/views"
resources.view.basePath = APPLICATION_PATH "/views"
; Scores configuration
profil.server.name = development
profil.mail.method = smtp
profil.mail.host = 192.168.3.200
profil.mail.port = 587
profil.mail.auth = login
profil.mail.username = batch1@srvbak01
profil.mail.password = test
profil.mail.email.support = supportdev@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.mail.email.contact = supportdev@scores-decisions.com
profil.mail.email.production = supportdev@scores-decisions.com
profil.path.shared = "/home/deploy/batch/shared"
; Metier - Infogreffe
profil.infogreffe.wsdl = "infogreffe.wsdl"
profil.infogreffe.url = "https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE"
profil.infogreffe.uri = "https://webservices.infogreffe.fr/"
profil.infogreffe.user = 85000109
profil.infogreffe.password = 166
profil.infogreffe.cache.path = APPLICATION_PATH "/../data/cache"
profil.infogreffe.cache.time = 8
profil.infogreffe.storage.path = ""
; Search Engine
profil.sphinx.ent.host = "172.19.7.12"
profil.sphinx.ent.port = 9312
profil.sphinx.ent.version = "2.2.11"
profil.sphinx.dir.host = "172.19.7.12"
profil.sphinx.dir.port = 9312
profil.sphinx.dir.version = "2.2.11"
profil.sphinx.act.host = "172.19.7.12"
profil.sphinx.act.port = 9312
profil.sphinx.act.version = "2.2.11"
profil.sphinx.histo.host = "172.19.7.12"
profil.sphinx.histo.port = 9312
profil.sphinx.histo.version = "2.2.11"
; Database configuration - For old configuration - see Configure.php
profil.db.metier.adapter=mysqli
profil.db.metier.params.host=172.19.7.10
profil.db.metier.params.username=batch
profil.db.metier.params.password=BMsH9vSEExbu5JK6
profil.db.metier.params.dbname=sdv1
profil.db.metier.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8"
[staging : production]
resources.frontController.params.displayExceptions = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 0
resources.frontController.params.displayExceptions = 1
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

View File

@ -0,0 +1,100 @@
<?php
/** BATCH **/
define('FILLER',' ');
define('VERSION_FICHIER_BODACC','0106');
define('LONGUEUR_LIGNE_SORTIE', 2000);
/** Paramétres du FTP des JO **/
define('BODACC_FTP_URL', 'ftp.journal-officiel.gouv.fr');
define('BODACC_FTP_USER', 'SCORE');
define('BODACC_FTP_PASS', 'SD075');
define('BODACC_LOCAL_DIR', '/home/deploy/batch/shared/sources/bodacc/');
define('JAL_LOCAL_DIR', '/home/deploy/batch/shared/sources/jal/');
/** Paramétres du FTP de Hugin : Communiqués de presse **/
define('HUGIN_FTP_URL', 'ftp.companynews.fr');
define('HUGIN_FTP_USER', 'scores');
define('HUGIN_FTP_PASS', 'scores_632');
define('HUGIN_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/hugin/');
/** Paramétres du FTP de ActusNews : Communiqués de presse **/
define('ACTUSNEWS_FTP_URL', 'ftp.actusnews.com');
define('ACTUSNEWS_FTP_USER', 'scores_act');
define('ACTUSNEWS_FTP_PASS', '6_etIwL');
define('ACTUSNEWS_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/actusnews/');
/** Paramétres du FTP de Di Release : Communiqués de presse **/
define('DIRELEASE_FTP_URL', 'ftp.actusnews.com');
define('DIRELEASE_FTP_USER', 'scores_dir');
define('DIRELEASE_FTP_PASS', '-gT52sQ');
define('DIRELEASE_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/direlease/');
/** Paramétres du FTP des Echos: Communiqués de presse **/
define('LESECHOS_FTP_URL', 'ftp.webdisclosure.com');
define('LESECHOS_FTP_USER', 'Scores');
define('LESECHOS_FTP_PASS', 'scores2001');
define('LESECHOS_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/lesechos/');
/** Paramétres du FTP de BusinessWire : Communiqués de presse **/
define('BUSINESSWIRE_LOCAL_DIR_INCOMING', '/home/deploy/batch/shared/ftp/businesswire/');
define('BUSINESSWIRE_LOCAL_DIR', '/home/deploy/batch/shared/infosreg/businesswire/');
/** Base de données de S&D **/
define ('MYSQL_HOST', '192.168.3.28');
define ('MYSQL_USER', 'batch');
define ('MYSQL_PASS', 'BMsH9vSEExbu5JK6');
define ('MYSQL_DEFAULT_DB', 'jo');
define ('MYSQL_SQL_LOG', 'NONE');
define ('SPHINX_HOST', '172.19.7.12');
define ('SPHINX_PORT', 9312);
define ('SPHINX_VERSION', "2.2.11");
define ('SPHINX_ENT_HOST', '172.19.7.12');
define ('SPHINX_ENT_PORT', 9312);
define ('SPHINX_ENT_VERSION', "2.2.11");
define ('SPHINX_DIR_HOST', '172.19.7.12');
define ('SPHINX_DIR_PORT', 9312);
define ('SPHINX_DIR_VERSION', "2.2.11");
define ('SPHINX_ACT_HOST', '172.19.7.12');
define ('SPHINX_ACT_PORT', 9312);
define ('SPHINX_ACT_VERSION', "2.2.11");
define ('SPHINX_HISTO_HOST', '172.19.7.12');
define ('SPHINX_HISTO_PORT', 9312);
define ('SPHINX_HISTO_VERSION', "2.2.11");
/** SERVEUR DE MESSAGERIE **/
define ('SMTP_HOST', 'smtp.celeste.fr');
define ('SMTP_PORT', 25);
define ('SMTP_USER', '');
define ('SMTP_PASS', '');
/** INFOGREFFE **/
define('INFOGREFFE_DISPO', true);
define('INFOGREFFE_DISPO_WS', true);
define('INFOGREFFE_DISPO_WEB', true);
define('INFOGREFFE_WS_URL', 'https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE');
define('INFOGREFFE_WS_URI', 'https://webservices.infogreffe.fr/');
define('INFOGREFFE_WS_USER', '85000109');
define('INFOGREFFE_WS_PASS', '166');
/** AMABIS **/
define('AMABIS_WS_URL', 'http://sw4.amabis.com:5101');
define('AMABIS_WS_URI', 'http://sw4.amabis.com:5101');
/** Dossiers locaux pour les documents a telecharger (PDF kbis, marques, etc...) **/
define ('DOC_WEB_LOCAL', '/home/deploy/batch/shared/datafile/');
define ('DOC_WEB_URL', '/data/');
/** LOGGING **/
define('LOG_PATH', '/home/deploy/batch/shared/log');
define ('DATETIME', date('YmdHis'));
define ('DATE', substr(DATETIME,0,8));
define ('TIME', substr(DATETIME,8,6));
define ('DATE_LISIBLE', substr(DATETIME,6,2).'/'.substr(DATETIME,4,2).'/'.substr(DATETIME,0,4));
define ('TIME_LISIBLE', substr(DATETIME,8,2).':'.substr(DATETIME,10,2).':'.substr(DATETIME,12,2));

View File

@ -23,7 +23,7 @@ profil.mail.email.support = supportdev@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.mail.email.contact = supportdev@scores-decisions.com
profil.mail.email.production = supportdev@scores-decisions.com
profil.path.shared = "/home/scores/batch/shared"
profil.path.shared = "/home/deploy/batch/shared"
; Metier - Infogreffe
profil.infogreffe.wsdl = "infogreffe.wsdl"

View File

@ -8,36 +8,36 @@ define('LONGUEUR_LIGNE_SORTIE', 2000);
define('BODACC_FTP_URL', 'ftp.journal-officiel.gouv.fr');
define('BODACC_FTP_USER', 'SCORE');
define('BODACC_FTP_PASS', 'SD075');
define('BODACC_LOCAL_DIR', '/home/scores/batch/shared/sources/bodacc/');
define('JAL_LOCAL_DIR', '/home/scores/batch/shared/sources/jal/');
define('BODACC_LOCAL_DIR', '/home/deploy/batch/shared/sources/bodacc/');
define('JAL_LOCAL_DIR', '/home/deploy/batch/shared/sources/jal/');
/** Paramétres du FTP de Hugin : Communiqués de presse **/
define('HUGIN_FTP_URL', 'ftp.companynews.fr');
define('HUGIN_FTP_USER', 'scores');
define('HUGIN_FTP_PASS', 'scores_632');
define('HUGIN_LOCAL_DIR', '/home/scores/batch/shared/sources/infosreg/hugin/');
define('HUGIN_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/hugin/');
/** Paramétres du FTP de ActusNews : Communiqués de presse **/
define('ACTUSNEWS_FTP_URL', 'ftp.actusnews.com');
define('ACTUSNEWS_FTP_USER', 'scores_act');
define('ACTUSNEWS_FTP_PASS', '6_etIwL');
define('ACTUSNEWS_LOCAL_DIR', '/home/scores/batch/shared/sources/infosreg/actusnews/');
define('ACTUSNEWS_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/actusnews/');
/** Paramétres du FTP de Di Release : Communiqués de presse **/
define('DIRELEASE_FTP_URL', 'ftp.actusnews.com');
define('DIRELEASE_FTP_USER', 'scores_dir');
define('DIRELEASE_FTP_PASS', '-gT52sQ');
define('DIRELEASE_LOCAL_DIR', '/home/scores/batch/shared/sources/infosreg/direlease/');
define('DIRELEASE_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/direlease/');
/** Paramétres du FTP des Echos: Communiqués de presse **/
define('LESECHOS_FTP_URL', 'ftp.webdisclosure.com');
define('LESECHOS_FTP_USER', 'Scores');
define('LESECHOS_FTP_PASS', 'scores2001');
define('LESECHOS_LOCAL_DIR', '/home/scores/batch/shared/sources/infosreg/lesechos/');
define('LESECHOS_LOCAL_DIR', '/home/deploy/batch/shared/sources/infosreg/lesechos/');
/** Paramétres du FTP de BusinessWire : Communiqués de presse **/
define('BUSINESSWIRE_LOCAL_DIR_INCOMING', '/home/scores/batch/shared/ftp/businesswire/');
define('BUSINESSWIRE_LOCAL_DIR', '/home/scores/batch/shared/infosreg/businesswire/');
define('BUSINESSWIRE_LOCAL_DIR_INCOMING', '/home/deploy/batch/shared/ftp/businesswire/');
define('BUSINESSWIRE_LOCAL_DIR', '/home/deploy/batch/shared/infosreg/businesswire/');
/** Base de données de S&D **/
define ('MYSQL_HOST', '192.168.3.28');
@ -87,11 +87,11 @@ define('AMABIS_WS_URL', 'http://sw4.amabis.com:5101');
define('AMABIS_WS_URI', 'http://sw4.amabis.com:5101');
/** Dossiers locaux pour les documents a telecharger (PDF kbis, marques, etc...) **/
define ('DOC_WEB_LOCAL', '/home/scores/batch/shared/datafile/');
define ('DOC_WEB_LOCAL', '/home/deploy/batch/shared/datafile/');
define ('DOC_WEB_URL', '/data/');
/** LOGGING **/
define('LOG_PATH', '/home/scores/batch/shared/log');
define('LOG_PATH', '/home/deploy/batch/shared/log');
define ('DATETIME', date('YmdHis'));
define ('DATE', substr(DATETIME,0,8));

View File

@ -1,16 +1,16 @@
---
- name: Deploy Batch
hosts: all
remote_user: scores
remote_user: deploy
become: no
vars:
# Specific
project: batch
project_tree: master
project_mode: prod
project_env: prod
# Always add a trailing / if you want rsync the content of the directory
ansistrano_deploy_from: "/home/vhosts/deploy/export/{{project}}/"
ansistrano_deploy_to: "/home/scores/{{project}}"
ansistrano_deploy_to: "/home/deploy/{{project}}"
ansistrano_version_dir: releases
ansistrano_current_dir: current
ansistrano_shared_paths: []
@ -25,7 +25,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -3,9 +3,10 @@ LANG=fr_FR.UTF-8
###########
# Clients #
###########
20 18 * * 1-6 scores php /home/scores/batch/current/bin/clientSfrIndicateur.php --cron --load >> /home/scores/batch/shared/log/SfrIndicateur.log
30 20 * * 1-6 scores php /home/scores/batch/current/bin/clientSfrSurv.php --cron --in >> /home/scores/batch/shared/log/SfrSurv.log 2>&1
20 00 * * 1-6 scores php /home/scores/batch/current/bin/clientSfrIndicateur.php --cron --evaluate >> /home/scores/batch/shared/log/SfrIndicateur.log 2>&1
00 22 * * * scores php /home/scores/batch/current/bin/clientRapportsTexte.php --site >> /home/scores/batch/shared/log/rapportsTextesWeb.log
00 23 * * * scores php /home/scores/batch/current/bin/clientRapportsTexte.php --ftp >> /home/scores/batch/shared/log/rapportsTextesFtp.log
00 07 * * 1-5 scores php /home/scores/batch/current/bin/clientRrgSurv.php --cron --since flux --from log >> /home/scores/batch/shared/log/rrgsurv.log 2>&1
20 18 * * 1-6 deploy php /home/deploy/batch/current/bin/clientSfrIndicateur.php --cron --load >> /home/deploy/batch/shared/log/SfrIndicateur.log
30 20 * * 1-6 deploy php /home/deploy/batch/current/bin/clientSfrSurv.php --cron --in >> /home/deploy/batch/shared/log/SfrSurv.log 2>&1
20 00 * * 1-6 deploy php /home/deploy/batch/current/bin/clientSfrIndicateur.php --cron --evaluate >> /home/deploy/batch/shared/log/SfrIndicateur.log 2>&1
00 22 * * * deploy php /home/deploy/batch/current/bin/clientRapportsTexte.php --site >> /home/deploy/batch/shared/log/rapportsTextesWeb.log
00 23 * * * deploy php /home/deploy/batch/current/bin/clientRapportsTexte.php --ftp >> /home/deploy/batch/shared/log/rapportsTextesFtp.log
00 18 * * * deploy php /home/deploy/batch/current/bin/clientRapportsTexte.php --file auto >> /home/deploy/batch/shared/log/rapportsTextesAuto.log
00 07 * * 1-5 deploy php /home/deploy/batch/current/bin/clientRrgSurv.php --cron --since flux --from log >> /home/deploy/batch/shared/log/rrgsurv.log 2>&1

View File

@ -4,14 +4,14 @@ LANG=fr_FR.UTF-8
# Traitement de la données #
############################
# dataScoring Quotidien
01 10 * * 1-6 scores php /home/scores/batch/current/bin/dataScoring.php --source inseeadd >> /home/scores/batch/shared/log/dataScoring.log 2>&1
05 10,23 * * 1-6 scores php /home/scores/batch/current/bin/dataScoring.php --source bilanasso >> /home/scores/batch/shared/log/dataScoring.log 2>&1
10 10,20 * * 1-6 scores php /home/scores/batch/current/bin/dataScoring.php --source bilan >> /home/scores/batch/shared/log/dataScoring.log 2>&1
20 10,15,21 * * 1-6 scores php /home/scores/batch/current/bin/dataScoring.php --source privilege >> /home/scores/batch/shared/log/dataScoring.log 2>&1
30 10 * * 1-6 scores php /home/scores/batch/current/bin/dataScoring.php --source insee >> /home/scores/batch/shared/log/dataScoring.log 2>&1
01 12,16,18 * * 1-5 scores php /home/scores/batch/current/bin/dataScoring.php --source manualadd >> /home/scores/batch/shared/log/dataScoring.log 2>&1
01 13 * * 1-6 scores php /home/scores/batch/current/bin/dataScoring.php --source dirigeant >> /home/scores/batch/shared/log/dataScoring.log 2>&1
10 13,19 * * 1-5 scores php /home/scores/batch/current/bin/dataScoring.php --source collecte >> /home/scores/batch/shared/log/dataScoring.log 2>&1
30 13,18 * * 1-5 scores php /home/scores/batch/current/bin/dataScoring.php --source bodacc >> /home/scores/batch/shared/log/dataScoring.log 2>&1
01 10 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source inseeadd >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
05 10,23 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source bilanasso >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
10 10,20 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source bilan >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
20 10,15,21 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source privilege >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
30 10 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source insee >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
01 12,16,18 * * 1-5 deploy php /home/deploy/batch/current/bin/dataScoring.php --source manualadd >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
01 13 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source dirigeant >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
10 13,19 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source collecte >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
30 13,18 * * 1-6 deploy php /home/deploy/batch/current/bin/dataScoring.php --source bodacc >> /home/deploy/batch/shared/log/dataScoring.log 2>&1
# dataSocring rattrapage

View File

@ -3,4 +3,4 @@ LANG=fr_FR.UTF-8
##############
# Prestation #
##############
01 04 * * 1-6 scores php /home/scores/batch/current/bin/prestaA6cmoEntrep.php --cron --nomail >> /home/scores/batch/shared/log/diffusionEntrepA6cmo.log 2>&1
01 04 * * 1-6 deploy php /home/deploy/batch/current/bin/prestaA6cmoEntrep.php --cron --nomail >> /home/deploy/batch/shared/log/diffusionEntrepA6cmo.log 2>&1

View File

@ -3,14 +3,14 @@ LANG=fr_FR.UTF-8
#########################
# Sources #
#########################
01 */4 * * * scores php /home/scores/batch/current/bin/sourceDila.php --cron >> /home/scores/batch/shared/log/dila.log 2>&1
10 09 * * * scores php /home/scores/batch/current/bin/sourceDila.php --cron --from restricted >> /home/scores/batch/shared/log/dila.log 2>&1
10 13 * * * scores php /home/scores/batch/current/bin/sourceDila.php --cron --from restricted >> /home/scores/batch/shared/log/dila.log 2>&1
01 */4 * * * deploy php /home/deploy/batch/current/bin/sourceDila.php --cron >> /home/deploy/batch/shared/log/dila.log 2>&1
10 09 * * * deploy php /home/deploy/batch/current/bin/sourceDila.php --cron --from restricted >> /home/deploy/batch/shared/log/dila.log 2>&1
10 13 * * * deploy php /home/deploy/batch/current/bin/sourceDila.php --cron --from restricted >> /home/deploy/batch/shared/log/dila.log 2>&1
30 11 * * * scores php /home/scores/batch/current/bin/sourceInpiDecisions.php >> /home/scores/batch/shared/log/getInpiDecisions.log 2>&1
00 19 * * * scores php /home/scores/batch/current/bin/sourceInpiDecisions.php >> /home/scores/batch/shared/log/getInpiDecisions.log 2>&1
00 7-18/1 * * 1-5 scores php /home/scores/batch/current/bin/sourceJalPdf.php --cron >> /home/scores/batch/shared/log/jalpdf.log 2>&1
00 04 * * 1-5 scores php /home/scores/batch/current/bin/sourceJalTable.php --cron >> /home/scores/batch/shared/log/jalpdf.log 2>&1
30 11 * * * deploy php /home/deploy/batch/current/bin/sourceInpiDecisions.php >> /home/deploy/batch/shared/log/getInpiDecisions.log 2>&1
00 19 * * * deploy php /home/deploy/batch/current/bin/sourceInpiDecisions.php >> /home/deploy/batch/shared/log/getInpiDecisions.log 2>&1
00 7-18/1 * * 1-5 deploy php /home/deploy/batch/current/bin/sourceJalPdf.php --cron >> /home/deploy/batch/shared/log/jalpdf.log 2>&1
00 04 * * 1-5 deploy php /home/deploy/batch/current/bin/sourceJalTable.php --cron >> /home/deploy/batch/shared/log/jalpdf.log 2>&1
30 11-19/2 * * * scores php /home/scores/batch/current/bin/sourceInsee.php --cron >> /home/scores/batch/shared/log/insee.log 2>&1
*/30 3-5 * * * scores php /home/scores/batch/current/bin/sourceInsee.php --cron >> /home/scores/batch/shared/log/insee.log 2>&1
30 11-19/2 * * * deploy php /home/deploy/batch/current/bin/sourceInsee.php --cron >> /home/deploy/batch/shared/log/insee.log 2>&1
*/30 3-5 * * * deploy php /home/deploy/batch/current/bin/sourceInsee.php --cron >> /home/deploy/batch/shared/log/insee.log 2>&1

View File

@ -1,9 +1,9 @@
/home/scores/batch/shared/log/*.log {
/home/deploy/batch/shared/log/*.log {
missingok
notifempty
weekly
rotate 10
compress
delaycompress
create 0755 scores scores
create 0755 deploy deploy
}

1
apps/batch/prodaws-hosts Normal file
View File

@ -0,0 +1 @@
172.19.7.13

View File

@ -1,6 +1,6 @@
---
- name: BATCH | Configure Project
copy: src="./config/application.{{project_mode}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
copy: src="./config/{{project_env}}/{{inventory_hostname}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
- name: BATCH | Configure Project
copy: src="./config/config.{{project_mode}}.php" dest="{{ansistrano_release_path.stdout}}/application/configs/config.php"
copy: src="./config/{{project_env}}/{{inventory_hostname}}.php" dest="{{ansistrano_release_path.stdout}}/application/configs/config.php"

View File

@ -0,0 +1,33 @@
---
- name: BATCH | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: BATCH | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: BATCH | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'log' }
- stat:
path: "{{ansistrano_deploy_to}}/shared/clients"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/clients"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)
- stat:
path: "{{ansistrano_deploy_to}}/shared/datafile"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/datafile"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)
- stat:
path: "{{ansistrano_deploy_to}}/shared/sources"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/sources"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)

View File

@ -1,16 +1,16 @@
---
- name: Deploy crony
hosts: all
remote_user: scores
remote_user: deploy
become: no
vars:
# Specific
project: crony
project_tree: master
project_mode: prod
project_env: prod
# Always add a trailing / if you want rsync the content of the directory
ansistrano_deploy_from: "/home/vhosts/deploy/export/{{project}}/"
ansistrano_deploy_to: "/home/scores/{{project}}"
ansistrano_deploy_to: "/home/deploy/{{project}}"
ansistrano_version_dir: releases
ansistrano_current_dir: current
ansistrano_shared_paths: []
@ -25,7 +25,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
#ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
#ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -1,2 +1,2 @@
* * * * * scores php /home/scores/crony/current/bin/sourceInpi.php 1>> /dev/null 2>&1
* * * * * scores php /home/scores/crony/current/bin/sourceInsee.php 1>> /dev/null 2>&1
* * * * * deploy php /home/deploy/crony/current/bin/sourceInpi.php 1>> /dev/null 2>&1
* * * * * deploy php /home/deploy/crony/current/bin/sourceInsee.php 1>> /dev/null 2>&1

View File

@ -0,0 +1,8 @@
/home/deploy/crony/shared/log/*.log {
missingok
notifempty
weekly
rotate 10
compress
delaycompress
}

1
apps/crony/prodaws-hosts Normal file
View File

@ -0,0 +1 @@
172.19.7.13

View File

@ -1,3 +1,3 @@
- name: CRONY | Configure Project
become: yes
copy: src="./config/application.{{project_mode}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
copy: src="./config/application.{{project_env}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"

View File

@ -0,0 +1,19 @@
---
- name: CRONY | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: CRONY | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: CRONY | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'log' }
- stat:
path: "{{ansistrano_deploy_to}}/shared/sources"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/sources"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)

View File

@ -1 +1 @@
172.18.8.6 project_config=dev opcache=fcgi
172.18.8.6 project_env=dev opcache=fcgi

View File

@ -1,4 +1,5 @@
---
- name: ENRICHISSEMENT | Restart PHP-FPM
become: yes
command: "service php5-fpm restart"
service: name=php5-fpm state=reloaded
when: opcache is defined and opcache == "fcgi"

View File

@ -0,0 +1,19 @@
---
- name: CRONY | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: CRONY | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: CRONY | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'log' }
- stat:
path: "{{ansistrano_deploy_to}}/shared/sources"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/sources"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)

View File

@ -6,7 +6,7 @@ phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -6,7 +6,7 @@ phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -2,11 +2,11 @@
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -2,11 +2,11 @@
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -25,7 +25,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -25,7 +25,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -1 +1 @@
172.18.8.6 project_config=dev opcache=fcgi
172.18.8.6 project_env=dev opcache=fcgi

View File

@ -1,11 +1,11 @@
# Bilan : envoi commande
0 * * * * root php PROJECT_DIR/current/scripts/jobs/bilaninput.php --send >> /home/vhosts/data/log/bilaninput.log 2>&1
0 * * * * root php PROJECT_DIR/current/scripts/jobs/bilaninput.php --send >> PROJECT_DIR/shared/log/bilaninput.log 2>&1
# Bilan : suppression fichier
0 10 1 * * root php PROJECT_DIR/current/scripts/jobs/bilaninput.php --delete >> /home/vhosts/data/log/bilaninput.log 2>&1
0 10 1 * * root php PROJECT_DIR/current/scripts/jobs/bilaninput.php --delete >> PROJECT_DIR/shared/log/bilaninput.log 2>&1
# Fichier temporaire : suppression
01 15 06 * * root php PROJECT_DIR/current/scripts/jobs/removeTempFile.php --options all >> /home/vhosts/data/log/remove.log 2>&1
01 15 06 * * root php PROJECT_DIR/current/scripts/jobs/removeTempFile.php --options all >> PROJECT_DIR/shared/log/remove.log 2>&1
# AltiScore
00 4 * * 1-5 www-data php PROJECT_DIR/current/scripts/jobs/getAltiScore.php --cron >> /home/vhosts/data/log/altiscore.log
00 4 * * 1-5 www-data php PROJECT_DIR/current/scripts/jobs/getAltiScore.php --cron >> PROJECT_DIR/shared/log/altiscore.log

View File

@ -1 +1 @@
sd-46528.dedibox.fr project_config=preprod
sd-46528.dedibox.fr project_env=preprod

View File

@ -1,2 +1,2 @@
sd-46528.dedibox.fr project_config=prod-online
91.121.157.194 project_config=prod-ovh
sd-46528.dedibox.fr project_env=prod-online
91.121.157.194 project_env=prod-ovh

View File

@ -1,4 +1,10 @@
- name: EXTRANET | Restart PHP-FPM
become: yes
command: "service php5-fpm restart"
when: opcache is defined and opcache == "fcgi"
when: opcache is defined and opcache == "fcgi"
- name: EXTRANET | Cleanup
become: yes
file: path="{{ansistrano_shared_path}}/{{item.src}}" state=absent
with_items:
- { src: 'wsdl' }

View File

@ -1,7 +1,16 @@
---
- name: EXTRANET | Create Symlink
become: yes
file: src={{item.src}} dest={{item.dest}} state=link force=yes
with_items:
- { src: "{{ansistrano_shared_path}}/persist/logos", dest: "{{ansistrano_shared_path}}/pages/file/image/logo/q" }
- { src: "{{ansistrano_shared_path}}/pages/imgcache", dest: "{{ansistrano_shared_path}}/pages/file/image/cache/q" }
- { src: "{{ansistrano_shared_path}}/persist/streetview", dest: "{{ansistrano_shared_path}}/pages/file/streetview/img/q" }
- { src: "{{ansistrano_release_path.stdout}}/public/themes", dest: "{{ansistrano_shared_path}}/pages/themes" }
- name: EXTRANET | Configure
become: yes
copy: src="./config/application.{{project_config}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
copy: src="./config/application.{{project_env}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
- name: EXTRANET | Set path in project config
become: yes
@ -13,36 +22,8 @@
- name: EXTRANET | Configuration PHP-FPM
become: yes
copy: src="./config/.user.{{project_config}}.ini" dest="{{ansistrano_release_path.stdout}}/public/.user.ini"
copy: src="./config/.user.{{project_env}}.ini" dest="{{ansistrano_release_path.stdout}}/public/.user.ini"
- name: EXTRANET | Cleanup
become: yes
file: path="{{ansistrano_shared_path}}/temp/{{item.src}}" state=absent
with_items:
- { src: 'wsdl' }
- name: EXTRANET | Create Temp Dir
become: yes
file: path="{{ansistrano_shared_path}}/temp/{{item.src}}" state=directory owner=www-data group=www-data
with_items:
- { src: 'cache' }
- { src: 'files' }
- { src: 'sessions' }
- { src: 'wsdl' }
- { src: 'pages/file/image/logo' }
- { src: 'pages/file/image/cache' }
- { src: 'pages/file/streetview/img' }
- { src: 'pages/imgcache' }
- name: EXTRANET | Create Symlink
become: yes
file: src={{item.src}} dest={{item.dest}} state=link force=yes
with_items:
- { src: "{{ansistrano_shared_path}}/persist/logos", dest: "{{ansistrano_shared_path}}/temp/pages/file/image/logo/q" }
- { src: "{{ansistrano_shared_path}}/temp/pages/imgcache", dest: "{{ansistrano_shared_path}}/temp/pages/file/image/cache/q" }
- { src: "{{ansistrano_shared_path}}/persist/streetview", dest: "{{ansistrano_shared_path}}/temp/pages/file/streetview/img/q" }
- { src: "{{ansistrano_release_path.stdout}}/public/themes", dest: "{{ansistrano_shared_path}}/temp/pages/themes" }
- name: EXTRANET | Set Permission "ansistrano_release_path"
become: yes
file: path="{{ansistrano_release_path.stdout}}" state=directory recurse=yes mode="u=rwx,g=rwx,o=rx" owner=www-data group=www-data

View File

@ -0,0 +1,40 @@
---
- name: EXTRANET | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: EXTRANET | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: EXTRANET | Project shared directory
file: path="{{ansistrano_deploy_to}}/shared" state=directory
- stat:
path: "{{ansistrano_deploy_to}}/shared/persist"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/persist"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)
- name: EXTRANET | Project shared directories
become: yes
file: path="{{ansistrano_shared_path}}/{{item.src}}" state=directory recurse=yes owner=www-data group=www-data
with_items:
- { src: 'log' }
- { src: 'cache' }
- { src: 'files' }
- { src: 'pages' }
- { src: 'pages/file/image/logo' }
- { src: 'pages/file/image/cache' }
- { src: 'pages/file/streetview/img' }
- { src: 'pages/imgcache' }
- { src: 'sessions' }
- { src: 'wsdl' }
- name: EXTRANET | Pre Cleanup
become: yes
file: path="{{ansistrano_shared_path}}/{{item.src}}" state=absent
with_items:
- { src: "{{ansistrano_shared_path}}/pages/file/image/logo/q" }
- { src: "{{ansistrano_shared_path}}/pages/file/image/cache/q" }
- { src: "{{ansistrano_shared_path}}/pages/file/streetview/img/q" }
- { src: "{{ansistrano_shared_path}}/pages/themes" }

View File

@ -0,0 +1,41 @@
[production]
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layoutPath = APPLICATION_PATH "/views"
resources.view.basePath = APPLICATION_PATH "/views"
autoloaderNamespaces[] = "Application_"
; Scores configuration
profil.path.data = "/home/data"
profil.path.storage = "/home/data/clients"
profil.path.ftp = "/home/data/ftp"
profil.path.sftp = "/home/data/sftp"
; Database configuration
profil.db.metier.adapter=mysqli
profil.db.metier.params.host=172.19.7.10
profil.db.metier.params.username=flux
profil.db.metier.params.password=BMsH9vSEExbu5JK6
profil.db.metier.params.dbname=sdv1
profil.db.metier.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8"
; Mail configuration
profil.db.method = sendmail
[staging : production]
resources.frontController.params.displayExceptions = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

View File

@ -7,7 +7,7 @@
# Specific
project: flux
project_tree: master
project_mode: prod
project_env: prod
# Always add a trailing / if you want rsync the content of the directory
ansistrano_deploy_from: "/home/vhosts/deploy/export/{{project}}/"
ansistrano_deploy_to: "/home/{{project}}"
@ -25,7 +25,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
#ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -1,5 +1,5 @@
# Gestion des flux a envoyer au client
*/15 4-18 * * * root php /home/flux/current/recv.php --cron >> /home/log/recv.log 2>&1
*/15 4-18 * * * root php /home/flux/current/recv.php --cron >> /home/flux/shared/recv.log 2>&1
# Nettoyage
01 18 * * * root php /home/flux/current/clean.php --cron >> /home/log/clean.log 2>&1
01 18 * * * root php /home/flux/current/clean.php --cron >> /home/flux/shared/clean.log 2>&1

View File

@ -1,2 +1,2 @@
/home/data/ftp/fransbonhomme/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/log/send.log 2>&1
/home/data/ftp/fransbonhomme/recv IN_CLOSE_NOWRITE,IN_ACCESS,IN_DELETE,IN_NO_LOOP php /home/flux/currrent/read.php --file $@/$# >> /home/log/read.log 2>&1
/home/data/ftp/fransbonhomme/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/flux/shared/send.log 2>&1
/home/data/ftp/fransbonhomme/recv IN_CLOSE_NOWRITE,IN_ACCESS,IN_DELETE,IN_NO_LOOP php /home/flux/currrent/read.php --file $@/$# >> /home/flux/shared/read.log 2>&1

View File

@ -1 +1 @@
/home/data/ftp/jalpdfsed/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/log/send.log 2>&1
/home/data/ftp/jalpdfsed/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/flux/shared/send.log 2>&1

View File

@ -1 +1 @@
/home/data/ftp/rrg/recv IN_CLOSE_NOWRITE,IN_ACCESS,IN_DELETE,IN_NO_LOOP php /home/flux/current/read.php --file $@/$# >> /home/log/read.log 2>&1
/home/data/ftp/rrg/recv IN_CLOSE_NOWRITE,IN_ACCESS,IN_DELETE,IN_NO_LOOP php /home/flux/current/read.php --file $@/$# >> /home/flux/shared/read.log 2>&1

View File

@ -1 +1 @@
/home/data/ftp/sofid/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/log/send.log 2>&1
/home/data/ftp/sofid/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/flux/shared/send.log 2>&1

View File

@ -1 +1 @@
/home/data/ftp/vwbank/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/log/send.log 2>&1
/home/data/ftp/vwbank/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/flux/shared/send.log 2>&1

View File

@ -1 +1 @@
/home/data/sftp/gefacto/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/log/send.log 2>&1
/home/data/sftp/gefacto/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/flux/shared/send.log 2>&1

View File

@ -1,2 +1,2 @@
/home/data/sftp/sfrbtr/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/log/send.log 2>&1
/home/data/sftp/sfrbtr/recv IN_CLOSE_NOWRITE,IN_ACCESS,IN_DELETE,IN_NO_LOOP php /home/flux/current/read.php --file $@/$# >> /home/log/read.log 2>&1
/home/data/sftp/sfrbtr/send IN_CLOSE_WRITE php /home/flux/current/send.php --file $@/$# >> /home/flux/shared/send.log 2>&1
/home/data/sftp/sfrbtr/recv IN_CLOSE_NOWRITE,IN_ACCESS,IN_DELETE,IN_NO_LOOP php /home/flux/current/read.php --file $@/$# >> /home/flux/shared/read.log 2>&1

View File

@ -1,4 +1,4 @@
/home/log/*.log {
/home/flux/shared/*.log {
weekly
missingok
rotate 5

View File

@ -1 +0,0 @@

1
apps/flux/prodaws-hosts Normal file
View File

@ -0,0 +1 @@
172.19.8.14 ansible_port=22

View File

@ -1,3 +1,3 @@
- name: FLUX | Configure Project
become: yes
copy: src="./config/application.{{project_mode}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
copy: src="./config/{{project_env}}/{{inventory_hostname}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"

View File

@ -0,0 +1,10 @@
---
- name: FLUX | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: FLUX | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: FLUX | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared" state=directory

View File

@ -7,7 +7,7 @@
# Specific
project: intranet
project_tree: master
project_mode: prod
project_env: prod
# Always add a trailing / if you want rsync the content of the directory
ansistrano_deploy_from: "/home/vhosts/deploy/export/{{project}}/"
ansistrano_deploy_to: "/home/vhosts/{{project}}"

View File

@ -1,5 +1,5 @@
---
- name: Intranet | Restart PHP-FPM
become: yes
command: "service php5-fpm restart"
service: name=php5-fpm state=reloaded
when: opcache is defined and opcache == "fcgi"

View File

@ -0,0 +1,51 @@
[production]
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = APPLICATION_PATH "/../data/sessions"
resources.session.gc_maxlifetime = 86400
resources.session.cookie_lifetime = 86400
resources.session.remember_me_seconds = 86400
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.plugins.Auth = "Application_Controller_Plugin_Auth"
resources.frontController.plugins.Menu = "Application_Controller_Plugin_Menu"
resources.frontController.plugins.Comptage = "Application_Controller_Plugin_Comptage"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
; Scores configuration
profil.server.name = Odea
profil.webservice.location = celeste
profil.mail.method = sendmail
profil.mail.email.support = supportdev@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.mail.email.contact = supportdev@scores-decisions.com
profil.mail.email.production = supportdev@scores-decisions.com
profil.path.data = "/home/vhosts/data"
profil.db.metier.adapter=mysqli
profil.db.metier.params.host=172.19.7.10
profil.db.metier.params.username=odea
profil.db.metier.params.password=BMsH9vSEExbu5JK6
profil.db.metier.params.dbname=ciblage
profil.db.metier.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8"
profil.sphinx.host="172.19.7.12"
profil.sphinx.port=9312
[staging : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

View File

@ -7,7 +7,7 @@
# Specific
project: odea
project_tree: develop
project_mode: devel
project_env: dev
# Always add a trailing / if you want rsync the content of the directory
ansistrano_deploy_from: "/home/vhosts/deploy/export/{{project}}/"
ansistrano_deploy_to: "/home/vhosts/{{project}}-ng"
@ -32,7 +32,7 @@
#ansistrano_before_symlink_shared_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-symlink-shared-tasks.yml"
#ansistrano_after_symlink_shared_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-after-symlink-shared-tasks.yml"
#ansistrano_before_symlink_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-symlink-tasks.yml"
#ansistrano_after_symlink_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-after-symlink-tasks.yml"
ansistrano_after_symlink_tasks_file: "{{playbook_dir}}/tasks/after-symlink.yml"
#ansistrano_before_cleanup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-cleanup-tasks.yml"
#ansistrano_after_cleanup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-after-cleanup-tasks.yml"
roles:

View File

@ -7,7 +7,7 @@
# Specific
project: odea
project_tree: master
project_mode: prod
project_env: prod
# Always add a trailing / if you want rsync the content of the directory
ansistrano_deploy_from: "/home/vhosts/deploy/export/{{project}}/"
ansistrano_deploy_to: "/home/vhosts/{{project}}"
@ -32,7 +32,7 @@
#ansistrano_before_symlink_shared_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-symlink-shared-tasks.yml"
#ansistrano_after_symlink_shared_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-after-symlink-shared-tasks.yml"
#ansistrano_before_symlink_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-symlink-tasks.yml"
#ansistrano_after_symlink_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-after-symlink-tasks.yml"
ansistrano_after_symlink_tasks_file: "{{playbook_dir}}/tasks/after-symlink.yml"
#ansistrano_before_cleanup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-cleanup-tasks.yml"
#ansistrano_after_cleanup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-after-cleanup-tasks.yml"
roles:

1
apps/odea/prodaws-hosts Normal file
View File

@ -0,0 +1 @@
172.19.8.13 opcache=fcgi

View File

@ -0,0 +1,5 @@
---
- name: ODEA | Restart PHP-FPM
become: yes
service: name=php5-fpm state=reloaded
when: opcache is defined and opcache == "fcgi"

View File

@ -9,7 +9,7 @@
- name: ODEA | Configure Project
become: yes
copy: src="./config/application.{{project_mode}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
copy: src="./config/{{project_env}}/{{inventory_hostname}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
- name: ODEA | Set path in project config
become: yes

View File

@ -0,0 +1,19 @@
---
- name: CRONY | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: CRONY | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: CRONY | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'log' }
- stat:
path: "{{ansistrano_deploy_to}}/shared/sources"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/sources"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)

View File

@ -63,6 +63,20 @@ $cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['compress'] = false;
/* Server: BigData02 - AWS */
$i++;
$cfg['Servers'][$i]['verbose'] = 'BigData02 (AWS)';
$cfg['Servers'][$i]['host'] = '172.19.7.10';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['compress'] = false;
/*
* End of servers configuration
*/

View File

@ -1,2 +1,3 @@
172.18.8.6 config=pma-devel.config.inc.php
192.168.3.203 config=pma-celeste.config.inc.php
192.168.3.203 config=pma-celeste.config.inc.php
172.19.8.12 config=pma-celeste.config.inc.php

View File

@ -0,0 +1,78 @@
[production]
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/sessions/wsdl"
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.plugins.Auth = "Application_Controller_Plugin_Auth"
resources.frontController.plugins.Services = "Application_Controller_Plugin_Services"
resources.frontController.plugins.Menu = "Application_Controller_Plugin_Menu"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/views"
resources.view.basePath = APPLICATION_PATH "/views"
; Scores configuration
profil.server.name = WebRecette
profil.mail.method = smtp
profil.mail.host = 192.168.3.200
profil.mail.port = 587
profil.mail.auth = login
profil.mail.username = batch1@srvbak01
profil.mail.password = test
profil.mail.email.support = supportdev@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.mail.email.contact = supportdev@scores-decisions.com
profil.mail.email.production = supportdev@scores-decisions.com
profil.wkhtmltopdf.path = "/usr/local/bin/wkhtmltopdf"
profil.path.shared = "PROJECT_DIR/shared"
; Metier - Infogreffe
profil.infogreffe.wsdl = "infogreffe.wsdl"
profil.infogreffe.url = "https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE"
profil.infogreffe.uri = "https://webservices.infogreffe.fr/"
profil.infogreffe.user = 85000109
profil.infogreffe.password = 166
profil.infogreffe.cache.path = "PROJECT_DIR/shared/cache"
profil.infogreffe.cache.time = 8
profil.infogreffe.storage.path = "PROJECT_DIR/shared/datafile/greffes"
; Sphinx configuration
profil.sphinx.ent.host = "172.19.7.12"
profil.sphinx.ent.port = 9312
profil.sphinx.ent.version = "2.2.11"
profil.sphinx.dir.host = "172.19.7.12"
profil.sphinx.dir.port = 9312
profil.sphinx.dir.version = "2.2.11"
profil.sphinx.act.host = "172.19.7.12"
profil.sphinx.act.port = 9312
profil.sphinx.act.version = "2.2.9"
profil.sphinx.histo.host = "172.19.7.12"
profil.sphinx.histo.port = 9312
profil.sphinx.histo.version = "2.2.11"
; For old configuration - see Configure.php
profil.db.metier.adapter=mysqli
profil.db.metier.params.host=172.19.7.10
profil.db.metier.params.username=webservice
profil.db.metier.params.password=BMsH9vSEExbu5JK6
profil.db.metier.params.dbname=sdv1
profil.db.metier.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8mb4"
[staging : production]
phpSettings.soap.wsdl_cache_enabled = 0
resources.frontController.params.displayExceptions = 1
[development : production]
phpSettings.soap.wsdl_cache_enabled = 0
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 0
resources.frontController.params.displayExceptions = 1
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

View File

@ -0,0 +1,78 @@
[production]
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/sessions/wsdl"
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.plugins.Auth = "Application_Controller_Plugin_Auth"
resources.frontController.plugins.Services = "Application_Controller_Plugin_Services"
resources.frontController.plugins.Menu = "Application_Controller_Plugin_Menu"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/views"
resources.view.basePath = APPLICATION_PATH "/views"
; Scores configuration
profil.server.name = WebService
profil.mail.method = smtp
profil.mail.host = 192.168.3.200
profil.mail.port = 587
profil.mail.auth = login
profil.mail.username = batch1@srvbak01
profil.mail.password = test
profil.mail.email.support = support@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.mail.email.contact = contact@scores-decisions.com
profil.mail.email.production = production@scores-decisions.com
profil.wkhtmltopdf.path = "/usr/local/bin/wkhtmltopdf"
profil.path.shared = "PROJECT_DIR/shared"
; Metier - Infogreffe
profil.infogreffe.wsdl = "infogreffe.wsdl"
profil.infogreffe.url = "https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE"
profil.infogreffe.uri = "https://webservices.infogreffe.fr/"
profil.infogreffe.user = 85000109
profil.infogreffe.password = 166
profil.infogreffe.cache.path = "PROJECT_DIR/shared/cache"
profil.infogreffe.cache.time = 8
profil.infogreffe.storage.path = "PROJECT_DIR/shared/datafile/greffes"
; Sphinx configuration
profil.sphinx.ent.host = "172.19.7.12"
profil.sphinx.ent.port = 9312
profil.sphinx.ent.version = "2.2.11"
profil.sphinx.dir.host = "172.19.7.12"
profil.sphinx.dir.port = 9312
profil.sphinx.dir.version = "2.2.11"
profil.sphinx.act.host = "172.19.7.12"
profil.sphinx.act.port = 9312
profil.sphinx.act.version = "2.2.11"
profil.sphinx.histo.host = "172.19.7.12"
profil.sphinx.histo.port = 9312
profil.sphinx.histo.version = "2.2.11"
; For old configuration - see Configure.php
profil.db.metier.adapter=mysqli
profil.db.metier.params.host=172.19.7.10
profil.db.metier.params.username=webservice
profil.db.metier.params.password=BMsH9vSEExbu5JK6
profil.db.metier.params.dbname=sdv1
profil.db.metier.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8mb4"
[staging : production]
phpSettings.soap.wsdl_cache_enabled = 0
resources.frontController.params.displayExceptions = 1
[development : production]
phpSettings.soap.wsdl_cache_enabled = 0
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 0
resources.frontController.params.displayExceptions = 1
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

View File

@ -24,7 +24,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -24,7 +24,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -1 +1 @@
172.18.8.6 project_config=dev opcache=fcgi
172.18.8.6 project_env=dev opcache=fcgi

View File

@ -2,4 +2,4 @@ MAILTO=supportdev@scores-decisions.com
##############
# WebService #
##############
00 13,18 * * * www-data php /home/vhosts/webservice-ng/current/scripts/jobs/getGreffe.php --send >> /home/vhosts/webservice-ng/shared/log/greffe.log 2>&1
00 13,18 * * * www-data php /home/vhosts/webservice-ng/current/bin/greffe.php --send >> /home/vhosts/webservice-ng/shared/log/greffe.log 2>&1

View File

@ -1 +1 @@
192.168.3.203 project_config=preprod opcache=fcgi
192.168.3.203 project_env=preprod opcache=fcgi

View File

@ -0,0 +1 @@
172.19.8.12 project_env=preprod opcache=fcgi

View File

@ -1,2 +1,2 @@
192.168.3.31 project_config=prod
192.168.94.31 project_config=prod
192.168.3.31 project_env=prod
192.168.94.31 project_env=prod

View File

@ -0,0 +1 @@
172.19.8.11 project_env=prod opcache=fcgi

View File

@ -2,16 +2,10 @@
- name: WEBSERVICE | Copy needed files
become: yes
copy: src="{{ansistrano_deploy_from}}/data/files" dest="{{ansistrano_shared_path}}/" force=yes
- name: WEBSERVICE | Configure Project
become: yes
copy: src="./config/application.{{project_config}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
when: project_config != "prod"
- name: WEBSERVICE | Configure Project
become: yes
copy: src="./config/prod/{{inventory_hostname}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
when: project_config == "prod"
copy: src="./config/{{project_env}}/{{inventory_hostname}}.ini" dest="{{ansistrano_release_path.stdout}}/application/configs/application.ini"
- name: WEBSERVICE | Set path in project config
become: yes
@ -19,11 +13,11 @@
- name: WEBSERVICE | Configuration PHP-FPM
become: yes
copy: src="./config/.user.{{project_config}}.ini" dest="{{ansistrano_release_path.stdout}}/public/.user.ini"
copy: src="./config/.user.{{project_env}}.ini" dest="{{ansistrano_release_path.stdout}}/public/.user.ini"
- name: WEBSERVICE | Generate Evenements Cache
become: yes
command: "/usr/bin/php {{ansistrano_release_path.stdout}}/scripts/build/genCache.php --generate Evenements"
command: "/usr/bin/php {{ansistrano_release_path.stdout}}/bin/buildCache.php --generate Evenements"
- name : WEBSERVICE | Cleanup
become: yes

View File

@ -0,0 +1,29 @@
---
- name: WEBSERVICE | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: WEBSERVICE | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: WEBSERVICE | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'cache' }
- { src: 'files' }
- { src: 'log' }
- { src: 'sessions' }
- { src: 'wsdl' }
- stat:
path: "{{ansistrano_deploy_to}}/shared/clients"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/clients"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)
- stat:
path: "{{ansistrano_deploy_to}}/shared/datafile"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/datafile"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)

View File

@ -1 +0,0 @@
172.18.8.6

28
hosts
View File

@ -1,21 +1,29 @@
172.18.8.5
192.168.3.31
192.168.94.31
[celeste]
[online]
sd-46528.dedibox.fr
[ovh]
91.121.157.194
[web]
192.168.3.31
[online-vpn]
192.168.94.31
[web-preprod]
[celeste]
192.168.3.31
192.168.3.202
192.169.3.201
192.168.3.203
[web-devel]
[devel]
172.18.8.6
172.18.8.5
[aws]
172.19.7.10
172.19.7.11
172.19.7.12
172.19.7.13
172.19.7.14
172.19.8.11
172.19.8.12
172.19.8.13
172.19.8.14