SlideShare a Scribd company logo
Microservizi & DevOps
Antonio Liccardi
IT & Mobile Specialist in Blexin s.r.l.
antonio.liccardi@blexin.com
@turibbio
Microsoft MVP Developer Technologies
Cosa sono i microservizi?
Microservices are small, autonomous
services that work together
I principi alla base dei microservizi
Orientati al
business
domain
API
Technology
agnostic
Small (1…N)
Indipendently
releasable
I principi alla base dei microservizi
• Piccoli e con un solo compito
• Ogni microservizi si deve focalizzare su una singola cosa. La coesione deve
essere fondamentale!
• Gather together those things that change for the same reason, and separate
those things that change for different reasons (Uncle Bob)
• Avere dei contesti (boundaries) espliciti.
• Più piccolo è il servizio, maggiori sono i benefici ma anche i possibili problemi
• Collaborano fra loro
• Espongono APIs (ma facendo attenzione, maggiore è l’esposizione, più sono le
interconnessioni)
I principi alla base dei microservizi
• Autonomi
• Tutte le comunicazioni avvengono tramite network (indipendenza)
• Rilasciabili autonomamente
• Devono poter essere rilasciati senza richiedere intervento da parte dei
consumer
Benefici dei microservizi
• Tecnologie eterogenee
• Basati su servizi, possono utilizzare diverse tecnologie dietro le quinte
• Benefici dal punto di vista dell’architettura, delle performance, organizzazione
aziendale
• Adozione facile di nuove tecnologie
Benefici dei microservizi
• Resilienza
• Concetto di bulkhead applicato ai service boundaries
• Scalabilità
• Possibilità di essere scalabili solo sulle funzionalità che richiedono scalabilità
• Facilità di deploy
• Ogni microservizio deve essere rilasciato in maniera indipendente
• Gestione del rollback semplice
Benefici dei microservizi
• Organizzazione aziendale
• L’uso dei microservizi aiuta l’organizzazione aziendale minimizzando il numero
di persone concentrato su una singola codebase
• Composabilità
• Riutilizzabilità dei componenti
• Una buona scelta per i sistemi legacy
Microservices are
not a silver bullet!
Come modellare un microservizio?
• Domain Driven Design by Eric
Evans (2003)
• Questo libro ci ha aiutato a
capire l’importanza di saper
rappresentare bene il mondo
nel nostro codice
Come modellare un microservizio?
• Hexagonal Architecture
• Niente più layer e tante «porte»
aperte!
Come modellare un microservizio?
• Loose Coupling
• Quando i servizi sono loosely coupled, una modifica ad un servizio non
richiede la modifica agli altri.
• High Cohesion
• Boundaries con accoppiamento dei domini comuni
Bounded Context
Bounded Context
• Ogni dominio è costituito da più bounded context
• In ogni bounded context c’è un modello che condivide determinate
informazioni verso l’esterno
• Ogni bounded context espone una specifica interfaccia con i modelli
condivisi
• Può capitare di avere modelli condivisi con egual nome ma con
informazioni diverse e usati in diversi contesti (es. Customer)
• Questo evita il tight coupling
• Aiuta a creare i moduli e servizi
Context Mapping
Monolite vs Microservizi
DevOps & Microservizi
Cosa sono i containers?
• E’ un approccio nello sviluppo software in cui una applicazione o
servizio, le sue dipendenze e la sua configurazione viene
«impacchettata» come una container image
• L’app può essere testata in maniera indipendente
• L’immagine viene deployata come una istanza sul container host
Vantaggi
• Deploy in diversi ambienti con la garanzia di avere lo stesso ambiente
• Isolamento dei container
• Eseguibili su piattaforme differenti (Linux / Windows)
• Più leggeri delle VM
• Scalabili
• Facili da deployare
Meet the «Hypervisor»
Docker
Docker: terminologia
• Container image
• applicazione contenente tutte le dipendenze, configurazioni e runtime
• una immagine può ereditare da altre
• Container
• istanza di un container, può essere eseguita più volte contemporaneamente
anche con parametri di inizializzazione differenti
• Tag
• una etichetta che può applicare ad una immagine
Docker: terminologia
• DockerFile
• configurazioni di build dell’immagine
• Build
• creazione dell’immagine container tramite il dockerfile
• Repository
• una collezione di immagini docker legate fra loro, generalmente associate ad
un tag
Docker: terminologia
• Registry
• un servizio che prevede l’accesso a dei repository di immagini (DockerHub, Docker
Trusted Registry o Azure Container Registry)
• Compose
• configurazione contenente il deploy di più immagini docker legate fra loro
• Cluster
• una collezione di Docker Host visti come unico (Swarm, DC/OS, Kubernetes)
• Orchestrator
• gestisce cluster e le istanze delle immagini presenti al proprio interno che ne prevede
l’esecuzione, la distribuzione e scalabilità
Meet Kubernetes
• Nasce in Google, ora gestito da Cloud Native Computing Foundation
• Installazione
• Diverse distribuzioni (cloud, on-premise)
• Azure Kubernetes Service
• Minikube (dev)
• Infrastructure as code
Kubernetes architecture
Workflow con Kubernetes
DEMO
Deploy containers on AKS with AzureDevOps
Testare containers
• Unit testing
• Component testing
• Integration testing
• End-to-End testing
• Contract Testing
• Production Testing
Contract Testing
• Consumer driven contract testing
Production testing
Monitorare Containers
• Application insight
• Marathon
• cAdvisor
• Prometheus
• Sysdig
• Your custom solution
Application Insight
Da dove comincio?
• eShopOnContainers
• Azure DevOps labs & documentation
Microservizi & DevOps
Microservizi & DevOps

