J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

32
Global Azure Bootcamp #GlobalAzure @AZUGFR PARIS - FRANCE 1 Azure et les Microservices Jean-Luc BOUCHO Julien CORIOLAND Architecte, Manager Azure Technical Evangelist @JeanLucBoucho @jcorioland

Transcript of J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Page 1: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE1

Azure et les Microservices

Jean-Luc BOUCHO Julien CORIOLAND Architecte, Manager Azure Technical Evangelist @JeanLucBoucho @jcorioland

Page 2: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

ORGANISATION GAB 2016

MERCI !

SPONSORS LOCAUX

2

Page 3: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Architecture Microservices• Azure Container Service• Azure Service Fabric

SOMMAIRE

3

Page 4: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE4

Architecture Microservices

Page 5: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Martin Flower & James Lewis (http://martinfowler.com/articles/microservices.html)« The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery »

• Objectif : construire des Applications / Systèmes…– Plus robustes– Plus scalables– Plus évolutifs– Plus denses

Architecture Microservices

5

Page 6: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Monolithic versusMicroservices…

6

Page 7: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

…MonolithicversusMicroservices

7

Page 8: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Architecture Microservices

8

Prin

cipes

- Découpage en Services Métiers capables d’évoluer de manière indépendante- Gouvernance « Produit »- Communication interservices légère (pas d’ESB)- Gestion des Données décentralisée- Infrastructure automatisée

Chal

leng

es

- Granularité du Service- Dépendances interservices- Gestion des services- Transactions multi-services- Synchronisation des Données- Gestion de la sécurité

Appr

oche

s- DDD- Mécanismes de résilience (circuit breaker, retries, fallback…)- DevOps (CI/CD)- Cloud- Container- API Gateway- Suivi des Performances- Agrégation des Logs

Page 9: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Netflix• Linkedin• Amazon• Ebay• Google• ING• …

Adoption… #Microservices

9

Shop Example (http://fr.slideshare.net/smancke/fros-con2014-microservicesarchitecture)

Page 10: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Docker Swarm et Docker Compose• Mesosphere DCOS, avec Apache Mesos et Marathon

-> Azure Container Service

• Kubernetes• Red Hat OpenShift• Pivotal Cloud Foundry

-> Azure VMs

-> Azure Service Fabric

Plateformes Microservices

10

Page 11: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Azure Container Service

11

Page 12: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Machine Virtuelles VS Conteneurs

Host OSHypervisor

Host OSContainer Engine

Guest OS

Guest OS

Guest OS

AppFramewor

k

App C

AppFramework

AppFramework

App A

App A’

App B

App B’

App C

App C’

App C’’

AppFramewor

k

App B

AppFramewor

k

App A

Page 13: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

La “mission” de Docker

Build Ship Run

Anywhere

Distributed Applications

Page 14: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

API DBWeb

Docker Hub/Repository

Update, customize, add code

Pullimages

Create

images

(docker

build)

Publish

Deploy containers

WebWeb Web

API

API

DB

Page 15: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Azure Virtual Machine– Utilisation des images « Container Apps » de la

Marketplace– Création via Docker Machine– Utilisation de Docker Virtual Machine Extension for

Linux

Docker sur Azure

Page 16: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

démoDÉMO

Page 17: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Page 18: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Developer Workstation

Container

Container

ContainerContainer

Container

Container

Container

Container

Container

Page 19: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Page 20: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Azure Container Service– Utilisation d’un cluster d’hôtes– Automatisation de la création de l’infrastructure– Choix entre Docker Swarm ou Apache Mesos (Marathon et

Chronos)

Docker sur Azure #2

Page 21: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

démoDÉMOAzure Container Services

Page 22: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Docker & Windows

Page 23: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Azure Service Fabric

23

Page 24: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

La plateforme Microsoft Azure Service Fabric

24

Service Fabric

High Availability

Hyper-Scale

Hybrid Operations

High Density

Microservices

Rolling Upgrades Stateful

Services

Low Latency Fast Startup & Shutdown

Code Orchestration & Lifecycle Management

Replication & Failover

Simple programming models Resource

Management

Self-healingData Partitioning

Automated Rollback

Health Monitoring

Placement Constraints

Azure Private cloud Other clouds

Azure Core

Infrastructure

SQL Databa

se

Power BI

Document DB

Intune

Skype for Bus.

Bing Corta

na

Event Hubs

300+ Customers

Page 25: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Azure Service Fabric est GA– Création de Clusters via ARM &

Portail– Améliorations de Performance,

Densité & Scalabilité– Améliorations API

• Preview– Support Linux– Support Java– Containers Docker & Windows– Clusters On-Premises

//BUILD 2016

25

Page 26: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Service Type = Package de Code + Config + Data– Unité de versioning et de mise à jour

• Code (EntryPoint)– Tout exécutable– “Reliable Services” API, stateless ou statefull (ReliableDictionary ou

ReliableQueue)– “Reliable Actors” API, stateless ou statefull– Containers Docker

Principes (1/2)

26

Page 27: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Instances / Replicas• Partitionnement

Principes (2/2)

27

Page 28: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

var requestQueue =  await this.StateManager.GetOrAddAsync<IReliableQueue<CustomerRecord>>(“requests");

var personDictionary =  await this.StateManager.GetOrAddAsync<IReliableDictionary<Guid, Person>>(“ppl"); ...using (var tx = this.StateManager.CreateTransaction()){    var customerRequestResult = await requestQueue.TryDequeueAsync(tx);

    await personDictionary.AddAsync(tx, customerId, customerRequestResult.Value.person);

    await tx.CommitAsync();}

Transaction de modification

28

Page 29: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Monitoring– Statut de bonne santé– Métriques pour les Actors et Services

• Diagnostique et Troubleshooting– Logs de la plateforme (création de l’application, mises à jour…) – Logs custom : avec tracing ETW– Outillage

• Visual Studio Diagnostics Events Viewer• Windows Event Viewer• Windows Azure Diagnostics + Operational Insights• Intégration possible avec d’autres outils: Kibana, Elasticsearch, …

Supervision

29

Page 30: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Service Fabric : http://aka.ms/ServiceFabric• Documentation : http://aka.ms/ServiceFabricDocs• Examples : http://aka.ms/ServiceFabricSamples• SDK : http://aka.ms/ServiceFabricSDK• Service Fabric pour Windows Server :

http://aka.ms/ServiceFabricWS2012R2• Inscription à Service Fabric pour Linux :

http://aka.ms/SFlinuxpreview• Feedback : http://aka.ms/ServiceFabricForum

Liens

30

Page 31: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

démo31

Page 32: J.L. Boucho, J.Corioland - Azure et les Microservices - Global Azure Bootcamp 2016 Paris

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

ORGANISATION GAB 2016

MERCI !

SPONSORS LOCAUX

32