Azure Functions Presentation Feb 1 2017

Download Report

Transcript Azure Functions Presentation Feb 1 2017

Knowing the
formula
SHAREPOINT SOLUTIONS USING SERVERLESS FUNCTIONS
BY: KEN COOPER, Enterprise Architect, Cushman & Wakefield
https://www.linkedin.com/in/kj07208
background


Explosion of the Cloud Ecosystem

Cloud computing has enabled a huge ecosystem of services and providers.

Cloud can/has/will easily enable some of the main pillars of delivering IT services
Software (Services)

Artificial Intelligence

Databases

Workflow

Business Intelligence

Mobile

Infrastructure

Scalability

Business continuity



Business

Fail fast with minimal
collateral damage
High availability

Faster time to market
Reliability

Expanded capabilities
Serverless Functions?

A service that wakes up on events, loads and executes
a block of code then gradual decommission itself.
Listen for
Event
React to
Event
Deprovision
Function
Provision
Function
Serverless Functions

Once the service is provisioned* it will load the code
associated with the service, execute, and return a result
to the caller
Load
Code
Provision
Function
Execute
Code
Return
Result
So why is this cool?

Reason for cool factor:

We are using Azure -> (software, infrastructure & business)

Discoverability

Reusable

Fast development, ramp up time

And we pay (¢) just for execution time !!!!!!
Languages*
DevOps (CD)*
Leveraging Azure Functions with
SharePoint

Formula 0 - (SPO + AzFn = Solution)

Azure Functions can be triggered based on:

Timer

Events

Azure Storage (Blobs, Queues, External File, External Table, Azure
Table Storage, Azure DocumentDB, Azure Moble Table Record,
Bot Framework, etc)

Web (Web Hooks, Web Services, & Rest APIs)
Scenarios of Usage
 Auto
Image Tagger (InstaTag)
 Currency Conversion
Auto Image Tagger = SP + AzFn + AI
“A.I. what is that a picture of?”
Mountain on tatooine
!@#!@#
Mountain
24.2 km
Usage: Auto Image Tagger

Formula –> Image Auto Tagging = SPO + AzFn + AI

Use Case: Tag images with keywords

Goal: Improve the findability images and pictures.

Business Issues and pain points:

To much work tagging/updating attributes

I can’t find anything!

SP is just a big file share 

Tagging is not my job !

 Utilization is down because we have required field on upload
Auto Image Tagger

A.I. to the rescue – Once again thanks to the diverse ecosystem of
hosted and cloud services A.I. platforms are easily accessible.

Formula Components

SP = SharePoint Image Library

AzFn = Azure Function (the new Timer Job)

AI = Azure Cognitive Services
DEMO
Auto Image Tagger

What’s Happening?
SP - Currency Converter
Of course we can do currency
conversion in SharePoint …
There’s a currency field right
????
Over promising Oliver
Usage: Currency Conversion

Formula –> Currency Conversion = SPO + AzFn + Flow

Use Case: Users want to enter their sales in their local currency.
Management wants all numbers reported in USD.

Issues and pain points:

Yes a workflow can be used, but logic becomes difficult

Decouples the dependency on SP workflows

Off load processing from your SP environment to another resource

Custom business rules can be supported in AzFn.

AzFn can be reused by other services

Data is maintained in a Storage table (might be some performance gains)

…
Currency Conversion - Architecture
Currency Conversion – MS Flow

IFTTT/Connector/Workflow service

A plug and play service that connects to MS applications to other
3rd services

WITHOUT CODING (SORT OF)!
MS Flow – Custom APIs
Can reference other services
with Custom APIs
But you need a little swagger!!!
MS Flow – Custom APIs
Custom API form
BTW don’t forget about the
name at the top!!!
MS Flow – Flow Currency
Conversion
Hook into a SharePoint list event
Start flow when list item is
created
DEMO
Azure Functions - Getting Started…

Needed - Azure Subscription

https://azure.microsoft.com/en-us/services/functions/

Free Account (60 days)

https://azure.microsoft.com/en-us/free/

From Azure Portal …
AzFn - Creating One (Deployment)

App Name

Resource Group



Hosting Plan

Consumption

App Service Plan
Location


Try using an existing plan or group by
product/project billing
* Try keeping your resources together
Storage Account

Can use existing storage accounts
AzFn – Create the Function

Can use
premade
function

Choose
language

Or Create
your own
custom
function

Create!
AzFn - IDE

Save / Run

Test

Logs

Keys
AzFn – Keys & Logs
Keys – Authentication
Logs – Debugging & Troubleshooting
AzFn - Integrations

Integrations with Storage accounts, database, other Azure services
AzFn – Management (Light)

Enable/Disable Function

Key Management

Delete Function
AzFn - Monitoring

Run logs and execution details
AzFn – Management (Advanced)

Config Settings

Continous
Integration

Kudu (metrics)

CORS

Authentication
AzFn – API Management

Public out your API

Create a mock web API project in
VS 2015 using Swashbuckle (latest
version)

Generate the json file

Upload the json file here
Need to know - to make life easier

#r to include external libraries

Use ASE to do advanced functionality

Can deploy your own libraries

Use ASE or FTP to deploy files to a bin directory

Might need to create the bin directory
Pricing
Pricing

https://azure.microsoft.com/en-us/pricing/details/functions/

Resource Consumption and Executions

Consumption Plan


Free Monthly grant of 1 Million requests and 400k resource consumption

Functions can use – Customer App Service Plan @ regular plan rates

Note: Storage account is created and charge at regular rates
𝑚𝑜𝑛𝑡ℎ 𝐸𝑥𝑒𝑐𝑢𝑡𝑖𝑜𝑛𝑠


Total requested executions each month for all functions – (first million are
free)
Resource Consumption

Observed resource consumption measured in Gigabyte Seconds

Average Memory size (GB) * Function Exe (s)

Free grant of 400k GBs monthly
Pricing – Resource Consumption
Pricing – Execution Billing
Pricing – Total Consumption
Total Monthly = Monthly Resource Consumption + Monthly Executions Cost
 $41.60

+ $0.20 = $ 41.80
https://azure.microsoft.com/en-us/pricing/calculator/?service=functions
Resources

Introducing Azure Functions


Free Azure Function Account


https://azure.microsoft.com/en-us/free/
Azure Function Pricing Calculator


https://azure.microsoft.com/en-us/blog/introducing-azure-functions/
https://azure.microsoft.com/en-us/pricing/calculator/?service=functions
Subscription for Cognitive Services

https://www.microsoft.com/cognitive-services/en-US/subscriptions