Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Specific rôle to install and configure pâquerette ADM Application
Inherit of the _web_app rôle
Needed variables :
```yml
php_server: yes
php_version: '5.6'
rev_proxy: nginx
mariadb_mysql_server: true
mariadb_mysql: mysql
mysql_root_password:
app_instances:
- role: adm_instance
app_instance_id: app_php_adm
description: ADM php application
app_domain:
database_password:
app_user: adm
app_user_password: # encrypted password (see the _webapp rôle)
app_version: # Git tag
git_user: # Access to the gitlab project
git_token: # Access to the gitlab project
git_mercanet_token: # Access to the gitlab project
mail_host:
mail_username:
mail_password:
```
Create access token to the code project and the mercanet projet with the same user name **git_user**
Application installation :
If you need to restore user data before running the role you may add tar files in directory :
`/tmp/restore_{{ app_instance_id }}/{{ app_instance_id }}/`
Restore of site files will be used if archives are present in this directory
* Database sql dump **without database creation (edit the file if needed)** but with drop and recreate table : app_php_adm_db.sql
* Mercanet params and cerfificates : mercanet_params.tar
* Docs, images userfiles and affiliations : var_files.tar.gz
The role will configure database access, mail access, mercanet path etc ...
Put the right tag in variable : app_version
Run the role with :
```
./play.py -y vpstest app_php_adm install
```
If the application is already installed
```
./play.py -y vpstest app_php_adm reinstall
```
You may also run part of the role using tags :
```
./play.py -y vpstest app_php_adm reinstall --apply-tags=setpath,mercanetparams
```
*setpath tag is often needed first to set up application root and path variables*