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

Post on 06-Jan-2017

121 views 0 download

Transcript of 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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

ORGANISATION GAB 2016

MERCI !

SPONSORS LOCAUX

2

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Architecture Microservices• Azure Container Service• Azure Service Fabric

SOMMAIRE

3

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE4

Architecture Microservices

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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Monolithic versusMicroservices…

6

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

…MonolithicversusMicroservices

7

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

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)

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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Azure Container Service

11

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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

La “mission” de Docker

Build Ship Run

Anywhere

Distributed Applications

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

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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

démoDÉMO

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Developer Workstation

Container

Container

ContainerContainer

Container

Container

Container

Container

Container

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

démoDÉMOAzure Container Services

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Docker & Windows

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

Azure Service Fabric

23

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

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

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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

• Instances / Replicas• Partitionnement

Principes (2/2)

27

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

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

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

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

démo31

Global Azure Bootcamp #GlobalAzure @AZUGFR

PARIS - FRANCE

ORGANISATION GAB 2016

MERCI !

SPONSORS LOCAUX

32