SlideShare a Scribd company logo
1 of 23
#DOH19
2
Automazione serverless con Azure
Function e PowerShell
Marco Obinu
@OmegaMadLab
#DOH19 3
Organizer & sponsors
GetLatestVersion.it
#DOH19
• Advisory Engineer @ Softjam S.p.A.
• Geek fino al midollo 
@OmegaMadLab
marco.obinu@omegamadlab.com
http://www.omegamadlab.com
https://github.com/OmegaMadLab
https://www.linkedin.com/in/marco-obinu-omegamadlab/
https://www.youtube.com/channel/UCpkBeQSscC1iBvpNP4VNTKQ
4
Marco Obinu
#DOH19 6
Azure Functions e PowerShell: perché?
• Piattoforma serverless event-driven
• Complementare ad Azure Automation
Completa astrazione
dal layer hardware
Scabilità guidata
dagli eventi
Paghi per l’effettivo
utilizzo
#DOH19 7
Trigger e bindings
Triggers Bindings
Blob Binding Direction Binding Direction
Queue Blob Input and Output Graph Onedrive Input and Output
HTTP Queue Output Graph Email Output
Cosmos DB Table Input and Output Graph Event Input and Output
Event Grid CosmoDb Input and Output Notification Hubs Output
Event Hub Event Hubs Output SendGrid Output
MS Graph Event Http Output Service bus Output
Service Bus Graph Excel Input and Output SignalR Input and Output
Timer
https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
Trigger
Input binding Output binding
8
Anatomia di una PowerShell function
#DOH19 9
Piani di servizio
Resource Consumption plan Premium plan (preview) App Service plan
Scale out Event driven Event driven Manual/autoscale
Max instances 200 20 10-20
Cold start ✅Yes ❌No ❌No
Default time out duration (min) 5 30 30
Max time out duration (min) 10 unbounded unbounded
ACU per instance 100 210-840 100-840
Max memory (GB per instance) 1.5 3.5-14 1.75-14
Function apps per plan 100 100 unbounded
App Service plans 100 per region 100 per resource group 100 per resource group
Storage 1 GB 250 GB 50-1000 GB
Vnet integration ❌No ✅Yes ✅Yes
https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale
#DOH19 10
Struttura del filesystem
PSFunctionApp
MyFirstFunction
run.ps1
function.json
MySecondFunction
run.ps1
function.json
Modules
myFirstHelperModule
myFirstHelperModule.psd1
myFirstHelperModule.psm1
mySecondHelperModule
mySecondHelperModule.psd1
mySecondHelperModule.psm1
local.settings.json
host.json
requirements.psd1
profile.ps1
11
Invio report con Az.ResourceGraph e
SendGrid
12
Interrogazione AzSQLDB con sqlserver
HTTP req HTTP resp
13
Integrazione con Event Grid
14
Alert response con Azure Monitor
#DOH19 15
Integrazione con la rete
Consumption plan
Premium plan
(preview) App Service plan
App Service
Environment
Inbound IP restrictions &
private site access
✅Yes ✅Yes ✅Yes ✅Yes
Virtual network
integration
❌No ✅Yes
(Regional)
✅Yes
(Regional and Gateway)
✅Yes
Virtual network triggers
(non-HTTP)
❌No ❌No ✅Yes ✅Yes
Hybrid Connections ❌No ✅Yes ✅Yes ✅Yes
Outbound IP Restrictions ❌No ❌No ❌No ✅Yes
https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
#DOH19
• Regional vnet integration
16
Integrazione con la rete
https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
#DOH19
• GW vnet integration
17
Integrazione con la rete
https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
#DOH19 18
Integrazione con la rete
https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
• ASE
#DOH19
• Hybrid connection
19
Integrazione con la rete
https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
20
Integrazione con la vnet
HTTP req HTTP resp
#DOH19 21
Sicurezza
• Networking
• IP restrictions e service endpoint
• ASE
• Verso l’esterno
• Managed Service Identity
• Sull’invocazione
• Function e master key
• Integrazione con authentication providers
• Gestione dei dati sensibili
• App Settings
• Integrazione con Key Vault
22
Logic App, sicurezza e scalabilità
#DOH19 23
Materiale utile
• Session video
https://youtu.be/0ZK1SQ6zkiU
• Demo
https://github.com/OmegaMadLab/StartingWithPoshAzureFunctions
• Documentazione ufficiale
https://docs.microsoft.com/en-us/azure/azure-functions/
• Interazione con Azure AD
https://github.com/eamonoreilly/ManageAzureActiveDirectoryWithPowerShellFunction
• Creazione SendGrid account ed integrazione in Azure Functions
http://www.omegamadlab.com/2019/10/21/using-sendgrid-binding-from-powershell-in-azure-functions/
• Invocazione Az Function con AAD authentication da Logic App
http://www.omegamadlab.com/2019/10/26/calling-an-azure-function-with-azure-ad-authentication-from-a-logic-app/
• Esempio di scalabilità con dedicated plan
https://artisticcheese.wordpress.com/2019/08/20/automation-at-scale-in-azure-with-powershell-azure-functions/
• Scalabilità  PSWorkerInProcConcurrencyUpperBound
https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell#concurrency
#DOH19
THANK YOU!
CODICE FEEDBACK:8F

