979 lines
No EOL
26 KiB
Markdown
979 lines
No EOL
26 KiB
Markdown
# Guide de Formation - Nomenclature v2.0
|
|
## L'Alliance Boréale
|
|
|
|
**Version :** 1.0
|
|
**Date :** 21 octobre 2025
|
|
**Durée :** 2-3 heures (formation complète)
|
|
**Public :** Administrateurs systèmes membres de L'Alliance
|
|
**Prérequis :** Connaissance Proxmox, bases Linux
|
|
|
|
---
|
|
|
|
## Table des Matières
|
|
|
|
1. [Introduction et Contexte](#1-introduction-et-contexte)
|
|
2. [Module 1 : Comprendre le Standard](#2-module-1-comprendre-le-standard)
|
|
3. [Module 2 : VMID Mnémotechnique](#3-module-2-vmid-mnémotechnique)
|
|
4. [Module 3 : Plan d'Adressage IP](#4-module-3-plan-dadressage-ip)
|
|
5. [Module 4 : Nomenclature VMs et DNS](#5-module-4-nomenclature-vms-et-dns)
|
|
6. [Module 5 : Outils Pratiques](#6-module-5-outils-pratiques)
|
|
7. [Module 6 : Migration en Pratique](#7-module-6-migration-en-pratique)
|
|
8. [Exercices Pratiques](#8-exercices-pratiques)
|
|
9. [Aide-Mémoire](#9-aide-mémoire)
|
|
10. [Certification](#10-certification)
|
|
|
|
---
|
|
|
|
## 1. Introduction et Contexte
|
|
|
|
### 1.1 Pourquoi un Standard de Nomenclature ?
|
|
|
|
**Problèmes avant le standard :**
|
|
- ❌ VMs nommées de façon incohérente (vm1, web-server, test123...)
|
|
- ❌ VMIDs attribués au hasard (104, 1523, 999...)
|
|
- ❌ IPs non structurées (10.50.100.5, 192.168.1.20...)
|
|
- ❌ Impossible de retrouver une ressource rapidement
|
|
- ❌ Automatisation difficile (Ansible ne peut pas cibler par pattern)
|
|
- ❌ Audit et conformité complexes
|
|
|
|
**Bénéfices du standard v2.0 :**
|
|
- ✅ Identification immédiate de toute ressource
|
|
- ✅ VMID → IP → Nom → DNS (cohérence totale)
|
|
- ✅ Automatisation facilitée (scripts, Ansible, Terraform)
|
|
- ✅ Onboarding rapide des nouveaux admins
|
|
- ✅ Audit simplifié pour labellisation
|
|
- ✅ Scalabilité (999 tenants, 99 instances par type)
|
|
|
|
### 1.2 Architecture de L'Alliance
|
|
|
|
**Rappel : Chaque membre est autonome**
|
|
```
|
|
┌─────────────────────────────────────────┐
|
|
│ INTERNET PUBLIC │
|
|
└───────────┬─────────────────────────────┘
|
|
│
|
|
┌───────┼───────┐
|
|
│ │ │
|
|
┌───▼───┐ ┌─▼───┐ ┌─▼───┐
|
|
│ CZP │ │ NUL │ │ TLI │ ← Chaque membre
|
|
│ NAT │ │ NAT │ │ NAT │ derrière NAT
|
|
└───┬───┘ └──┬──┘ └──┬──┘
|
|
│ │ │
|
|
│ 10.0.0.0/8 (local, identique partout)
|
|
│ = Pas de conflit car isolé
|
|
│
|
|
└────────┴───────┴──────→ 172.16.0.0/12
|
|
(fédération via tunnels)
|
|
```
|
|
|
|
**Point clé :** Tous les membres utilisent **10.0.0.0/8** localement sans conflit.
|
|
|
|
---
|
|
|
|
## 2. Module 1 : Comprendre le Standard
|
|
|
|
### 2.1 Les 4 Piliers de la Nomenclature
|
|
|
|
```
|
|
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
│ VMID │ ←→ │ IP │ ←→ │ Nom VM │ ←→ │ DNS │
|
|
│ 02001 │ │10.0.2.10│ │czp-infra│ │dns.infra│
|
|
│ │ │ │ │-dns-... │ │.czp.ab │
|
|
└─────────┘ └─────────┘ └─────────┘ └─────────┘
|
|
```
|
|
|
|
**Tous ces éléments sont liés !**
|
|
|
|
### 2.2 Les Deux Catégories de VMs
|
|
|
|
#### **A) Infrastructure Fédéré (Couches 1-4)**
|
|
Services propres au membre :
|
|
- **Couche 1** : Monitoring matériel
|
|
- **Couche 2** : DNS, VPN, Réseau
|
|
- **Couche 3** : Stockage (Ceph, NFS, Backups)
|
|
- **Couche 4** : Orchestration (Ansible, Git, CI/CD)
|
|
|
|
#### **B) Tenants (Couches 5-8)**
|
|
VMs des clients hébergés :
|
|
- Chaque client = 1 tenant
|
|
- Tenant 001, 002, 003...
|
|
- Services web, DB, API, workers...
|
|
|
|
### 2.3 Vue d'Ensemble du Plan
|
|
|
|
```
|
|
10.0.0.0/8 (Espace Interne Membre)
|
|
│
|
|
├── 10.0.0.0/24 Management
|
|
├── 10.0.1.0/24 Platform Services
|
|
├── 10.0.2.0/24 Public DNS
|
|
├── 10.0.20.0/22 Reserved Infrastructure
|
|
│
|
|
├── 10.0.10.0/23 Tenant Infrastructure
|
|
└── 10.0.128.0/17 Expansion (50% du /8)
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Module 2 : VMID Mnémotechnique
|
|
|
|
### 3.1 Format Infrastructure : `0CTTII`
|
|
|
|
```
|
|
0 = Infrastructure (fixe)
|
|
C = Couche (1, 2, 3, ou 4)
|
|
TT = Type de service (00-99)
|
|
II = Instance (01-99)
|
|
```
|
|
|
|
**Exemples :**
|
|
```
|
|
02001 = 0-2-00-01
|
|
│ │ │ └── Instance 1
|
|
│ │ └───── DNS (type 00)
|
|
│ └──────── Couche 2 (Réseau)
|
|
└────────── Infrastructure
|
|
|
|
04201 = 0-4-20-01
|
|
│ │ │ └── Instance 1
|
|
│ │ └───── Git (type 20)
|
|
│ └──────── Couche 4 (Orchestration)
|
|
└────────── Infrastructure
|
|
```
|
|
|
|
### 3.2 Format Tenant : `TTTII`
|
|
|
|
```
|
|
TTT = Tenant ID (001-999)
|
|
II = Instance (01-99)
|
|
```
|
|
|
|
**Exemples :**
|
|
```
|
|
10001 = 100-01
|
|
│ └── Instance 1
|
|
└────── Tenant 001
|
|
|
|
10021 = 100-21
|
|
│ └── Instance 21 (convention: DB)
|
|
└────── Tenant 001
|
|
|
|
20001 = 200-01
|
|
│ └── Instance 1
|
|
└────── Tenant 002
|
|
```
|
|
|
|
### 3.3 Table de Référence Rapide
|
|
|
|
| Type | VMID | Décodage | Description |
|
|
|------|------|----------|-------------|
|
|
| Infra | 02001 | Couche 2, DNS, Instance 1 | PowerDNS Master |
|
|
| Infra | 02002 | Couche 2, DNS, Instance 2 | PowerDNS Slave 1 |
|
|
| Infra | 02101 | Couche 2, VPN, Instance 1 | WireGuard Gateway |
|
|
| Infra | 04001 | Couche 4, Ansible, Instance 1 | Ansible Controller |
|
|
| Tenant | 10001 | Tenant 001, Instance 1 | Web Frontend |
|
|
| Tenant | 10021 | Tenant 001, Instance 21 | Database |
|
|
| Tenant | 20001 | Tenant 002, Instance 1 | Web Frontend |
|
|
|
|
### 3.4 Exercice 1 : Décodage VMID
|
|
|
|
**Décoder ces VMIDs :**
|
|
1. 03301 → ?
|
|
2. 04201 → ?
|
|
3. 30011 → ?
|
|
|
|
<details>
|
|
<summary>Voir les réponses</summary>
|
|
|
|
1. **03301** = Infrastructure, Couche 3 (Stockage), Type 30 (Backup), Instance 1 → Proxmox Backup Server
|
|
2. **04201** = Infrastructure, Couche 4 (Orchestration), Type 20 (Git), Instance 1 → Forgejo
|
|
3. **30011** = Tenant 003, Instance 11 → Backend API tenant 003
|
|
|
|
</details>
|
|
|
|
### 3.5 Exercice 2 : Choix VMID
|
|
|
|
**Quel VMID pour :**
|
|
1. Un nouveau DNS Slave (3ème) ?
|
|
2. La 1ère VM web du tenant 005 ?
|
|
3. Un nouveau CI/CD runner (2ème) ?
|
|
|
|
<details>
|
|
<summary>Voir les réponses</summary>
|
|
|
|
1. **02003** (Couche 2, DNS type 00, Instance 3)
|
|
2. **50001** (Tenant 005, Instance 01)
|
|
3. **04102** (Couche 4, CI type 10, Instance 2)
|
|
|
|
</details>
|
|
|
|
---
|
|
|
|
## 4. Module 3 : Plan d'Adressage IP
|
|
|
|
### 4.1 Segmentation Infrastructure
|
|
|
|
```
|
|
10.0.0.0/24 → Management
|
|
.1 → Gateway
|
|
.10-.50 → Hyperviseurs Proxmox
|
|
.100-.200 → Monitoring
|
|
|
|
10.0.1.0/24 → Platform Services
|
|
.10 → Ansible (04001)
|
|
.20 → Git (04201)
|
|
.30 → DB Platform (04301)
|
|
.40 → API Admin (04401)
|
|
|
|
10.0.2.0/24 → Public DNS
|
|
.10 → DNS Master (02001)
|
|
.11 → DNS Slave 1 (02002)
|
|
.12 → DNS Slave 2 (02003)
|
|
.20 → VPN Gateway (02101)
|
|
```
|
|
|
|
### 4.2 Allocation Tenants
|
|
|
|
**Stratégie simple :**
|
|
```
|
|
10.0.10.0-99 → Tenant 001
|
|
10.0.10.100-199 → Tenant 002
|
|
10.0.11.0-99 → Tenant 003
|
|
...
|
|
```
|
|
|
|
**Ou avec IPAM automatique** (script allocate-ip.sh)
|
|
|
|
### 4.3 Exercice 3 : Allocation IP
|
|
|
|
**Quelle IP pour :**
|
|
1. Un nouveau PowerDNS Slave 3 ?
|
|
2. La 2ème VM web du tenant 001 ?
|
|
3. Un 2ème Ansible Controller ?
|
|
|
|
<details>
|
|
<summary>Voir les réponses</summary>
|
|
|
|
1. **10.0.2.12** (Segmentation DNS : 10.0.2.0/24)
|
|
2. **10.0.10.2** (Tenant 001 : 10.0.10.0-99)
|
|
3. **10.0.1.11** (Platform Services : 10.0.1.0/24)
|
|
|
|
</details>
|
|
|
|
---
|
|
|
|
## 5. Module 4 : Nomenclature VMs et DNS
|
|
|
|
### 5.1 Format Nom VM Infrastructure
|
|
|
|
```
|
|
<membre>-infra-<type>-<env>-<instance>
|
|
|
|
Exemples:
|
|
czp-infra-dns-master-prod-01
|
|
czp-infra-vpn-gateway-prod-01
|
|
czp-infra-ansible-ctrl-prod-01
|
|
nul-infra-git-forgejo-prod-01
|
|
```
|
|
|
|
### 5.2 Format Nom VM Tenant
|
|
|
|
```
|
|
<membre>-t<tenant-id>-<type>-<env>-<instance>
|
|
|
|
Exemples:
|
|
czp-t001-web-prod-01
|
|
czp-t001-db-postgres-prod-01
|
|
czp-t002-api-fastapi-prod-01
|
|
```
|
|
|
|
### 5.3 Format DNS
|
|
|
|
**Infrastructure :**
|
|
```
|
|
<service>.infra.<membre>.alliance-boreale.ca
|
|
|
|
Exemples:
|
|
dns-master.infra.czp.alliance-boreale.ca
|
|
ansible.infra.czp.alliance-boreale.ca
|
|
```
|
|
|
|
**Tenant :**
|
|
```
|
|
<service>.t<tenant-id>.<membre>.alliance-boreale.ca
|
|
|
|
Exemples:
|
|
web.t001.czp.alliance-boreale.ca
|
|
db.t001.czp.alliance-boreale.ca
|
|
```
|
|
|
|
### 5.4 Exercice 4 : Construction Complète
|
|
|
|
**Pour un nouveau DNS Slave 3 chez Chezlepro :**
|
|
- VMID : ?
|
|
- IP : ?
|
|
- Nom VM : ?
|
|
- DNS : ?
|
|
|
|
<details>
|
|
<summary>Voir les réponses</summary>
|
|
|
|
- **VMID :** 02003
|
|
- **IP :** 10.0.2.12
|
|
- **Nom VM :** czp-infra-dns-slave3-prod-01
|
|
- **DNS :** dns-slave3.infra.czp.alliance-boreale.ca
|
|
|
|
</details>
|
|
|
|
---
|
|
|
|
## 6. Module 5 : Outils Pratiques
|
|
|
|
### 6.1 Installation
|
|
|
|
```bash
|
|
# Télécharger les scripts
|
|
cd /tmp
|
|
wget https://forge.alliance-boreale.ca/tools/scripts-nomenclature-v2.tar.gz
|
|
tar xzf scripts-nomenclature-v2.tar.gz
|
|
|
|
# Installer
|
|
sudo bash install-nomenclature-tools.sh
|
|
```
|
|
|
|
### 6.2 Configuration
|
|
|
|
```bash
|
|
# Éditer la configuration
|
|
sudo nano /etc/alliance-boreale/nomenclature.conf
|
|
|
|
# Contenu:
|
|
MEMBER_ID="czp"
|
|
DNS_DOMAIN="alliance-boreale.ca"
|
|
```
|
|
|
|
### 6.3 Utilisation des Scripts
|
|
|
|
#### **1. Audit de Conformité**
|
|
```bash
|
|
# Audit complet
|
|
audit-nomenclature.sh
|
|
|
|
# Résultat attendu
|
|
✅ CONFORME | VMID: 02001 | Nom: czp-infra-dns-master-prod-01
|
|
❌ NON CONFORME | VMID: 104 | Nom: old-vm
|
|
```
|
|
|
|
#### **2. Génération DNS**
|
|
```bash
|
|
# Générer zone file
|
|
generate-dns-records.sh > dns-records.zone
|
|
|
|
# Aperçu
|
|
dns-master.infra.czp.alliance-boreale.ca. IN A 10.0.2.10
|
|
```
|
|
|
|
#### **3. Validation VMID**
|
|
```bash
|
|
# Valider un VMID
|
|
validate-vmid.sh 02001
|
|
|
|
# Résultat
|
|
✅ VMID VALIDE
|
|
Type: Infrastructure
|
|
Couche: 2
|
|
```
|
|
|
|
#### **4. Migration VM**
|
|
```bash
|
|
# Simulation
|
|
DRY_RUN=true migrate-vm.sh 104 10001 czp-t001-web-prod-01 10.0.10.1
|
|
|
|
# Migration réelle
|
|
migrate-vm.sh 104 10001 czp-t001-web-prod-01 10.0.10.1
|
|
```
|
|
|
|
### 6.4 Exercice 5 : Utilisation des Scripts
|
|
|
|
**Tâches à réaliser :**
|
|
1. Installer les scripts sur votre Proxmox
|
|
2. Exécuter un audit de conformité
|
|
3. Valider le VMID 02001
|
|
4. Générer les enregistrements DNS
|
|
|
|
---
|
|
|
|
## 7. Module 6 : Migration en Pratique
|
|
|
|
### 7.1 Workflow de Migration Complet
|
|
|
|
```
|
|
┌─────────────────┐
|
|
│ 1. AUDIT │ → Identifier VMs non conformes
|
|
└────────┬────────┘
|
|
│
|
|
┌────────▼────────┐
|
|
│ 2. PLANIFICATION│ → Déterminer nouveaux VMID/IP/noms
|
|
└────────┬────────┘
|
|
│
|
|
┌────────▼────────┐
|
|
│ 3. BACKUP │ → Sauvegarder toutes les VMs
|
|
└────────┬────────┘
|
|
│
|
|
┌────────▼────────┐
|
|
│ 4. MIGRATION │ → Migrer par lots (5-10 VMs)
|
|
└────────┬────────┘
|
|
│
|
|
┌────────▼────────┐
|
|
│ 5. VALIDATION │ → Vérifier conformité
|
|
└────────┬────────┘
|
|
│
|
|
┌────────▼────────┐
|
|
│ 6. DOCUMENTATION│ → Mettre à jour DNS/Inventaire
|
|
└────────┬────────┘
|
|
│
|
|
┌────────▼────────┐
|
|
│ 7. NETTOYAGE │ → Supprimer anciennes VMs
|
|
└─────────────────┘
|
|
```
|
|
|
|
### 7.2 Exemple de Migration Pas-à-Pas
|
|
|
|
**Scénario :** Migrer une vieille VM web (VMID 104) vers le standard
|
|
|
|
#### **Étape 1 : État Actuel**
|
|
```bash
|
|
# Informations actuelles
|
|
VMID: 104
|
|
Nom: old-vm-web
|
|
IP: 10.50.100.5
|
|
```
|
|
|
|
#### **Étape 2 : Déterminer Nouveaux Attributs**
|
|
```bash
|
|
# Cette VM est le web du tenant 001
|
|
# Nouveaux attributs:
|
|
VMID: 10001 (Tenant 001, Instance 01)
|
|
IP: 10.0.10.1 (Première IP tenant 001)
|
|
Nom: czp-t001-web-prod-01
|
|
DNS: web.t001.czp.alliance-boreale.ca
|
|
```
|
|
|
|
#### **Étape 3 : Validation**
|
|
```bash
|
|
# Vérifier VMID
|
|
validate-vmid.sh 10001
|
|
# ✅ VMID VALIDE
|
|
|
|
# Vérifier IP disponible
|
|
allocate-ip.sh 001
|
|
# ✅ IP DISPONIBLE: 10.0.10.1
|
|
```
|
|
|
|
#### **Étape 4 : Backup**
|
|
```bash
|
|
# Créer snapshot
|
|
vzdump 104 --mode snapshot --compress zstd
|
|
```
|
|
|
|
#### **Étape 5 : Migration Simulation**
|
|
```bash
|
|
# Test en dry-run
|
|
DRY_RUN=true migrate-vm.sh 104 10001 \
|
|
czp-t001-web-prod-01 10.0.10.1
|
|
|
|
# Vérifier la sortie
|
|
```
|
|
|
|
#### **Étape 6 : Migration Réelle**
|
|
```bash
|
|
# Exécuter migration
|
|
migrate-vm.sh 104 10001 czp-t001-web-prod-01 10.0.10.1
|
|
|
|
# Le script fait:
|
|
# 1. Backup
|
|
# 2. Arrêt VM
|
|
# 3. Clone vers nouveau VMID
|
|
# 4. Config nouvelle IP
|
|
# 5. Démarrage
|
|
```
|
|
|
|
#### **Étape 7 : Post-Migration**
|
|
```bash
|
|
# 1. Se connecter à la VM
|
|
ssh root@10.0.10.1
|
|
|
|
# 2. Vérifier et ajuster l'IP dans la VM
|
|
nano /etc/network/interfaces
|
|
# Changer vers 10.0.10.1/24
|
|
|
|
# 3. Redémarrer réseau
|
|
systemctl restart networking
|
|
|
|
# 4. Tester connectivité
|
|
ping 10.0.0.1
|
|
```
|
|
|
|
#### **Étape 8 : DNS et Inventaire**
|
|
```bash
|
|
# Ajouter DNS
|
|
echo "web.t001.czp.alliance-boreale.ca. IN A 10.0.10.1" >> /etc/bind/zones/...
|
|
|
|
# Régénérer inventaire
|
|
generate-inventory.sh
|
|
|
|
# Tester avec Ansible
|
|
ansible web.t001.czp.alliance-boreale.ca -m ping
|
|
```
|
|
|
|
#### **Étape 9 : Validation Finale**
|
|
```bash
|
|
# Audit
|
|
audit-nomenclature.sh | grep 10001
|
|
# ✅ CONFORME | VMID: 10001
|
|
|
|
# Une fois validé (quelques jours), supprimer ancienne VM
|
|
qm destroy 104
|
|
```
|
|
|
|
### 7.3 Checklist de Migration
|
|
|
|
```
|
|
AVANT:
|
|
□ Backup complet créé
|
|
□ Fenêtre de maintenance planifiée
|
|
□ Nouveaux attributs validés (VMID, IP, nom)
|
|
□ Plan de rollback documenté
|
|
□ Équipe informée
|
|
|
|
PENDANT:
|
|
□ Migration exécutée (script)
|
|
□ VM démarre correctement
|
|
□ IP configurée dans la VM
|
|
□ Connectivité réseau OK
|
|
□ Services applicatifs fonctionnels
|
|
|
|
APRÈS:
|
|
□ DNS créé
|
|
□ Inventaire Ansible mis à jour
|
|
□ Monitoring configuré
|
|
□ Documentation à jour
|
|
□ Tests de régression OK
|
|
□ Ancienne VM supprimée (après validation)
|
|
```
|
|
|
|
---
|
|
|
|
## 8. Exercices Pratiques
|
|
|
|
### Exercice 6 : Planification Migration
|
|
|
|
**Vous avez ces VMs à migrer :**
|
|
|
|
| VMID | Nom Actuel | IP Actuelle | Type |
|
|
|------|------------|-------------|------|
|
|
| 100 | dns-server | 192.168.1.10 | DNS Master |
|
|
| 105 | web1 | 10.20.30.5 | Web Tenant A |
|
|
| 106 | db1 | 10.20.30.6 | DB Tenant A |
|
|
| 200 | ansible | 10.10.10.5 | Ansible |
|
|
|
|
**Complétez le plan de migration :**
|
|
|
|
| VMID Actuel | Nouveau VMID | Nouveau Nom | Nouvelle IP |
|
|
|-------------|--------------|-------------|-------------|
|
|
| 100 | ? | ? | ? |
|
|
| 105 | ? | ? | ? |
|
|
| 106 | ? | ? | ? |
|
|
| 200 | ? | ? | ? |
|
|
|
|
<details>
|
|
<summary>Voir les réponses</summary>
|
|
|
|
| VMID Actuel | Nouveau VMID | Nouveau Nom | Nouvelle IP |
|
|
|-------------|--------------|-------------|-------------|
|
|
| 100 | 02001 | czp-infra-dns-master-prod-01 | 10.0.2.10 |
|
|
| 105 | 10001 | czp-t001-web-prod-01 | 10.0.10.1 |
|
|
| 106 | 10021 | czp-t001-db-postgres-prod-01 | 10.0.10.2 |
|
|
| 200 | 04001 | czp-infra-ansible-ctrl-prod-01 | 10.0.1.10 |
|
|
|
|
</details>
|
|
|
|
### Exercice 7 : Création Nouvelle Infrastructure
|
|
|
|
**Votre membre rejoint L'Alliance. Créez l'infrastructure minimale (Bronze) :**
|
|
|
|
**Ressources nécessaires :**
|
|
- 1 DNS Master
|
|
- 1 Ansible Controller
|
|
- 1 Backup Server
|
|
|
|
**Complétez :**
|
|
|
|
| Service | VMID | Nom VM | IP | DNS |
|
|
|---------|------|--------|-----|-----|
|
|
| DNS Master | ? | ? | ? | ? |
|
|
| Ansible | ? | ? | ? | ? |
|
|
| Backup | ? | ? | ? | ? |
|
|
|
|
<details>
|
|
<summary>Voir les réponses (exemple membre NUL)</summary>
|
|
|
|
| Service | VMID | Nom VM | IP | DNS |
|
|
|---------|------|--------|-----|-----|
|
|
| DNS Master | 02001 | nul-infra-dns-master-prod-01 | 10.0.2.10 | dns-master.infra.nul.ab.ca |
|
|
| Ansible | 04001 | nul-infra-ansible-ctrl-prod-01 | 10.0.1.10 | ansible.infra.nul.ab.ca |
|
|
| Backup | 03301 | nul-infra-pbs-backup-prod-01 | 10.0.1.30 | backup.infra.nul.ab.ca |
|
|
|
|
</details>
|
|
|
|
### Exercice 8 : Déploiement Nouveau Tenant
|
|
|
|
**Un nouveau client (Tenant 005) vous demande :**
|
|
- 2 VMs web (load balancing)
|
|
- 1 API backend
|
|
- 1 Database PostgreSQL
|
|
- 1 Redis cache
|
|
|
|
**Complétez le plan de déploiement :**
|
|
|
|
| Service | VMID | Nom VM | IP |
|
|
|---------|------|--------|----|
|
|
| Web 1 | ? | ? | ? |
|
|
| Web 2 | ? | ? | ? |
|
|
| API | ? | ? | ? |
|
|
| DB | ? | ? | ? |
|
|
| Redis | ? | ? | ? |
|
|
|
|
<details>
|
|
<summary>Voir les réponses</summary>
|
|
|
|
| Service | VMID | Nom VM | IP |
|
|
|---------|------|--------|----|
|
|
| Web 1 | 50001 | czp-t005-web-prod-01 | 10.0.10.40 |
|
|
| Web 2 | 50002 | czp-t005-web-prod-02 | 10.0.10.41 |
|
|
| API | 50011 | czp-t005-api-fastapi-prod-01 | 10.0.10.42 |
|
|
| DB | 50021 | czp-t005-db-postgres-prod-01 | 10.0.10.43 |
|
|
| Redis | 50031 | czp-t005-cache-redis-prod-01 | 10.0.10.44 |
|
|
|
|
**Note :** Convention instance :
|
|
- 01-09 : Web/Frontend
|
|
- 10-19 : Backend/API
|
|
- 20-29 : Databases
|
|
- 30-39 : Cache/Queue
|
|
|
|
</details>
|
|
|
|
---
|
|
|
|
## 9. Aide-Mémoire
|
|
|
|
### 9.1 Carte de Référence Rapide
|
|
|
|
**À imprimer et garder près de votre écran !**
|
|
|
|
```
|
|
╔════════════════════════════════════════════════════════╗
|
|
║ NOMENCLATURE v2.0 - AIDE-MÉMOIRE RAPIDE ║
|
|
╠════════════════════════════════════════════════════════╣
|
|
║ ║
|
|
║ FORMAT VMID INFRASTRUCTURE: 0CTTII ║
|
|
║ 0 = Infrastructure ║
|
|
║ C = Couche (1-4) ║
|
|
║ TT = Type (00-99) ║
|
|
║ II = Instance (01-99) ║
|
|
║ ║
|
|
║ FORMAT VMID TENANT: TTTII ║
|
|
║ TTT = Tenant ID (001-999) ║
|
|
║ II = Instance (01-99) ║
|
|
║ ║
|
|
║ PLAN IP INFRASTRUCTURE: ║
|
|
║ 10.0.0.0/24 → Management ║
|
|
║ 10.0.1.0/24 → Platform Services ║
|
|
║ 10.0.2.0/24 → Public DNS ║
|
|
║ 10.0.20.0/22 → Reserved ║
|
|
║ ║
|
|
║ PLAN IP TENANTS: ║
|
|
║ 10.0.10.0/23 → Tenant Infrastructure ║
|
|
║ 10.0.128.0/17 → Expansion ║
|
|
║ ║
|
|
║ NOM VM INFRA: ║
|
|
║ <membre>-infra-<type>-<env>-<instance> ║
|
|
║ Exemple: czp-infra-dns-master-prod-01 ║
|
|
║ ║
|
|
║ NOM VM TENANT: ║
|
|
║ <membre>-t<tenant>-<type>-<env>-<instance> ║
|
|
║ Exemple: czp-t001-web-prod-01 ║
|
|
║ ║
|
|
║ DNS INFRA: ║
|
|
║ <service>.infra.<membre>.alliance-boreale.ca ║
|
|
║ ║
|
|
║ DNS TENANT: ║
|
|
║ <service>.t<tenant>.<membre>.alliance-boreale.ca ║
|
|
║ ║
|
|
║ SCRIPTS UTILES: ║
|
|
║ audit-nomenclature.sh # Audit conformité ║
|
|
║ validate-vmid.sh <vmid> # Valider VMID ║
|
|
║ allocate-ip.sh <tenant> # Allouer IP ║
|
|
║ migrate-vm.sh <src> <dst> <nom> <ip> # Migration ║
|
|
║ ║
|
|
╚════════════════════════════════════════════════════════╝
|
|
```
|
|
|
|
### 9.2 Table des Types de Services
|
|
|
|
#### Couche 2 - Réseau
|
|
```
|
|
00-09 : DNS (PowerDNS)
|
|
10-19 : VPN/WireGuard
|
|
20-29 : Routeurs
|
|
30-39 : Proxy/HAProxy
|
|
```
|
|
|
|
#### Couche 3 - Stockage
|
|
```
|
|
00-09 : Ceph Monitors
|
|
10-19 : Ceph OSDs
|
|
20-29 : NFS
|
|
30-39 : Backup (PBS, Borg)
|
|
```
|
|
|
|
#### Couche 4 - Orchestration
|
|
```
|
|
00-09 : Ansible
|
|
10-19 : CI/CD Runners
|
|
20-29 : Git (Forgejo)
|
|
30-39 : DB Platform
|
|
40-49 : API Admin
|
|
```
|
|
|
|
#### Instances Tenant
|
|
```
|
|
01-09 : Web/Frontend
|
|
10-19 : Backend/API
|
|
20-29 : Databases
|
|
30-39 : Cache/Queue
|
|
40-49 : Workers
|
|
```
|
|
|
|
### 9.3 Commandes Fréquentes
|
|
|
|
```bash
|
|
# Lister toutes les VMs
|
|
qm list
|
|
|
|
# Info VM
|
|
qm config <vmid>
|
|
|
|
# Audit conformité
|
|
audit-nomenclature.sh
|
|
|
|
# Valider VMID
|
|
validate-vmid.sh <vmid>
|
|
|
|
# Générer DNS
|
|
generate-dns-records.sh > dns.zone
|
|
|
|
# Générer inventaire
|
|
generate-inventory.sh
|
|
|
|
# Migration (simulation)
|
|
DRY_RUN=true migrate-vm.sh <src> <dst> <nom> <ip>
|
|
|
|
# Allouer IP tenant
|
|
allocate-ip.sh <tenant-id>
|
|
```
|
|
|
|
---
|
|
|
|
## 10. Certification
|
|
|
|
### 10.1 Test de Certification
|
|
|
|
**Pour valider votre formation, répondez à ces 10 questions :**
|
|
|
|
#### Question 1
|
|
Quel est le VMID pour un 2ème DNS Slave en infrastructure ?
|
|
- A) 02002
|
|
- B) 20002
|
|
- C) 02102
|
|
- D) 02200
|
|
|
|
#### Question 2
|
|
Quelle IP pour le 1er Ansible Controller ?
|
|
- A) 10.0.0.10
|
|
- B) 10.0.1.10
|
|
- C) 10.0.2.10
|
|
- D) 10.0.4.10
|
|
|
|
#### Question 3
|
|
Quel nom pour la 1ère VM web du tenant 003 (membre czp) ?
|
|
- A) czp-web-t003-prod-01
|
|
- B) czp-t003-web-prod-01
|
|
- C) czp-t003-prod-web-01
|
|
- D) czp-tenant003-web-01
|
|
|
|
#### Question 4
|
|
Quel DNS pour l'API du tenant 002 (membre nul) ?
|
|
- A) api.nul.t002.alliance-boreale.ca
|
|
- B) t002-api.nul.alliance-boreale.ca
|
|
- C) api.t002.nul.alliance-boreale.ca
|
|
- D) api.tenant002.nul.alliance-boreale.ca
|
|
|
|
#### Question 5
|
|
Quelle plage IP pour l'infrastructure Platform Services ?
|
|
- A) 10.0.0.0/24
|
|
- B) 10.0.1.0/24
|
|
- C) 10.0.2.0/24
|
|
- D) 10.0.10.0/24
|
|
|
|
#### Question 6
|
|
Le VMID 30021 correspond à quoi ?
|
|
- A) Infrastructure Couche 3, Type 00, Instance 21
|
|
- B) Tenant 003, Instance 21
|
|
- C) Tenant 300, Instance 21
|
|
- D) Infrastructure Couche 30, Instance 21
|
|
|
|
#### Question 7
|
|
Combien de tenants maximum peut supporter ce standard ?
|
|
- A) 99
|
|
- B) 999
|
|
- C) 9999
|
|
- D) Illimité
|
|
|
|
#### Question 8
|
|
Quelle commande pour valider un VMID ?
|
|
- A) check-vmid.sh
|
|
- B) validate-vmid.sh
|
|
- C) test-vmid.sh
|
|
- D) verify-vmid.sh
|
|
|
|
#### Question 9
|
|
Avant une migration, quelle est la PREMIÈRE étape ?
|
|
- A) Arrêter la VM
|
|
- B) Créer un backup
|
|
- C) Changer le VMID
|
|
- D) Modifier l'IP
|
|
|
|
#### Question 10
|
|
Où sont stockées les allocations IP des tenants ?
|
|
- A) /etc/proxmox/ipam.txt
|
|
- B) /var/lib/ipam/allocations.txt
|
|
- C) /etc/alliance-boreale/ipam.txt
|
|
- D) /etc/network/ipam.conf
|
|
|
|
### 10.2 Réponses
|
|
|
|
<details>
|
|
<summary>Cliquer pour voir les réponses</summary>
|
|
|
|
1. **A** - 02002 (Couche 2, DNS type 00, Instance 2)
|
|
2. **B** - 10.0.1.10 (Platform Services)
|
|
3. **B** - czp-t003-web-prod-01
|
|
4. **C** - api.t002.nul.alliance-boreale.ca
|
|
5. **B** - 10.0.1.0/24
|
|
6. **B** - Tenant 003, Instance 21 (probablement une DB)
|
|
7. **B** - 999 tenants (001-999)
|
|
8. **B** - validate-vmid.sh
|
|
9. **B** - Créer un backup
|
|
10. **C** - /etc/alliance-boreale/ipam.txt
|
|
|
|
**Score :**
|
|
- 10/10 : ✅ Certifié Expert Nomenclature v2.0
|
|
- 8-9/10 : ✅ Certifié avec révision mineure
|
|
- 6-7/10 : ⚠️ Révision recommandée
|
|
- <6/10 : ❌ Formation à reprendre
|
|
|
|
</details>
|
|
|
|
### 10.3 Exercice Pratique Final
|
|
|
|
**Déploiement complet d'un nouveau membre :**
|
|
|
|
**Scénario :** Vous êtes le nouvel administrateur de "TechnoLibre" (tli), membre #003 de L'Alliance. Vous devez déployer l'infrastructure minimale Bronze + 1 premier tenant.
|
|
|
|
**Livrables attendus :**
|
|
|
|
1. **Plan d'infrastructure (3 VMs minimum) :**
|
|
- DNS Master
|
|
- Ansible Controller
|
|
- Backup Server
|
|
|
|
2. **Plan tenant 001 (3 VMs) :**
|
|
- Web Frontend
|
|
- API Backend
|
|
- Database PostgreSQL
|
|
|
|
3. **Documentation complète pour chaque VM :**
|
|
- VMID
|
|
- Nom VM
|
|
- IP
|
|
- DNS
|
|
|
|
4. **Scripts de création :**
|
|
- Commandes qm create pour chaque VM
|
|
- Commandes de configuration réseau
|
|
|
|
5. **Zone DNS complète**
|
|
|
|
**Créez un document avec tous ces éléments !**
|
|
|
|
---
|
|
|
|
## Ressources Supplémentaires
|
|
|
|
### Documentation
|
|
- **Standard Nomenclature v2.0** : https://docs.alliance-boreale.ca/nomenclature-v2
|
|
- **Scripts** : https://forge.alliance-boreale.ca/tools/nomenclature-scripts
|
|
- **Vidéos** : https://video.alliance-boreale.ca/nomenclature
|
|
|
|
### Support
|
|
- **Email** : technique@alliance-boreale.ca
|
|
- **Matrix** : #technique:alliance-boreale.ca
|
|
- **Forum** : https://forum.alliance-boreale.ca/c/nomenclature
|
|
|
|
### Communauté
|
|
- **Partage de configurations** : https://forge.alliance-boreale.ca/configs
|
|
- **Retours d'expérience** : https://blog.alliance-boreale.ca/tag/nomenclature
|
|
|
|
---
|
|
|
|
## Conclusion
|
|
|
|
### Ce que vous avez appris
|
|
|
|
✅ Comprendre la philosophie du standard v2.0
|
|
✅ Maîtriser le format VMID mnémotechnique
|
|
✅ Connaître le plan d'adressage IP complet
|
|
✅ Construire des noms VMs et DNS conformes
|
|
✅ Utiliser les scripts de migration et audit
|
|
✅ Planifier et exécuter une migration complète
|
|
|
|
### Prochaines Étapes
|
|
|
|
1. **Pratiquer** sur un environnement de test
|
|
2. **Auditer** votre infrastructure actuelle
|
|
3. **Planifier** la migration progressive
|
|
4. **Documenter** votre plan
|
|
5. **Valider** avec le Cercle Technique
|
|
6. **Migrer** par lots sur 6-12 mois
|
|
|
|
### Engagement
|
|
|
|
En tant qu'administrateur certifié Nomenclature v2.0, vous vous engagez à :
|
|
- Respecter le standard pour tous nouveaux déploiements
|
|
- Participer à la migration progressive de l'existant
|
|
- Partager vos retours d'expérience avec la communauté
|
|
- Former les nouveaux administrateurs de votre membre
|
|
|
|
---
|
|
|
|
**« Une nomenclature maîtrisée = Une infrastructure maîtrisée »**
|
|
|
|
---
|
|
|
|
**FIN DU GUIDE DE FORMATION**
|
|
|
|
**Version :** 1.0
|
|
**Date :** 21 octobre 2025
|
|
**Licence :** CC-BY-SA 4.0
|
|
**Auteur :** L'Alliance Boréale - Cercle Technique |