Archived
Update presentation
This commit is contained in:
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 28 KiB |
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 |
+65
-38
@@ -1,3 +1,8 @@
|
|||||||
|
## Simplifiez vos déploiement avec la conteneurisation
|
||||||
|
Nathan Tien You
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Sommaire
|
## Sommaire
|
||||||
- Introduction à la conteneurisation
|
- Introduction à la conteneurisation
|
||||||
- Docker
|
- Docker
|
||||||
@@ -30,6 +35,22 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Infrastructure as code
|
||||||
|
- Automatisation
|
||||||
|
- Fiabilité
|
||||||
|
- Efficacité
|
||||||
|
- Contrôle des versions
|
||||||
|
- Autodocumenté
|
||||||
|
- Immutabilité
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Virtualisation du service
|
||||||
|
\
|
||||||
|
<sup>source : [Gitlab](https://gitlab.com)</sup>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Différents types de conteneurisation
|
## Différents types de conteneurisation
|
||||||
- Conteneurs Processus
|
- Conteneurs Processus
|
||||||
- Docker
|
- Docker
|
||||||
@@ -40,48 +61,38 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Virtualisation du service
|
|
||||||
\
|
|
||||||
<sup>source : [Gitlab](https://gitlab.com)</sup>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Infrastructure as code
|
|
||||||
- Automatisation
|
|
||||||
- Fiabilité
|
|
||||||
- Efficacité
|
|
||||||
- Contrôle des versions
|
|
||||||
- Code = Infrastructre : autodocumenté
|
|
||||||
- Immutabilité
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Conteneurs
|
## Conteneurs
|
||||||
<ul>
|
Contexte d'éxecution isolé : chroot
|
||||||
<li>Ressources (processeur, ram)</li>
|
|
||||||
<li>Stockage</li>
|
|
||||||
<li>Réseau</li>
|
|
||||||
</ul>
|
|
||||||
<object data-id="Container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
|
||||||
<!-- .slide: data-auto-animate -->
|
|
||||||
|
|
||||||
----
|
<object data-id="chroot.svg" data="./assets/chroot.svg" type="image/svg+xml"></object>
|
||||||
|
|
||||||
```bash [1-5|1-2|3|4|5]
|
---
|
||||||
|
|
||||||
|
## Base du conteneur : image
|
||||||
|
|
||||||
|
<object data-id="image.svg" data="./assets/image.svg" type="image/svg+xml"></object>
|
||||||
|
|
||||||
|
- Point d'entrée (exécutable)
|
||||||
|
- Variables d'environnement
|
||||||
|
- Ports
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Registres d'images
|
||||||
|

|
||||||
|
---
|
||||||
|
|
||||||
|
## Lancement d'un conteneur
|
||||||
|
|
||||||
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
-it --rm \
|
-it --rm \
|
||||||
-v /tmp:/usr/local/apache2/htdocs/ \
|
-v /tmp:/usr/local/apache2/htdocs/ \
|
||||||
-p 8000:80 \
|
-p 8000:80 \
|
||||||
httpd:latest
|
httpd:latest
|
||||||
```
|
```
|
||||||
<object data-id="Container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
|
||||||
<!-- .slide: data-auto-animate -->
|
|
||||||
|
|
||||||
----
|
<object data-id="container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
||||||
|
|
||||||

|
|
||||||
<object data-id="Container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
|
||||||
<!-- .slide: data-auto-animate -->
|
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -89,11 +100,27 @@ httpd:latest
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Images
|
## Bonnes pratiques Docker
|
||||||
```Docker
|
- Conteneurs éphémères
|
||||||
FROM httpd:alpine
|
- Processus stateless
|
||||||
|
- Architecture Shared-nothing
|
||||||
|
- Images minimales
|
||||||
|
- Installer uniquement le nécessaire
|
||||||
|
- Séparer compilation et mise en production
|
||||||
|
|
||||||
COPY files/* /usr/local/apache2/htdocs/
|
---
|
||||||
|
|
||||||
|
## Construction d'une image
|
||||||
|
```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"]
|
||||||
```
|
```
|
||||||

|

|
||||||
```bash
|
```bash
|
||||||
@@ -121,7 +148,7 @@ docker buildx build . -t demo:latest
|
|||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
```yaml [|1-4,11-13,22-23|5-6,14-15,36-37|8-9,18-19,28-30,32-34|7,16-17,24-25,26-27] dockercompose
|
```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:
|
services:
|
||||||
|
|
||||||
database:
|
database:
|
||||||
@@ -167,7 +194,7 @@ volumes:
|
|||||||
- Clusters
|
- Clusters
|
||||||
- Stockage distribué
|
- Stockage distribué
|
||||||
- Haute Disponibilité
|
- Haute Disponibilité
|
||||||
- Redonance
|
- Redondance
|
||||||
- Stratégie de déploiement
|
- Stratégie de déploiement
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user