SlideShare a Scribd company logo
1 of 24
Download to read offline
Python, Azure Cosmos
DB, Docker and Azure
Container, all inclusive
ro Libro – 29.11.2019
Thanks to
AGENDA
• Azure Cosmos DB
• Overview
• Partitioning
• Security & Compliance
• Azure Cosmos Emulator
• Uses Cases
• PythonFlask Web App
• Azure Container Registry (ACR)
• Container Instances
• Container Tasks
• Continuous Deployment (ACR Tasks)
• Database service multi-modello per lo sviluppo di applicazioni scalabili a
livello globale
• Aggiunta di "Azure Locations" in qualsiasi momento con un singolo click,
Azure Cosmos DB provvederà a replicare i dati e a renderli disponibili
• Failover automatico (o manuale)
• Replicazione e sincronizzazione multi-regione automatica
• Scritture multi-regione per ridurre la latenza ed aumentare la disponibilità
• Azure Cosmos DB permette di scalare throughput e storage in modo
elastico e globale secondo le esigenze della nostra applicazione, pagando
solo per il necessario
Azure Cosmos DB : Overview
• Supporto API multi-model : SQL (Core), Cassandra, Mongo DB, Gremlin,
Spark, Table
• 5 modelli di consistenza ben definiti:
Azure Cosmos DB : Overview
• Throughput garantito
• High Availability: 99,999% (letture multi-regione, 99,99% per singola
regione)
• Latenza: <10ms in lettura e <10ms in scrittura (single-digit latency, 99
percentile)
• Dati, indici, backups, attachments cifrati per default
• Nessun impatto sulle performance
• Completamente trasparente alle nostre applicazioni
Azure Cosmos DB : Overview
• ACD usa il partitioning per lo scaling dei containers
• Gli items di un container sono divisi in partizioni logiche
• Basate sulla partition key (PK) associata ad ogni container
• Tutti gli items in una partizione logica (PL) avranno lo stesso valore di PK
• In aggiunta alla PK, ogni Item ha un "ID" (univoco a livello di PL)
• PK + ID (identifica univocamente l’item) crea l’Index
• ACD gestisce in modo trasparente ed automatico il mapping tra PL e PF per
soddisfare le necessità di scalabilità e performance del container
• Queries che accedono ai dati di una singola PL sono piu’ costosi rispetto a
queries che accedono a partizioni multiple (“hot spots”)
• Le transazioni (Stored Procedure o Triggers) sono permesse solo su elementi di
una singola partizione logica
• Request unit (RU) : misura dell’throughput in ACD. 1RU = throughput di un GET
di un document da 1KB
Azure Cosmos DB : Partitioning
Azure Cosmos DB : Partitioning
• Fornisce un ambiente locale che permette di emulare il servizio Azure
Cosmos DB per scopi di sviluppo e testing
• Supporta funzionalità identiche alla versione cloud (es. creazione di
documenti, query, stored procedure, triggers)
• Data Explorer supporta solo clients per SQL (Core) API
• Stesse funzionalità, differente l'implementazione
• L'emulatore utilizza le componenti standard del sistema operativo
• No geo-replication
• No single-digit millisecond latency
• Un solo modello di consistenza disponibile
Azure Cosmos DB : Emulator
• White Paper: Trusted Cloud: security, privacy, compliance, resiliency, and IP
https://download.microsoft.com/download/1/6/0/160216AA-8445-480B-
B60F-5C8EC8067FCA/WindowsAzure-SecurityPrivacyCompliance.pdf
• Azure Compliance
https://azure.microsoft.com/en-us/overview/trusted-cloud/compliance/
Azure Cosmos DB : Security & Compliance
Il link https://tinyurl.com/y8gpmw3l documenta Use Cases in ambito:
• Retail
• IoT + Manufacturing
• Gaming
• Financial Services
• Machine Learning
Azure Cosmos DB : Uses Cases
Azure Cosmos DB
• Python Web App Application
• Python (3.7.4 - 64 bit)
• Flask
• “lightweight WSGI web application framework”
• Per semplici o complesse applicazioni
• Uno dei più popolari framework web per Python
Flask App & Virtual Environments
• Un Virtual Environment evita l'installazione di librerie e tool a livello
globale
• Controllo delle librerie e delle versioni utilizzate per specifica applicazione
• Creazione di un environment (Windows) -> python -m env <nome_env>
• Esportare tutte le librerie usate nel Virtual Environment
• pip freeze > requirements.txt
• Installare tutte le librerie tramite
• pip install -r requirements.txt
Flask App & Virtual Environments
Python, Flask & Azure Cosmos DB
• ACR è un servizio "Docker Registry" privato basato su "Docker Registry 2.0"
• build, store e management di immagini Docker per il deployment di tutti i
tipi di container
ACR : Azure Container Registry
• Per eseguire il push ed il pull di immagini è necessario aver installato
Docker
• Key Features:
• Tasks: build di immagini on demand o basate su triggres (es. "code commits")
• Geo-Replication
• Container Registry con Azure Container Instances
• Container Registry con Azure Kubernetes Service (AKS)
• Container Registry con Service Fabric
ACR : Azure Container Registry
• Il modo migliore per il package, deploy e manage di applicazioni cloud
senza preoccuparsi di gestire VMs
• Ideale per scenari che operano in containers isolati (single applications,
task automation e build jobs)
• Per scenari più complessi, si consiglia l'uso di AKS
• Startup : secondi
• Internet : Indirizzo IP pubblico e FQDN (custom label)
customlabel.azureregion.azurcontainer.io
• Free e-book: https://tinyurl.com/vj9vpmd
Azure Container Instances
• Suite di features all'interno di ACR che permette build di immagini per
Docker Container in modo efficiente (anche senza Docker installato
localmente)
• ACR Task utilizza lo stesso "Dockerfile" locale, non è necessario
cambiareadattare nulla
• ACR Task può essere utilizzato in modalità Single step (demo) o multi-step
utilizzando YAML
Azure Container Registry Tasks
ACR, Tasks e Continuous Deployment
Pietro Libro
• LinkedIn
https://www.linkedin.com/in/pietrolibro/
• Email
pietro.libro@gmail.com
Per contattarmi
Thank You!!!
Thanks to