More Related Content

What's hot

What's hot (20)

Resillient microservices with AKS
Resillient microservices with AKSResillient microservices with AKS
Resillient microservices with AKS
 
Serverless with Google Cloud Functions
Serverless with Google Cloud FunctionsServerless with Google Cloud Functions
Serverless with Google Cloud Functions
 
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
 
Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
 
Google cloud functions
Google cloud functionsGoogle cloud functions
Google cloud functions
 
Desarrollo de aplicaciones con Grails 3, Angular JS y Spring Security
Desarrollo de aplicaciones con Grails 3, Angular JS y Spring SecurityDesarrollo de aplicaciones con Grails 3, Angular JS y Spring Security
Desarrollo de aplicaciones con Grails 3, Angular JS y Spring Security
 
Rapid Application Deployment with Play Framework
Rapid Application Deployment with Play FrameworkRapid Application Deployment with Play Framework
Rapid Application Deployment with Play Framework
 
Tokyo Azure Meetup #29 AKS
Tokyo Azure Meetup #29 AKSTokyo Azure Meetup #29 AKS
Tokyo Azure Meetup #29 AKS
 
[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API
 
Getting started with Serverless applications on Microsoft Azure
Getting started with Serverless applications on Microsoft AzureGetting started with Serverless applications on Microsoft Azure
Getting started with Serverless applications on Microsoft Azure
 
CI CD with Docker and Kubernetes
CI CD with Docker and Kubernetes CI CD with Docker and Kubernetes
CI CD with Docker and Kubernetes
 
戦う情シス!全社 API で社内アプリ開発を加速させよう
戦う情シス!全社 API で社内アプリ開発を加速させよう戦う情シス!全社 API で社内アプリ開発を加速させよう
戦う情シス!全社 API で社内アプリ開発を加速させよう
 
firebase yebisu_vol2
firebase yebisu_vol2firebase yebisu_vol2
firebase yebisu_vol2
 
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
 
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
 
Service Mesh Status Quo 2018: 2019年に向けたService Meshの現状課題の整理と考察
Service Mesh Status Quo 2018:  2019年に向けたService Meshの現状課題の整理と考察Service Mesh Status Quo 2018:  2019年に向けたService Meshの現状課題の整理と考察
Service Mesh Status Quo 2018: 2019年に向けたService Meshの現状課題の整理と考察
 
Improve Monitoring and Observability for Kubernetes with OSS tools
Improve Monitoring and Observability for Kubernetes with OSS toolsImprove Monitoring and Observability for Kubernetes with OSS tools
Improve Monitoring and Observability for Kubernetes with OSS tools
 
Beyond OpenStack | OpenStack in Real Life
Beyond OpenStack | OpenStack in Real LifeBeyond OpenStack | OpenStack in Real Life
Beyond OpenStack | OpenStack in Real Life
 
Performance Testing with Tsung
Performance Testing with TsungPerformance Testing with Tsung
Performance Testing with Tsung
 

Similar to Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOps Heroes 2019

Similar to Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOps Heroes 2019 (20)

Cloud Workflows What's new in serverless orchestration and automation
Cloud Workflows What's new in serverless orchestration and automationCloud Workflows What's new in serverless orchestration and automation
Cloud Workflows What's new in serverless orchestration and automation
 
Serverless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud WorkflowsServerless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud Workflows
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Serverless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud WorkflowsServerless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud Workflows
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data edition
 
Codecoon - A technical Case Study
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case Study
 
GDG DevFest Romania - Architecting for the Google Cloud Platform
GDG DevFest Romania - Architecting for the Google Cloud PlatformGDG DevFest Romania - Architecting for the Google Cloud Platform
GDG DevFest Romania - Architecting for the Google Cloud Platform
 
IDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionIDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase Session
 
FIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
FIWARE Global Summit - FogFlow, a new GE for IoT Edge ComputingFIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
FIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
 
Serverless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud WorkflowsServerless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud Workflows
 
Yannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflowYannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflow
 
Yannis Zarkadas. Stefano Fioravanzo. Enterprise data science workflows on kub...
Yannis Zarkadas. Stefano Fioravanzo. Enterprise data science workflows on kub...Yannis Zarkadas. Stefano Fioravanzo. Enterprise data science workflows on kub...
Yannis Zarkadas. Stefano Fioravanzo. Enterprise data science workflows on kub...
 
クラウドネイティブ時代の分散トレーシング - Distributed Tracing in a Cloud Native Age
クラウドネイティブ時代の分散トレーシング - Distributed Tracing in a Cloud Native Ageクラウドネイティブ時代の分散トレーシング - Distributed Tracing in a Cloud Native Age
クラウドネイティブ時代の分散トレーシング - Distributed Tracing in a Cloud Native Age
 
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
 
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
GE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTGE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoT
 

More from Marco Obinu

More from Marco Obinu (17)

Securing an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 PordenoneSecuring an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 Pordenone
 
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
 
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
 
Infrastructure as Code on Azure: Show your Bicep!
Infrastructure as Code on Azure: Show your Bicep!Infrastructure as Code on Azure: Show your Bicep!
Infrastructure as Code on Azure: Show your Bicep!
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su Azure
 
SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921
 
SQL Server Disaster Recovery on Azure - SQL Saturday 921
SQL Server Disaster Recovery on Azure - SQL Saturday 921SQL Server Disaster Recovery on Azure - SQL Saturday 921
SQL Server Disaster Recovery on Azure - SQL Saturday 921
 
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco ObinuAzure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
 
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMsGlobal Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
 
Azure Day Reloaded 2019 - React to infrastructure events with Azure Monitor
Azure Day Reloaded 2019 - React to infrastructure events with Azure MonitorAzure Day Reloaded 2019 - React to infrastructure events with Azure Monitor
Azure Day Reloaded 2019 - React to infrastructure events with Azure Monitor
 
Azure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshopAzure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshop
 
Sql Saturday 895 - SQL Server e PowerShell: from Zero to Hero
Sql Saturday 895 - SQL Server e PowerShell: from Zero to HeroSql Saturday 895 - SQL Server e PowerShell: from Zero to Hero
Sql Saturday 895 - SQL Server e PowerShell: from Zero to Hero
 
Azure Saturday Pordenone 2019 - Reagire agli eventi di infrastruttura con Azu...
Azure Saturday Pordenone 2019 - Reagire agli eventi di infrastruttura con Azu...Azure Saturday Pordenone 2019 - Reagire agli eventi di infrastruttura con Azu...
Azure Saturday Pordenone 2019 - Reagire agli eventi di infrastruttura con Azu...
 
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
 
SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...
SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...
SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...
 
Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...
Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...
Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...
 
Global Azure BootCamp 2019 - Verona - Azure Cloud Shell
Global Azure BootCamp 2019 - Verona - Azure Cloud ShellGlobal Azure BootCamp 2019 - Verona - Azure Cloud Shell
Global Azure BootCamp 2019 - Verona - Azure Cloud Shell
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOps Heroes 2019

  • 2. 2 Automazione serverless con Azure Function e PowerShell Marco Obinu @OmegaMadLab
  • 3. #DOH19 3 Organizer & sponsors GetLatestVersion.it
  • 4. #DOH19 • Advisory Engineer @ Softjam S.p.A. • Geek fino al midollo  @OmegaMadLab marco.obinu@omegamadlab.com http://www.omegamadlab.com https://github.com/OmegaMadLab https://www.linkedin.com/in/marco-obinu-omegamadlab/ https://www.youtube.com/channel/UCpkBeQSscC1iBvpNP4VNTKQ 4 Marco Obinu
  • 5. #DOH19 6 Azure Functions e PowerShell: perché? • Piattoforma serverless event-driven • Complementare ad Azure Automation Completa astrazione dal layer hardware Scabilità guidata dagli eventi Paghi per l’effettivo utilizzo
  • 6. #DOH19 7 Trigger e bindings Triggers Bindings Blob Binding Direction Binding Direction Queue Blob Input and Output Graph Onedrive Input and Output HTTP Queue Output Graph Email Output Cosmos DB Table Input and Output Graph Event Input and Output Event Grid CosmoDb Input and Output Notification Hubs Output Event Hub Event Hubs Output SendGrid Output MS Graph Event Http Output Service bus Output Service Bus Graph Excel Input and Output SignalR Input and Output Timer https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings Trigger Input binding Output binding
  • 7. 8 Anatomia di una PowerShell function
  • 8. #DOH19 9 Piani di servizio Resource Consumption plan Premium plan (preview) App Service plan Scale out Event driven Event driven Manual/autoscale Max instances 200 20 10-20 Cold start ✅Yes ❌No ❌No Default time out duration (min) 5 30 30 Max time out duration (min) 10 unbounded unbounded ACU per instance 100 210-840 100-840 Max memory (GB per instance) 1.5 3.5-14 1.75-14 Function apps per plan 100 100 unbounded App Service plans 100 per region 100 per resource group 100 per resource group Storage 1 GB 250 GB 50-1000 GB Vnet integration ❌No ✅Yes ✅Yes https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale
  • 9. #DOH19 10 Struttura del filesystem PSFunctionApp MyFirstFunction run.ps1 function.json MySecondFunction run.ps1 function.json Modules myFirstHelperModule myFirstHelperModule.psd1 myFirstHelperModule.psm1 mySecondHelperModule mySecondHelperModule.psd1 mySecondHelperModule.psm1 local.settings.json host.json requirements.psd1 profile.ps1
  • 10. 11 Invio report con Az.ResourceGraph e SendGrid
  • 11. 12 Interrogazione AzSQLDB con sqlserver HTTP req HTTP resp
  • 13. 14 Alert response con Azure Monitor
  • 14. #DOH19 15 Integrazione con la rete Consumption plan Premium plan (preview) App Service plan App Service Environment Inbound IP restrictions & private site access ✅Yes ✅Yes ✅Yes ✅Yes Virtual network integration ❌No ✅Yes (Regional) ✅Yes (Regional and Gateway) ✅Yes Virtual network triggers (non-HTTP) ❌No ❌No ✅Yes ✅Yes Hybrid Connections ❌No ✅Yes ✅Yes ✅Yes Outbound IP Restrictions ❌No ❌No ❌No ✅Yes https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
  • 15. #DOH19 • Regional vnet integration 16 Integrazione con la rete https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
  • 16. #DOH19 • GW vnet integration 17 Integrazione con la rete https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
  • 17. #DOH19 18 Integrazione con la rete https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options • ASE
  • 18. #DOH19 • Hybrid connection 19 Integrazione con la rete https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
  • 19. 20 Integrazione con la vnet HTTP req HTTP resp
  • 20. #DOH19 21 Sicurezza • Networking • IP restrictions e service endpoint • ASE • Verso l’esterno • Managed Service Identity • Sull’invocazione • Function e master key • Integrazione con authentication providers • Gestione dei dati sensibili • App Settings • Integrazione con Key Vault
  • 21. 22 Logic App, sicurezza e scalabilità
  • 22. #DOH19 23 Materiale utile • Session video https://youtu.be/0ZK1SQ6zkiU • Demo https://github.com/OmegaMadLab/StartingWithPoshAzureFunctions • Documentazione ufficiale https://docs.microsoft.com/en-us/azure/azure-functions/ • Interazione con Azure AD https://github.com/eamonoreilly/ManageAzureActiveDirectoryWithPowerShellFunction • Creazione SendGrid account ed integrazione in Azure Functions http://www.omegamadlab.com/2019/10/21/using-sendgrid-binding-from-powershell-in-azure-functions/ • Invocazione Az Function con AAD authentication da Logic App http://www.omegamadlab.com/2019/10/26/calling-an-azure-function-with-azure-ad-authentication-from-a-logic-app/ • Esempio di scalabilità con dedicated plan https://artisticcheese.wordpress.com/2019/08/20/automation-at-scale-in-azure-with-powershell-azure-functions/ • Scalabilità  PSWorkerInProcConcurrencyUpperBound https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell#concurrency