View
2.694
Download
17
Category
Preview:
Citation preview
23/09/2016
1
Formation Windows Containers alphorm.com™©
Formation
Windows Containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
2
Formation Windows Containers alphorm.com™©
Plan
• Présentation de votre formateur
• Présentation du plan de formation
• Objectifs de la formation
• Publique concerné
• Prérequis
• Introduction aux Windows Containers
• Ressources utiles pour suivre la formation
23/09/2016
3
Formation Windows Containers alphorm.com™©
Présentation de votre formateur
Seyfallah Tagrerout
• Microsoft MVP Cloud and Datacenter Management
� Membre de la Communauté AOS http://aos.community/
• Sogeti du groupe Capgemini
• Migration; Design; Troubleshooting; Mise en place des infrastructures Microsoft / VMware / Citrix et Cisco
• Formateur YNOV (école d’ingénieur Aix-En-Provence)
• Spécialité : Virtualisation
• Me joindre :
� Mail : Seyfallah.t@gmail.com
• Blog : http://seyfallah-it.blogspot.fr/
• LinkedIn : https://fr.linkedin.com/in/seyfallahtagrerout
23/09/2016
4
Formation Windows Containers alphorm.com™©
Ma formation Hyper-V 2016 sur Alphorm
• http://www.alphorm.com/tutoriel/formation-en-ligne-hyper-v-2016
23/09/2016
5
Formation Windows Containers alphorm.com™©
Plan de la formation• Chapitre 1 : Présentation de la formation (Windows Containers)
• Chapitre 2 : Les Windows Containers
� Présentation des Windows Containers
� Présentation des Hyper-V Containers
� Prérequis pour les Windows Containers
• Chapitre 3 : Les images Containers
� Présentation des images Containers
� Téléchargement et installation des images containers
23/09/2016
6
Formation Windows Containers alphorm.com™©
Plan de la formation
• Chapitre 4 : Docker sur Windows Server
� Installation de docker sur Windows Server
• Chapitre 5 : Création des Windows Containers
� Création des Windows Container
� Création des Hyper-V container
� Conversion des Windows Container vers des Hyper-V container
• Chapitre 6: Création des images Containers
� Création des images container personnalise
23/09/2016
7
Formation Windows Containers alphorm.com™©
Plan de la formation
• Chapitre 7 : Administration & opération sur les containers
� Connexion & administration des Windows Containers
� Opération de base sur les containers
• Chapitre 8 : Les containers et le réseau
� Configuration réseaux pour les Windows containers
• Chapitre 9 : Conclusion
23/09/2016
8
Formation Windows Containers alphorm.com™©
Objectif de la formation
• Comprendre les nouveaux concepts avec les Windows Containers
• Planifier, créer, gérer les Windows Containers
• Déploiement d’environnement applicatif isolé
23/09/2016
9
Formation Windows Containers alphorm.com™©
Publique concerné
• Ingénieur / consultant IT
• Geek
• Personnes qui souhaite progresser dans les technologies Microsoft (nouveautés)
23/09/2016
10
Formation Windows Containers alphorm.com™©
Prérequis
• Avoir suivi la formation Hyper-V 2016 Alphorm
• Connaissances Windows Server
• Connaissance de base PowerShell
• Connaissance de base TCP/IP
23/09/2016
11
Formation Windows Containers alphorm.com™©
Introduction aux Windows Containers
• Les Windows containers :
� Vient des technologies de virtualisation d’application Linux
� Popularisé également avec Docker qui est en partenariat avec Microsoft
� Inclus le moteur et client Docker
� Conçu pour le Cloud et la rapidité de déploiement d’application lourde
� Isolation applicative
23/09/2016
12
Formation Windows Containers alphorm.com™©
Are you ready?
GOOOOOOOOOOOOOOO
23/09/2016
13
Formation Windows Containers alphorm.com™©
Présentation du LAB de la formation
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
14
Formation Windows Containers alphorm.com™©
Plan
•Présentation du LAB
•Monter son lab ☺
•Démo
23/09/2016
15
Formation Windows Containers alphorm.com™©
Présentation du LAB
• Le LAB sera constitué des éléments suivants:
� Un serveur sous Windows Server 2016 TP 5 (Virtuelle ou Physique)
� Name : VH01
� Deux Nic
• IP : 192.168.2.3 /24
• IP : DHCP
23/09/2016
16
Formation Windows Containers alphorm.com™©
Monter son lab
• Téléchargement de Windows Server 2016 TP 5 �
https://www.microsoft.com/fr-fr/evalcenter/evaluate-windows-server-technical-preview
• Installation de Windows Server 2016 TP5
• Configuration du serveur « Container Host »
23/09/2016
17
Formation Windows Containers alphorm.com™©
Démo du LAB
• Démo qui montre le montage et la configuration du LAB
23/09/2016
18
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Présentation du LAB
•Configuration et préparation du LAB
23/09/2016
19
Formation Windows Containers alphorm.com™©
Présentation des Windows Containers
Les Windows Containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
20
Formation Windows Containers alphorm.com™©
Plan
•Présentation des Windows containers
•Pourquoi les Windows containers ?
•Représentation des Windows containers
•Concept et vocabulaire
23/09/2016
21
Formation Windows Containers alphorm.com™©
Présentation des Windows containers
• Client Docker intégré dans Windows Server 2016
• Les Windows containers sont conçus pour les environnements cloud, cloud privé
• Technologie qui permet de faire cohabiter sur un même système plusieurs environnements
• Permet également d’avoir plusieurs versions d’applications sur une machine
• Les containers sont plus légers que des Machines virtuelles
23/09/2016
22
Formation Windows Containers alphorm.com™©
Pourquoi les Windows containers ?
• Isolation applicative
•Rapidité de déploiement
•Plus d’autonomie pour les développeurs
•Flexibilité au niveau des environnements de développement
•Portabilité
23/09/2016
23
Formation Windows Containers alphorm.com™©
Représentation des Windows containers
•Représentation des Windows Containers sous Windows Server 2016 :
23/09/2016
24
Formation Windows Containers alphorm.com™©
Représentation des Windows containers
•Représentation des Windows Containers sous Windows Server 2016 :
23/09/2016
25
Formation Windows Containers alphorm.com™©
Concept et vocabulaire
• Container Host : Machine qui héberge les containers (physique ou virtuelle)
• Container Image : Image qui contient des actions appliquées au niveau de la container OS Image
• Container OS Image : Image Windows Server sur laquelle va se baser le container
• Container Repository : L’endroit où sont stockées les containers
• Container Management technology: Gestion des containers en PowerShell et avec le client Docker
23/09/2016
26
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Présentation des Windows containers
•Pourquoi les Windows containers ?
•Représentation des Windows containers
•Concept et vocabulaire
23/09/2016
27
Formation Windows Containers alphorm.com™©
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
Présentation des Hyper-V Containers
Les Windows Containers
23/09/2016
28
Formation Windows Containers alphorm.com™©
Plan
•Présentation des Hyper-V Containers
•Représentation des Hyper-V Containers
•Concept et vocabulaire
23/09/2016
29
Formation Windows Containers alphorm.com™©
Présentation des Hyper-V container
• Hyper-V Containers offrent une meilleure isolation que les Windows containers
• Chaque Container est créé dans un environnement isolé
• Chaque container est lancé dans une « petite machine virtuelle »
• L’isolation est faite au niveau hardware
23/09/2016
30
Formation Windows Containers alphorm.com™©
Représentation des Hyper-V containers
•Représentation des Hyper-V Containers sous Windows Server 2016:
23/09/2016
31
Formation Windows Containers alphorm.com™©
Représentation des Hyper-V containers
•Représentation des Hyper-V Containers sous Windows Server 2016:
23/09/2016
32
Formation Windows Containers alphorm.com™©
Concept et vocabulaire
• Container Host : Machine qui héberge les containers (physique ou virtuelle)
• Container Image : Image qui contient des actions appliquées au niveau de la container OS Image
• Container OS Image : Image Windows Server sur la quelle va se baser le container
• Container Repository : L’endroit où sont stockés les containers
• Container Management technology : Gestion des containers en PowerShell et avec le client Docker
23/09/2016
33
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Les Hyper-V containers
•Leur représentation
23/09/2016
34
Formation Windows Containers alphorm.com™©
Prérequis
Les Windows Containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
35
Formation Windows Containers alphorm.com™©
Plan
• Introduction
• Prérequis pour les Windows containers :
� Prérequis containers Host
� Prérequis logiciel
23/09/2016
36
Formation Windows Containers alphorm.com™©
Introduction
• Les Windows containers est un rôle disponible sous Windows Server 2016 (TP 5)
� Version Windows Server :
• Full GUI
• Core
• Nano Server
• En cas d’Hyper-V containers (Hyper-V doit être installé)
23/09/2016
37
Formation Windows Containers alphorm.com™©
Prérequis pour les Windows containers
• Pour l’installation des Windows containers : (Container Host)
• 4 GB de RAM
• Windows Server 2016 (Full GUI / Core / Nano)
• CPU Intel avec l'Intel VT (seulement pour les processeur intel)
• Si le container host est une machine virtuelle:
� Le nested Virtualization est nécessaire en cas d’activation des Hyper-V containers
� Au moins 2 vCPU
23/09/2016
38
Formation Windows Containers alphorm.com™©
Prérequis pour les Windows containers
• Pour la partie logicielle (Image) :
� Les Windows containers supportent les images en fonction de la version de l’OS du container Host :
23/09/2016
39
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Les prérequis pour les Windows containers et Hyper-V containers
23/09/2016
40
Formation Windows Containers alphorm.com™©
Présentation des images Containers
Les images Containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
41
Formation Windows Containers alphorm.com™©
Plan
• Introduction
•Présentation des images Containers
23/09/2016
42
Formation Windows Containers alphorm.com™©
Introduction
•Les Windows containers fonctionnent sous une image Containers
•Ces images containers contiennent des OS Windows Server
23/09/2016
43
Formation Windows Containers alphorm.com™©
Présentation des images Containers
• Deux types d’images containers :
1. Base Os Image : Image fournie par Microsoft
2. Container Images : Image créée comme Template via l’image de base « Base Os Images »
• Version des images Base OS Images :
� Image Nano Server
� Image WindowsServerCore
� Image ServerDatacenterCore
23/09/2016
44
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•La présentation des Images containers
•Leur fonction
•Leur différentes versions
23/09/2016
45
Formation Windows Containers alphorm.com™©
Téléchargement & installation des images containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
Les images Containers
23/09/2016
46
Formation Windows Containers alphorm.com™©
Plan
• Installation de la feature « Containers »
• Installation du module Container Provider
• Téléchargement et installation des images Containers
23/09/2016
47
Formation Windows Containers alphorm.com™©
Installation de la feature « Containers »
• Installation de la feature « Containers »:
Install-WindowsFeature Containers
23/09/2016
48
Formation Windows Containers alphorm.com™©
Installation du module Container Provider
• Installation du module « Container Provider »:
Install-PackageProvider ContainerImage -Force
• Après l’installation, vérifiez le module PowerShell comme ceci:
Get-Command –Module ContainerImage
• 3 commandes disponibles:
� Find-ContainerImage : Liste les containers images qu’on peut télécharger
� Install-ContainerImage : Télécharge et installe les images
� Save-Configuration : Sauvegarde la configuration
23/09/2016
49
Formation Windows Containers alphorm.com™©
Téléchargement et installation des images Containers
• Comment télécharger et installer une image containers ??
Install-ContainerImage -Name NanoServer -Version 10.0.10586.0
Image NanoServer:
Image WindowsServerCore: (téléchargement long, en fonction de votre connexion)
23/09/2016
50
Formation Windows Containers alphorm.com™©
Téléchargement et installation des images Containers
• Vérification de l’installation des images containers :
Get-ContainerImage
23/09/2016
51
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
• Le téléchargement et l’installation des images containers « Base Os images » depuis Microsoft
23/09/2016
52
Formation Windows Containers alphorm.com™©
Installation de docker sur Windows Server 2016
Docker sur Windows Server
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
53
Formation Windows Containers alphorm.com™©
Plan
• Installation pas à pas de Docker sur Windows Server 2016 TP5
23/09/2016
54
Formation Windows Containers alphorm.com™©
Installation de docker sur Windows Server
• Installation de la feature Containers : (si ce n’est pas fait)
Install-WindowsFeature Containers
23/09/2016
55
Formation Windows Containers alphorm.com™©
Installation de docker sur Windows Server
• Installation du rôle Hyper-V: (si ce n’est pas fait)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
23/09/2016
56
Formation Windows Containers alphorm.com™©
Création des Windows containers
• Désactivation des OpLocks :
Set-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers' -Name VSmbDisableOplocks -Type DWord -Value 1 –Force
• Ajout du répertoire docker dans le chemin système :
mkdir "$env:ProgramFiles\docker"[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:ProgramFiles\docker\", [EnvironmentVariableTarget]::Machine)
Fermez la console PowerShell et redémarrez une nouvelle session PowerShell en tant qu’administrateur
23/09/2016
57
Formation Windows Containers alphorm.com™©
Création des Windows containers
• Téléchargement du moteur docker :
Invoke-WebRequest https://master.dockerproject.org/windows/amd64/dockerd.exe -OutFile dockerd.exe
• Téléchargement du client Docker :
Invoke-WebRequest https://master.dockerproject.org/windows/amd64/docker.exe -OutFile docker.exe
• Vérification :
docker info
• Téléchargement d’une image Nano Server :
docker pull microsoft/nanoserver
• Création d’un container :
docker run --rm -it microsoft/nanoserver cmd.exe
23/09/2016
58
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
• Docker sur Windows Server 2016
23/09/2016
59
Formation Windows Containers alphorm.com™©
Création des Windows Containers
Création des Windows Containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
60
Formation Windows Containers alphorm.com™©
Plan
•Module PowerShell « container »
•Création des Windows containers
23/09/2016
61
Formation Windows Containers alphorm.com™©
Module PowerShell « container »
Get-Command -Module Containers
23/09/2016
62
Formation Windows Containers alphorm.com™©
Création des Windows containers
• Commande pour créer un Windows container:
New-Container -Name "Container01" -ContainerImageNameWindowsServerCore
• Explication de la commande :
� New-Container : Création de nouveaux Containers
� Name : Nom du container
� ContainerImageName : l’image sur laquelle sera basé le container
23/09/2016
63
Formation Windows Containers alphorm.com™©
Création des Windows containers
• Exemple :
• Création de 3 Windows containers :
� Contain01
� Contain02
� Contain03
23/09/2016
64
Formation Windows Containers alphorm.com™©
Création des Windows containers
• Création de 3 Windows containers : avec l’image container « WindowsServerCore »
• New-Container –name Contain01 –ContainerImageName WindowsServerCore
• New-Container –name Contain02 –ContainerImageName WindowsServerCore
• New-Container –name Contain03 –ContainerImageName WindowsServerCore
23/09/2016
65
Formation Windows Containers alphorm.com™©
Création des Windows containers
• Vérification :
Get-Container
23/09/2016
66
Formation Windows Containers alphorm.com™©
Opération de base sur Windows containers
• Opérations de base :
Voir le repository � C:\ProgramData\Microsoft\Windows\Hyper-V\Containers
23/09/2016
67
Formation Windows Containers alphorm.com™©
Opération de base sur Windows containers
• Trouver l’ID d’un container :
23/09/2016
68
Formation Windows Containers alphorm.com™©
Opération de base sur Windows containers
• Création d’un container avec Docker :
docker run --rm -it microsoft/nanoserver cmd.exe
23/09/2016
69
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
• Le module PowerShell « Containers »
• La création des Windows container « simple »
• Quelques opérations de base :
� Vérification des fichiers & affichage des IDs des containers
23/09/2016
70
Formation Windows Containers alphorm.com™©
Création des Hyper-V Containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
Création des Windows Containers
23/09/2016
71
Formation Windows Containers alphorm.com™©
Plan
•Prérequis
•Représentation des Hyper-V containers
•Création des Hyper-V containers
23/09/2016
72
Formation Windows Containers alphorm.com™©
Prérequis
• Si le container host est un serveur physique, il faut installer le rôle « Hyper-V » � Install-WindowsFeature -Hyper-V -Restart
• Activez le Spoofing Mac Address si les hyper-V containers sont sur une VM sous Hyper-V �Get-VMNetworkAdapter -VMName VH01 | Set-VMNetworkAdapter -MacAddressSpoofing On
• Si le container host est une VM sous Hyper-V 2016, activez le nestedvirtualization �
Set-VMProcessor -VMName VH01 -ExposeVirtualizationExtensions $true
• Désactiver la mémoire dynamique si le container host est une VM �Set-VMMemory VH01 -DynamicMemoryEnabled $false
• Mettre deux vCPUs si le container host est une VM �Set-VMProcessor -VMName VH01 -Count 2
23/09/2016
73
Formation Windows Containers alphorm.com™©
Représentation des Hyper-V containers
23/09/2016
74
Formation Windows Containers alphorm.com™©
Création des Hyper-V container
• Création des Hyper-V Containers:
New-Container -name Hyper01 -ContainerImageName NanoServer -SwitchName "Virtual Switch" -RuntimeType HyperV
• Get-Container :
23/09/2016
75
Formation Windows Containers alphorm.com™©
Création des Hyper-V container
• Différence entre les Hyper-V containers et Windows container lors de la création :
Get-Container | select ContainerName, RuntimeType
Run Type Type de container
Default Windows Container
HyperV Hyper-V Container
23/09/2016
76
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Les Hyper-V containers:
� Le prérequis des Hyper-V containers
� Leur représentation au niveau schéma
� Leur création & vérification
23/09/2016
77
Formation Windows Containers alphorm.com™©
Conversion des Windows Containers en Hyper-V containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
Création des Windows Containers
23/09/2016
78
Formation Windows Containers alphorm.com™©
Plan
•Convertir des Windows containers en Hyper-V containers
23/09/2016
79
Formation Windows Containers alphorm.com™©
Prérequis
•Plan d’action :
� Créer un Windows container au nom de « SRV06 »
� Vérifier sa création
� Convertir le Windows container en Hyper-V container avec la commande suivante: Set-Container –name SRV06 –RunTimeType HyperV
� Vérifier la conversion
23/09/2016
80
Formation Windows Containers alphorm.com™©
Prérequis
23/09/2016
81
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Conversion des Windows containers à Hyper-V containers
23/09/2016
82
Formation Windows Containers alphorm.com™©
Création des images containers personnalisées
Création images Containers
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
83
Formation Windows Containers alphorm.com™©
Plan
• Introduction
•Plan d’action
•Représentation
23/09/2016
84
Formation Windows Containers alphorm.com™©
Introduction
•Possibilité de créer une image container Image personnalisée.
• Rappel : Microsoft fournit des images vierges de base « Base OS Image »
23/09/2016
85
Formation Windows Containers alphorm.com™©
Plan d’action
• Etape 1:
� Création d’un Windows container « Contain04 »
• Etape 2:
� Créer une image qui se base sur le container « Contain04 » « image-Contain »
• Etape 3:
� Création de plusieurs containers qui se basent sur l’image qu’on a créé
• Etape 4 :
� Vérification
23/09/2016
86
Formation Windows Containers alphorm.com™©
Plan d’action
23/09/2016
87
Formation Windows Containers alphorm.com™©
Représentation
23/09/2016
88
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•La création des images containers
23/09/2016
89
Formation Windows Containers alphorm.com™©
Titre de vidéo
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
Opérations de base sur les containers
Administration et opérations
23/09/2016
90
Formation Windows Containers alphorm.com™©
Plan
• Introduction
• Exemples
23/09/2016
91
Formation Windows Containers alphorm.com™©
Introduction
•Plusieurs opérations au niveau des containers :
� Gestion de la mémoire
� Vérification du stockage
� Gestion et configuration des cartes réseau
� Chargement de repository
23/09/2016
92
Formation Windows Containers alphorm.com™©
Exemples
• Vérification de la mémoire :
• Vérification au niveau stockage :
23/09/2016
93
Formation Windows Containers alphorm.com™©
Exemples
• Emplacement du stockage des containers :
23/09/2016
94
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Opérations possibles sur les Containers
•Exemples d’opérations
23/09/2016
95
Formation Windows Containers alphorm.com™©
Connexion et administration des Windows Containers
Configuration réseaux
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
96
Formation Windows Containers alphorm.com™©
Plan
• Introduction
• Type de commutateur
• Gestion des cartes réseau
• Configuration
� Création du Switch virtuel
� Création des règles NAT
� Mappage de ports
23/09/2016
97
Formation Windows Containers alphorm.com™©
Introduction
• Un container fonctionne comme une machine virtuelle au niveau réseau, il dispose d’une carte réseau virtuelle qui sera connectée ensuite sur un switch virtuel
• Nous avons créé des containers sans réseau jusqu’à présent
23/09/2016
98
Formation Windows Containers alphorm.com™©
Type de commutateur
• Sous Windows Server 2016 TP 5 deux types de commutateurs sont proposés pour les Windows Containers :
• Mode Transparent :
� Ce type de switch est dit switch de type « Externe » les containers connectés dessus pourront recevoir une adresse IP distribuée par un DHCP
• Mode traduction d’adresse réseau (NAT) :
� Les containers sont dans un réseau de type « Interne » avec des adresses IP internes, avec le mécanisme du NAT, l’adresse IP interne du container est traduite en l’adresse IP externe du Container Host.
• L2 Bridge Mode & L2 Tunnel Mode
23/09/2016
99
Formation Windows Containers alphorm.com™©
Type de commutateur
• Création :
� Switch NAT :
New-VMSwitch -Name "SwitchNAT" -SwitchType NAT -NATSubnetAddress "192.168.1.0/24"
23/09/2016
100
Formation Windows Containers alphorm.com™©
Gestion des cartes réseaux
• Il est possible de faire plusieurs actions en PowerShell afin de gérer les cartes réseau des Windows Containers :
� Connect-ContainerNetworkAdapter : Connexion d’un container à un switch virtuel
� Disconnect-ContainerNetworkAdapter : déconnecter un container
� Add-ContainerNetworkAdapter : ajout de carte réseau
� Set-ContainerNetworkAdapter: modifier une carte réseau
� Remove-ContainerNetworkAdapter : supprimer une carte réseau
� Get-ContainerNetworkAdapter: afficher les informations de la carte réseau
23/09/2016
101
Formation Windows Containers alphorm.com™©
Configuration
• Création d’un switch virtuel :
New-VMSwitch -Name “vSwitchNAT" -SwitchType NAT -NATSubnetAddress"192.168.1.0/24“
• Création de la traduction:
New-NetNat -Name vSwitchNAT -InternalIPInterfaceAddressPrefix"192.168.1.0/24“
• Création d’un nouveau container :
New-Container -Name Contain06 -ContainerImageName WindowsServerCore -SwitchName “vSwitchNAT"
23/09/2016
102
Formation Windows Containers alphorm.com™©
Configuration
•Création du mappage :
23/09/2016
103
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
•Le réseau avec les Windows containers
•La gestion des cartes réseau
•La configuration réseau
� Création de Switch + mappage
23/09/2016
104
Formation Windows Containers alphorm.com™©
Ce que j’ai appris
Conclusion
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
105
Formation Windows Containers alphorm.com™©
Plan
•Ce que j’ai appris
23/09/2016
106
Formation Windows Containers alphorm.com™©
Prochaines formations
• Théorie :
� La notion de container sous Windows Server TP5
� Leurs rôles et avantages
• Opérationnel :
� Création d’un environnement avec des Windows Container et Hyper-V containers
� Administration des containers avec PowerShell et docker
23/09/2016
107
Formation Windows Containers alphorm.com™©
Ce qu’on a couvert
• Les chose apprise lors de cette formation sur les « Windows Containers »
23/09/2016
108
Formation Windows Containers alphorm.com™©
Résumé de la formation
Conclusion
Seyfallah TAGREROUTConsultant Infrastructure Sogeti & Microsoft MVP Cloud and DatacenterManagement
Site : http://www.alphorm.comBlog : http://blog.alphorm.com
23/09/2016
109
Formation Windows Containers alphorm.com™©
Plan
•La formation
•Prochaines formations sur Alphorm
•Liens utiles
23/09/2016
110
Formation Windows Containers alphorm.com™©
La formation
• Chapitre 1 : Présentation de la formation (Windows Containers)
• Chapitre 2 : Les Windows Containers
• Chapitre 3 : Les images Containers
• Chapitre 4 : Création des Windows Containers
• Chapitre 5: Création des images Containers
• Chapitre 6 : Administration & opération sur les containers
• Chapitre 7 : Les containers et le réseau
• Chapitre 8 : Cas concret
23/09/2016
111
Formation Windows Containers alphorm.com™©
Prochaines formations
• Hyper-V formation N° 2 (version plus avancée)
• Windows Server 2016 et le stockage
• Formation Nano Server
• Azure ?
• Et surprises …. !
23/09/2016
112
Formation Windows Containers alphorm.com™©
Lien utiles
• http://seyfallah-it.blogspot.fr/2016/01/windows-containers.html
• http://seyfallah-it.blogspot.fr/2016/01/administration-des-windows-containers.html
• http://seyfallah-it.blogspot.fr/2016/01/creation-dune-ferme-de-serveur-web-avec.html
• http://seyfallah-it.blogspot.fr/2016/02/hyper-v-containers.html
• https://channel9.msdn.com/Blogs/MVP-Cloud-DataCenter/Cration-des-Windows-Containers-sous-Windows-Server-2016-Technical-Preview-4
• Lien pour la TP 5 : https://msdn.microsoft.com/fr-fr/virtualization/windowscontainers/containers_welcome
Recommended