add 2025 directory

This commit is contained in:
Nathan Tien You
2025-06-20 12:17:37 +02:00
parent b4cfdcc5b5
commit 39b40989fa
11 changed files with 0 additions and 0 deletions
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 83 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.
+209
View File
@@ -0,0 +1,209 @@
## Simplifiez vos déploiement avec la conteneurisation
Nathan Tien You
---
## Sommaire
- Introduction à la conteneurisation
- Docker
- Principes clés
- Conteneurs
- Images
- Orchestration
- Exemples d'applications
---
## Nathan Tien You
<!-- .slide: data-visibility="hidden"-->
- Ingénieur spécialité informatique
- Développeur fullstack
- Home Server :
- Proxmox
- Docker
- Gitea actions
- Amateur de jeux de deckbuilding
---
## Problématiques liées à la virtualisation
- Gourmand (Mémoire, processeur, disque dur)
- Installation lourde
- Mises à jour et maintenance
- Système d'exploitation
- Outils de supervision
- Dépendances / prérequis
---
## Infrastructure as code
- Automatisation
- Fiabilité
- Efficacité
- Contrôle des versions
- Autodocumenté
- Immutabilité
---
## Virtualisation du service
![Comparison between containers, bare metal, and virtual machines](https://about.gitlab.com/images/blogimages/containers-vm-bare-metal.png "Containers vs VMs")
<!-- <sup>source : [Gitlab](https://gitlab.com)</sup> -->
---
## Différents types de conteneurisation
- Conteneurs Processus
- Docker
- Podman
- Conteneurs Machine
- LXC
- LXD
---
## Conteneurs
Contexte d'éxecution isolé : chroot
![chroot](./assets/chroot.svg)
---
## Base du conteneur : image
![Docker_image](./assets/Docker_image.drawio.svg)
---
## Registres d'images
<!-- .slide: data-visibility="hidden"-->
![Docker image registry](https://despliegue.codeandcoke.com/_media/apuntes:arquitectura_docker.png)
---
## Lancement d'un conteneur
```bash
docker run hello-world
```
![container_run](./assets/Container.drawio.svg)
----
<!-- .slide: data-visibility="hidden" data-background-video="./assets/run.mp4" data-background-size="contain" -->
---
## Bonnes pratiques Docker
- Conteneurs éphémères
- Processus stateless
- Architecture Shared-nothing
- Images minimales
- Installer uniquement le nécessaire
- Compiler le code dans les images : pas de compilation en production
---
## Construction d'une image
<!-- .slide: data-visibility="hidden"-->
```Docker dockercompose
FROM node:lts-alpine3.20
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
COPY index.js ./
RUN npm ci
CMD ["node", "index.js"]
```
![Container Insides](./assets/Image.drawio.svg)
```bash
docker buildx build . -t demo:latest
```
----
<!-- .slide: data-background-video="./assets/run.mp4" data-background-size="contain" data-visibility="hidden" -->
---
## Orchestration
<!-- .slide: data-auto-animate -->
Conteneur Docker = processus unitaire
**But : agencer plusieurs conteneurs pour faire une application**
---
## Orchestration
<!-- .slide: data-auto-animate -->
- Automatisation du déploiement
- Horizontal Scaling
- Nombreuses platformes
- Kubernetes
- Docker Compose
- OpenShift
---
<h2>Exemple d'usage</h2>
<object data-id="Compose.svg" data="./assets/Compose.drawio.svg" type="image/svg+xml"></object>
----
```yaml [|1-4,11-13,21-23|5-6,14-15,36-37|8-9,18-19,28-30,32-34|7,16-17,24-25,26-27] dockercompose
services:
database:
image: redis:alpine3.20
volumes:
- database-data:/data
command: "redis-server --save 60 1"
networks:
- back
frontend:
image: docker-demo/front
build: ./front
volumes:
- ./test.txt:/usr/local/apache2/htdocs/test.txt
ports:
- "80:80"
networks:
- front
backend:
image: docker-demo/backend
build: ./back
environment:
- REDIS_URL=redis://database
depends_on:
- database
networks:
- back
- front
networks:
front:
back:
volumes:
database-data:
```
---
## Orchestration : Kubernetes
- Clusters
- Stockage distribué
- Haute Disponibilité
- Redondance
- Stratégie de déploiement
---
## Où utiliser la conteneurisation ?
- Services internes ou publics
- DevOps (Déploiement et intégration continue)
- Technologies Cloud (AWS, Azure...) ou on-prem
- Complémentaire aux machines virtuelles
+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
```