approccio ad una infrastruttura per microservice
TRANSCRIPT
![Page 1: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/1.jpg)
GnuLinuxMeetingPalermo 11-12 Marzo 2016
Daniele Mondello
Daniele Mondello
Approccio ad una infrastruttura per
Microservice
![Page 2: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/2.jpg)
GnuLinuxMeeting
•Management • Team Leader • Quality Manager •Web Architect • Healthcare IT Consultant • UX Expert
General
O.S.
PHP (6 years) Javascript (11 years) ASP(13 years) MySQL (6 years) HTML, CSS3 (15 years) Ruby, Rails (1 year) Python (1 year)
Developer
•Ubuntu, CentOS •Mac OSX •Windows • IOS - Android • Embedded OS •Raspai, Pidora
Chi sono e cosa faccio
![Page 3: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/3.jpg)
Definizione di MicrorservicesSono dei servizi “micro” autonomi, che fanno una cosa sola )ma bene!) e che interagiscono tra di loro… in altre parole dei sistemi distribuiti-
GnuLinuxMeeting
Cosa è un Microservice
![Page 4: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/4.jpg)
GnuLinuxMeeting
Caratteristiche di un Microservice
UTILIZZO DECENTRATO DEI
DATISCALABILITA'
INDiPENDENTE DA LINGUAGGIO
POSSIBILITA DI RIUTILIZZO
Bug Isolati
![Page 5: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/5.jpg)
GnuLinuxMeeting
L’obiettivo di un Microservice
Micro è l’obiettivo!
![Page 6: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/6.jpg)
Microservice A Microservice B Microservice C Microservice D MicroserviceE
GnuLinuxMeeting
Architettura per Microservices
![Page 7: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/7.jpg)
Cosa fa
DOCKER?Docker sviluppata da Docker inc di Salomon Hykes è un sistema di virtualizzazione basato su container. Mentre nella virtualizzazione classica sono virtualizzati programmi e kernel del sistema operativo nella virtualizzazione per containers sono virtualizzati software e librerie.
GnuLinuxMeeting
Docker
![Page 8: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/8.jpg)
Platform Automation Deployment Automation Build & Test Automation
Diagnostic & Instrumentation Monitoring & Alerting AuthN/AuthZ
Messaging Channel
Microservice A Microservice B Microservice C Microservice D MicroserviceE
GnuLinuxMeeting
Architettura per Microservices
![Page 9: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/9.jpg)
Generare report più o meno complessi
Effettuare delle misurazioni rispetto a delle metriche
Deployment Automation
Collezionare il codice dai repository remoti
Deployment Automation
Lanciare test statici e dinamici sul codice
Continuous Delivery
GnuLinuxMeeting
![Page 10: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/10.jpg)
Build Privata Server CI
Lancio di una build privataLo sviluppatore effettua una Build Privata sulla propria postazione così da integrare eventuali cambiamenti effettuati dagli altri membri del team e verificato che l’integrazione dia un sistema funzionante.
Commit sul CVS del codiceLo sviluppatore conclusa l’attività effettua un commit sul repository del sistema di controllo di versione. 5
Lancio SCRIPT su server CIIl server di CI accortosi del cambiamento scarica il codice aggiornato e lancia uno script di build così da integrare questi cambiamenti e da ricostruire il sistema e ri-testarlo ed a seguito del risultato della build, genera un feedback (es: email) visibile al team
CVS
Flusso di Lavoro per un Microservice
GnuLinuxMeeting
![Page 11: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/11.jpg)
I progetti in Jenkins
GnuLinuxMeeting
![Page 12: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/12.jpg)
Un progetto in Jenkins 1/2
GnuLinuxMeeting
![Page 13: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/13.jpg)
Un progetto in Jenkins 2/2
GnuLinuxMeeting
![Page 14: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/14.jpg)
Platform Automation Deployment Automation Build & Test Automation
Diagnostic & Instrumentation Monitoring & Alerting AuthN/AuthZ
Messaging Channel
Microservice A Microservice B Microservice C Microservice D MicroserviceE
Event Published
Event Subscribed
Event Published/Subscribed
GnuLinuxMeeting
Architettura per Microservices
![Page 15: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/15.jpg)
Easy to Use!
Runs on all major O.S.
Open Source
GnuLinuxMeeting
Robusta soluzione per messaggistica tra applicazioni con supporto a diverse piattaforme di sviluppo
Messaging Channel
![Page 16: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/16.jpg)
GnuLinuxMeeting
UtilizzoRabbit MQ
![Page 17: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/17.jpg)
Platform Automation Deployment Automation Build & Test Automation
Diagnostic & Instrumentation Monitoring & Alerting AuthN/AuthZ
Messaging Channel
Microservice A Microservice B Microservice C Microservice D MicroserviceE
Event Published
Event Subscribed
Event Published/Subscribed
Shared Configuration
Dependency Management
GnuLinuxMeeting
Architettura per Microservices
![Page 18: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/18.jpg)
01
02 05
06 Canticle.io Permette di gestire dipendenze di micorservices.
DATABASE E’ possibile gestire dipendenze
tramite DB
COMPOSER Gestisce le dipendenze in PHP
Maven Strumento per la gestione dei progetti per la piattaforma Java
Dipendenze e Configurazioni
Dipendenze
Configurazioni
VSGnuLinuxMeeting
![Page 19: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/19.jpg)
Platform Automation Deployment Automation Build & Test Automation
Diagnostic & Instrumentation Monitoring & Alerting AuthN/AuthZ
Messaging Channel
Microservice A Microservice B Microservice C Microservice D MicroserviceE
Event Published
Event Subscribed
Event Published/Subscribed
Shared Configuration
Dependency Management
Service Gateway
GnuLinuxMeeting
Architettura per Microservices
![Page 20: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/20.jpg)
Service Gateway
GnuLinuxMeeting - Fonte: https://www.nginx.com/blog/building-microservices-using-an-api-gateway/
L’API Gateway incapsula l’architettura interna dei microservicese fornisce delle API a misura di client. Può avere anche responsabilità come autentication, monitoring, load balancing, caching, request shaping, static response handling (StrongLoop,NodeJS)
![Page 21: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/21.jpg)
Platform Automation Deployment Automation Build & Test Automation
Diagnostic & Instrumentation Monitoring & Alerting AuthN/AuthZ
Messaging Channel
Microservice A Microservice B Microservice C Microservice D MicroserviceE
Event Published
Event Subscribed
Event Published/Subscribed
Shared Configuration
Dependency Management
Service Gateway
Service RoutingService
Discovery
GnuLinuxMeeting
Architettura per Microservices
![Page 22: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/22.jpg)
Platform Automation Deployment Automation Build & Test Automation
Diagnostic & Instrumentation Monitoring & Alerting AuthN/AuthZ
Messaging Channel
Microservice A Microservice B Microservice C Microservice D Microservice E
Event Published
Event Subscribed
Event Published/Subscribed
Shared Configuration
Dependency Management
Service Gateway
Service Routing
GnuLinuxMeeting
Architettura per Microservices
Service Discovery
![Page 23: Approccio ad una infrastruttura per Microservice](https://reader034.vdocuments.net/reader034/viewer/2022042611/5879f0aa1a28ab70298b49a1/html5/thumbnails/23.jpg)
GRAZIE PER L’ATTENZIONE
@dmondello
DanielemondelloDaniele Mondello
GnuLinuxMeetingPalermo 11-12 Marzo 2016