Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a...

59
Louisville .NET Meetup – April 2018 From Zero to Serverless

Transcript of Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a...

Page 1: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Louisville .NET Meetup – April 2018

From Zero to Serverless

Page 2: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Thanks to our Sponsors

Page 3: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Upcoming Meetups

May 17

Does it NEED to be a PWA?

Tara A. Manicsic

June 21

Azure’s Cosmos DB from a Developer’s Perspective

Mike Schlegel

July 19

Develop Couchbase Apps on Microsoft Azure

Matt Groves

Page 4: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Other Groups to Check Out

JSLou

Louisville Tech Ladies

Louisville Tech Leaders

IT Happy Hour

Page 5: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Upcoming Local Events

Louisville Global Azure Bootcamp

April 21

Louisville DevOps Global Bootcamp

June 16

Page 6: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Upcoming Online Events

Microsoft Build (build.microsoft.com)

May 7 – 9

Google I/O (events.google.com/io)

May 8 – 10

Page 7: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Upcoming Regional Events CodeStock – Knoxville, TN

April 20 - 21

Stir Trek – Columbus, OH May 4

Music City Tech – Nashville May 31 – June 2

Pittsburg TechFest 2018 June 2

Beer City Code – Grand Rapids, MI June 22 – 23

That Conference – Wisconsin Dells, WI August 6 – 8

Scenic City Summit 2018 – Chattanooga August 17

CoderCruise 2018 – The Bahamas August 30 – September 3

Page 8: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,
Page 9: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to ServerlessLouisville .NET MeetupApril 19, 2018

Chad Green

Page 10: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Who is Chad Green

• Data & Solutions Architect at ProgressiveHealth• Community Involvement

• Code PaLOUsa Conference Chair• Louisville .NET Meetup Organizer• Louisville Tech Leaders Meetup Co-Organizer• Louisville Tech Ladies Committee Member

• Contact Information• [email protected]• chadgreen.com• ChadGreen• ChadwickEGreen

Page 11: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Our Agenda What is Serverless Computing

Serverless Options

Code Demonstrations

Azure Functions

Page 12: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

What is Serverless ComputingFrom Zero to Serverless

Page 13: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

The evolution of application platforms

13

On-Premises

Which packages should

be on my server?

How do I deploy new

code to my servers?How can I increase

server utilization?

How often should I

patch my servers?

What size of servers

should I buy?

Who has physical

access to my servers?

It takes how long to

provision a new server?

Page 14: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

The evolution of application platforms

14

IaaS What is the right size of servers for my business needs?

How can I increase server utilization?

How many servers do I need?

How can I scale my application?

How do I deploy new code to my server?

Which Operating System should I use?

Who monitors my application?

How often should I patch my servers?

How often should I backup my server?

Which packages should be on my server?

Page 15: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

The evolution of application platforms

15

PaaS What is the right size of servers for my business needs?

How can I increase server utilization?

How many servers do I need?

How can I scale my application?

Page 16: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

The evolution of application platforms

16

Serverless

The platform for next generation applications

Page 17: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

What is Serverless?

17

• Applications that significantly or fully

depend on services (in the cloud) to

manage server-side logic and state

Area #1 Area #2• Application run in stateless compute

containers that are event-triggered,

ephemeral, and fully managed by a 3rd

party

Backend as a Service (BaaS) Functions as a Service (FaaS)

Page 18: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

What is Serverless?

18

Abstraction of Servers Event-Driven/Instant Scale Micro-Billing

Page 19: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Benefits of Serverless

19

Reduced DevOps Faster Time to MarketManage apps not servers

Page 20: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Challenges of Serverless Architecture

20

ComplexityOrganizational

SupportNo Runtime Optimization

Managing a monolithic application as a single unit is

more straightforward than managing a fleet of purpose-

built functions and the dependencies between them.

It’s a non-trivial consideration for some to move to a serverless

paradigm.

By its very nature, you mostly do not have control over the

execution environment for the workload.

Page 21: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Serverless OptionsFrom Zero to Serverless

Page 22: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Serverless Options

22

• Zimki

• Google Cloud Functions

• Amazon Lambda

• IBM Openwhisk

• Auth0 WebTask

Page 23: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Azure Serverless

23

FunctionsExecute your code based

on events you specify

Logic AppsDesign workflows and orchestrate processes

Event GridManage all events that

can trigger code or logic

Storage Security IoT Analytics IntelligenceDatabase

