issue140:tutoriel1
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue140:tutoriel1 [2018/12/28 18:08] – créée auntiee | issue140:tutoriel1 [2019/01/07 11:15] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | In my line of work I don't really get any exposure to containers, but the landscape is changing and if you want to stay relevant, you need to know. At first it was a scary prospect, until Daniel from the Full Circle Telegram group gave me a quick introduction to Vagrant. I had seen LXC on the internet, but assumed (incorrectly) that it was just another virtual machine manager. When I wanted to look into LXC, I was told about LXD, which is LXC with bells on. | + | **In my line of work I don't really get any exposure to containers, but the landscape is changing and if you want to stay relevant, you need to know. At first it was a scary prospect, until Daniel from the Full Circle Telegram group gave me a quick introduction to Vagrant. I had seen LXC on the internet, but assumed (incorrectly) that it was just another virtual machine manager. When I wanted to look into LXC, I was told about LXD, which is LXC with bells on. ** |
+ | |||
+ | Dans mon travail, je ne suis pas vraiment tourné vers les conteneurs, mais le paysage change et si vous voulez rester pertinent, vous devez les connaître. Au début, c' | ||
- | What is LXD? | + | **What is LXD? |
- | LXD is an open source container management extension for Linux Containers (LXC). LXD both improves upon existing LXC features and provides new features and functionality to build and manage Linux containers. | + | LXD is an open source container management extension for Linux Containers (LXC). LXD both improves upon existing LXC features and provides new features and functionality to build and manage Linux containers.** |
+ | |||
+ | Qu' | ||
+ | |||
+ | LXD est une extension de gestion de conteneurs Open Source pour les conteneurs sous Linux (LXC). LXD améliore les fonctionnalités existantes de LXC tout en fournissant de nouvelles caractéristiques et fonctionnalités pour construire et gérer les conteneurs sous Linux. | ||
- | And that is? | + | **And that is? |
Containers are a lightweight virtualisation technology that don't emulate hardware. | Containers are a lightweight virtualisation technology that don't emulate hardware. | ||
Ligne 11: | Ligne 17: | ||
Take the fifty cent tour with me. | Take the fifty cent tour with me. | ||
- | We can try LXD out online without installing anything at: https:// | + | We can try LXD out online without installing anything at: https:// |
+ | |||
+ | Et c'est quoi ? | ||
+ | |||
+ | Les conteneurs sont une technologie de virtualisation allégée qui n' | ||
+ | |||
+ | Faisons un petit tour rapide ensemble. | ||
+ | |||
+ | Nous pouvons tester LXD en ligne, sans rien installer, à : https:// | ||
- | For those who want to try it at home, the LXD container hypervisors are supported and created by Ubuntu team, so installation is as simple as: | + | **For those who want to try it at home, the LXD container hypervisors are supported and created by Ubuntu team, so installation is as simple as: |
sudo apt install lxd | sudo apt install lxd | ||
Ligne 20: | Ligne 34: | ||
1. Set up and configure LXD | 1. Set up and configure LXD | ||
2. Create our first container | 2. Create our first container | ||
- | 3. Launch a container | + | 3. Launch a container** |
+ | |||
+ | Pour ceux qui veulent l' | ||
+ | |||
+ | sudo apt install lxd | ||
+ | |||
+ | En résumé : | ||
+ | 1. Paramétrer et configurer LXD | ||
+ | 2. Créer notre premier conteneur | ||
+ | 3. Lancer un conteneur | ||
- | Once LXD is installed, there will be a LXD group added to your list of groups. Just add your user to the group to be able to manage containers: | + | **Once LXD is installed, there will be a LXD group added to your list of groups. Just add your user to the group to be able to manage containers: |
sudo adduser gewgaw lxd | sudo adduser gewgaw lxd | ||
Should the group not be created, add it yourself: | Should the group not be created, add it yourself: | ||
+ | |||
+ | newgrp lxd** | ||
+ | |||
+ | Une fois LXD installé, vous trouverez un groupe LXD ajouté à votre liste de groupes. Il suffit d' | ||
+ | |||
+ | sudo adduser gewgaw lxd | ||
+ | |||
+ | Au cas où le groupe n' | ||
newgrp lxd | newgrp lxd | ||
+ | |||
- | Setup | + | **Setup |
- | + | ||
Instead of configuring LXD by hand, it comes with a handy set up: | Instead of configuring LXD by hand, it comes with a handy set up: | ||
sudo lxd init | sudo lxd init | ||
Ligne 37: | Ligne 69: | ||
You will need to answer the questions on screen to continue. This sets up the storage and networking etc. for you. Once you are done, verify your install with: lxc info | You will need to answer the questions on screen to continue. This sets up the storage and networking etc. for you. Once you are done, verify your install with: lxc info | ||
- | LXD is built on top of LXC so the lxc commands are all valid. | + | LXD is built on top of LXC so the lxc commands are all valid.** |
+ | |||
+ | Paramétrage | ||
+ | |||
+ | Au lieu de configurer LXD à la main, il arrive avec un paramétrage pratique : | ||
+ | sudo lxd init | ||
+ | |||
+ | Vous devrez répondre aux questions à l' | ||
+ | |||
+ | LXD est construit par dessus LXC ; aussi toutes les commandes lxc sont valables. | ||
- | Creation | + | **Creation |
To create and start containers from images use the launch command: <lxc launch images: > | To create and start containers from images use the launch command: <lxc launch images: > | ||
Ligne 49: | Ligne 90: | ||
or: | or: | ||
- | lxc launch images: | + | lxc launch images: |
- | Can you see the pattern? | + | Création |
+ | |||
+ | Pour créer et démarrer des conteneurs à partir d' | ||
+ | |||
+ | exemples : | ||
+ | |||
+ | xc launch images: | ||
+ | |||
+ | ou: | ||
+ | |||
+ | lxc launch images: | ||
+ | |||
+ | |||
+ | **Can you see the pattern? | ||
Our container is now created. To confirm it was created, we can use the command: lxc list | Our container is now created. To confirm it was created, we can use the command: lxc list | ||
Ligne 60: | Ligne 114: | ||
lxc start, lxc stop, lxc info, lxc delete, lxc destroy, lxc create, lxc clone, etc. | lxc start, lxc stop, lxc info, lxc delete, lxc destroy, lxc create, lxc clone, etc. | ||
- | You can get a lot more info here: https:// | + | You can get a lot more info here: https:// |
- | LXD is typically added to the Linux kernel. Packaged LXD distributions are available for numerous Linux distributions, | + | Pouvez-vous voir le motif ? |
+ | |||
+ | Notre conteneur est maintenant créé. Pour confirmer sa création, nous pouvons utiliser la commande : lxc list | ||
+ | |||
+ | Ceci vous donnera le nom de votre conteneur, son état, l' | ||
+ | |||
+ | exemples : | ||
+ | |||
+ | lxc start, lxc stop, lxc info, lxc delete, lxc destroy, lxc create, lxc clone, etc. | ||
+ | |||
+ | Vous pouvez trouver beaucoup plus d' | ||
+ | |||
+ | **LXD is typically added to the Linux kernel. Packaged LXD distributions are available for numerous Linux distributions, | ||
+ | |||
+ | LXD est contenu classiquement dans le noyau Linux. Des distributions packagées de LXD sont disponibles pour de nombreuses distributions Linux, y compris Fedora, Debian, openSUSE, Ubuntu, Alpine Linux, Arch Linux et Gentoo. Vous pouvez aussi obtenir des compilations de LXD pour Windows et OSX. | ||
- | Launch | + | **Launch |
When you run 'lxc list', you will get a name in the first column. To start a container, simply type: 'lxc exec' and the name in that first column. For example: | When you run 'lxc list', you will get a name in the first column. To start a container, simply type: 'lxc exec' and the name in that first column. For example: | ||
Ligne 74: | Ligne 142: | ||
lxc exec fedora28-c7 -- dnf update | lxc exec fedora28-c7 -- dnf update | ||
- | To run a script you need to provide the full path to that script. | + | To run a script you need to provide the full path to that script.** |
- | To work inside a container, add '-- bash' to the end: | + | Lancement |
+ | |||
+ | Quand vous lancerez « lxc list », vous trouverez un nom dans la première colonne. Pour démarrer un conteneur, tapez simplement : « lxc exec » suivi du nom de la première colonne. Par exemple : | ||
+ | |||
+ | lxc exec centos-c2 | ||
+ | |||
+ | L' | ||
+ | |||
+ | lxc exec fedora28-c7 -- dnf update | ||
+ | |||
+ | Pour lancer un script, vous devez fournir le chemin complet vers ce script. | ||
+ | |||
+ | **To work inside a container, add '-- bash' to the end: | ||
lxc exec fedora28-c7 | lxc exec fedora28-c7 | ||
- | When you are done doing updates or installing software, simply type: exit | + | When you are done doing updates or installing software, simply type: exit** |
+ | |||
+ | Pour travailler dans un conteneur, ajoutez « -- bash » à la fin : | ||
+ | |||
+ | lxc exec fedora28-c7 -- bash | ||
+ | |||
+ | Quand les mises à jour ou des installations de logiciels sont terminées, tapez simplement | ||
- | That is the quick overview on LXD. There is more to it, but you will pick up everything else very fast once you have this bit under your belt. | + | **That is the quick overview on LXD. There is more to it, but you will pick up everything else very fast once you have this bit under your belt. |
Here you can find a list of commands: https:// | Here you can find a list of commands: https:// | ||
- | Website: https:// | + | Website: https:// |
+ | |||
+ | C'est un aperçu rapide de LXD. Plus de choses existent à son sujet, mais vous récupérerez facilement le reste une fois que vous aurez digérez ce début. | ||
+ | |||
+ | Voici où vous trouverez une liste de commandes : https:// | ||
+ | |||
+ | |||
+ | Site Web : https:// |
issue140/tutoriel1.1546016929.txt.gz · Dernière modification : 2018/12/28 18:08 de auntiee