Oltre il Worker Role, da Serverless computing a VM Scale Set

Post on 15-Apr-2017

63 views 0 download

Transcript of Oltre il Worker Role, da Serverless computing a VM Scale Set

P R E S E N TA

Cosa c’è oltre il Worker Role: dagli Scale Set al “serverless computing”Vito Flavio Lorusso – Senior SDE - Microsoft

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 2

• Cosa intendiamo per «scalable» Worker

• In Azure:Come si realizzavano solo 2 anni fa

Quali scelte abbiamo oggi

Agenda

3Proudly produced by scalable workers in Camino

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 4

Job host

Anatomia di un Worker

My long running job

Job journal

Another long running job

Yet another long running job

Job scheduler

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 5

Solo 2 anni fa Worker role

Storage queue

Storage table

Sviluppo/Debug Visual Studio, Eclipse o text editorLinguaggi .NET, Java, PHP (o qualunque runtime su windows)Deploy Creazione di un .cspkg (signed zip)Autoscale CPU, RAM, NetworkCI/CD Visual Studio, PSH o VSTSPersonalizzazione OS

Startup Script

Manutenzione OS Update automatico

OS

.cspkg

code.cloudconfig

.serviceconfig

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 6

OggiCome implemento uno scalable worker in Azure?

Functions (serverless è

il futuro!)WebJobs

(facile dai!)Containers! Cos’altro?

Service Fabric (microservizi… serve dire

altro?)

Scale Sets (sempre vicini

al metallo)

Batch? (tutti ne parlano ma non so cosa sia)

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 7

Functions

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 8

Functions

Storage table

Sviluppo/Debug Visual Studio Code – Debug limitatoLinguaggi .NET, NodeJSDeploy Publish su Git repoAutoscale Basato su trigger o su App Service (CPU, RAM, Network)CI/CD VSTS – GITPersonalizzazione OS

Nessuna

Manutenzione OS Update automatico

OS

App Service

.initcode

[TRIGGER]

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 9

Webjobs

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 10

WebJobs

Storage table

Sviluppo/Debug Visual Studio o altri editor di codice

Linguaggi .exe - .NET assemblies compiled with the WebJobs SDK .cmd, .bat, .exe (using windows cmd) .sh (using bash) .php (using php) .py (using python) .js (using node)

Deploy Come Web App (Visual Studio, Git, VSTS)

Autoscale Basato su App Service (CPU, RAM, Network)

CI/CD VSTS – GIT

Personalizzazione OS Nessuna

Manutenzione OS Update automatico

OS

App Service

JobHostcode

[TRIGGER]

Scheduler

WebJobs

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 11

Batch

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 12

Batch

Sviluppo/Debug Visual Studio o altri editor di codice

Linguaggi Powershell, .NET, CLI, Java, Node.js, Python

Deploy Visual Studio, VSTS, Azure Resource Manager

Autoscale Parametri custom con la Batch Library

CI/CD VSTS – ARM

Personalizzazione OS Nessuna

Manutenzione OS Update automatico

OS

Batch

Application Package (.zip)

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 13

Service Fabric

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 14

Service Fabric

Sviluppo/Debug Visual Studio o altri editor di codice

Linguaggi .NETJava (preview)

Deploy Visual Studio, VSTS, ARM

Autoscale Basato su VM Scale Set (CPU, RAM, Network) o custom

CI/CD VSTS – ARM

Personalizzazione OS Nessuna

Manutenzione OS e Service Fabric Host Update automatico o manuale

VM Scale SetOS

Service Fabric Host

Node Typecode

Storage queue[Custom]

Service Fabric[Local Storage]

(stateful service)

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 15

Azure Container Service

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 16

Container Service

Sviluppo/Debug Qualunque editor di codice

Linguaggi Qualunque (a seconda del sistema operativo)

Deploy ARM, DockerFile

Autoscale Basato su VM Scale Set (CPU, RAM, Network) o custom (API di ACS)

CI/CD VSTS – ARM

Personalizzazione OS Completa

Manutenzione OS e Docker Host Update manuale

VM Scale SetOS

Docker Host

Docker Container

[Custom]

[Custom] SwarmDCOSMESOS

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 17

VM Scale Sets

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 18

VM Scale Sets

Sviluppo/Debug Qualunque editor di codice

Linguaggi Qualunque (a seconda del sistema operativo)

Deploy ARM e quello supportato dallo stack applicativo

Autoscale CPU, RAM, Network

CI/CD ARM e quello supportato dallo stack applicativo

Personalizzazione OS Completa

Manutenzione OS e Application host manuale

VM Scale SetOS

Your App HostCustom components

[Custom]

[Custom]Custom code

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 19

Wrap UPIniziate dal codice (Functions)

Requisiti perfetti per Batch? Usate Batch!

Scendete di livello solo se avete «veramente» bisogno di più performance o flessibilità

Usate ACS «solo» se la vostra infrastruttura è già docker centrica

Service Fabric è «potentissimo» ma parte da 5-10 nodi in produzione

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 20

Q&ADomande e Risposte

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 21

Risorse• Link utili

Functions https://docs.microsoft.com/en-us/azure/azure-functi

ons/index WebJobs

https://docs.microsoft.com/en-us/azure/app-service-web/websites-webjobs-resources

Batch https://docs.microsoft.com/en-us/azure/batch/

Service Fabric https://docs.microsoft.com/en-us/azure/service-fabr

ic/

Container Service https://docs.microsoft.com/en-us/azure/container-s

ervice/

VM Scale Sets https://docs.microsoft.com/en-us/azure/virtual-mac

hine-scale-sets/

www.wpc2016.it – info@wpc2016.it - +39 02 365738.11 22

Contatti OverNet Education

OverNet Educationinfo@overneteducation.itwww.overneteducation.itTel. 02 365738

@overnetewww.facebook.com/OverNetEducationwww.linkedin.com/company/overnet-solutionswww.wpc2016.it