openstack-useropenstack en quelques mots openstack logo naissance en 2010 fondation openstack depuis...

157
OPENSTACK-USER 1

Upload: others

Post on 06-Aug-2020

20 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

OPENSTACK-USER

1

Page 2: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CONCERNANT CES SUPPORTS DE COURS

2 . 1

Page 3: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

SUPPORTS DE COURS RÉALISÉS PAR ALTER WAY CLOUDCONSULTING

ex Osones -

Copyright © 2014 - 2019 alter way CloudConsultingLicence : Sources : HTML/PDF :

Licence Creative Commons BY-SA 4.0

https://cloud-consulting.alterway.fr

Creative Commons BY-SA 4.0https://github.com/Alterway/formations/

https://osones.com/formations/

2 . 2

Page 4: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

INTRODUCTION

3 . 1

Page 5: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

OBJECTIFS DE LA FORMATION : CLOUDComprendre les principes du cloud et son intérêtConnaitre le vocabulaire inhérent au cloudAvoir une vue d’ensemble sur les solutions existantes encloud public et privéPosséder les clés pour tirer parti au mieux du IaaSPouvoir déterminer ce qui est compatible avec la philosophiecloud ou pasAdapter ses méthodes d’administration système et dedéveloppement à un environnement cloud

3 . 2

Page 6: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

OBJECTIFS DE LA FORMATION : OPENSTACKConnaitre le fonctionnement du projet OpenStack et sespossibilitésComprendre le fonctionnement de chacun des composantsd’OpenStackPouvoir faire les bons choix de configurationSavoir déployer manuellement un cloud OpenStack pourfournir du IaaSConnaitre les bonnes pratiques de déploiement d’OpenStackÊtre capable de déterminer l’origine d’une erreur dansOpenStackSavoir réagir face à un bug

3 . 3

Page 7: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PRÉ-REQUIS DE LA FORMATIONCompétences d’administration système Linux tel qu’Ubuntu

Gestion des paquetsManipulation de fichiers de configuration et de servicesLVM (Logical Volume Management) et systèmes defichiers

Notions :Virtualisation : KVM (Kernel-Based Virtual Machine), libvirtRéseau : iptables, namespacesSQL

Optionnel :À l’aise dans un environnement Python

3 . 4

Page 8: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LE CLOUD, VUE D'ENSEMBLE

4 . 1

Page 9: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

DÉFINITION FORMELLE

4 . 2

Page 10: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CARACTÉRISTIQUESFournir un (des) service(s)...

Self serviceÀ travers le réseauMutualisation desressourcesÉlasticité rapideMesurabilité

Inspiré de la définition du NISThttps://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-

145.pdf

4 . 3

Page 11: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

SELF SERVICEL'utilisateur accède directement au servicePas d'intermédiaire humainRéponses immédiatesCatalogue de services permettant leurdécouverte

4 . 4

Page 12: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

À TRAVERS LE RÉSEAUL'utilisateur accède au service à travers le réseauLe fournisseur du service est distant du consommateurRéseau = internet ou pasUtilisation de protocoles réseaux standards (typiquement :HTTP)

4 . 5

Page 13: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

MUTUALISATION DES RESSOURCESUn cloud propose ses services à de multiplesutilisateurs/organisations (multi-tenant)Tenant ou projet : isolation logique des ressourcesLes ressources sont disponibles en grandes quantités(considérées illimitées)Le taux d'occupation du cloud n'est pas visibleLa localisation précise des ressources n'est pas visible

4 . 6

