Skip to content

Files

Latest commit

0867436 · May 31, 2017

History

History
93 lines (66 loc) · 6.54 KB

logic-apps-serverless-get-started-vs.md

File metadata and controls

93 lines (66 loc) · 6.54 KB
title description keywords services author manager editor documentationcenter ms.assetid ms.service ms.workload ms.tgt_pltfrm ms.devlang ms.topic ms.date ms.author
Build a serverless app in Visual Studio | Microsoft Docs
Get started with your first serverless app with this guide on creating, deploying, and managing the app in Visual Studio.
logic-apps
jeffhollan
anneta
d565873c-6b1b-4057-9250-cf81a96180ae
logic-apps
integration
na
na
article
03/30/2017
LADocs; jehollan

Build a serverless app in Visual Studio with Logic Apps and Functions

Serverless tools and capabilities in Azure allow for rapid development and deployment of cloud applications. This document focuses on how to get started in Visual Studio building a serverless application. An overview of serverless in Azure can be found in this article.

Getting everything ready

Here are the prerequisites needed to build a serverless application from Visual Studio:

Getting started with a deployment template

Managing resources in Azure are done within a resource group. A resource group is a logical grouping of resources. Resource groups allow deployment and management of a collection of resources. For a Serverless application in Azure, our resource group contains both Azure Logic Apps, and Azure Functions. By using the Resource Group project within Visual Studio, we are able to develop, manage, and deploy the entire application as a single asset.

Create a Resource Group project in Visual Studio

  1. In Visual Studio, click to add a New Project
  2. In the Cloud category, select to create an Azure Resource Group project
  • If you do not see the category or project listed, be sure you have the Azure SDK installed for Visual Studio
  1. Give the project a name and location, and select Ok to create Visual Studio prompts to select a template. You could select to start from Blank, start with a Logic App or other resource. However, in this case we use an Azure Quickstart Template to get us started with a serverless app.
  2. Select to show templates from Azure Quickstart Selecting Azure Quickstart templates
  3. Select the serverless quickstart template: 101-logic-app-and-function-app and click Ok

The quickstart template creates a deployment template in your resource group project. The template contains a simple Logic App that calls an Azure Functions, and returns the result. If you open the azuredeploy.json file in the Solution Explorer, you can see the resources for the serverless app.

Deploying the serverless application

Before you can open the Logic App visual designer in Visual Studio, there needs to be a pre-deployed Azure Resource Group. This allows the designer to create and use connections to resources and services in the logic app. To get started, we simply need to deploy the solution created.

  1. Right-click the project in Visual Studio, select Deploy, and create a New deployment Selecting new resource deployment
  2. Select a valid Azure subscription and Resource group
  3. Select to Deploy the solution
  4. Enter in the name for the Logic App and the Azure Function App. The Azure Function name does need to be globally unique

The serverless solution deploys into the specified resource group. If you look at the Output in Visual Studio you can see the status of the deployment.

Editing the logic app in Visual Studio

Once the solution has been deployed into any resource group, the visual designer can be used to edit and make changes to the logic app.

  1. Right-click the azuredeploy.json file in the Solution Explorer and select Open With Logic Apps Designer
  2. Select the Resource Group and Location the solution has been deployed to and select OK

The Logic App visual designer should now be visible with Visual Studio. You can continue to add steps, modify the workflow, and save changes. You can also create logic apps from Visual Studio. If you right-click the Resources in the template navigator, you can choose to add a Logic App to the project. Empty logic apps load in the visual designer without a pre-deploy into a resource group.

Managing and viewing run history for a deployed logic app

You can also manage and view the run history for logic apps deployed in Azure. If you open the Cloud Explorer tool in Visual Studio, you can right-click any Logic App and choose to edit, disable, view properties, or view run history. Clicking edit also allows you to download a published logic app into a Visual Studio Resource Group project. This means that even if you started building your logic app in the Azure portal, you can still import it and manage it from Visual Studio.

Developing an Azure Function in Visual Studio

The deployment template deploys any Azure Functions that are contained in the solution for the git repository specified in the azuredeploy.json variables. If you author a function project within the solution, check it into source control (GitHub, Visual Studio Team Services, etc.), and update the repo variable, the template will deploy the Azure Function.

Creating an Azure Function project

If using JavaScript, Python, F#, Bash, Batch, or PowerShell, follow the steps in the Functions CLI to create a project. If developing a function in C#, you can use a C# class library in the current solution for the Azure Function.

Next steps