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-- |
28 | 1 |
# Projet Corpus de la parole |
2 |
||
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 | 21 |
|
22 |
## Lancement VM dev |
|
23 |
- `cd /dev` |
|
24 |
- `cp provisioning/custom.yaml.tmpl provisioning/custom.yaml` |
|
25 |
- édition de `provisioning/custom.yaml` |
|
26 |
- `vagrant up` (nécessite une connexion internet) |
|
27 |
- url : http://vhost/corpus |
|
28 |
- accès sesame workbench : http://vhost:8080/openrdf-workbench |
|
29 |
- chargement des données dans `corpus` et `corpus_raw` |
|
30 |
||
31 |
## Lancement VM de build |
|
32 |
- Activation Ansible |
|
33 |
- `cd /build` |
|
34 |
- `vagrant up` |
|
35 |
||
36 |
## Initialisation env de dev |
|
37 |
- `cd /server/bo_client` |
|
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 | 40 |
- `cd /server/src` |
41 |
- télécharger composer.phar (https://getcomposer.org/) et le mettre dans le répertoire server/src |
|
42 |
- `php composer.phar install` |
|
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 | 45 |
|
46 |
## Commandes bo_client |
|
47 |
- `ember serve` |
|
48 |
- `ember build` -> résultat dans `server/bo_client/dist` |
|
49 |
||
368
5f79f31ca9a2
Add some doc. Improve auto documentation of build script
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
50 |
|
28 | 51 |
## Commandes serveur php |
52 |
- Compilation css/js : `gulp` -> cette commande lance `ember build` de `/server/bo_client` |
|
53 |
- `php artisan serve` |
|
54 |
||
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 | 57 |
- Dans le répertoire `build`, lancer la commande `./build.sh -p && ./build_puppet.sh` |
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 | 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 | 73 |
- `cd /server/src` |
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 | 83 |
- `cd /build` |
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 | 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 | 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 |