Page 14: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ÉLASTICITÉ RAPIDEProvisionning et suppression des ressources quasiinstantanéPermet le scaling (passage à l'échelle)Possibilité d'automatiser ces actions de scalingVirtuellement pas de limite à cette élasticité

4 . 7

Page 15: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

MESURABILITÉL'utilisation des ressources cloud est monitorée par lefournisseurLe fournisseur peut gérer son capacity planning et safacturation à partir de ces informationsL'utilisateur est ainsi facturé en fonction de son usage précisdes ressourcesL'utilisateur peut tirer parti de ces informations

4 . 8

Page 16: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

MODÈLESOn distingue :

modèles de service : IaaS, PaaS, SaaSmodèles de déploiement : public, privé,hybride

4 . 9

Page 17: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

IAASInfrastructure as a ServiceInfrastructure :Compute (calcul)Storage (stockage)Network (réseau)Utilisateurs cibles : administrateurs (système, stockage,réseau)

4 . 10

Page 18: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PAASPlatform as a ServiceDésigne deux concepts :Environnement permettant de développer/déployer uneapplication (spécifique à un langage/framework - exemple :Python/Django)Ressources plus haut niveau que l'infrastructure, exemple :BDDUtilisateurs cibles : développeurs d'application

4 . 11

Page 19: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

SAASSoftware as a ServiceUtilisateurs cibles : utilisateurs finauxNe pas confondre avec la définition économique duSaaS

4 . 12

Page 20: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

QUELQUECHOSE AS A SERVICE ?Load balancing as a Service (Infra)Database as a Service (Platform)MonApplication as a Service(Software)etc.

4 . 13

Page 21: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES MODÈLES DE SERVICE EN UN SCHÉMA

IaaS - PaaS - SaaS (source : Wikipedia)

Page 22: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

4 . 14

Page 23: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CLOUD PUBLIC OU PRIVÉ ?À qui s'adresse le cloud ?

Public : tout le monde, disponible sur internetPrivé : à une organisation, disponible sur son réseau

4 . 15

Page 24: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CLOUD HYBRIDEUtilisation mixte de multiples clouds privés et/ou publicsConcept séduisant mais mise en œuvre a priori difficileCertains cas d'usages s'y prêtent très bienIntégration continue (CI)MotivationsÉviter le lock-inDébordement (cloud bursting)

4 . 16

Page 25: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

L'INSTANT VIRTUALISATIONMise au point.

La virtualisation est une technologie permettantd'implémenter la fonction computeUn cloud fournissant du compute peut utiliser lavirtualisationMais peut également utiliser :Du bare-metalDes containers (système)

4 . 17

Page 26: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES APIS, LA CLÉ DU CLOUDRappel : API pour Application Programming InterfaceAu sens logiciel : Interface permettant à un logiciel d’utiliserune bibliothèqueAu sens cloud : Interface permettant à un logiciel d’utiliser unservice (XaaS)Interface de programmation (via le réseau, souvent HTTP)Frontière explicite entre le fournisseur (provider) etl'utilisateur (user)Définit la manière dont l'utilisateur communique avec lecloud pour gérer ses ressourcesGérer : CRUD (Create, Read, Update, Delete)

4 . 18

Page 27: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

API RESTUne ressource == une URI (Uniform Resource Identifier)Utilisation des verbes HTTP pour caractériser les opérations(CRUD)GETPOSTPUTDELETEUtilisation des codes de retour HTTPReprésentation des ressources dans le corps des réponsesHTTP

4 . 19

Page 28: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

REST - EXEMPLESGET http://endpoint/volumes/GET http://endpoint/volumes/?size=10POST http://endpoint/volumes/DELETE http://endpoint/volumes/xyz

4 . 20

Page 29: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

EXEMPLE CONCRETGET /v2.0/networks/d32019d3-bc6e-4319-9c1d-6722fc136a22{ "network":{ "status":"ACTIVE", "subnets":[ "54d6f61d-db07-451c-9ab3-b9609b6b6f0b" ], "name":"private-network", "provider:physical_network":null, "admin_state_up":true, "tenant_id":"4fd44f30292945e481c7b8a0c8908869", "provider:network_type":"local", "router:external":true, "shared":true, "id":"d32019d3-bc6e-4319-9c1d-6722fc136a22", "provider:segmentation_id":null }}

4 . 21

Page 30: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

POURQUOI LE CLOUD ? CÔTÉ ÉCONOMIQUEAppréhender les ressources IT comme des services“fournisseur”Faire glisser le budget “investissement” (Capex) vers lebudget “fonctionnement” (Opex)Réduire les coûts en mutualisant les ressources, etéventuellement avec des économies d'échelleRéduire les délaisAligner les coûts sur la consommation réelle des ressources

4 . 22

Page 31: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

POURQUOI LE CLOUD ? CÔTÉ TECHNIQUEAbstraire les couches basses (serveur, réseau, OS, stockage)S’affranchir de l’administration technique des ressources etservices (BDD, pare-feux, load-balancing, etc.)Concevoir des infrastructures scalables à la voléeAgir sur les ressources via des lignes de code et gérer lesinfrastructures “comme du code”

4 . 23

Page 32: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LE MARCHÉ

4 . 24

Page 33: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

AMAZON WEB SERVICES (AWS), LE LEADER

AWS logoLancement en 2006À l'origine : services web "e-commerce" pourdéveloppeursPuis : d'autres services pour développeursEt enfin : services d'infrastructureRécemment, SaaS

4 . 25

Page 34: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ALTERNATIVES IAAS PUBLICS À AWSGoogle Cloud PlatformGoogle Cloud PlatformMicrosoft AzureMicrosoft AzureRackspaceDreamHostDigitalOceanEn France :Cloudwatt (Orange BusinessServices)Numergy (SFR)OVHIkoulaScalewayOutscale

4 . 26

Page 35: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

FAIRE DU IAAS PRIVÉOpenStackOpenStackCloudStackEucalyptusOpenNebula

4 . 27

Page 36: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

OPENSTACK EN QUELQUES MOTS

OpenStack logoNaissance en 2010Fondation OpenStack depuis 2012Écrit en Python et distribué sous licence Apache 2.0Soutien très large de l'industrie et contributions variées

4 . 28

Page 37: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

EXEMPLES DE PAAS PUBLICAmazon Elastic Beanstalk( )Google App Engine ( )Heroku ( )

https://aws.amazon.com/fr/elasticbeanstalkhttps://cloud.google.com/appengine

https://www.heroku.com

4 . 29

Page 38: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

SOLUTIONS DE PAAS PRIVÉCloud Foundry, Fondation ( )OpenShift, Red Hat ( )Solum, OpenStack ( )

https://www.cloudfoundry.orghttps://www.openshift.org

https://wiki.openstack.org/wiki/Solum

4 . 30

Page 39: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES CONCEPTS INFRASTRUCTURE AS A SERVICE

4 . 31

Page 40: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LA BASEInfrastructure :ComputeStorageNetwork

4 . 32

Page 41: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RESSOURCES COMPUTEInstanceImageFlavor (gabarit)Paire de clé(SSH)

4 . 33

Page 42: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

INSTANCEDédiée au computeDurée de vie typiquement courte, à considérer commeéphémèreNe doit pas stocker de données persistantesDisque racine non persistantBasée sur une image

4 . 34

Page 43: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

IMAGE CLOUDImage disque contenant un OS déjà installéInstanciable à l'infiniSachant parler à l'API de metadata

4 . 35

Page 44: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

API ... DE METADATAhttp://169.254.169.254Accessible depuis l'instanceFournit des informations relatives à l'instanceExpose les userdataL'outil cloud-init permet d'exploiter cetteAPI

4 . 36

Page 45: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

FLAVOR (GABARIT)Instance type chez AWSDéfinit un modèle d’instance en termes de CPU, RAM, disque(racine), disque éphémèreLe disque éphémère a, comme le disque racine, l’avantaged’être souvent local donc rapide

4 . 37

Page 46: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PAIRE DE CLÉClé publique + clé privée SSHLe cloud manipule et stocke la clé publiqueCette clé publique est utilisée pour donner un accès SSH auxinstances

4 . 38

Page 47: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RESSOURCES RÉSEAU 1/2Réseau L2Port réseauRéseau L3RouteurIP flottanteGroupe de sécurité

4 . 39

Page 48: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RESSOURCES RÉSEAU 2/2Load Balancing as aServiceVPN as a ServiceFirewall as a Service

4 . 40

Page 49: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RESSOURCES STOCKAGELe cloud fournit deux types de stockage

BlockObjet

4 . 41

Page 50: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

STOCKAGE BLOCKVolumesVolumes attachables à une instanceAccès à des raw devices type /dev/vdbPossibilité d’utiliser n’importe quel système de fichiersPossibilité d'utiliser du LVM, du chiffrement, etc.Compatible avec toutes les applications existantesNécessite de provisionner l'espace en définissant la taille duvolume

4 . 42

Page 51: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

DU STOCKAGE PARTAGÉ ?Le stockage block n’est paspas une solution de stockage partagécomme NFSNFS se situe à une couche plus haute : système de fichiersUn volume est a priori connecté à une seule machine

4 . 43

Page 52: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

"BOOT FROM VOLUME"Démarrer une instance avec un disque racine sur un volumevolume

Persistance des données du disqueracineSe rapproche du serveur classique

4 . 44

Page 53: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

STOCKAGE OBJETAPI : faire du CRUD sur les donnéesPousser et retirer des objetsobjets dans un containercontainer/bucketPas de hiérarchie, pas de répertoires, pas de système defichiersAccès lecture/écriture uniquement par les APIsPas de provisioning nécessaireL’application doit être conçue pour tirer parti du stockageobjet

4 . 45

Page 54: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ORCHESTRATIONOrchestrer la création et la gestion des ressources dans lecloudDéfinition de l'architecture dans un templatetemplateLes ressources créées à partir du templatetemplate forment la stackstackIl existe également des outils d'orchestration (plutôt que desservices)

4 . 46

Page 55: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

BONNES PRATIQUES D'UTILISATION

4 . 47

Page 56: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

POURQUOI DES BONNES PRATIQUES ?Deux approches :

Ne pas évoluerRisquer de ne pas répondre aux attentesSe contenter d'un cas d'usage test & devAdapter ses pratiques au cloud pour en tirer parti pleinement

4 . 48

Page 57: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

HAUTE DISPONIBILITÉ (HA)Le control plane (les APIs) du cloud est HALes ressources provisionnées ne le sont pasforcément

4 . 49

Page 58: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PET VS CATTLEComment considérer ses instances ?

PetCattle

4 . 50

Page 59: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

INFRASTRUCTURE AS CODEAvec du code

Provisionner les ressources d'infrastructureConfigurer les dites ressources, notamment lesinstances

Le métier évolue : Infrastructure Developer

4 . 51

Page 60: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

SCALING, PASSAGE À L'ÉCHELLEScale out plutôt que Scale upScale out : passage à l'échellehorizontalScale up : passage à l'échelle verticalAuto-scalingGéré par le cloudGéré par un composant extérieur

4 . 52

Page 61: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

APPLICATIONS CLOUD READYStockent leurs données au bon endroitSont architecturées pour tolérer lespannesEtc.

Cf. https://12factor.net/

4 . 53

Page 62: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

DERRIÈRE LE CLOUD

4 . 54

Page 63: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

COMMENT IMPLÉMENTER UN SERVICE DE COMPUTEVirtualisationContainers(système)Bare metal

4 . 55

Page 64: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

IMPLÉMENTATION DU STOCKAGE : (SOFTWARE DEFINEDSTORAGE) SDS

AttentionAttention : ne pas confondre avec le sujet block vs objet

Utilisation de commodity hardwarePas de RAID matérielLe logiciel est responsable de garantir les donnéesLes pannes matérielles sont prises en compte et géréesLe projet CephCeph et le composant OpenStack SwiftOpenStack Swiftimplémentent du SDS

Voir aussi ScalityScality

4 . 56

Page 65: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

SDS - THÉORÈME CAP

Page 66: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

Consistency - Availability - Partition tolerance

4 . 57

Page 67: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RÉCAPITULATIF VOCABULAIRE

4 . 58

Page 68: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

NOTIONS ET VOCABULAIRE IAAS 1/4Identité et accès

Tenant/Projet (Project) : locataire du cloud, propriétairede ressources.Utilisateur (User) : compte autorisé à utiliser les APIOpenStack.Quota : contrôle l’utilisation des ressources (vcpu, ram, fip,security groups,...) dans un tenant.Catalogue (de services) : services disponibles etaccessibles via les API.Endpoint : URL permettant l’accès à une API. Un endpointpar service.

4 . 59

Page 69: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

NOTIONS ET VOCABULAIRE IAAS 2/4Calcul/Serveurs (Compute)

Image : généralement, un OS bootable et “cloud ready”.Instance : forme dynamique d’une image.Type d’instance (flavor) : mensurations d’une instance(cpu, ram, capacité disque,...).Metadata et user data : informations gérées par le IaaS etmises à disposition de l’instance.Cloud-init, cloud-config : mécanismes permettant laconfiguration finale automatique d’une instance.

4 . 60

Page 70: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

NOTIONS ET VOCABULAIRE IAAS 3/4Stockage (Storage)

Volume : disque virtuel accessible par les instances(stockage “block”).Conteneur (Container) : entités logiques pour le stockagede fichiers et accessibles via une URL (stockage “objet”).

Réseau et sécurité (Network, Security)Groupe de sécurité (Security groups) : ensemble de règlesde filtrage de flux appliqué à l’entrée des instances.Paire de clés (Keypairs) : clé privée + clé publiquepermettant les connexions aux instances via SSH.IP flottantes (Floating IP) : adresse IP allouée à la demandeet utilisée par les instances pour communiquer avec leréseau “externe”.

4 . 61

Page 71: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

NOTIONS ET VOCABULAIRE IAAS 4/4Orchestration

Stack : ensemble des ressources IaaS utilisées par uneapplication.Template : fichier texte contenant la description d’unestack.

4 . 62

Page 72: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

OPENSTACK : LE PROJET

5 . 1

Page 73: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

TOUR D'HORIZON

5 . 2

Page 74: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

VUE HAUT NIVEAU

Version simple

5 . 3

Page 75: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

HISTORIQUEDémarrage en 2010Objectif : le Cloud Operating System libreFusion de deux projets de Rackspace (Storage) et de la NASA(Compute)Logiciel libre distribué sous licence Apache 2.0Naissance de la Fondation en 2012

5 . 4

Page 76: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

MISSION STATEMENTTo produce a ubiquitous Open Source Cloud Computing platform that is easy to use, simple to implement, interoperable between deployments, works well at all scales, and meets the needs of users and operators of both public and private clouds.

5 . 5

Page 77: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES RELEASESAustin (2010.1)Bexar (2011.1), Cactus (2011.2), Diablo (2011.3)Essex (2012.1), Folsom (2012.2)Grizzly (2013.1), Havana (2013.2)Icehouse (2014.1), Juno (2014.2)Kilo (2015.1), Liberty (2015.2)Mitaka (2016.1), Newton (2016.2)Ocata (2017.1), Pike (2017.2)Queens (2018.1), RockyRocky (2018.2)Stein (2019.1), Train (2019.2)Premier semestre 2020 : Ussuri

5 . 6

Page 78: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

QUELQUES SOUTIENS/CONTRIBUTEURS ...Editeurs : Red Hat, Suse, Canonical, Vmware, ...Constructeurs : IBM, HP, Dell, ...Constructeurs/réseau : Juniper, Cisco, ...Constructeurs/stockage : NetApp, Hitachi, ...En vrac : NASA, Rackspace, Yahoo, OVH, Citrix, SAP, ...GoogleGoogle ! (depuis juillet 2015)

https://www.openstack.org/foundation/companies/

5 . 7

Page 79: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

... ET UTILISATEURSTous les contributeurs précédemment citésEn France : CloudwattCloudwatt et NumergyNumergyWikimediaCERNPaypalComcastBMWEtc. Sans compter les implémentations confidentielles

https://www.openstack.org/user-stories/

5 . 8

Page 80: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES DIFFÉRENTS SOUS-PROJETS

OpenStack Compute - NovaOpenStack (Object) Storage - SwiftOpenStack Block Storage - CinderOpenStack Networking - NeutronOpenStack Image Service - GlanceOpenStack Identity Service -KeystoneOpenStack Dashboard - HorizonOpenStack Telemetry - CeilometerOpenStack Orchestration - Heat

https://www.openstack.org/software/project-navigator/

5 . 9

Page 81: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES DIFFÉRENTS SOUS-PROJETS (2)

Page 82: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

Mais aussi :Bare metal (Ironic)Queue service (Zaqar)Database Service (Trove)Data processing (Sahara)DNS service (Designate)Shared File Systems (Manila)Key management (Barbican)Container (Magnum)

AutresLes clients CLI et bibliothèquesLes outils de déploiement d'OpenStackLes bibliothèques utilisées par OpenStackLes outils utilisés pour développerOpenStack 5 . 10

Page 83: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

APISChaque projet supporte son API OpenStackCertains projets supportent l'API AWS équivalente (Nova/EC2,Swift/S3)

5 . 11

Page 84: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES 4 OPENSOpen SourceOpen DesignOpen DevelopmentOpen Community

https://governance.openstack.org/tc/reference/opens.html

https://www.openstack.org/four-opens/

5 . 12

Page 85: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LA FONDATION OPENSTACKEntité de gouvernance principale et représentation juridiquedu projetLes membres du board sont issus des entreprises sponsors etélus par les membres individuelsTout le monde peut devenir membre individuel(gratuitement)Ressources humaines : marketing, événementiel, releasemanagement, quelques développeurs (principalement surl’infrastructure)600 organisations à travers le monde80000 membres individuels dans 170 pays

5 . 13

Page 86: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LA FONDATION OPENSTACK

Les principales entités de la Fondation

5 . 14

Page 87: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

OPEN INFRASTRUCTURERécemment, la Fondation OpenStack s'élargit à l'OpenOpenInfrastructureInfrastructureAu-delà d'OpenStack, nouveaux projets chapeautés :

Kata ContainersZuulAirshipStarlingX

5 . 15

Page 88: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RESSOURCESAnnonces (nouvelles versions, avis de sécurité) :

Portail documentation : API/SDK : Gouvernance du projet : Versions : Support :

[email protected]#openstack@Freenode

[email protected]

https://docs.openstack.org/https://developer.openstack.org/

https://governance.openstack.org/https://releases.openstack.org/

https://ask.openstack.org/

5 . 16

Page 89: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RESSOURCESActualités :

Blog officiel : Planet : Superuser :

Ressources commerciales : entre autres

Job board :

https://www.openstack.org/blog/http://planet.openstack.org/

http://superuser.openstack.org/

https://www.openstack.org/marketplace/https://www.openstack.org/community/jobs/

5 . 17

Page 90: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

USER SURVEYSondage réalisé régulièrement par la Fondation (tous les 6mois)Auprès des déployeurs et utilisateursDonnées exploitables : https://www.openstack.org/analytics

5 . 18

Page 91: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CERTIFICATION CERTIFIED OPENSTACK ADMINISTRATOR (COA)

Page 92: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

La seule certification :Validée par la Fondation OpenStackNon liée à une entreprise particulière

Contenu :Essentiellement orientée utilisateur de cloud OpenStack

Aspects pratiques :Examen pratique, passage à distance, durée : 2,5 heuresCoût : $300 (deux passages possibles)

Ressources

Tips : Handbook : Exercices (non-officiels) :

https://www.openstack.org/coa/requirements/

https://www.openstack.org/coa/https://www.openstack.org/coa/tips/

http://www.openstack.org/coa/handbook

https://github.com/AJNOURI/COA 5 . 19

Page 93: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

RESSOURCES - COMMUNAUTÉ FRANCOPHONE ET ASSOCIATION

Logo OpenStack-fr -

Meetups : Paris, Lyon, Toulouse, Montréal, etc.OpenStack Days France (Paris) :

Présence à des événements tels que Paris Open SourceSummitCanaux de communication :

[email protected]#openstack-fr@Freenode

https://openstack.fr/ https://asso.openstack.fr/

https://openstackdayfrance.fr/

5 . 20

Page 94: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

UTILISER OPENSTACK

6 . 1

Page 95: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LE PRINCIPEToutes les fonctionnalités sont accessibles par l’APILes clients (y compris Horizon) utilisent l’APIDes crédentials sont nécessaires, avec l'API OpenStack:utilisateurmot de passeprojet (tenant)domaine

6 . 2

Page 96: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES APIS OPENSTACKUne API par service OpenStackVersionnée, la rétro-compatibilité est assuréeLe corps des requêtes et réponses est formatté avecJSONArchitecture RESTLes ressources gérées sont spécifiques à un projet

https://developer.openstack.org/#api

6 . 3

Page 97: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ACCÈS AUX APISDirect, en HTTP, via des outils comme curlAvec une bibliothèqueLes implémentations officielles en PythonOpenStackSDKD’autres implémentations, y compris pour d’autres langages(exemple : jclouds)Shade (bibliothèque Python incluant la business logic)Avec les outils officiels en ligne de commandeAvec HorizonAu travers d'outils tiers, plus haut niveau (exemple :Terraform)

6 . 4

Page 98: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CLIENTS OFFICIELSOpenStack fournit des clients officielsHistoriquement : python-PROJETclient (bibliothèquePython et CLI)Aujourd'hui : openstackclient (CLI)Outils CLIL’authentification se fait en passant les crédentials parparamètres, variables d’environnement ou fichier deconfigurationL’option --debug affiche la communication HTTP

6 . 5

Page 99: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

OPENSTACK CLIENTClient CLI unifiéCommandes du typeopenstack <ressource> <action> (shell interactifdisponible)Vise à remplacer les clients CLI spécifiquesPermet une expérience utilisateur plus homogèneFichier de configuration clouds.yaml

https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-

files

6 . 6

Page 100: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

KEYSTONE : AUTHENTIFICATION, AUTORISATION ET CATALOGUEDE SERVICES

6 . 7

Page 101: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PRINCIPESKeystone est responsable de l'authentification, l'autorisation et

le catalogue de services.

L'utilisateur standard s'authentifie auprès de KeystoneL'administrateur intéragit régulièrement avec Keystone

6 . 8

Page 102: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

APIAPI v3 : port 5000Gère :UtilisateursUtilisateurs, groupesgroupesProjetsProjets (tenants)RôlesRôles (lien entre utilisateur et projet)DomainesDomainesServicesServices et endpointsendpoints (catalogue de services)Fournit :TokensTokens (jetons d'authentification)

6 . 9

Page 103: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CATALOGUE DE SERVICESPour chaque service, plusieurs endpoints sont possibles enfonction de :la régionle type d'interface (public, internal, admin)

6 . 10

Page 104: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

SCÉNARIO D’UTILISATION TYPIQUE

Page 105: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

Interactions avec Keystone

6 . 11

Page 106: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

NOVA : COMPUTE

6 . 12

Page 107: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PRINCIPESGère principalement les instancesinstancesLes instances sont créées à partir des images fournies parGlanceLes interfaces réseaux des instances sont associées à desports NeutronDu stockage block peut être fourni aux instances par Cinder

6 . 13

Page 108: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PROPRIÉTÉS D’UNE INSTANCEÉphémère, a priori non hautement disponibleDéfinie par une flavorConstruite à partir d’une imageOptionnel : attachement de volumesOptionnel : boot depuis un volumeOptionnel : une clé SSH publiqueOptionnel : des ports réseaux

6 . 14

Page 109: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

APIRessources gérées :

InstancesInstancesFlavorsFlavors (types d’instance)KeypairsKeypairs : ressource propre à l'utilisateur (et non propre auprojet)

6 . 15

Page 110: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ACTIONS SUR LES INSTANCESReboot / shutdownSnapshotLecture des logsAccès VNCRedimensionnementMigration (admin)

6 . 16

Page 111: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

GLANCE : REGISTRE D'IMAGES

6 . 17

Page 112: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PRINCIPESRegistre d'images et de snapshotsPropriétés sur les images

6 . 18

Page 113: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

APIAPI v2 : version courante, gère images etsnapshotsAPI artifacts : version future, plus généraliste

6 . 19

Page 114: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

TYPES D’IMAGESGlance supporte un large éventail de types d’images, limité par

le support de la technologie sous-jacente à Nova

rawqcow2amivmdkiso

6 . 20

Page 115: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PROPRIÉTÉS DES IMAGES DANS GLANCEL’utilisateur peut définir un certain nombre de propriétés dont

certaines seront utilisées lors de l’instanciation

Type d’imageArchitectureDistributionVersion de ladistributionEspace disque minimumRAM minimum

6 . 21

Page 116: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PARTAGE DES IMAGESImage publique : accessible à tous les projetsPar défaut, seul l'administrateur peut rendre une imagepubliqueImage partagée : accessible à un ou plusieurs autre(s)projet(s)

6 . 22

Page 117: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

TÉLÉCHARGER DES IMAGESLa plupart des OS fournissent des images régulièrement mises à

jour :

Ubuntu : Debian : CentOS :

https://cloud-images.ubuntu.com/https://cdimage.debian.org/cdimage/openstack/https://cloud.centos.org/centos/

6 . 23

Page 118: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

NEUTRON : RÉSEAU

6 . 24

Page 119: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

APIL’API permet notamment de manipuler ces ressources :

Réseau (network) : niveau 2Sous-réseau (subnet) : niveau 3Port : attachable à une interface sur une instance, un load-balancer, etc.RouteurIP flottante, groupe de sécurité

6 . 25

Page 120: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES IP FLOTTANTESEn plus des fixed IPs portées par les instancesAllocation (réservation pour le projet) d'une IP depuis un poolAssociation d'une IP allouée à un port (d'une instance, parexemple)Non portées directement par les instances

6 . 26

Page 121: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

LES GROUPES DE SÉCURITÉÉquivalent à un firewall devant chaque instanceUne instance peut être associée à un ou plusieurs groupes desécuritéGestion des accès en entrée et sortieRègles par protocole (TCP/UDP/ICMP) et par portCible une adresse IP, un réseau ou un autre groupe desécurité

6 . 27

Page 122: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

FONCTIONNALITÉS SUPPLÉMENTAIRESOutre les fonctions réseau de base niveaux 2 et 3, Neutron peut

fournir d’autres services :

Load BalancingFirewall : diffère des groupes de sécuritéVPN : permet d’accéder à un réseau privé sans IPflottantesQoS

6 . 28

Page 123: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CINDER : STOCKAGE BLOCK

6 . 29

Page 124: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PRINCIPESFournit des volumes (stockage block) attachables auxinstancesGère différents types de volumeGère snapshots et backups de volumes

6 . 30

Page 125: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

UTILISATIONVolume supplémentaire (et stockage persistant) sur uneinstanceBoot from volume : l’OS est sur le volumeFonctionnalité de backup vers un object store (Swift ou Ceph)

6 . 31

Page 126: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

HEAT : ORCHESTRATION

6 . 32

Page 127: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

GÉNÉRALITÉSHeat est la solution native OpenStack, service d'orchestrationHeat fournit une API de manipulation de stacksstacks à partir detemplatestemplatesUn template Heat suit le format HOT (Heat OrchestrationTemplate), basé sur YAML

6 . 33

Page 128: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

UN TEMPLATE HEAT ORCHESTRATION TEMPLATE (HOT)parameters - resources - outputs

heat_template_version: 2013-05-23description: Simple template to deploy a single compute instanceresources:my_instance: type: OS::Nova::Server properties: key_name: my_key image: F18-x86_64-cfntools flavor: m1.small

6 . 34

Page 129: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CONSTRUIRE UN TEMPLATE À PARTIR D’EXISTANTMultiples projets en cours de développement

Flame (Cloudwatt)HOT builderMerlin

6 . 35

Page 130: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

HORIZON : DASHBOARD WEB

6 . 36

Page 131: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PRINCIPESFournit une interface webUtilise les APIs existantes pour fournir une interfaceutilisateurLog in possible sans préciser un projet : Horizon détermine laliste des projets accessible

6 . 37

Page 132: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

UTILISATIONUne interface par projet (possibilité de switcher)Catalogue de services accessibleTéléchargement d'un fichier de configurationclouds.yamlUne zone “admin” restreinte

6 . 38

Page 133: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ARCHITECTURES CLOUD-READY

7 . 1

Page 134: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CONCEVOIR UNE APPLICATION POUR LE CLOUD

7 . 2

Page 135: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

12-FACTOR“The Twelve-Factor App”

Écrit par HerokuSuivre (tout) le code dans un VCSConfiguration

https://12factor.net/

7 . 3

Page 136: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ADAPTER OU PENSER SES APPLICATIONS “CLOUD READY” 1/3Cf. les design tenets du projet OpenStack et Twelve-Factor

Architecture distribuée plutôt quemonolithique

Facilite le passage à l’échelleLimite les domaines de failure

Couplage faible entre les composants

https://12factor.net/

7 . 4

Page 137: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ADAPTER OU PENSER SES APPLICATIONS “CLOUD READY” 2/3Bus de messages pour les communications inter-composantsStateless : permet de multiplier les routes d’accès àl’applicationDynamicité : l’application doit s’adapter à sonenvironnement et se reconfigurer lorsque nécessairePermettre le déploiement et l’exploitation par des outilsd’automatisation

7 . 5

Page 138: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

ADAPTER OU PENSER SES APPLICATIONS “CLOUD READY” 3/3Limiter autant que possible les dépendances à du matériel oudu logiciel spécifique qui pourrait ne pas fonctionner dans uncloudTolérance aux pannes (fault tolerance) intégréeNe pas stocker les données en local, mais plutôt :

Base de donnéesStockage objet

Utiliser des outils standards de journalisation

7 . 6

Page 139: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

MODULAIREMultiples composants de tailleraisonnablePhilosophie UnixCouplage faible et interface documentée

7 . 7

Page 140: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

PASSAGE À L’ÉCHELLEVertical vs HorizontalScale up vs Scale outPlusieurs petites instances plutôt qu’une grosse instance

7 . 8

Page 141: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

STATEFUL VS STATELESSBeaucoup de stateful dans les applications legacyNécessite de partager l’information d’état lorsque plusieursworkersLe stateless élimine cette contrainte

7 . 9

Page 142: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

TOLÉRANCE AUX PANNESL’infrastructure n’est pas hautement disponibleL’API d’infrastructure est hautement disponibleL’application doit anticiper et réagir auxpannes

7 . 10

Page 143: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

STOCKAGE DES DONNÉESBase de données relationnellesBase de données NoSQLStockage blocStockage objetStockage éphémèreCache, temporaire

7 . 11

Page 144: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

DESIGN TENETS D’OPENSTACK (EXEMPLE) 1/21. Scalability and elasticity are our main goals2. Any feature that limits our main goals must be optional3. Everything should be asynchronous. If you can’t do

something asynchronously, see #24. All required components must be horizontally scalable

7 . 12

Page 145: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

DESIGN TENETS D’OPENSTACK (EXEMPLE) 2/25. Always use shared nothing architecture (SN) or sharding. If

you can’t Share nothing/shard, see #26. Distribute everything. Especially logic. Move logic to where

state naturally exists.7. Accept eventual consistency and use it where it is

appropriate.8. Test everything. We require tests with submitted code. (We

will help you if you need it)

https://wiki.openstack.org/wiki/BasicDesignTenets

7 . 13

Page 146: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CONCEVOIR UNE INFRASTRUCTURE POUR LE CLOUD

7 . 14

Page 147: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

AUTOMATISATIONAutomatiser la gestion de l’infrastructure :indispensableCréation des ressourcesConfiguration des ressources

7 . 15

Page 148: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

INFRASTRUCTURE AS CODETravailler comme un développeurDécrire son infrastructure sous forme de code(Heat/Terraform, Ansible)Suivre les changements dans un VCS (git)Mettre en place de la revue de codeUtiliser des mécanismes de testsExploiter des systèmes d'intégration et déploiement continue

7 . 16

Page 149: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

BESOIN D’ORCHESTRATIONManager tous les types de ressources par un pointd’entréeDescription de l’infrastructure dans un fichier (template)Heat (intégré à OpenStack), Terraform

7 . 17

Page 150: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

TESTS ET INTÉGRATION CONTINUEStyle de codeValidation de la syntaxeTests unitairesTests d'intégrationTests de déploiement complet

7 . 18

Page 151: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

TOLÉRANCE AUX PANNESTirer parti des capacités de l'applicationNe pas tenter de rendre l'infrastructure computeHA

7 . 19

Page 152: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

AUTOSCALING GROUPGroupe d’instances similairesNombre variable d’instancesScaling automatique en fonction de métriquesPermet le passage à l'échelle horizontal

7 . 20

Page 153: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

MONITORINGPrendre en compte le cycle de vie des instances : DOWN !=ALERTMonitorer le service plus que le serveur

7 . 21

Page 154: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

BACKUPÊtre capable de recréer ses instances (et le reste de soninfrastructure)Données (applicatives, logs) : block, objet

7 . 22

Page 155: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

COMMENT GÉRER SES IMAGES ?Utilisation d’images génériques et personnalisation àl’instanciationCréation d’images plus ou moins personnalisées :

Modification à froid : libguestfs, virt-builder, virt-sysprepModification au travers d'une instance : automatisationpossible avec PackerConstruction from scratch : diskimage-builder (TripleO)Construction from scratch avec des outils spécifiques auxdistributions (openstack-debian-images pour Debian)

7 . 23

Page 156: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

CONCLUSION

8 . 1

Page 157: OPENSTACK-USEROPENSTACK EN QUELQUES MOTS OpenStack logo Naissance en 2010 Fondation OpenStack depuis 2012 Écrit en Python et distribué sous licence Apache 2.0 …

POUR CONCLURELe cloud révolutionne l’ITOpenStack est le projet libre phare sur la partie IaaSL’utilisation d’un cloud IaaS implique des changements depratiqueLes métiers d’architecture logicielle et infra évoluent

8 . 2