More Related Content

What's hot

Super-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costsSuper-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costsMikhail Zakharenko
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksGianluca Hotz
 
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Gianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca Hotz
 
Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017MongoDB
 
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon AuroraCome utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon AuroraGianluca Hotz
 
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on AzureSQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on AzureMarco Obinu
 
Azure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integrationAzure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integrationRoberto Messora
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query ProcessingGianluca Hotz
 
SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaGianluca Hotz
 
Azure Saturday Pordenone 2018 IoT real time processing for lazy developer
Azure Saturday Pordenone 2018 IoT real time processing for lazy developerAzure Saturday Pordenone 2018 IoT real time processing for lazy developer
Azure Saturday Pordenone 2018 IoT real time processing for lazy developerAlessio Biasiutti
 
SQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with PolybaseSQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with PolybaseGianluca Hotz
 
Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Emanuele Zanchettin
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database LedgerGianluca Hotz
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoEDB
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseGianluca Hotz
 

What's hot (20)

Super-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costsSuper-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costs
 
SQL Server in AWS
SQL Server in AWSSQL Server in AWS
SQL Server in AWS
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed Disks
 
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017
 
Ec2
Ec2Ec2
Ec2
 
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon AuroraCome utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
 
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on AzureSQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
 
Azure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integrationAzure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integration
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
 
SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: Sicurezza
 
SQL Server in AWS
SQL Server in AWSSQL Server in AWS
SQL Server in AWS
 
Azure Saturday Pordenone 2018 IoT real time processing for lazy developer
Azure Saturday Pordenone 2018 IoT real time processing for lazy developerAzure Saturday Pordenone 2018 IoT real time processing for lazy developer
Azure Saturday Pordenone 2018 IoT real time processing for lazy developer
 
SQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with PolybaseSQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with Polybase
 
Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
Citrix Xen App on Windows Azure
Citrix Xen App on Windows AzureCitrix Xen App on Windows Azure
Citrix Xen App on Windows Azure
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybase
 

Similar to Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Container, all inclusive

Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Gianluca Hotz
 
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tuttiCCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tuttiwalk2talk srl
 
Kubernetes e bello, sicuro è meglio!
Kubernetes e bello, sicuro è meglio!Kubernetes e bello, sicuro è meglio!
Kubernetes e bello, sicuro è meglio!Giuliano Latini
 
Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseGianluca Hotz
 
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 cloudRiccardo Zamana
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudGianluca Hotz
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentationUgo Landini
 
Sviluppare Azure Web Apps
Sviluppare Azure Web AppsSviluppare Azure Web Apps
Sviluppare Azure Web AppsAndrea Dottor
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech LabUgo Landini
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Codemotion
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL DatabaseEmanuele Zanchettin
 
AWS CDK infrastructure is code
AWS CDK infrastructure is codeAWS CDK infrastructure is code
AWS CDK infrastructure is codeEnrico Pesce
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il MobilePietro Libro
 
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...Codemotion
 
Infrastructure as code: Kubernetes on ACS
Infrastructure as code: Kubernetes on ACSInfrastructure as code: Kubernetes on ACS
Infrastructure as code: Kubernetes on ACSNucleode Srl
 
Ottimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloudOttimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloudNicolò Carandini
 
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2MongoDB
 
Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...
Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...
Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...Meet Magento Italy
 
The Hitchhiker's Guide to the Azure Galaxy
The Hitchhiker's Guide to the Azure GalaxyThe Hitchhiker's Guide to the Azure Galaxy
The Hitchhiker's Guide to the Azure GalaxyNicolò Carandini
 

Similar to Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Container, all inclusive (20)

Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)
 
Azure sql database
Azure sql databaseAzure sql database
Azure sql database
 
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tuttiCCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
 
Kubernetes e bello, sicuro è meglio!
Kubernetes e bello, sicuro è meglio!Kubernetes e bello, sicuro è meglio!
Kubernetes e bello, sicuro è meglio!
 
Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL Database
 
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
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloud
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentation
 
Sviluppare Azure Web Apps
Sviluppare Azure Web AppsSviluppare Azure Web Apps
Sviluppare Azure Web Apps
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
 
AWS CDK infrastructure is code
AWS CDK infrastructure is codeAWS CDK infrastructure is code
AWS CDK infrastructure is code
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile
 
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
 
Infrastructure as code: Kubernetes on ACS
Infrastructure as code: Kubernetes on ACSInfrastructure as code: Kubernetes on ACS
Infrastructure as code: Kubernetes on ACS
 
Ottimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloudOttimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloud
 
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
 
Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...
Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...
Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and mi...
 
The Hitchhiker's Guide to the Azure Galaxy
The Hitchhiker's Guide to the Azure GalaxyThe Hitchhiker's Guide to the Azure Galaxy
The Hitchhiker's Guide to the Azure Galaxy
 

More from azuredayit

Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOps
Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOpsAzure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOps
Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOpsazuredayit
 
Azure Day Rome Reloaded 2019 - Reactive Systems with Event Grid
Azure Day Rome Reloaded 2019 - Reactive Systems with Event GridAzure Day Rome Reloaded 2019 - Reactive Systems with Event Grid
Azure Day Rome Reloaded 2019 - Reactive Systems with Event Gridazuredayit
 
Azure Day Rome Reloaded 2019 - Building serverless microservices in azure
Azure Day Rome Reloaded 2019 - Building serverless microservices in azureAzure Day Rome Reloaded 2019 - Building serverless microservices in azure
Azure Day Rome Reloaded 2019 - Building serverless microservices in azureazuredayit
 
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azure
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for AzureAzure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azure
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azureazuredayit
 
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purpose
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purposeAzure Day Rome Reloaded 2019 - Azure: a cloud with a purpose
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purposeazuredayit
 
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...azuredayit
 
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...azuredayit
 
