readme.md
author ymh <ymh.work@gmail.com>
Fri, 17 Nov 2017 11:41:58 +0100
changeset 562 210420362d64
parent 530 a76bae4795d5
child 571 6f852d0f7760
permissions -rw-r--r--
Added tag 0.0.24 for changeset bb2cb0fad904
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
# Projet Corpus de la parole
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
## Prérequis
368
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
     4
La plateforme de dévelopement visée est MacOS et Linux.
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
     5
Les éléments suivant sont des prérequis:
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
     6
  - php >= 5.6
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
     7
  - Vagrant
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
     8
  - Ansible.
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
     9
  - node
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    10
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    11
### php
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    12
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    13
### node
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    14
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    15
### Vagrant
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    16
Vagrant est utilisé pour le développement du back-office et la contruction des pacquets RPM.
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    17
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    18
### Ansible
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    19
Ansible n'est nécessaire que pour lancer l'environement de contruction des RPM.
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    20
Ansible sera soit installé globalement, soit installé dans un environement virtuel. dans ce cas, `virtualenv-wrapper` doit être installé et l'environement virtuel doit avoir le nom `ansible`.
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
## Lancement VM dev
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
- `cd /dev`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
- `cp provisioning/custom.yaml.tmpl provisioning/custom.yaml`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
- édition de `provisioning/custom.yaml`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
- `vagrant up` (nécessite une connexion internet)
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
- url : http://vhost/corpus
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
- accès sesame workbench : http://vhost:8080/openrdf-workbench
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
- chargement des données dans `corpus` et `corpus_raw`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
## Lancement VM de build
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
- Activation Ansible
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
- `cd /build`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
- `vagrant up`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
## Initialisation env de dev
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
- `cd /server/bo_client`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
- `npm install`
368
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    39
- `./node_modules/.bin/bower install`
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
- `cd /server/src`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
- télécharger composer.phar (https://getcomposer.org/) et le mettre dans le répertoire server/src
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
- `php composer.phar install`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
- `npm install`
368
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    44
- `./node_modules/.bin/bowerbower install`
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
## Commandes bo_client
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
- `ember serve`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
- `ember build` -> résultat dans `server/bo_client/dist`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
368
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    50
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
## Commandes serveur php
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
- Compilation css/js : `gulp` -> cette commande lance `ember build` de `/server/bo_client`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
- `php artisan serve`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
## Creation de version
368
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    56
- mettre à jour le numéro de version. Pour cela lancer le script `build/set-version.sh "x.y.z"`, avec "x.y.z" le numéro de version
530
a76bae4795d5 version 0.0.19
ymh <ymh.work@gmail.com>
parents: 407
diff changeset
    57
- Dans le répertoire `build`, lancer la commande `./build.sh -p && ./build_puppet.sh`
a76bae4795d5 version 0.0.19
ymh <ymh.work@gmail.com>
parents: 407
diff changeset
    58
407
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    59
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    60
### Création du RPM contenant les fichiers `puppet`
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    61
- lancer le script `build/build_puppet.sh`.
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    62
- le fichier rpm se trouvera dans `/build/dist` sous le nom `puppet-corpusdelaparole-<version>-<iteration>.rpm`
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    63
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    64
### Création du RPM de l'application
368
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    65
- lancer le script `build/build.sh`. options:
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    66
    - `-d`: build debug
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    67
    - `-p`: build de production
407
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    68
- le fichier rpm se trouvera dans `/build/dist` sous le nom `corpusdelaparole-<version>-<iteration>.rpm`
368
5f79f31ca9a2 Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    69
530
a76bae4795d5 version 0.0.19
ymh <ymh.work@gmail.com>
parents: 407
diff changeset
    70
### Étapes du processus de build
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    71
- mettre à jour le fichier version `server/src/config/config/version.php`
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    72
- mettre à jour le fichier version `cms/app-client/package.json`
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
- `cd /server/src`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
- s'assurer que les sources sont à jour: `php composer.phar install` + `npm install` + `bower install`
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    75
- `gulp copy-build`
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    76
- `cd /cms/app-client`
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    77
- `npm install`
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    78
- `bower install`
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    79
- `ember build --prod` ou `ember build`
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    80
- `cd /cms`
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    81
- `npm install` pour installer gulp + dépendances
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    82
- `gulp copy-build`
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
- `cd /build`
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
- `vagrant ssh -c "/vagrant/build_rpm.sh"`
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    85
- le fichier rpm se trouvera dans `/build/dist`
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
407
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    87
28
b0b56e0f8c7f Add contributor edition
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
## installation rpm sur serveur
407
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    89
- 1ère installation: `rpm -i /path/to/corpusdelaparole-<version>-<iteration>.rpm`
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    90
- Mise à jour: `rpm -U /path/to/corpusdelaparole-<version>-<iteration>.rpm`
2dba812c7ef2 add a way to build rpm for puppet files, correct elasticsearch provisioning, correct error on elasticsearch queries + tests
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
    91
- ensuite : création du fichier `/etc/www/corpus_env.conf`
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents: 28
diff changeset
    92
- après un update : drush cc all