add old presentations

This commit is contained in:
Nathan Tien You
2025-06-20 12:16:48 +02:00
parent 1b88925719
commit b4cfdcc5b5
2 changed files with 209 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
# Migration test -> prod HAPROXY
---
# Sommaire
- Haute Disponibilité (HA) : éviter les coupures en prod
- Déploiement : copie de test à prod
---
# Stratégies de déploiement
- Blue Green Deployment
- Rolling Deployment
Ressources : [Ansible](https://docs.ansible.com/ansible/latest/playbook_guide/guide_rolling_upgrade.html#the-rolling-upgrade), [AWS](https://docs.aws.amazon.com/pdfs/whitepapers/latest/blue-green-deployments/blue-green-deployments.pdf#welcome), [Blog Personnel](https://blog.itaysk.com/2017/11/20/deployment-strategies-defined)
---
# HA
![HA01](https://gricad-gitlab.univ-grenoble-alpes.fr/tienyoun/gdml_deployment/-/raw/main/doc/ha/gdml%20deployment%20HA1.png =80%x)
---
# HA
![HA02](https://gricad-gitlab.univ-grenoble-alpes.fr/tienyoun/gdml_deployment/-/raw/main/doc/ha/gdml%20deployment%20HA2.png =80%x)
---
# HA
![HA03](https://gricad-gitlab.univ-grenoble-alpes.fr/tienyoun/gdml_deployment/-/raw/main/doc/ha/gdml%20deployment%20HA3.png =80%x)
---
# HA
![HA04](https://gricad-gitlab.univ-grenoble-alpes.fr/tienyoun/gdml_deployment/-/raw/main/doc/ha/gdml%20deployment%20HA4.png =80%x)
---
# HA : Notes
- Reverse proxy
- X-Forwarded-For
- Choix du logiciel : HaProxy, Nginx, Apache...
- Rollback difficile (sauf si...)
- Health checks
- Serveur "sur demande"
---
# Copie test -> prod
- [ZFS](https://gricad-gitlab.univ-grenoble-alpes.fr/tienyoun/gdml_deployment/-/blob/zfs/prod_deploy.sh?ref_type=heads)
- [rsync](https://gricad-gitlab.univ-grenoble-alpes.fr/tienyoun/gdml_deployment/-/blob/main/haproxy/prod_deploy.sh?ref_type=heads)
---
| | ZFS | rsync |
| ------------------------------------ | --- | ----- |
| Abstraction hyperviseur | | x |
| Simplicité/Complexité de maintenance | | x |
| Simplicité/Complexité d'usage | | x |
| Déduplication des données | x | |
| Optimisation | x | |
| Rollback | x | (?) |
---
# Choix ?
* **Rsync** : pour les petits datasets ou pour des fichiers "statiques"
* **ZFS** : pour les grosses données (>)
+139
View File
@@ -0,0 +1,139 @@
# Migration Geodesic ZFS
----
# Needs
![intro](https://gricad-gitlab.univ-grenoble-alpes.fr/uploads/-/system/personal_snippet/339/6a97572d1bf17094e56d38d78c1006eb/intro.png =500x)
----
# Summary
- Rsync
- Offline migration (data files)
- Online migration (dumps)
- Snapshots
- Virtual Machines
- ZFS/BTRFS
- Container-based solutions
----
## rsync/scp : offline migration
![rsync 1](https://gricad-gitlab.univ-grenoble-alpes.fr/uploads/-/system/personal_snippet/339/a0305422abc056b2b03244cf9b08e678/rsync_1.png)
----
## rsync/scp : online migration
![rsync 2](https://gricad-gitlab.univ-grenoble-alpes.fr/uploads/-/system/personal_snippet/339/8b93709e86166a3078fb4981ea649309/rsync_2.png)
----
## rsync/scp
#### Possible practical issues :
- File permissions
- Postgres permissions
- SSH keys
- Configuration mismatch
<!--- Static files : `rsync` or `scp` --->
```diff
+ No big architectural changes
- Lots of configuration
- Heavy : will take time to backup and restore
- Hacky ?
```
----
## Snapshots
![gitflow1.svg](https://gricad-gitlab.univ-grenoble-alpes.fr/uploads/-/system/personal_snippet/339/bd9f6a847e821531acde7831c3afa9c7/gitflow1.svg =100%x)
----
## Snapshots
![gitflow2.svg](https://gricad-gitlab.univ-grenoble-alpes.fr/uploads/-/system/personal_snippet/339/98b95ac5511be266098338fa9197288c/gitflow2.svg =100%x)
----
## Snapshots
![gitflow3.svg](https://gricad-gitlab.univ-grenoble-alpes.fr/uploads/-/system/personal_snippet/339/ab3e6403503c24eb218c9af7a4b8b2f5/gitflow3.svg =100%x)
----
## Snapshots
![gitflow4.svg](https://gricad-gitlab.univ-grenoble-alpes.fr/uploads/-/system/personal_snippet/339/f4da1dc71b31e7f4dfc30e724ad1d826/gitflow4.svg =100%x)
----
### Virtual Machine cloning
```diff
- Must fiddle with hypervisor
- We don't want to nest virtual machines
```
----
### ZFS
![cow.gif](https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-000-nocow.gif)
> Conventional Filesystem
----
### ZFS
![cow.gif](https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-001-data-comet.gif)
> Copy on write (CoW)
----
### ZFS
![cow.gif](https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-002-data-worm.gif)
> Simplified CoW representation
----
### ZFS
![cow.gif](https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-003-visualizing-snapshots.gif)
> Snapshots using CoW
----
### ZFS
#### Tools :
- [zrepl](https://zrepl.github.io/quickstart.html)
- [syncoid](https://github.com/jimsalterjrs/sanoid/wiki/Syncoid)
```diff
+ Automatic / Seamless
- Possible use of untested additional tools/programs
- Additional system complexity
```
----
### Container-based solutions
#### LXD
- Hypervisor for Linux Containers (LXC) and virtual machines
- Can use ZFS
- Canonical maintaned
```diff
+ Automatic / Seamless
- Additional architectural complexity
```
----
#### Kubernetes Volume Cloning
```diff
+ Automatic / Seamless
- Additional architectural complexity
- Definitely Hacky
- Kubernetes
- Better handled with operators/pods
```