Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Serverless computing in Azure with .NET

You're reading from  Serverless computing in Azure with .NET

Product type Book
Published in Aug 2017
Publisher Packt
ISBN-13 9781787288393
Pages 468 pages
Edition 1st Edition
Languages

Table of Contents (23) Chapters

Title Page
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Understanding Serverless Architecture 2. Getting Started with the Azure Environment 3. Setting Up the Development Environment 4. Configuring Endpoints, Triggers, Bindings, and Scheduling 5. Integrations and Dependencies 6. Integrating Azure Functions with Cognitive Services API 7. Debugging Your Azure Functions 8. Testing Your Azure Functions 9. Configuring Continuous Delivery 10. Securing Your Application 11. Monitoring Your Application 12. Designing for High Availability, Disaster Recovery, and Scale 13. Designing Cost-Effective Services 14. C# Script-Based Functions 15. Azure Compute On-Demand Options

Chapter 2. Getting Started with the Azure Environment

This chapter will cover the full setup and configuration of the Azure serverless computing environment (Azure Functions) and deploying our first “Hello World” application into it.

The first part of this chapter will cover the basics of getting access to the Microsoft Azure Cloud. If you are already familiar with Microsoft Azure and have access to an Azure account and a subscription, you may choose to skip to Azure serverless computing section.

During the course of this chapter, we will cover the following topics:

  • Learning how to set up a new Azure account and subscription and accessing the Management Portal
  • Understanding the Azure serverless computing environment
  • Deploying an HTTP-triggered Azure Function using the Functions Portal
  • Understanding environment settings and the definition of a function
  • Learning how to clean up Azure resources

As discussed in the previous chapter, serverless computing offers are vendor-specific. While the architectural...

Microsoft Azure Cloud


Azure is a public cloud computing platform powered by Microsoft. Microsoft Azure was first made available to the public in February 2010. Azure data centers are currently available in 40 regions across many countries and are expanding at a rapid rate. Azure offers a variety of IaaS, PaaS, and SaaS products. In addition to native Azure products and services, thousands of third-party products can be hosted on the Azure platform.

In this book, we will focus on a native Azure service called the Azure Functions, which is Microsoft' s primary offer for serverless computing.

The Azure Functions is a Functions as a Service (FaaS) offering. As discussed earlier, in a typical Platform as a Service (PaaS) offering, you are responsible for managing your application and data layers, while the vendor manages the hardware, middleware, OS, servers, and networking. In a FaaS environment, the vendor also manages the application context, and you can focus solely on implementing a particular...

Azure serverless computing


The Azure serverless computing offering is called Azure Functions.

Azure offers a number of other "compute-on-demand" services in which you aren't required to manage servers, such as Azure WebJobs and Azure Batch. These services are not Functions as a Service, and are best suited for background or batch processing. These services will be covered in the Appendix A, Azure Compute On-Demand Options.

Hosting Plan

There are two options for hosting plans for the Azure Functions: the Consumption Plan and the App Service Plan.

With an App Service plan, you host the application on Azure App Service.

In general, App Service is a Platform as a Service offering for hosting web or mobile applications on Azure. If you have a web development background, you can think of App Service as an IIS as a service. When deploying a .Net Web Application (as we will see in Chapter 3, Setting Up the Development Environment, when deploying a results dashboard), you will only need to take care of...

Deploying a function


In this section, we will walk through the step-by-step deployment of our first serverless Azure Function using the Azure Management Portal.

Creating an Azure serverless environment

To create your first Azure Function, navigate to Azure Management Portal at https://portal.azure.com. In the left-hand side pane, navigate to New | Compute | Function App. The parameters in the following screenshot will be explained next:

Let's take a moment to elaborate on the Function App deployment parameters.

The App name parameter

The App name parameter is the DNS prefix that your application will be assigned. Once deployed, your application will be publicly routable via [YourAppName].azurewebsites.net. The name (DNS prefix) needs to be unique within the azurewebsites.net domain.

Note that a custom domain name can be assigned to your application. We will cover the custom domain name configuration in Chapter 10, Securing Your Application.

In Azure serverless computing, HTTP-triggered functions...

Clean up Azure resources


If you have been experimenting with deploying different resources, you may want to delete some of them to keep things organized and to avoid being charged for resources you don' t use. This section will describe the procedure of resource deletion at various levels. Be careful--the delete procedure is irreversible.

Deleting a function

One way to delete a specific function inside the Function App, is to delete it from the function's app Functions list as shown in the following screenshot:

Alternatively, you can also delete by navigating to Functions State | Manage | Delete function:

Deleting the Function App

To delete the entire Function App, go to the application's Overview page and click on the Delete button on the right-hand side, as shown in the following screenshot:

Deleting the resource group

To browse to the entire resource group, navigate to the main portal Dashboard | Resource Groups | [YourResourceGroupName].

You can right-click on the resource group name and select...

Summary


This chapter provided us with a solid introduction to the Azure serverless computing environment and walked us through the deployment of our first Azure Functions application.

In this chapter, we covered the basics of Microsoft Azure cloud and created our first serverless computing environment and a "Hello World" function. We also walked through application settings and environment configuration.

In the next chapter, we will walk through creating an Azure Functions project in Visual Studio and deploying it to our existing Azure environment. We will also set up two other application components: the database and the Web UI to demonstrate a real-world example of serverless computing utilization.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Serverless computing in Azure with .NET
Published in: Aug 2017 Publisher: Packt ISBN-13: 9781787288393
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}