Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Gentle Introduction to Azure

Similar presentations


Presentation on theme: "A Gentle Introduction to Azure"— Presentation transcript:

1 A Gentle Introduction to Azure
SharePoint Saturday Sat 28-Oct-2017 Burlington MA Bill Wilder HELLO my name is Bill Wilder The Microsoft Azure cloud platform offers dozens of powerful services, available at your convenience. In this 75 minute talk, we briefly marvel at the breadth of services before diving into a few services that you can put to use immediately. We all know the cloud offers VMs, and we'll have a peek there too, but that's not the focus of this talk. Instead, come learn about Logic Apps, Functions (serverless computing), Websites, Office 365/Azure Active Directory integration, database services, and more as time permits. By the end of this talk you can expect to have an understanding of what the Azure cloud platform can do for you generally, with a few specific practical examples you can try out right away. Unless otherwise noted, slide deck contents copyright (c) 2017, Bill

2

3 How do I automatically email my MailChimp subscribers after I publish a post on WordPress?

4 Goal: By the end of this talk…
Understand how to assemble an Azure service or application without touching a server or VM. Discussion spans Azure Active Directory, Web Apps, [SQL Database], [API Apps], Logic Apps, Functions, and Azure Storage technologies. Whither API apps?

5 Global Enterprise Cloud Platform
42 Azure regions, more than any cloud provider 42 Azure regions

6 Preview Version 1.7 ( ) * Preview Services

7

8 Page of Photos Architecture
Web Tier - Public Web App API App Azure AD Service Tier - Private Functions Logic Apps Github VSTS - Git Data Tier - Private Key Vault SQL DB Queues Tables Blobs

9 Logic Apps

10 Logic Apps – the new component model
Triggers + Actions = Logic App

11 Triggers + Actions = Logic App
Triggers  Some event – web hook, timer, user action, etc. + Actions  Your response to trigger – based on trigger & data = Logic App  Serverless Software Component

12 How is this possible? Connectors
A Component Model for the Cloud The code behind Triggers & Actions Front simple microservers or whole systems Ecosystem is blooming Gallery of Microsoft-maintained connectors Community-contributed connectors are available You can create your own connectors (via Open API (Swagger)) Well-defined Logic App Workflow Definition Language

13 Triggers Timer User action Action from some other system
Queue Message, Blob Creation, Webhook/HTTP Call Examples: tweet, , slack, calendar event, something changed Business event: User signed up on my website Code event: New version of file checked into GitHub Azure event: A new VM was provisioned

14 Actions Call an API Trigger more actions
Use data from triggers for filtering/decisions Pass along data from triggers in carrying out actions Can be custom Huge gallery New component model for software developers

15 Scheduler supports Cron syntax
{second} {minute} {hour} {day} {month} {day-of-week} Note {second} is non-standard for cron entry * * * * * *  Every second */90 * * * * *  Every 90 seconds 0 0 * * * *  Every hour, on the hour 0 0 * 13 8 *  Every hour on Aug 13 every year 0 0 9,12,2 1, *  9 am/noon/2 pm on 1st/15th of Oct-Dec WEBSITE_TIME_ZONE and set the value to Eastern Standard Time for Function Apps

16 Duration – per ISO 8601 PT5M PT2D PT36H PT36H vs. P1DT12H

17 Logic Apps Demo Gallery of Connectors Create new Ad hoc Scheduled DEMO

18 Page of Photos Architecture
Web Tier - Public Web App API App Azure AD Service Tier - Private Functions Logic Apps Github VSTS - Git Data Tier - Private Key Vault SQL DB Queues Tables Blobs

19 Content Moderator Cognitive Service Sign up via Azure Portal
turedMenuItemBlade/selectedMenuItemId/CognitiveServices_MP/dontDis cardJourney/true/launchingContext/%7B%22source%22%3A%22Resources %20Microsoft.CognitiveServices%2Faccounts%22%7D/resetMenuId/

20 Page of Photos “Onboarding” Process
We have twitter handle, address, name – so onboarding begins: Check their twitter account is compliance with acceptable use for PoP Check they have a non-default profile photo Use Cognitive Services Content Moderator API to verify they have no images or text in tweets that are inappropriate Route to human with if any concerns Check source IP on VirusTotal to make sure they are not known bad Send them a welcome Post a welcome on twitter Provision them in our database with an API key 10 transactions per $1 per 1,000 transactions in US East 2

21 What should happen when we invoke the “Onboarding” Logic App?
Web Tier - Public Web App API App Azure AD Service Tier - Private Functions Github VSTS - Git Logic Apps Data Tier - Private Key Vault SQL DB Queues Tables Blobs

22 Accepted HTTP 202 If you build an API *called by* Logic Apps, you need to support at least the location header, and optionally the retry-after – but Logic Apps themselves return a MASTER LIST: STORAGE: Example: Target throughput for single queue (1 KB messages) = Up to 2000 messages per second SQL DB:

