MigrationAppliEnvole4 » Historique » Version 13
Lionel Morin, 03/07/2013 16:25
1 | 1 | Lionel Morin | h1. Migration d'une application Envole vers la version EOLE 2.4 (ébauche) |
---|---|---|---|
2 | 1 | Lionel Morin | |
3 | 3 | Lionel Morin | Pour faciliter le travail de packaging, il est nécessaire de [[eole-skeletor:Doc-geting-started| "skeletoriser"]] le dépot 2.3 pour le [[eole:EoleDebianPackaging24| transformer en dépot 2.4]]. |
4 | 5 | Lionel Morin | |
5 | 13 | Lionel Morin | h2. Nouvelle organisation du dépot git |
6 | 1 | Lionel Morin | |
7 | 13 | Lionel Morin | Une nouvelle organisation globale des dépots git pour Envole est mise en place et sera commune pour 2.3 et 2.4. |
8 | 13 | Lionel Morin | |
9 | 13 | Lionel Morin | h3. Description des branches |
10 | 13 | Lionel Morin | |
11 | 8 | Lionel Morin | |_.Sources originales |_.Sources modifiées pour Envole |_.Ajouts EOLE |_.Packaging | |
12 | 13 | Lionel Morin | |/2=.upstream |/2=.=> patch |/2=.=> master |=> packaging 2.3| |
13 | 1 | Lionel Morin | | => packaging 2.4| |
14 | 4 | Lionel Morin | |
15 | 4 | Lionel Morin | * la branche _*upstream*_ ne contient que les sources originales de l'application |
16 | 13 | Lionel Morin | * la branche _*patch*_ contient les sources patchées pour envole (il y a ici possibilité de générer un paquet envole-<nom_appli>) |
17 | 1 | Lionel Morin | * la branche _*master*_ est commune en 2.3 et 2.4 (sous réserve de rester compatible) et comporte, en plus des sources, tous les ajouts EOLE (templates, dicos, scripts, sql, password...) |
18 | 1 | Lionel Morin | * les branches de *_packaging_*, une par version |
19 | 13 | Lionel Morin | |
20 | 13 | Lionel Morin | h3. Étapes de migration d'un dépot |
21 | 13 | Lionel Morin | |
22 | 13 | Lionel Morin | # Cloner la branche "master" en branche "patch": |
23 | 13 | Lionel Morin | <pre> |
24 | 13 | Lionel Morin | git checkout -b patch |
25 | 13 | Lionel Morin | </pre> |
26 | 13 | Lionel Morin | # Supprimer tout le contenu autre que le dossier src : |
27 | 13 | Lionel Morin | @git rm dico/* |
28 | 13 | Lionel Morin | git rm ....@ |
29 | 1 | Lionel Morin | |
30 | 1 | Lionel Morin | h2. Modification des dicos |
31 | 1 | Lionel Morin | |
32 | 1 | Lionel Morin | Normalement il n'y a rien à changer. |
33 | 1 | Lionel Morin | |
34 | 1 | Lionel Morin | h2. Modification des templates |
35 | 1 | Lionel Morin | |
36 | 1 | Lionel Morin | Certaines variables souvent utilisées dans Envole ont changé de nom. |
37 | 1 | Lionel Morin | |
38 | 1 | Lionel Morin | |_.Nom en 2.3 |_.Nouveau nom en 2.4 | |
39 | 1 | Lionel Morin | |adresse_ip_annuaire |container_ip_annuaire | |
40 | 1 | Lionel Morin | |adresse_ip_fichier |container_ip_fichier | |
41 | 1 | Lionel Morin | |adresse_ip_mail |container_ip_mail | |
42 | 1 | Lionel Morin | |adresse_ip_mysql |container_ip_mysql | |
43 | 1 | Lionel Morin | |adresse_ip_web |container_ip_web | |
44 | 1 | Lionel Morin | |
45 | 3 | Lionel Morin | *=> Ces variables peuvent être rajoutées en 2.4 pour une rétro-compatibilité* |
46 | 1 | Lionel Morin | |
47 | 1 | Lionel Morin | h2. Modification des scripts shell |
48 | 2 | Lionel Morin | |
49 | 2 | Lionel Morin | h3. CreoleGet |
50 | 2 | Lionel Morin | |
51 | 2 | Lionel Morin | <pre> |
52 | 2 | Lionel Morin | .ParseDico |
53 | 2 | Lionel Morin | echo $mavariable |
54 | 2 | Lionel Morin | </pre> |
55 | 2 | Lionel Morin | est remplacé par : |
56 | 2 | Lionel Morin | <pre> |
57 | 2 | Lionel Morin | echo $(CreoleGet mavariable) |
58 | 2 | Lionel Morin | </pre> |
59 | 2 | Lionel Morin | |
60 | 2 | Lionel Morin | ATTENTION : à ce jour, pour accéder à une variable esclave, il faut connaître la variable maître : |
61 | 2 | Lionel Morin | <pre> |
62 | 1 | Lionel Morin | echo $(CreoleGet lamaster.lesclave) |
63 | 1 | Lionel Morin | </pre> |
64 | 2 | Lionel Morin | |
65 | 12 | Lionel Morin | *=> Il est possible de tester la présence de ParseDico avant de le lancer et ainsi faire en sorte d'avoir des scripts communs en 2.3 et en 2.4* |
66 | 3 | Lionel Morin | |
67 | 10 | Lionel Morin | Code à confirmer : |
68 | 7 | Lionel Morin | <pre> |
69 | 10 | Lionel Morin | if type -p ParseDico &> /dev/null; then |
70 | 11 | Lionel Morin | .ParseDico |
71 | 11 | Lionel Morin | else |
72 | 11 | Lionel Morin | # initialisation des variables utilisées |
73 | 11 | Lionel Morin | adresse_ip_br0=$(CreoleGet adresse_ip_br0) |
74 | 1 | Lionel Morin | fi |
75 | 11 | Lionel Morin | |
76 | 11 | Lionel Morin | echo $adresse_ip_br0 |
77 | 7 | Lionel Morin | </pre> |
78 | 7 | Lionel Morin | |
79 | 2 | Lionel Morin | h3. CreoleRun |
80 | 2 | Lionel Morin | |
81 | 2 | Lionel Morin | <pre> |
82 | 2 | Lionel Morin | ./usr/share/eole/FonctionsEoleNg |
83 | 2 | Lionel Morin | RunCmd "ma -commande" conteneur |
84 | 2 | Lionel Morin | </pre> |
85 | 2 | Lionel Morin | est remplacé par : |
86 | 1 | Lionel Morin | <pre> |
87 | 1 | Lionel Morin | CreoleRun "ma -commande" conteneur |
88 | 2 | Lionel Morin | </pre> |
89 | 3 | Lionel Morin | |
90 | 3 | Lionel Morin | *=> Il est possible d'émuler la commande RunCmd en 2.4* |
91 | 2 | Lionel Morin | |
92 | 2 | Lionel Morin | h2. Problèmes spécifiques |
93 | 2 | Lionel Morin | |
94 | 2 | Lionel Morin | h3. Problème de connexion aux bases MySQL #5633 |
95 | 2 | Lionel Morin | |
96 | 2 | Lionel Morin | Pour y remédier temporairement, on peut mettre "localhost" à la place de "127.0.0.1" (penser à la fois aux fichiers sql et aux fichiers de config php). |