Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit ed1138e

Browse files
authored
docs: Update README and CONFIG docs (#464)
1 parent e1a4988 commit ed1138e

File tree

2 files changed

+53
-15
lines changed

2 files changed

+53
-15
lines changed

README.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22

33
This plugin enables Azure Functions support within the Serverless Framework.
44

5-
[![Code Coverage](https://codecov.io/gh/serverless/serverless-azure-functions/branch/dev/graph/badge.svg)](https://codecov.io/gh/serverless/serverless-azure-functions) [![Node Integration Tests](https://github.com/serverless/serverless-azure-functions/workflows/Node%20Integration%20Tests/badge.svg)](https://github.com/serverless/serverless-azure-functions/actions?query=workflow%3A%22Node+Integration+Tests%22) [![Python Integration Tests](https://github.com/serverless/serverless-azure-functions/workflows/Python%20Integration%20Tests/badge.svg)](https://github.com/serverless/serverless-azure-functions/actions?query=workflow%3A%22Python+Integration+Tests%22) [![.NET Integration Tests](https://github.com/serverless/serverless-azure-functions/workflows/.NET%20Integration%20Tests/badge.svg)](https://github.com/serverless/serverless-azure-functions/actions?query=workflow%3A%22.NET+Integration+Tests%22)
5+
[![Build Status](https://dev.azure.com/serverless-inc/serverless-azure-functions/_apis/build/status/Publish%20Release?branchName=master)](https://dev.azure.com/serverless-inc/serverless-azure-functions/_build/latest?definitionId=13&branchName=master) [![Code Coverage](https://codecov.io/gh/serverless/serverless-azure-functions/branch/dev/graph/badge.svg)](https://codecov.io/gh/serverless/serverless-azure-functions) [![npm version](https://badge.fury.io/js/serverless-azure-functions.svg)](https://www.npmjs.com/package/serverless-azure-functions) [![Node Integration Tests](https://github.com/serverless/serverless-azure-functions/workflows/Node%20Integration%20Tests/badge.svg)](https://github.com/serverless/serverless-azure-functions/actions?query=workflow%3A%22Node+Integration+Tests%22) [![Python Integration Tests](https://github.com/serverless/serverless-azure-functions/workflows/Python%20Integration%20Tests/badge.svg)](https://github.com/serverless/serverless-azure-functions/actions?query=workflow%3A%22Python+Integration+Tests%22) [![.NET Integration Tests](https://github.com/serverless/serverless-azure-functions/workflows/.NET%20Integration%20Tests/badge.svg)](https://github.com/serverless/serverless-azure-functions/actions?query=workflow%3A%22.NET+Integration+Tests%22)
66

77
## Quickstart
88

99
### Pre-requisites
1010

11-
1. Node.js 8.x or 10.x *(this is the runtime version supported by Azure Functions)*
11+
1. Node.js 8.x or above
1212
2. Serverless CLI `v1.9.0+`. You can run `npm i -g serverless` if you don't already have it.
1313
3. An Azure account. If you don't already have one, you can sign up for a [free trial](https://azure.microsoft.com/en-us/free/) that includes $200 of free credit.
1414

1515
### Create a new Azure Function App
1616

1717
```bash
1818
# Create Azure Function App from template
19+
# Templates include: azure-nodejs, azure-python, azure-dotnet
1920
$ sls create -t azure-nodejs -p <appName>
2021
# Move into project directory
2122
$ cd <appName>
@@ -27,13 +28,7 @@ The `serverless.yml` file contains the configuration for your service. For more
2728

2829
### Running Function App Locally (`offline` plugin)
2930

30-
In order to run a Azure Function App locally, the `azure-functions-core-tools` package needs to be installed from NPM. Since it is only used for local development, we did not include it in the `devDependencies` of `package.json`. To install globally, run:
31-
32-
```bash
33-
$ npm i azure-functions-core-tools -g
34-
```
35-
36-
Then, at the root of your project directory, run:
31+
At the root of your project directory, run:
3732

3833
```bash
3934
# Builds necessary function bindings files and starts the function app
@@ -44,16 +39,16 @@ The `offline` process will generate a directory for each of your functions, whic
4439

4540
After the necessary files are generated, it will start the function app from within the same shell. For HTTP functions, the local URLs will be displayed in the console when the function app is initialized.
4641

47-
To simply start the function app *without* building the files, run:
42+
To build the files *without* spawning the process to start the function app, run:
4843

4944
```bash
50-
$ sls offline start
45+
$ sls offline build
5146
```
5247

53-
To build the files *without* spawning the process to start the function app, run:
48+
To simply start the function app *without* building the files, run:
5449

5550
```bash
56-
$ sls offline build
51+
$ sls offline start
5752
```
5853

5954
To clean up files generated from the build, run:
@@ -325,10 +320,14 @@ We run our integration tests twice per day from our GitHub workflow. These tests
325320
- Python 3.6 (Linux only) using premium functions
326321
- Python 3.7 (Linux only)
327322
- Python 3.8 (Linux only)
323+
- .NET Core 2.2 on Linux
324+
- .NET Core 2.2 on Windows
325+
- .NET Core 3.1 on Linux
326+
- .NET Core 3.1 on Windows
328327
329328
We made these configurations as minimal as possible. If you are having problems with your project, feel free to check to see if our integration tests are passing (see badge at top of readme) and then double check our configuration inside the `integrationTests` directory.
330329
331-
We use [Clover](https://www.npmjs.com/package/clvr) to run the integration tests, and they run 2x per day in our GitHub Action.
330+
We use [Clover](https://www.npmjs.com/package/clvr) to run the integration tests, and they run 2x per day in our GitHub Action, split out by runtime language.
332331
333332
#### Signing commits
334333

docs/CONFIG.md

+40-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,52 @@ This document serves as a basic outline for configuring your Azure Function App
1616
- `python3.6` (forced to use `linux`)
1717
- `python3.7` (forced to use `linux`)
1818
- `python3.8` (forced to use `linux`)
19+
- `dotnet2.2`
20+
- `dotnet3.1`
1921
- `provider.region` - [Azure region](https://azure.microsoft.com/en-us/global-infrastructure/regions/) for resources
2022
- `provider.prefix` - Prefix used in naming convention for resources. Default `sls`
2123
- `provider.subscriptionId` - Subscription ID to be used in deployment. Can also be set via:
2224
- Command-line argument (`--subscriptionId {SUB_ID}`)
2325
- Environment variable (`AZURE_SUBSCRIPTION_ID`)
2426
- `provider.stage` - Stage for resources. Default `dev`
25-
<!-- TODO - provider.type -->
27+
- `provider.type` - Type of Azure Function app
28+
- `consumption` (default)
29+
- `premium`
30+
- `ase`
31+
- `provider.subscriptionId` - Azure subscription ID. Can also be specified by environment variable (`AZURE_SUBSCRIPTION_ID`) or command-line args (`--subscriptionId`)
32+
- `provider.tenantId` - Azure subscription ID. Can also be specified by environment variable (`AZURE_TENANT_ID`) or command-line args (`--tenantId`)
33+
- `provider.appId` - Azure subscription ID. Can also be specified by environment variable (`AZURE_CLIENT_ID`) or command-line args (`--appId`)
34+
- `provider.tags` - Tags to apply to resource group
35+
```yaml
36+
provider:
37+
tags:
38+
tagName: tagValue
39+
```
40+
- `provider.deployment` - Deployment configuration
41+
- `provider.deployment.external` - Publishes function app by uploading to blob storage and executes a sync triggers command
42+
- `provider.deployment.rollback` - Enables the rollback scenario by timestamping deployments and artifacts. (Default true)
43+
- `provider.deployment.container` - Optional specification of container name for zipped code artifacts
44+
- `provider.{resource}.name` - Specify name of resource for the Azure resource types
45+
- `provider.{resource}.sku.name` - Specify name of the sku for the Azure resource types
46+
- `provider.{resource}.sku.tier` - Specify tier of the sku for the Azure resource types
47+
- Azure resource types 👆
48+
- `functionApp`
49+
- `appInsights`
50+
- `appServicePlan`
51+
- `storageAccount`
52+
- `hostingEnvironment`
53+
- `virtualNetwork`
54+
- `keyVaultConfig` (can only specify `name` or `resourceGroup`)
55+
- `provider.deploymentName` - Specification of deployment name
56+
- `provider.armTemplate` - Specification of ARM template to use
57+
```yaml
58+
provider:
59+
armTemplate:
60+
file: "pathToArmTemplate.json"
61+
parameters:
62+
param1: value1
63+
param2: value2
64+
```
2665
- `provider.environment` - Key value pairs to set as app settings (environment variables) within function app. Example:
2766
```yaml
2867
provider:

0 commit comments

Comments
 (0)