More Related Content

What's hot

Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
OpenShift 4 installation
OpenShift 4 installationOpenShift 4 installation
OpenShift 4 installation
Robert Bohne
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
CJ Cullen
 
Best Practices for API Management
Best Practices for API Management Best Practices for API Management
Best Practices for API Management
WSO2
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
Kasun Indrasiri
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
EastBanc Tachnologies
 
Introduction to Istio Service Mesh
Introduction to Istio Service MeshIntroduction to Istio Service Mesh
Introduction to Istio Service Mesh
Georgios Andrianakis
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
Microservices With Istio Service Mesh
Microservices With Istio Service MeshMicroservices With Istio Service Mesh
Microservices With Istio Service Mesh
Natanael Fonseca
 
쿠버네티스 ( Kubernetes ) 소개 자료
쿠버네티스 ( Kubernetes ) 소개 자료쿠버네티스 ( Kubernetes ) 소개 자료
쿠버네티스 ( Kubernetes ) 소개 자료
Opennaru, inc.
 
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesJFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
Chris Richardson
 
Microservices with Docker
Microservices with Docker Microservices with Docker
Microservices with Docker
Venkata Naga Ravi
 
Service Mesh - Why? How? What?
Service Mesh - Why? How? What?Service Mesh - Why? How? What?
Service Mesh - Why? How? What?
Orkhan Gasimov
 
From Monolith to Microservices
From Monolith to MicroservicesFrom Monolith to Microservices
From Monolith to Microservices
Amazon Web Services
 
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basics
Sourabh Saxena
 
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Lucas Jellema
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...
Edureka!
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101
LorisPack Project
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
VMware Tanzu
 
Introduction to Istio on Kubernetes
Introduction to Istio on KubernetesIntroduction to Istio on Kubernetes
Introduction to Istio on Kubernetes
Jonh Wendell
 

What's hot (20)

Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
OpenShift 4 installation
OpenShift 4 installationOpenShift 4 installation
OpenShift 4 installation
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Best Practices for API Management
Best Practices for API Management Best Practices for API Management
Best Practices for API Management
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Introduction to Istio Service Mesh
Introduction to Istio Service MeshIntroduction to Istio Service Mesh
Introduction to Istio Service Mesh
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Microservices With Istio Service Mesh
Microservices With Istio Service MeshMicroservices With Istio Service Mesh
Microservices With Istio Service Mesh
 
쿠버네티스 ( Kubernetes ) 소개 자료
쿠버네티스 ( Kubernetes ) 소개 자료쿠버네티스 ( Kubernetes ) 소개 자료
쿠버네티스 ( Kubernetes ) 소개 자료
 
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesJFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
 
