Microsoft Azure WebJobs

22
MICROSOFT AZURE WEBJOBS Kashif Imran [email protected]

Transcript of Microsoft Azure WebJobs

Page 1: Microsoft Azure WebJobs

MICROSOFT AZURE WEBJOBS

Kashif Imran

[email protected]

Page 2: Microsoft Azure WebJobs

AZURE WEBJOBS

Programs or scripts that run in Azure Website as background tasks

Scenarios Image processing or other CPU-intensive work

Queue processing

RSS aggregation

File maintenance, such as aggregating or cleaning up log files

Running Mode On demand

Continuous

On a schedule

Acceptable File Types .cmd, .bat, .exe, .ps1, .sh, .php, .py, .js

Page 3: Microsoft Azure WebJobs

Demo

On Demand Web Job

Page 4: Microsoft Azure WebJobs

Demo

Continuously Running WebJob

Page 5: Microsoft Azure WebJobs

Demo

Scheduled WebJob

Page 6: Microsoft Azure WebJobs

WEBJOB DEPLOYMENT PROCESS

Deployment copies runtime files to the appropriate folder in the Azure Website App_Data/jobs/continuous for continuous WebJobs

App_Data/jobs/triggered for scheduled and on-demand WebJobs

Set up Azure Scheduler jobs for scheduled WebJobs. (This is not needed for continuous WebJobs.)

http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/

Page 7: Microsoft Azure WebJobs

Demo

Deploy WebJobs using FTP

Page 8: Microsoft Azure WebJobs

WEBJOB PROJECT TEMPLATE IN VISUAL STUDIO

The Microsoft.Web.WebJobs.Publish NuGet package

A webjob-publish-settings.json file that contains deployment and scheduler settings

Page 9: Microsoft Azure WebJobs

Demo

Create and Deploy WebJobFrom Visual Studio

Page 10: Microsoft Azure WebJobs

DEPLOY WEBJOB WITH WEB PROJECT

Link WebJob and Web App Projects

Deploy WebJob along with the Web App

Page 11: Microsoft Azure WebJobs

Demo

WebJob Deployment with Web App

Page 12: Microsoft Azure WebJobs

WEBJOBS SDK

Simplify the task of writing code that works with Azure Storage queues, blobs, and tables, and Service Bus queues.

Not a requirement to develop WebJobs

What is Included in WebJobs SDK NuGet packages

Dashboard (site extension)

Current Version 1.0.0 rc1

Page 13: Microsoft Azure WebJobs

HELLO WORLD WEBJOBS SDK

Page 14: Microsoft Azure WebJobs

CONNECTION STRINGS

Default Connection Strings: AzureWebJobsStorage

AzureWebJobsDashboard

Pass connection string explicitly to the JobHost object.

Page 15: Microsoft Azure WebJobs

Demo

WebJobs using SDK

Page 16: Microsoft Azure WebJobs
Page 17: Microsoft Azure WebJobs
Page 18: Microsoft Azure WebJobs
Page 19: Microsoft Azure WebJobs
Page 20: Microsoft Azure WebJobs
Page 21: Microsoft Azure WebJobs

RESOURCES

http://blogs.msdn.com/b/jmstall/

Page 22: Microsoft Azure WebJobs

QUESTIONS?