9ce6ae37be
- Em dashes: 1712 remplaces par tirets simples (86 fichiers + _index.md, en-tete section Limagrain conserve) - Checklists: 24 '- [ ]' -> '- ☐' (3 pages operations, plus de todos Obsidian) - Ancres: 33 reparees (slugs GitHub + ancres HTML <a id> reconnues), 1 reciblee (manuel de reten) - related: tenseflow -> tense-flow, pie -> mechanical-elements, group.md retire (doublon shipping) - Registre: compteur global 122 -> 131 pages - Rapport racine _lint_report.md mis a jour (scan v2 + re-scan final: 0 anomalie) - Aucun fichier limagrain/ modifie (cloisonnement)
157 lines
6.0 KiB
Markdown
157 lines
6.0 KiB
Markdown
---
|
||
title: "Deploy Existing Application"
|
||
type: operation
|
||
sources:
|
||
- sources/archives/Deploiement_application_existante.md
|
||
related:
|
||
- operations/vm-installation.md
|
||
- operations/first-deployment.md
|
||
- operations/deployment-specific-commit.md
|
||
- operations/custom-application-management.md
|
||
- operations/git-workflow.md
|
||
- operations/deploy-test-application.md
|
||
last_compiled: "2026-04-17"
|
||
---
|
||
|
||
# Deploy Existing Application
|
||
|
||
## Overview
|
||
|
||
Procédure de **redéploiement** d'un projet EasyWMS déjà initialisé sur une VM. À utiliser quand :
|
||
|
||
- Un nouveau développeur rejoint un projet en cours et doit préparer sa VM
|
||
- Un développeur applique un point de contrôle "Deploy 0" pour repartir d'une VM propre avant de travailler sur une autre branche
|
||
- Une mise à jour importante a été poussée sur le GIT et doit être redéployée
|
||
- On bascule d'une branche à une autre (ex : `master` → `develop` → branche de feature)
|
||
|
||
Elle **ne couvre pas le premier déploiement** d'un projet neuf (cf. [first-deployment](first-deployment.md)), ni le déploiement d'un commit figé (cf. [deployment-specific-commit](deployment-specific-commit.md)).
|
||
|
||
Source : Confluence EasyWMS France - *Déploiement d'une application existante* (v20, 04/07/2024).
|
||
|
||
## Étape 1 - Vérifier `env.secrets.yaml`
|
||
|
||
Dans **`C:\deploy\env.secrets.yaml`** sur la VM, vérifier les paramètres BDD :
|
||
|
||
**Oracle :**
|
||
| Paramètre | Valeur par défaut |
|
||
|-----------|-------------------|
|
||
| `Engine` | `Oracle` |
|
||
| `Server` | `localhost/orcl` |
|
||
| `Password` (toutes BDD) | `robmec` |
|
||
|
||
**PostgreSQL :**
|
||
| Paramètre | Valeur par défaut |
|
||
|-----------|-------------------|
|
||
| `Engine` | `PostgreSQL` |
|
||
| `Server` | `localhost` |
|
||
| `Password` (toutes BDD) | `robmec` |
|
||
|
||
## Étape 2 - Déploiement complet
|
||
|
||
Ouvrir **PowerShell en administrateur** dans **`C:\deploy`** de la VM (`cd C:\deploy`).
|
||
|
||
Par défaut le script cible la branche **Master** du GIT. Pour une autre branche, l'ajouter en 2ᵉ argument :
|
||
|
||
```powershell
|
||
# Déploiement sur Master (défaut)
|
||
.\deploy_repository.ps1 NomDuProjetGit
|
||
|
||
# Déploiement sur une branche spécifique
|
||
.\deploy_repository.ps1 NomDuProjetGit Branche
|
||
```
|
||
|
||
Exemple :
|
||
|
||
```powershell
|
||
.\deploy_repository.ps1 1707_FRANCE_MA_PIECES_AUTOS_BRETAGNE develop
|
||
```
|
||
|
||
> ℹ️ D'après l'équipe Espagne, il devrait être possible de déployer **n'importe quelle version depuis la 21.1.19.2** via ce script. En cas d'échec : ouvrir un ticket support.
|
||
|
||
> En cas d'erreur : voir Confluence *Installation machine virtuelle de développement*, paragraphe "Deploy 1".
|
||
|
||
> ✅ Si **aucune erreur** : sauter étapes 3, 4, 5, 6. L'**étape 7 reste obligatoire** quoi qu'il arrive.
|
||
|
||
## Étapes 3–6 (anciens scripts `deploy.ps1`)
|
||
|
||
À exécuter uniquement si le projet repose encore sur les anciens scripts (pas `deploy_repository.ps1`).
|
||
|
||
### 3 - Deploy 1 (Complete)
|
||
|
||
```powershell
|
||
.\deploy.ps1 # choisir "1. Complete"
|
||
```
|
||
|
||
### 4 - Intégrer la config entrepôt (Load)
|
||
|
||
```powershell
|
||
.\deploy.ps1 # choisir "2. Load"
|
||
```
|
||
|
||
Charge :
|
||
- Config entrepôt depuis `C:\deploy\Config`
|
||
- Paramètres uGNA depuis `C:\deploy\Data`
|
||
|
||
> Alternative : **EasyS → Transfert Data** vers la VM.
|
||
|
||
### 5 - Assignation utilisateur
|
||
|
||
```powershell
|
||
.\Commands\commands.ps1
|
||
```
|
||
|
||
Ou via **SmartUI → Organisation → Utilisateurs** → éditer `mecalux` → ajouter les sites autorisés.
|
||
|
||
### 6 - Import de l'application custom
|
||
|
||
Voir [custom-application-management - Import](custom-application-management.md#import).
|
||
|
||
## Étape 7 - Désactiver les instances en BDD (OBLIGATOIRE)
|
||
|
||
> ⚠️ Sans cette étape, **les instances ne fonctionneront pas** - cette modification est requise à **chaque redéploiement** (le fichier `Tenants.xml` est régénéré).
|
||
|
||
Dans **`C:\inetpub\wwwroot\ApplicationService\Tenants.xml`**, remplacer :
|
||
|
||
```xml
|
||
<processStore name="TENANT ProcessStore" providerName="Oracle.ManagedDataAccess.Client" … />
|
||
```
|
||
|
||
par :
|
||
|
||
```xml
|
||
<processStore name="TENANT ProcessStore" providerName="InMemory" connectionString="MaxProcessInfoLogs=20;MaxProcessLogEntries=50"/>
|
||
```
|
||
|
||
Puis : `iisreset` ou recyclage du pool **ApplicationService**.
|
||
|
||
### Astuce Notepad++ (multi-tenant)
|
||
|
||
`Ctrl+H` en mode **Regular expression** :
|
||
|
||
- **Recherche** : `(<processStore name=")(.*)(ProcessStore.*$)`
|
||
- **Remplacement** : `<processStore name="\2ProcessStore" providerName="InMemory" connectionString="MaxProcessInfoLogs=20;MaxProcessLogEntries=50"/>`
|
||
|
||
## Checklist rapide
|
||
|
||
1. ✅ `env.secrets.yaml` cohérent avec la BDD template VM
|
||
2. ✅ `deploy_repository.ps1 <Projet> [Branche]` lancé en PowerShell admin
|
||
3. ✅ `Tenants.xml` → `InMemory` + `iisreset` (toujours)
|
||
4. ✅ Custom app importée si "anciens scripts" et que ce n'est pas le nouveau déploiement
|
||
|
||
## Common errors
|
||
|
||
- **Instances WMS ne démarrent pas après redéploiement** → étape 7 oubliée. **Obligatoire à chaque déploiement**, même si tout semble OK.
|
||
- **Script sort "repo non trouvé"** → VM non connectée à internet (Zscaler), ou nom de projet erroné, ou branche inexistante.
|
||
- **Version WMS < 21.1.19.2** → redéploiement peut échouer avec `deploy_repository.ps1`. Ouvrir un ticket ou repartir de zéro via [first-deployment](first-deployment.md).
|
||
- **`deploy.ps1` inconnu** → projet migré vers script unifié. Utiliser uniquement `deploy_repository.ps1` et sauter étapes 3–6.
|
||
- **Custom app manquante après déploiement** → soit `Customs:` vide dans `DeployConfig.yaml`, soit (anciens scripts) étape 6 oubliée. Cf. [custom-application-management](custom-application-management.md).
|
||
|
||
## Related
|
||
|
||
- [VM Installation](vm-installation.md) - pré-requis VM + validation
|
||
- [First Deployment](first-deployment.md) - à lire d'abord si le projet n'a jamais été déployé
|
||
- [Deploy Specific Commit](deployment-specific-commit.md) - variante pour cibler un commit figé plutôt qu'un HEAD de branche
|
||
- [Custom Application Management](custom-application-management.md) - import/export de la custom app
|
||
- [Git Workflow](git-workflow.md) - sélection de la branche cible
|
||
- [GNA, Services & License](gna-services-license.md) - réinstaller GNA après redéploiement si scripts BOO modifiés
|