23 Postman Just a tool, but a popular/handy one
Useful for testing HTTP actions, including API calls Free Slack channel – @postman

24 Logic Apps Workflow Definition Language

25 {JSON:Schema} @JSONSchema

26 JSON Schema example (tweet)
{ "type": "object", "properties": { "tweet": { "type": "string" }

27 DEMO Logic Apps Demo Execute via Postman Debugging & error handling
Workflow Definition with JSON Schema DEMO

28 Sharepoint + Logic Apps
create-api-sharepointonline

29 Deployment with ARM Logic app resource: Pricing plan, location, and specific workflow. Workflow definition: ARM template references the target workflow. Connections: Connector metadata like access tokens included as ARM parameters.

30 Being Serverless execution time, error handling, scaling

31 Serverless Apps – How long can they run?
Function App Logic App Function App Logic App 5 minutes (default) 10 minutes (max) (consumption) [doc] 90 days [doc] 12960:1 4 orders of magnitude Durable Functions is a thing that’s coming Q: How long can an AWS Lambda function execute? The default timeout is 3 seconds, but you can set the timeout to any value between 1 and 300 seconds. Official: Less official: > 10,000 : 1

32 Functions – Scaling Example

33 Serverless Computing is characterized by…
Deployment units are small, loosely-coupled components More “no server configuration” than PaaS Cloud-friendly pay-by-the-drink billing

34 Serverless for me Spins up on demand, under control (decision-making done by Azure) Short-lived Microservices executing in parallel Pay by the drink

35 Pricing Logic Apps Azure Functions Consumption
Azure Functions Consumption or App Service Plan

36 Function Apps

37 Function Apps are Code + Triggers & Bindings
Timer User action Action from some other system Queue Message, Blob Creation, Webhook/HTTP Call (Look familiar?)

38 Folder Structure

39 Storage Tables & Functions & Table API
Azure Storage Tables (the present) bindings-storage-table Nice binding construct (show later in demo) Cosmos DB Table API (the future) table-dotnet

40 Function App Demo – Goals
Create easily Consumption model Deploy from source control available + other Web App features Bindings (e.g., in Azure Tables)  Running example: twitter.azurewebsites.net/ DEMO

41 Error Handling Try it Retry it Deal with the failure
Track with logging & telemetry Monitor with alerts & dashboards “Scopes” exception-handling

42 HTTP 429 HTTP 500 HTTP 503 Error code 40197
Busy Signals HTTP 429 HTTP 500 HTTP 503 Error code 40197 Throttle, too busy, over limit (e.g., >2000 msg/sec), or database hardware problem – retry in 5s MASTER LIST: STORAGE: Example: Target throughput for single queue (1 KB messages) = Up to 2000 messages per second SQL DB: 8 different TRANSIENT error codes Many others, including for OUT OF SPACE 40197 – 17 – “The service has encountered an error processing your request. Please try again.” You receive this error when the service is down due to software or hardware upgrades, hardware failures, or any other failover problems. The error code (%d) embedded within the message of error provides additional information about the kind of failure or failover that occurred. Some examples of the error codes are embedded within the message of error are 40020, 40143, 40166, and Reconnecting to your SQL Database server automatically connects you to a healthy copy of your database. Your application must catch error 40197, log the embedded error code (%d) within the message for troubleshooting, and try reconnecting to SQL Database until the resources are available, and your connection is established again.

43 HTTP 409 Error code 40544 Hard Errors (e.g., size)
SQL DB: 8 different TRANSIENT error codes Many others, including for OUT OF SPACE The Azure infrastructure has the ability to dynamically reconfigure servers when heavy workloads arise in the SQL Database service. This dynamic behavior might cause your client program to lose its connection to SQL Database. This kind of error condition is called a transient fault.+

44 Azure Function that returns 500 75% of calls
6cca66e

45 DEMO Errors Demo – Goals
What happens when there’s an error? We try again!  Code for running example Logic App (SucceedSometimes): DEMO

46 “Multiple Triggers” One trigger type can be assigned per Logic App
Many parallel instances of your Logic App can fire to absorb load Limits? and-config Why would you want to limit it? Singleton available

47 Future – Durable Functions
a-preview-for-durable-functions/ Durable Task Framework Better out-of-the-box experience to efficiently string together Function Apps

48 Web Apps Shhh.. not really serverless (shame, shame, shame)

49 A Web App for your website
Technology: ASP.NET, Python, Node.JS, PHP, others… Autoscale support Easy to build Easy to manage Available with App Service Environment Minimal server awareness

50 DEMO Web App Demo – Goals Create easily
App Plan (NB: server peeks out!) Deploy from source control Add AAD authentication (“intranet application”) Show Twitter authentication  Running example: DEMO

51 Find this slide deck here
Questions? See you at Boston Azure bostonazure.org Find this slide deck here Bill blog.codingoutloud.com linkedin.com/in/billwilder

52 Subliminal  … 0.25


Download ppt "A Gentle Introduction to Azure"

Similar presentations


Ads by Google