Share
Azure in Action - Pragmatische Cloud-Lösungen für alle
IDE öffnen, „File – New Project – Cloud“, OK klicken und fertig. Oder? Nun, nicht ganz. Denn egal ob AWS, GCP oder eben Azure: am Ende des Tages werden Sie sich fragen, warum, wann und wie gehe ich in die Cloud? Genau diese Fragestellungen wollen Thorsten Hans und Christian Weyer für Java-, node.js- und .NET-Entwickler in diesem Workshop beantworten. Anhand diverser Use Cases werden mögliche Wege mit, über und in Azure diskutiert. Was bedeuten Architekturansätze wie Cloud-Native Microservices und Serverless Microservices? Wie gehe ich bei Brownfield-Projekten vor und wie kann ich Greenfield-Lösungen effizient in Azure realisieren? Wo liegen Unterschiede und Benefits von datengetriebenen und von ereignisgetriebenen Ansätzen? Wie kann ich mit dem Sammelsurium an Patterns, Technologien und Tools in Azure kosteneffektiv hantieren und dennoch flexibel sein? All dies werden wir anhand praktischer Beispiele und pragmatischer Lösungen in interaktiver Art und Weise adressieren. Sehen Sie PaaS, Web Apps, Containers, Orchestrators, Serverless, Functions & Co. mit der Azure-Cloud anhand von .NET- und node.js-Demos in Action. (Bringen Sie gerne Ihre „eigenen Probleme“ mit und lassen Sie uns darüber reden.)
Christian Weyer PRO
Transcript
58 slides
-
Azure in Action Pragmatische Cloud-Lösungen für alle Thorsten Hans @thorstenhans
Consultant Christian Weyer @christianweyer CTO -
2 § We can choose from a continuum § VM
➔ § Containers ➔ § Orchestrators ➔ § PaaS ➔ § Serverless Azure in Action: Pragmatische Cloud-Lösungen für alle Evolution to Cloud Compute Continuum PaaS IaaS On-Premises Serverless -
3 § Distributed Applications using Container Technologies § Serverless Architectures
Azure in Action: Pragmatische Cloud-Lösungen für alle What we‘ll talk about today -
4 Building & integrating software Microservices architectures Azure in Action:
Pragmatische Cloud-Lösungen für alle -
5 § Build & provide software systems easily & quickly
§ Need of integrating systems, applications, services, data § EAI: Enterprise Application Integration § B2B: Business-to-Business communication § B2C: Business-to-Consumer communication § Possible approaches & patterns § Microservices, Nanoservices, Picoservices – WTF? ! § Free choice of technical platform & framework § Event-driven integration § Can the Cloud offer value here? § Without having to always worry about too many (unnecessary) details… Azure in Action: Pragmatische Cloud-Lösungen für alle Building & integrating modern software systems -
6 § Single responsibility § Focused around business domain §
Small, doing one thing § Autonomy § Exclusive State § Can live on its own § Easier to CI /CD § Isolation § Well-defined technology-agnostic API § Mobility § Asynchronous communication for integration § Decoupled message passing, e.g. publish & subscribe Principles of Microservices Azure in Action: Pragmatische Cloud-Lösungen für alle -
8 § Why Azure? § Look beyond one’s own nose
§ Microsoft has always been strong in the enterprise § It is no longer “Windows Azure” J § Ca. 40% of VMs running on Linux (increasing) § Strong developer tooling § Very broad availability worldwide § German Azure as sovereign Cloud Azure in Action: Pragmatische Cloud-Lösungen für alle Azure Cloud https://w w w .cnbc.com /20 17/10 /28/m icrosoft-azure-is-grow ing-faster-than-aw s-backed-by-big-brands.htm l -
11 Azure in Action: Pragmatische Cloud-Lösungen für alle End-to-End Target
Architecture HTTP HTTPS WebSocket Service A Service B Service C Web APIs (ASP.NET, Node.js, …) HTML5-Application (Single-Page Application) Web Cordova Electron -
ACR § Private Docker registry based on Docker Registry 2.0
§ Fully managed Azure Service § Seamless integration with Docker CLI § Available in three SKUs (Basic, Standard Premium) § Provides webhooks for further automation like Continuous Deployment (CD) Azure Container Registry Azure in Action: Pragmatische Cloud-Lösungen für alle -
Get access to your Azure Container Registry § Azure AD-based
login mechanism for regular usage § Tokens requested by Azure CLI will be used to authenticate with ACR § Headless Authentication using Azure AD Service Principals § Used by Orchestrators or other Services § Admin Account § Designed for Single User scenarios § Should be disabled on all (pre)-production ACRs Authentication Azure in Action: Pragmatische Cloud-Lösungen für alle -
For Linux § Execute Web Apps based on Docker Images
§ Interation with public and private Docker Repositories § Frictionless Continuous Deployment § Port Forwarding configured automatically § Dockerfile EXPOSE Azure Web Apps Azure in Action: Pragmatische Cloud-Lösungen für alle -
Open-Source Container Orchestrator § Initially founded by Google / now
maintained by CNCF (Cloud Native Computing Foundation) § Successor of Google’s Borg § Original Codename Seven (https://en.wikipedia.org/wiki/Seven_of_Nine) § Greek for pilot or helmsman of a ship § Written in go Kubernetes Azure in Action: Pragmatische Cloud-Lösungen für alle -
What is k8s § Container platform § Runs Docker containers
§ Takes care about Networking / Isolation of applications § Abstracting hardware from the developer § Cloud-Agnostic § Container Lifecycle Management § Deployment, Rolling Upgrades, Scaling, Load-Balancing Kubernetes Azure in Action: Pragmatische Cloud-Lösungen für alle -
AKS § Fully managed Kubernetes cluster § Frictionless operation of
containerized apps § Easy to scale-out, upgrade, replicate § Seamless integration with other Azure resources § Self healing for k8s Masters § Cost efficient – you pay for your Nodes Azure Container Services Azure in Action: Pragmatische Cloud-Lösungen für alle -
AKS § Currently in technical preview (April 2018) § Preview
is only available in the following Regions § East US, West Europe, Central US, Canada Central, Canada East § Service quotas and limits* § Max 100 nodes per cluster § Max 110 pods per node § Max 20 clusters per subscription Azure Container Services Azure in Action: Pragmatische Cloud-Lösungen für alle -
Azure ! AKS § K8s Load Balancer will spin up
an Azure Load Balancer § Easily mount Azure Files Shares and Disks as Volumes § Consume Docker Images from Azure Container Registry § Communicate with other Azure Resources like Redis, SQL Azure § Traffic inside the same region is always free AKS Azure Integration Azure in Action: Pragmatische Cloud-Lösungen für alle -
27 § Serverless Compute → Azure Functions § Serverless Database
→ Azure Cosmos DB § Serverless Events → Azure Event Grid § Serverless Workflows → Azure Logic Apps Azure Durable Functions § Serverless Realtime → Azure SignalR Service § Serverless IoT → Azure IoT Hub § Serverless Analytics → Azure Application Insights § Serverless Containers → Azure Container Instances § ... and more ... https://azure.microsoft.com/en-us/overview/serverless-computing/ Serverless in Azure (Serverless != FaaS-only) Azure in Action: Pragmatische Cloud-Lösungen für alle -
28 Azure Functions Serverless Code / Compute Azure in Action:
Pragmatische Cloud-Lösungen für alle -
29 § Azure Functions is code being triggered by an
event § Focused code + events § Basic principles enable powerful use cases § Events § Triggers § Bindings § Two ways of operation § Cost-optimized, automatic scale (aka Consumption Plan) § Always-on, via Azure App Service § V2 Runtime built on .NET Core § Available for self-hosting Azure Functions: Functions-as-a-Service Azure in Action: Pragmatische Cloud-Lösungen für alle -
30 § Cold vs. warm start Azure in Action: Pragmatische
Cloud-Lösungen für alle Azure Functions: Activation in Consumption Plan https://blogs.m sdn.m icrosoft.com /appserviceteam /20 18/0 2/0 7/understanding-serverless-cold-start/ -
31 § In portal, via CLI, or in IDE §
Visual Studio wizards for pre-compiled Functions § Local tooling & runtime available § Debugging locally or remote § Multiple language bindings supported § C# & C# Script (CSX) § F# § JavaScript, TypeScript (node.js) § Java (preview) § Bash, Batch, PowerShell § … more planned Developing Functions Azure in Action: Pragmatische Cloud-Lösungen für alle -
32 § Incoming event triggers function § Input bindings enable
easy access to data from various data sources § Output bindings offer easy access to outbound data sinks § Custom triggers and bindings can be implemented Triggers & Bindings Azure in Action: Pragmatische Cloud-Lösungen für alle Your codelogic Runtime Azure Function HTTP Trigger Storage Input Binding Push Notification Output Binding Database Output Binding Email Output Binding -
33 Triggers & Bindings in Code Azure in Action: Pragmatische
Cloud-Lösungen für alle -
34 Azure in Action: Pragmatische Cloud-Lösungen für alle https://docs.m icrosoft.com
/en-us/azure/azure-functions/functions-triggers-bindings Triggers & Bindings -
35 § Azure Portal § Azure CLI / PowerShell §
Visual Studio wizards § Container (v2) § Continuous integration § Git § GitHub § Bitbucket § VSTS § DropBox, OneDrive Deployment Options Azure in Action: Pragmatische Cloud-Lösungen für alle -
36 Azure Cosmos DB Serverless Database Azure in Action: Pragmatische
Cloud-Lösungen für alle -
37 § Globally distributed, elastically scalable § Fully managed by
Azure § But not yet fully automatically scaling § Multi-model database § Key-value, document, graph § Multiple APIs § DocumentDB, with SQL & JS APIs § MongoDB API § Cassandra API § Table Storage API § Graph Database with Gremlin API § No database schema management Cosmos DB: A Database with Many Faces Azure in Action: Pragmatische Cloud-Lösungen für alle -
38 § Building event-driven architectures with Cosmos DB § Use
as input binding in Functions § Subscribe to collection changes § Can be used as a trigger for Functions Cosmos DB Change Feed Azure in Action: Pragmatische Cloud-Lösungen für alle -
39 Serverless Realtime Azure SignalR Service Azure in Action: Pragmatische
Cloud-Lösungen für alle -
40 § Realtime is a wanted feature nowadays § Apps
that require high frequency updates from the server § Dashboards and monitoring apps § Collaborative apps § Apps that require notifications § “ASP.NET Core SignalR messaging & scale-out”-as-a-Service § Scaling § On-prem with SQL Server, Azure Service Bus, or Redis Cache § Azure SignalR Service: update unit count for your service. Each service unit supports up to 1000 client connections Azure in Action: Pragmatische Cloud-Lösungen für alle Azure SignalR Service -
41 Azure Event Grid Serverless Eventing Azure in Action: Pragmatische
Cloud-Lösungen für alle -
42 § Fully-managed centralized event routing service § Simplifies development
of event-based applications § Simplifies creation of serverless workflows § Manages all routing of events § From any source, to any destination, for any application § Eventing, not enterprise messaging § Supports direct event filtering using event type, prefix or suffix § Your application will only need to receive the events you care about § Same underlying model for different use-cases § System-provided events § Custom application-specific events Event Grid Azure in Action: Pragmatische Cloud-Lösungen für alle -
43 Event Grid Reliability & Performance Azure in Action: Pragmatische
Cloud-Lösungen für alle -
44 Serverless IoT Azure IoT Hub Azure in Action: Pragmatische
Cloud-Lösungen für alle -
45 IoT & the Azure Cloud Azure in Action: Pragmatische
Cloud-Lösungen für alle https://4.bp.blogspot.com/-SQHr_XnFfUM/VBjq1wFkmUI/AAAAAAAAAyE/coSUQ71f1k8/s1600/20140912_231941.jpg -
46 § Bi-directional communication with IoT devices § IoT device
management § Supports MQTT § Lightweight § Publish/Subscribe § Secure § Lots of SDKs available § C § Java § .NET § Node.js § Python Azure in Action: Pragmatische Cloud-Lösungen für alle Azure IoT Hub -
47 Azure Durable Functions Serverless Workflows with code Azure in
Action: Pragmatische Cloud-Lösungen für alle -
48 § Durable Functions let developers abstract away management of
state for complex, stateful orchestrations § In code, not markup § Can be started via orchestration client § Via HTTP addressable state machine § Mental model: “Serverless orchestrations” § Based on Durable Task Framework § Write long running persistent workflows in C# using async/await § https://github.com/Azure/durabletask § Some say “WF done better” Azure Durable Functions Azure in Action: Pragmatische Cloud-Lösungen für alle -
49 § Extension of Azure Functions § Manages state, checkpoints,
and restarts for you § You have to play by the rules § Define stateful workflows in a new type of function called orchestrator function § Advantages of orchestrator functions: § Define workflows in code § Call other functions synchronously and asynchronously § Output from called functions can be saved to local variables § Automatically checkpoint progress whenever the function awaits § Local state is never lost if the process recycles or the underlying VM reboots § Orchestrators can call activity functions, other sub-orchestrations, and wait for an external event Azure Durable Functions Azure in Action: Pragmatische Cloud-Lösungen für alle -
50 Azure in Action: Pragmatische Cloud-Lösungen für alle Azure Durable
Functions - Patterns § Function chaining § Fan-out / fan-in § Async HTTP APIs § Stateful singletons § Human interaction -
51 Azure Logic Apps Serverless Workflows without code Azure in
Action: Pragmatische Cloud-Lösungen für alle -
52 § Basic Idea: bring serverless functionality to non-coders §
Low-code, No-code § No-code: ‘citizen developers’ / business users who can build functional but generally limited apps without having to write a line of code § Low-code: professional developers, streamlining and simplifying their work – delivering enterprise-class applications with little or no hand-coding § Graphical designer for rapid creation § With underlying descriptive model § Azure Logic Apps offer integration and workflow offering in the Cloud § Low-code / no-code § IFTTT for businesses Azure in Action: Pragmatische Cloud-Lösungen für alle Codeless Workflows -
53 § A Logic App workflow § Begins with a
trigger (like 'When an account is added to Office 365') § After trigger many combinations of § Actions § Conversions § Condition logic § Cloud-ready features § Custom retry policy § No need to code any retry, Azure Logic App will handle this § Managed scale § Azure will scale out your workflow runs with the resource it needs Azure in Action: Pragmatische Cloud-Lösungen für alle Azure Logic Apps -
55 • AppFigures • Asana • Azure API Management •
Azure App Services • Azure Automation • Azure Cognitive Face API • Azure Cognitive LUIS • Azure Cognitive Text Analytics • Azure Cognitive Vision • Azure Data Lake Store • Azure Document DB • Azure Event Hub • Azure Functions • Azure Machine Learning • Azure Resource Manager • Azure Service Bus • Azure SQL • Azure Storage Blob • Azure Storage Queues • Basecamp • Bing Search • BitBucket • Bitly • Blogger • Box • Buffer • Campfire • Chatter • Common Data Service • Disqus • DocuSign • Dropbox • Dynamics AX Online • Dynamics CRM Online • Dynamics CRM Service Bus • Dynamics Financials • Dynamics Operations • Easy Redmine • Eventbrite • Facebook • FreshBooks • Freshdesk • GitHub • Gmail • Google Calendar • Google Contacts • Google Drive • Google Sheets • Google Tasks • GoTo Meeting • GoTo Training • GoTo Webinar • Harvest • HelloSign • Infusionsoft • JIRA • Insightly • Instagram • Instapaper • MailChimp • Mandrill • Medium • Microsoft Project Online • Microsoft Translator • MSN Weather • Muhimbi PDF • Office 365 • Office 365 Users • Office 365 Video • OneDrive • OneDrive for Business • OneNote • Outlook.com • Outlook Tasks • PagerDuty • Pinterest • Pipedrive • Pivotal Tracker • Power BI • Project Online • Redmine • Salesforce • Salesforce Chatter • SendGrid • SharePoint Online • Slack • SmartSheet • SparkPost • Stripe • Survey Monkey • Todoist • Toodledo • Trello • Twilio • Twitter • Typeform • UserVoice • VS Team Services • Webmerge • Wordpress • Wunderlist • Yammer • YouTube • Zendesk • HTTP, HTTPS • HTTP Webhook • FTP, SFTP • SMTP • RSS • Compose, Query, Parse JSON • Wait • Terminate • Workflow Protocols/Native • XML Validation • Transform XML (+Mapper) • Flat File Encode • Flat File Decode • X12 • EDIFACT • AS2 • Integration Account Artifact Lookup XML and EDI Hybrid • BizTalk Server • File System • IBM DB2 • Informix • Oracle DB • SharePoint Server • SQL Server • SAP • WebsphereMQ SaaS Logic Apps Connectivity Azure in Action: Pragmatische Cloud-Lösungen für alle -
56 § Processing 100,000 Events Per Second on Azure Functions
§ https://blogs.msdn.microsoft.com/appserviceteam/2017/09/19/processing- 100000-events-per-second-on-azure-functions/ § Azure Functions – Significant Improvements in HTTP Trigger Scaling § https://www.azurefromthetrenches.com/azure-functions-significant- improvements-in-http-trigger-scaling/ § Azure Functions: Cold Starts in Numbers § https://mikhail.io/2018/04/azure-functions-cold-starts-in-numbers/ Azure in Action: Pragmatische Cloud-Lösungen für alle Interesting reading -
57 § OK – you asked for it J §
https://docs.microsoft.com/en-us/azure/architecture/aws- professional/services § Microsofts „Azure & AWS Cloud Service Map“ § https://aka.ms/awsazureguide AWS & Azure Azure in Action: Pragmatische Cloud-Lösungen für alle -
Azure in Action Pragmatische Cloud-Lösungen für alle Christian Weyer @christianweyer
CTO Thorsten Hans @thorstenhans Consultant https://github.com/thinktecture/api-ms-summit-spring-2018-azure-in-action