Más contenido relacionado La actualidad más candente (20) Similar a Alphorm.com Support de la Formation Windows Containers (20) Alphorm.com Support de la Formation Windows Containers1. 23/09/2016
1
Formation Windows Containers alphorm.com™©
Formation
Windows Containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
2. 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
3. 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
5. 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
6. 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
7. 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
8. 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é
10. 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
11. 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
13. 23/09/2016
13
Formation Windows Containers alphorm.com™©
Présentation du LAB
de la formation
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
15. 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
16. 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 »
19. 23/09/2016
19
Formation Windows Containers alphorm.com™©
Présentation des
Windows Containers
Les Windows Containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
21. 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
22. 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é
25. 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
26. 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
27. 23/09/2016
27
Formation Windows Containers alphorm.com™©
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
Présentation des
Hyper-V Containers
Les Windows Containers
29. 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
31. 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
32. 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
34. 23/09/2016
34
Formation Windows Containers alphorm.com™©
Prérequis
Les Windows Containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
36. 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é)
37. 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
38. 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 :
40. 23/09/2016
40
Formation Windows Containers alphorm.com™©
Présentation des
images Containers
Les images Containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
43. 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
45. 23/09/2016
45
Formation Windows Containers alphorm.com™©
Téléchargement & installation
des images containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
Les images Containers
48. 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
49. 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)
52. 23/09/2016
52
Formation Windows Containers alphorm.com™©
Installation de docker
sur Windows Server 2016
Docker sur Windows Server
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
55. 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
56. 23/09/2016
56
Formation Windows Containers alphorm.com™©
Création des Windows containers
• Désactivation des OpLocks :
Set-ItemProperty -Path 'HKLM:SOFTWAREMicrosoftWindows
NTCurrentVersionVirtualizationContainers' -Name VSmbDisableOplocks -Type DWord -Value 1 –Force
• Ajout du répertoire docker dans le chemin système :
mkdir "$env:ProgramFilesdocker"
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:ProgramFilesdocker",
[EnvironmentVariableTarget]::Machine)
Fermez la console PowerShell et redémarrez une nouvelle session
PowerShell en tant qu’administrateur
57. 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
59. 23/09/2016
59
Formation Windows Containers alphorm.com™©
Création des
Windows Containers
Création des Windows Containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
62. 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" -ContainerImageName
WindowsServerCore
• Explication de la commande :
New-Container : Création de nouveaux Containers
Name : Nom du container
ContainerImageName : l’image sur laquelle sera basé le container
64. 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
69. 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
70. 23/09/2016
70
Formation Windows Containers alphorm.com™©
Création des Hyper-V
Containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
Création des Windows Containers
72. 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 nested
virtualization
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
74. 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 :
75. 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
77. 23/09/2016
77
Formation Windows Containers alphorm.com™©
Conversion des Windows Containers
en Hyper-V containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
Création des Windows Containers
79. 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
82. 23/09/2016
82
Formation Windows Containers alphorm.com™©
Création des images
containers personnalisées
Création images Containers
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
85. 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
89. 23/09/2016
89
Formation Windows Containers alphorm.com™©
Titre de vidéo
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
Opérations de base
sur les containers
Administration et opérations
91. 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
93. 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
95. 23/09/2016
95
Formation Windows Containers alphorm.com™©
Connexion et administration
des Windows Containers
Configuration réseaux
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
96. 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
97. 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
98. 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
100. 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
101. 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"
104. 23/09/2016
104
Formation Windows Containers alphorm.com™©
Ce que j’ai appris
Conclusion
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
106. 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
108. 23/09/2016
108
Formation Windows Containers alphorm.com™©
Résumé
de la formation
Conclusion
Seyfallah TAGREROUT
Consultant Infrastructure Sogeti &
Microsoft MVP Cloud and Datacenter
Management
Site : http://www.alphorm.com
Blog : http://blog.alphorm.com
110. 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
111. 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 …. !
112. 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