Microservices with Docker
Microservices with Docker Microservices with Docker
Microservices with Docker
 
Service Mesh - Why? How? What?
Service Mesh - Why? How? What?Service Mesh - Why? How? What?
Service Mesh - Why? How? What?
 
From Monolith to Microservices
From Monolith to MicroservicesFrom Monolith to Microservices
From Monolith to Microservices
 
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basics
 
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
 
Introduction to Istio on Kubernetes
Introduction to Istio on KubernetesIntroduction to Istio on Kubernetes
Introduction to Istio on Kubernetes
 

Similar to Microservizi & DevOps

DevOps in a Microservices World
DevOps in a Microservices WorldDevOps in a Microservices World
DevOps in a Microservices World
Antonio Liccardi
 
MySQL Day Roma 2019 - Le architetture a microservizi e MySQL
MySQL Day Roma 2019 - Le architetture a microservizi e MySQLMySQL Day Roma 2019 - Le architetture a microservizi e MySQL
MySQL Day Roma 2019 - Le architetture a microservizi e MySQL
Par-Tec S.p.A.
 
Service Fabric: la potenza dei micro servizi
Service Fabric:  la potenza dei micro serviziService Fabric:  la potenza dei micro servizi
Service Fabric: la potenza dei micro servizi
Massimo Bonanni
 
20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp
mlraviol
 
Architetture a Microservizi con Docker Container
Architetture a Microservizi con Docker ContainerArchitetture a Microservizi con Docker Container
Architetture a Microservizi con Docker Container
Roberto Messora
 
