dnc2015 azure-microservizi-vforusso
TRANSCRIPT
![Page 1: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/1.jpg)
Template designed by
Sviluppare e gestire architetture a microservizi su AzureVito Flavio [email protected] - @vflorussohttps://github.com/vflorusso/
![Page 2: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/2.jpg)
Chi sono e cosa faccio
![Page 3: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/3.jpg)
Obiettivi e takeaway
Architetture
Cloud
Stato della
tecnologia
Azure
Docker
Service
Fabric
![Page 4: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/4.jpg)
Un po’ di contesto
80s 90s 2000s oggi
Architetture
Computing style
Ciclo di vita
PC o Mainframe Desktop e browser Web e smart client Mobile, web, desktop
«fat client»«fat server» Client - Server SOA Distribuite
Waterfall Waterfall + Agile Agile + Scrum Scrum + LeanContinuous delivery
![Page 5: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/5.jpg)
Ieri
Le sfide
Oggi
Uno store dati
Un sistema operativo prevalente
Un client
Una tecnologia di sviluppo
ER, NoSQL, Hadoop
Windows + Linux
Mobile, Web, TV
.NET, Javascript, NodeJS, Xamarin, Java
![Page 6: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/6.jpg)
Abbiamo bisogno di un nuovo stile di architettura
![Page 7: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/7.jpg)
L’evoluzione dell’architettura software
Desktop
Client
Server
Browser
Web Server
Db Server
Any Device
microservices
API Proxy
![Page 8: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/8.jpg)
Cosa è un «Microservice»• Funzionalità specializzata• «loosely coupled» da altre funzionalità“Autonomo”
• Sviluppato, testato e aggiornato autonomamente“Isolato”
• Può avere o non avere stato• scalare in maniera indipendente“Elastico”
• “fault tolerant”• altamente disponibile“Resiliente”
• Risponde in tempi rapidi e “predicibili”“Responsivo”
![Page 9: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/9.jpg)
Architettura logica
Microservice
• “Any client” UX
• SDK per accedere al servizioSDK• Protocollo di comunicazione
standard (in genere REST/HTTP)
Protocol
• Modelli datiModels
• Logia e regole di businessService
• Strato di accesso ai datiDAC
• Store di dati persistenteStore
• “Continuous Delivery”Automation
Protocol
Protocol
DAC
Store
Any Client
Models
Service
SDK
Auto
mat
ion
![Page 10: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/10.jpg)
Le soluzioni disponibili su Azure
VMs and VM Scale Sets
Azure Public CloudAzure-Consistent Private Cloud
VM Extensions
SCALR, RightScale, Mesos, Swarm
Service Fabric (VMs and Containers)
BatchApp Service
MediaWeb Apps
MobileApps
Apprenda, CloudFoundryJelastic, Marathon
Infrastructure
IaaS and IaaS+
General Compute
PaaS
Vertical compute
PaaS
Cluster Orchestratio
n
![Page 11: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/11.jpg)
Docker: VM vs ContainerApp
A
Hypervisor (Type 2)
Host OS
Server
GuestOS
Bins/Libs
AppA’
GuestOS
Bins/Libs
AppB
GuestOS
Bins/Libs
VM
GuestOS
GuestOS
App A’Host OS
Server
Bins/Libs
App A
Bins/LibsApp B
App B’
App B’
App B’Container
I Container sono isolati,ma condividono il kernel del sistema operativo e i binari/librerie
Docker Engine
Picture Source: www.docker.com
Portabilità, agilità e cost-saving
![Page 12: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/12.jpg)
Docker: portabilità dei container
![Page 13: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/13.jpg)
Docker: Ecosistema
Docker HostDocker Client
Docker Hub
Container A
Container B
…Source Code Repo
Create
Delete
List
Push
Pull
Private Repositories
Private Repositories
![Page 14: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/14.jpg)
Docker: continuous integration
Container«app»
Container«cache»
Container«data»
Docker Host #1 Docker Host #2 Docker Host #3
Applicazione
Ambiente di runtime
a c dc a d d d d d c c
![Page 15: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/15.jpg)
Docker: continuous integration (contd.)
Container«app»
Container«cache»
Container«data»
Docker Host #1 Docker Host #2 Docker Host #3
Applicazione
Ambiente di runtime
a c dc a d d d d d c c
Machine
Compose
Swarm
![Page 16: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/16.jpg)
Docker Compose: YAML filewordpress.ymlname: counterwordpress: image: wordpress links: - mysql ports: - "80:80" environment: - WORDPRESS_DB_NAME=wordpress - WORDPRESS_DB_USER=wordpress - WORDPRESS_DB_PASSWORD=wordpresspwd mysql: image: mysql volumes: - /home/docker/mysql:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=wordpressdocker - MYSQL_DATABASE=wordpress - MYSQL_USER=wordpress - MYSQL_PASSWORD=wordpresspwd
group.ymlname: countercontainers:
web:build: .command: python app.pyports:- "5000:5000"volumes:- .:/codelinks:- redis
redis:image: redis:latest
![Page 17: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/17.jpg)
Azure PaaS – App Service / Data Stores
Doc DB
Web App
Azure CacheSQL DB
Microservice A
API App
Microservice B
Batch
![Page 18: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/18.jpg)
Azure PaaS – Continuous Deployment
Doc DB
Web App
Azure CacheSQL DB
Microservice A
API App
Microservice B
Batch
RESOURCE GROUP
Azure Resource Manager
json json
![Page 19: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/19.jpg)
Esempi di file JSON
https://azure.microsoft.com/en-us/documentation/articles/app-service-deploy-complex-application-predictably/
![Page 20: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/20.jpg)
Esempi di file JSON
https://azure.microsoft.com/en-us/documentation/articles/app-service-deploy-complex-application-predictably/
![Page 21: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/21.jpg)
Esempi di file JSON
https://azure.microsoft.com/en-us/documentation/articles/app-service-deploy-complex-application-predictably/
![Page 22: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/22.jpg)
Service Fabric
Azure
WindowsServer Linux
Hosted Clouds
WindowsServer Linux
Service Fabric
Private Clouds
WindowsServer Linux
High Availability
Hyper-Scale
Hybrid Operations
High Density
Microservices
Rolling Upgrades Stateful
services
Low Latency Fast startup & shutdown
Container Orchestration & lifecycle management Replication &
FailoverSimple
programming models
Load balancing
Self-healingData Partitioning
Automated Rollback
Health Monitoring
Placement Constraints
![Page 23: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/23.jpg)
Service Fabric: modelli di programmazione
Reliable Actors APIReliable Services API
Azure Private Clouds
Applications composed of microservices
High Availability
Hyper-Scale
Hybrid Operations
High Density
Rolling Upgrades Stateful
services
Low Latency Fast startup & shutdown
Container Orchestration & lifecycle management Replication &
Failover
Simple programming models
Load balancing
Self-healingData Partitioning
Automated Rollback
Health Monitoring
Placement Constraints
Service Fabric
![Page 24: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/24.jpg)
A set of independent machines; physical or virtual
Service Fabric: Typical datacenter
![Page 25: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/25.jpg)
A set of machines that Service Fabric stitches together to form a cluster
Clusters can scale to1000s of machines
Service Fabric Cluster: A federation of machines
Node
Node
Node
Node
Node
Node
![Page 26: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/26.jpg)
Service Fabric: Machine failure detection
Time = t1
83 76 50 4664 New Node arrived61
Time = t2
8361
50 46Failures Detected
cluster reconfigured
83 76 6450 46
Time = t0
Nodes failed
![Page 27: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/27.jpg)
Controllo o «servizi PaaS»
Ultimate Control
Rapid Development
VMs /VM Scale Sets VM Extensions Service Fabric /
BatchWeb Apps/ App Service
IaaS PaaS
![Page 28: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/28.jpg)
Introduzione alla next-gen computing platform su Azure:http://channel9.msdn.com/Events/Build/2015/3-618Microservizi e Docker su Azure (corso MVA):http://channel9.msdn.com/Series/Exploring-Microservices-in-Docker-and-Microsoft-AzureService Fabric:http://azure.microsoft.com/en-us/documentation/articles/service-fabric-get-started/https://github.com/azure/servicefabric-sampleshttp://channel9.msdn.com/Events/Build/2015/2-640http://channel9.msdn.com/Events/Build/2015/2-700http://channel9.msdn.com/Events/Build/2015/2-717http://channel9.msdn.com/Events/Build/2015/2-66
Link e approfondimenti
![Page 29: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/29.jpg)
Domande?
![Page 30: Dnc2015 azure-microservizi-vforusso](https://reader035.vdocuments.pub/reader035/viewer/2022081521/587331e21a28ab596c8b6c49/html5/thumbnails/30.jpg)
Grazie a tutti per la partecipazioneRiceverete il link per il download a slide e demo via email nei prossimi giorniPer contattarmi
su Twitter: @vflorussovia e-mail: [email protected]
Grazie