Page 24: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Azure FunctionsFrom Zero to Serverless

Page 25: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Features of Azure Functions

25

• Choice of language

• Pay-per-use pricing model

• Bring your own dependencies

• Integrated security

• Simplified integration

• Flexible development

• Open-source

Batch

Page 26: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

What can you do with Functions

26

• HTTPTrigger

• TimerTriger

• GitHub webhook

• Generic webhook

• CosmosDBTrigger

• BlobTrigger

• QueueTrigger

• EventHubTrigger

• ServiceBusQueueTrigger

• ServiceBusTopicTrigger

Page 27: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

What can you do with Functions

27

Timer-Based ProcessingAzure Service Event Processing

SaaS Event Processing Serverless Web Application Architectures

Serverless Mobile Back EndsReal-Time Stream Processing

Real-Time Bot Messaging

Page 28: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Azure Functions Pricing

28

• Takes care of everything but your code

• Pay only when your functions are running

• Scale out automatically

Consumption Plan App Service Plan• You pretty much take care of everything

• Consider when:

• Existing, underutilized VMs

• Function apps to run continuously

• More CPU or memory options

• Run longer than maximum execution

time

• Require features only available on

App Service plan

• Want to run on Linux

Page 29: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

How the Consumption plan works

29

Page 30: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Azure Functions Pricing

30

• Gigabyte-second (GB-s) – Combination of memory size and execution time

• Executions – Each time a function is executed

Page 31: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Code Demonstrations

Page 32: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Demo 1: Create an Azure Function from the Portal

Page 33: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 1: Create an Azure Function from the Portal

33

Log into the Azure Portal – https://portal.azure.com

Page 34: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 1: Create an Azure Function from the Portal

34

Create a function app

Page 35: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 1: Create an Azure Function from the Portal

35

Create a function app

Page 36: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 1: Create an Azure Function from the Portal

36

Create a function app

Page 37: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 1: Create an Azure Function from the Portal

37

Create an HTTP triggered function

Page 38: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 1: Create an Azure Function from the Portal

38

Test the function

Page 39: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 1: Create an Azure Function from the Portal

39

Test the function

Page 40: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Demo 2: Create an Azure Function Triggered by a Timer

Page 41: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 2: Create an Azure Function Triggered by a Timer

41

Create a timer triggered function

Page 42: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 2: Create an Azure Function Triggered by a Timer

42

Create a timer triggered function

Page 43: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 2: Create an Azure Function Triggered by a Timer

43

Verify execution

Page 44: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 2: Create an Azure Function Triggered by a Timer

44

Update the timer’s schedule

Page 45: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Demo 3: Create an Azure Function from Visual Studio

Page 46: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 3: Create an Azure Function from Visual Studio

46

Install Visual Studio 2017

Page 47: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 3: Create an Azure Function from Visual Studio

47

Include the Azure development workload

Page 48: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 3: Create an Azure Function from Visual Studio

48

Create a function app project

Page 49: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 3: Create an Azure Function from Visual Studio

49

Create a function app project

Page 50: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 3: Create an Azure Function from Visual Studio

50

Create a function app project

Page 51: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 3: Create an Azure Function from Visual Studio

51

Test the function locally

Page 52: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Demo 3: Create an Azure Function from Visual Studio

52

Test the function locally

Page 53: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Best PracticesFrom Zero to Serverless

Page 54: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Best Practices

54

• Functions should do one thing

• Functions should finish as quickly as possible

• Where to get started

• Start small, replace 1 API or background processing item

• Integration is a great place, often it’s a new layer on top of old layers

Page 55: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

SummaryFrom Zero to Serverless

Page 56: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Summary

56

• With Azure Functions, the focus is on the code and not managing the

infrastructure

• Serverless architecture provides the following benefits:

• Reduced time to market

• Lower total cost of ownership

• Pay per execution

Page 57: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

From Zero to Serverless

Azure Serverless Compute Summary

57

• It’s now becoming easier than ever to create small, targeted

microservice/nanoservice architecture using a variety of services

• Azure provides many services that can help you achieve a low-friction, high-

throughput and low-cost solution

• Azure Functions, Logic Apps, Event Grid are just a few in the serverless

architecture family

Page 58: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,

Who is Chad Green

[email protected]

bit.ly/LDN0418

Page 59: Louisville .NET Meetup April 2018 · • Azure provides many services that can help you achieve a low-friction, high- throughput and low-cost solution • Azure Functions, Logic Apps,