[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...
[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...
[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...
Corrado Musumeci
 
Azure dayroma java, il lato oscuro del cloud
Azure dayroma   java, il lato oscuro del cloudAzure dayroma   java, il lato oscuro del cloud
Azure dayroma java, il lato oscuro del cloud
Riccardo Zamana
 
Introduzione a Docker
Introduzione a DockerIntroduzione a Docker
Introduzione a Docker
Roberto Messora
 
Docker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptx
Docker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptxDocker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptx
Docker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptx
Giuliano Latini
 
Da Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritornoDa Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritornoMatteo Pagani
 
Introduzione A Docker
Introduzione A DockerIntroduzione A Docker
Introduzione A Docker
Yefry Figueroa
 
Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015Codemotion
 
Il Cloud Computing
Il Cloud ComputingIl Cloud Computing
Il Cloud Computingzambe92
 
Microservices
MicroservicesMicroservices
Microservices
Massimo Romano
 
Anatomia di un progetto open-source
Anatomia di un progetto open-sourceAnatomia di un progetto open-source
Anatomia di un progetto open-source
Bergamo Linux Users Group
 
.NET Microservices
.NET Microservices.NET Microservices
.NET Microservices
Luca Congiu
 
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDTYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
DotNetCampus
 
Slide typescript - net campus
Slide typescript - net campusSlide typescript - net campus
Slide typescript - net campusDotNetCampus
 
Presentazione Unibo
Presentazione UniboPresentazione Unibo
Presentazione Unibo
Balint Maschio
 
Introduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor ModelIntroduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor Model
Andrea Tosato
 

Similar to Microservizi & DevOps (20)

DevOps in a Microservices World
DevOps in a Microservices WorldDevOps in a Microservices World
DevOps in a Microservices World
 
MySQL Day Roma 2019 - Le architetture a microservizi e MySQL
MySQL Day Roma 2019 - Le architetture a microservizi e MySQLMySQL Day Roma 2019 - Le architetture a microservizi e MySQL
MySQL Day Roma 2019 - Le architetture a microservizi e MySQL
 
Service Fabric: la potenza dei micro servizi
Service Fabric:  la potenza dei micro serviziService Fabric:  la potenza dei micro servizi
Service Fabric: la potenza dei micro servizi
 
20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp
 
Architetture a Microservizi con Docker Container
Architetture a Microservizi con Docker ContainerArchitetture a Microservizi con Docker Container
Architetture a Microservizi con Docker Container
 
[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...
[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...
[AxonIQ Italia Community] Architetture distribuite a eventi: sono adatte al m...
 
Azure dayroma java, il lato oscuro del cloud
Azure dayroma   java, il lato oscuro del cloudAzure dayroma   java, il lato oscuro del cloud
Azure dayroma java, il lato oscuro del cloud
 
Introduzione a Docker
Introduzione a DockerIntroduzione a Docker
Introduzione a Docker
 
Docker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptx
Docker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptxDocker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptx
Docker_vs_Rancher_chi_dominerà_i_Desktop_dei_developers.pptx
 
Da Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritornoDa Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritorno
 
Introduzione A Docker
Introduzione A DockerIntroduzione A Docker
Introduzione A Docker
 
Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015
 
Il Cloud Computing
Il Cloud ComputingIl Cloud Computing
Il Cloud Computing
 
Microservices
MicroservicesMicroservices
Microservices
 
Anatomia di un progetto open-source
Anatomia di un progetto open-sourceAnatomia di un progetto open-source
Anatomia di un progetto open-source
 
.NET Microservices
.NET Microservices.NET Microservices
.NET Microservices
 
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDTYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
 
Slide typescript - net campus
Slide typescript - net campusSlide typescript - net campus
Slide typescript - net campus
 
Presentazione Unibo
Presentazione UniboPresentazione Unibo
Presentazione Unibo
 
Introduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor ModelIntroduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor Model
 

More from Antonio Liccardi

DevOpsConf2021 - GitOps and best practices for cloud native CI/CD
DevOpsConf2021 - GitOps and best practices for cloud native CI/CDDevOpsConf2021 - GitOps and best practices for cloud native CI/CD
DevOpsConf2021 - GitOps and best practices for cloud native CI/CD
Antonio Liccardi
 
Delivering code with git hub actions
Delivering code with git hub actionsDelivering code with git hub actions
Delivering code with git hub actions
Antonio Liccardi
 
Cloud native CI/CD with GitOps
Cloud native CI/CD with GitOpsCloud native CI/CD with GitOps
Cloud native CI/CD with GitOps
Antonio Liccardi
 
GitOps and Best Practices for Cloud Native CI/CD
GitOps and Best Practices for Cloud Native CI/CDGitOps and Best Practices for Cloud Native CI/CD
GitOps and Best Practices for Cloud Native CI/CD
Antonio Liccardi
 
DevDay Salerno - Mobile DevOps con Xamarin
DevDay Salerno - Mobile DevOps con XamarinDevDay Salerno - Mobile DevOps con Xamarin
DevDay Salerno - Mobile DevOps con Xamarin
Antonio Liccardi
 
DevDay Salerno - Introduzione a Xamarin
DevDay Salerno - Introduzione a XamarinDevDay Salerno - Introduzione a Xamarin
DevDay Salerno - Introduzione a Xamarin
Antonio Liccardi
 
SonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo EmiliSonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo Emili
Antonio Liccardi
 
Continuous integration per sviluppatori mobile
Continuous integration per sviluppatori mobileContinuous integration per sviluppatori mobile
Continuous integration per sviluppatori mobile
Antonio Liccardi
 
Introduzione a docker
Introduzione a dockerIntroduzione a docker
Introduzione a docker
Antonio Liccardi
 
Continuous integration per le tue applicazioni mobile
Continuous integration per le tue applicazioni mobileContinuous integration per le tue applicazioni mobile
Continuous integration per le tue applicazioni mobile
Antonio Liccardi
 
Javascript task automation
Javascript task automationJavascript task automation
Javascript task automation
Antonio Liccardi
 
Vs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows AzureVs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows Azure
Antonio Liccardi
 
Vs03 – migliorare la qualità del codice con vs 2013
Vs03 – migliorare la qualità del codice con vs 2013Vs03 – migliorare la qualità del codice con vs 2013
Vs03 – migliorare la qualità del codice con vs 2013Antonio Liccardi
 
Le novita' su diagnostica e qualita' del codice con visual studio 2013
Le novita' su diagnostica e qualita' del codice con visual studio 2013Le novita' su diagnostica e qualita' del codice con visual studio 2013
Le novita' su diagnostica e qualita' del codice con visual studio 2013
Antonio Liccardi
 
Le novità di team foundation server 2012
Le novità di team foundation server 2012Le novità di team foundation server 2012
Le novità di team foundation server 2012
Antonio Liccardi
 

More from Antonio Liccardi (15)

DevOpsConf2021 - GitOps and best practices for cloud native CI/CD
DevOpsConf2021 - GitOps and best practices for cloud native CI/CDDevOpsConf2021 - GitOps and best practices for cloud native CI/CD
DevOpsConf2021 - GitOps and best practices for cloud native CI/CD
 
Delivering code with git hub actions
Delivering code with git hub actionsDelivering code with git hub actions
Delivering code with git hub actions
 
Cloud native CI/CD with GitOps
Cloud native CI/CD with GitOpsCloud native CI/CD with GitOps
Cloud native CI/CD with GitOps
 
GitOps and Best Practices for Cloud Native CI/CD
GitOps and Best Practices for Cloud Native CI/CDGitOps and Best Practices for Cloud Native CI/CD
GitOps and Best Practices for Cloud Native CI/CD
 
DevDay Salerno - Mobile DevOps con Xamarin
DevDay Salerno - Mobile DevOps con XamarinDevDay Salerno - Mobile DevOps con Xamarin
DevDay Salerno - Mobile DevOps con Xamarin
 
DevDay Salerno - Introduzione a Xamarin
DevDay Salerno - Introduzione a XamarinDevDay Salerno - Introduzione a Xamarin
DevDay Salerno - Introduzione a Xamarin
 
SonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo EmiliSonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo Emili
 
Continuous integration per sviluppatori mobile
Continuous integration per sviluppatori mobileContinuous integration per sviluppatori mobile
Continuous integration per sviluppatori mobile
 
Introduzione a docker
Introduzione a dockerIntroduzione a docker
Introduzione a docker
 
Continuous integration per le tue applicazioni mobile
Continuous integration per le tue applicazioni mobileContinuous integration per le tue applicazioni mobile
Continuous integration per le tue applicazioni mobile
 
Javascript task automation
Javascript task automationJavascript task automation
Javascript task automation
 
Vs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows AzureVs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows Azure
 
Vs03 – migliorare la qualità del codice con vs 2013
Vs03 – migliorare la qualità del codice con vs 2013Vs03 – migliorare la qualità del codice con vs 2013
Vs03 – migliorare la qualità del codice con vs 2013
 
Le novita' su diagnostica e qualita' del codice con visual studio 2013
Le novita' su diagnostica e qualita' del codice con visual studio 2013Le novita' su diagnostica e qualita' del codice con visual studio 2013
Le novita' su diagnostica e qualita' del codice con visual studio 2013
 
Le novità di team foundation server 2012
Le novità di team foundation server 2012Le novità di team foundation server 2012
Le novità di team foundation server 2012
 

Microservizi & DevOps

  • 1.
  • 2. Microservizi & DevOps Antonio Liccardi IT & Mobile Specialist in Blexin s.r.l. antonio.liccardi@blexin.com @turibbio Microsoft MVP Developer Technologies
  • 3. Cosa sono i microservizi? Microservices are small, autonomous services that work together
  • 4. I principi alla base dei microservizi Orientati al business domain API Technology agnostic Small (1…N) Indipendently releasable
  • 5. I principi alla base dei microservizi • Piccoli e con un solo compito • Ogni microservizi si deve focalizzare su una singola cosa. La coesione deve essere fondamentale! • Gather together those things that change for the same reason, and separate those things that change for different reasons (Uncle Bob) • Avere dei contesti (boundaries) espliciti. • Più piccolo è il servizio, maggiori sono i benefici ma anche i possibili problemi • Collaborano fra loro • Espongono APIs (ma facendo attenzione, maggiore è l’esposizione, più sono le interconnessioni)
  • 6. I principi alla base dei microservizi • Autonomi • Tutte le comunicazioni avvengono tramite network (indipendenza) • Rilasciabili autonomamente • Devono poter essere rilasciati senza richiedere intervento da parte dei consumer
  • 7. Benefici dei microservizi • Tecnologie eterogenee • Basati su servizi, possono utilizzare diverse tecnologie dietro le quinte • Benefici dal punto di vista dell’architettura, delle performance, organizzazione aziendale • Adozione facile di nuove tecnologie
  • 8. Benefici dei microservizi • Resilienza • Concetto di bulkhead applicato ai service boundaries • Scalabilità • Possibilità di essere scalabili solo sulle funzionalità che richiedono scalabilità • Facilità di deploy • Ogni microservizio deve essere rilasciato in maniera indipendente • Gestione del rollback semplice
  • 9. Benefici dei microservizi • Organizzazione aziendale • L’uso dei microservizi aiuta l’organizzazione aziendale minimizzando il numero di persone concentrato su una singola codebase • Composabilità • Riutilizzabilità dei componenti • Una buona scelta per i sistemi legacy
  • 10. Microservices are not a silver bullet!
  • 11. Come modellare un microservizio? • Domain Driven Design by Eric Evans (2003) • Questo libro ci ha aiutato a capire l’importanza di saper rappresentare bene il mondo nel nostro codice
  • 12. Come modellare un microservizio? • Hexagonal Architecture • Niente più layer e tante «porte» aperte!
  • 13. Come modellare un microservizio? • Loose Coupling • Quando i servizi sono loosely coupled, una modifica ad un servizio non richiede la modifica agli altri. • High Cohesion • Boundaries con accoppiamento dei domini comuni
  • 15. Bounded Context • Ogni dominio è costituito da più bounded context • In ogni bounded context c’è un modello che condivide determinate informazioni verso l’esterno • Ogni bounded context espone una specifica interfaccia con i modelli condivisi • Può capitare di avere modelli condivisi con egual nome ma con informazioni diverse e usati in diversi contesti (es. Customer) • Questo evita il tight coupling • Aiuta a creare i moduli e servizi
  • 17.
  • 19.
  • 20.
  • 21.
  • 22.
  • 24. Cosa sono i containers? • E’ un approccio nello sviluppo software in cui una applicazione o servizio, le sue dipendenze e la sua configurazione viene «impacchettata» come una container image • L’app può essere testata in maniera indipendente • L’immagine viene deployata come una istanza sul container host
  • 25. Vantaggi • Deploy in diversi ambienti con la garanzia di avere lo stesso ambiente • Isolamento dei container • Eseguibili su piattaforme differenti (Linux / Windows) • Più leggeri delle VM • Scalabili • Facili da deployare
  • 28. Docker: terminologia • Container image • applicazione contenente tutte le dipendenze, configurazioni e runtime • una immagine può ereditare da altre • Container • istanza di un container, può essere eseguita più volte contemporaneamente anche con parametri di inizializzazione differenti • Tag • una etichetta che può applicare ad una immagine
  • 29. Docker: terminologia • DockerFile • configurazioni di build dell’immagine • Build • creazione dell’immagine container tramite il dockerfile • Repository • una collezione di immagini docker legate fra loro, generalmente associate ad un tag
  • 30. Docker: terminologia • Registry • un servizio che prevede l’accesso a dei repository di immagini (DockerHub, Docker Trusted Registry o Azure Container Registry) • Compose • configurazione contenente il deploy di più immagini docker legate fra loro • Cluster • una collezione di Docker Host visti come unico (Swarm, DC/OS, Kubernetes) • Orchestrator • gestisce cluster e le istanze delle immagini presenti al proprio interno che ne prevede l’esecuzione, la distribuzione e scalabilità
  • 31.
  • 32. Meet Kubernetes • Nasce in Google, ora gestito da Cloud Native Computing Foundation • Installazione • Diverse distribuzioni (cloud, on-premise) • Azure Kubernetes Service • Minikube (dev) • Infrastructure as code
  • 35. DEMO Deploy containers on AKS with AzureDevOps
  • 36. Testare containers • Unit testing • Component testing • Integration testing • End-to-End testing • Contract Testing • Production Testing
  • 37. Contract Testing • Consumer driven contract testing
  • 39. Monitorare Containers • Application insight • Marathon • cAdvisor • Prometheus • Sysdig • Your custom solution
  • 41. Da dove comincio? • eShopOnContainers • Azure DevOps labs & documentation