Azure Day Rome Reloaded 2019 - Azure Application Insights Overview
Azure Day Rome Reloaded 2019 - Azure Application Insights OverviewAzure Day Rome Reloaded 2019 - Azure Application Insights Overview
Azure Day Rome Reloaded 2019 - Azure Application Insights Overviewazuredayit
 
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKSAzure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKSazuredayit
 
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...azuredayit
 
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...azuredayit
 
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...azuredayit
 
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Dive
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep DiveAzure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Dive
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Diveazuredayit
 

More from azuredayit (13)

Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOps
Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOpsAzure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOps
Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOps
 
Azure Day Rome Reloaded 2019 - Reactive Systems with Event Grid
Azure Day Rome Reloaded 2019 - Reactive Systems with Event GridAzure Day Rome Reloaded 2019 - Reactive Systems with Event Grid
Azure Day Rome Reloaded 2019 - Reactive Systems with Event Grid
 
Azure Day Rome Reloaded 2019 - Building serverless microservices in azure
Azure Day Rome Reloaded 2019 - Building serverless microservices in azureAzure Day Rome Reloaded 2019 - Building serverless microservices in azure
Azure Day Rome Reloaded 2019 - Building serverless microservices in azure
 
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azure
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for AzureAzure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azure
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azure
 
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purpose
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purposeAzure Day Rome Reloaded 2019 - Azure: a cloud with a purpose
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purpose
 
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...
 
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...
 
Azure Day Rome Reloaded 2019 - Azure Application Insights Overview
Azure Day Rome Reloaded 2019 - Azure Application Insights OverviewAzure Day Rome Reloaded 2019 - Azure Application Insights Overview
Azure Day Rome Reloaded 2019 - Azure Application Insights Overview
 
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKSAzure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
 
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
 
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzand...
 
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...
 
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Dive
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep DiveAzure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Dive
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Dive
 

Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Container, all inclusive

  • 1. Python, Azure Cosmos DB, Docker and Azure Container, all inclusive ro Libro – 29.11.2019
  • 3. AGENDA • Azure Cosmos DB • Overview • Partitioning • Security & Compliance • Azure Cosmos Emulator • Uses Cases • PythonFlask Web App • Azure Container Registry (ACR) • Container Instances • Container Tasks • Continuous Deployment (ACR Tasks)
  • 4. • Database service multi-modello per lo sviluppo di applicazioni scalabili a livello globale • Aggiunta di "Azure Locations" in qualsiasi momento con un singolo click, Azure Cosmos DB provvederà a replicare i dati e a renderli disponibili • Failover automatico (o manuale) • Replicazione e sincronizzazione multi-regione automatica • Scritture multi-regione per ridurre la latenza ed aumentare la disponibilità • Azure Cosmos DB permette di scalare throughput e storage in modo elastico e globale secondo le esigenze della nostra applicazione, pagando solo per il necessario Azure Cosmos DB : Overview
  • 5. • Supporto API multi-model : SQL (Core), Cassandra, Mongo DB, Gremlin, Spark, Table • 5 modelli di consistenza ben definiti: Azure Cosmos DB : Overview
  • 6. • Throughput garantito • High Availability: 99,999% (letture multi-regione, 99,99% per singola regione) • Latenza: <10ms in lettura e <10ms in scrittura (single-digit latency, 99 percentile) • Dati, indici, backups, attachments cifrati per default • Nessun impatto sulle performance • Completamente trasparente alle nostre applicazioni Azure Cosmos DB : Overview
  • 7. • ACD usa il partitioning per lo scaling dei containers • Gli items di un container sono divisi in partizioni logiche • Basate sulla partition key (PK) associata ad ogni container • Tutti gli items in una partizione logica (PL) avranno lo stesso valore di PK • In aggiunta alla PK, ogni Item ha un "ID" (univoco a livello di PL) • PK + ID (identifica univocamente l’item) crea l’Index • ACD gestisce in modo trasparente ed automatico il mapping tra PL e PF per soddisfare le necessità di scalabilità e performance del container • Queries che accedono ai dati di una singola PL sono piu’ costosi rispetto a queries che accedono a partizioni multiple (“hot spots”) • Le transazioni (Stored Procedure o Triggers) sono permesse solo su elementi di una singola partizione logica • Request unit (RU) : misura dell’throughput in ACD. 1RU = throughput di un GET di un document da 1KB Azure Cosmos DB : Partitioning
  • 8. Azure Cosmos DB : Partitioning
  • 9. • Fornisce un ambiente locale che permette di emulare il servizio Azure Cosmos DB per scopi di sviluppo e testing • Supporta funzionalità identiche alla versione cloud (es. creazione di documenti, query, stored procedure, triggers) • Data Explorer supporta solo clients per SQL (Core) API • Stesse funzionalità, differente l'implementazione • L'emulatore utilizza le componenti standard del sistema operativo • No geo-replication • No single-digit millisecond latency • Un solo modello di consistenza disponibile Azure Cosmos DB : Emulator
  • 10. • White Paper: Trusted Cloud: security, privacy, compliance, resiliency, and IP https://download.microsoft.com/download/1/6/0/160216AA-8445-480B- B60F-5C8EC8067FCA/WindowsAzure-SecurityPrivacyCompliance.pdf • Azure Compliance https://azure.microsoft.com/en-us/overview/trusted-cloud/compliance/ Azure Cosmos DB : Security & Compliance
  • 11. Il link https://tinyurl.com/y8gpmw3l documenta Use Cases in ambito: • Retail • IoT + Manufacturing • Gaming • Financial Services • Machine Learning Azure Cosmos DB : Uses Cases
  • 13. • Python Web App Application • Python (3.7.4 - 64 bit) • Flask • “lightweight WSGI web application framework” • Per semplici o complesse applicazioni • Uno dei più popolari framework web per Python Flask App & Virtual Environments
  • 14. • Un Virtual Environment evita l'installazione di librerie e tool a livello globale • Controllo delle librerie e delle versioni utilizzate per specifica applicazione • Creazione di un environment (Windows) -> python -m env <nome_env> • Esportare tutte le librerie usate nel Virtual Environment • pip freeze > requirements.txt • Installare tutte le librerie tramite • pip install -r requirements.txt Flask App & Virtual Environments
  • 15. Python, Flask & Azure Cosmos DB
  • 16. • ACR è un servizio "Docker Registry" privato basato su "Docker Registry 2.0" • build, store e management di immagini Docker per il deployment di tutti i tipi di container ACR : Azure Container Registry
  • 17. • Per eseguire il push ed il pull di immagini è necessario aver installato Docker • Key Features: • Tasks: build di immagini on demand o basate su triggres (es. "code commits") • Geo-Replication • Container Registry con Azure Container Instances • Container Registry con Azure Kubernetes Service (AKS) • Container Registry con Service Fabric ACR : Azure Container Registry
  • 18. • Il modo migliore per il package, deploy e manage di applicazioni cloud senza preoccuparsi di gestire VMs • Ideale per scenari che operano in containers isolati (single applications, task automation e build jobs) • Per scenari più complessi, si consiglia l'uso di AKS • Startup : secondi • Internet : Indirizzo IP pubblico e FQDN (custom label) customlabel.azureregion.azurcontainer.io • Free e-book: https://tinyurl.com/vj9vpmd Azure Container Instances
  • 19. • Suite di features all'interno di ACR che permette build di immagini per Docker Container in modo efficiente (anche senza Docker installato localmente) • ACR Task utilizza lo stesso "Dockerfile" locale, non è necessario cambiareadattare nulla • ACR Task può essere utilizzato in modalità Single step (demo) o multi-step utilizzando YAML Azure Container Registry Tasks
  • 20. ACR, Tasks e Continuous Deployment
  • 21.
  • 22. Pietro Libro • LinkedIn https://www.linkedin.com/in/pietrolibro/ • Email pietro.libro@gmail.com Per contattarmi