Name: serverless-azure-functions
Owner: Serverless
Description: Serverless Azure Functions Plugin ? Add Azure Functions support to the Serverless Framework
Created: 2016-11-21 14:42:21.0
Updated: 2018-05-14 20:32:13.0
Pushed: 2018-05-02 22:36:27.0
Homepage: null
Size: 95
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This plugin enables Azure Functions support within the Serverless Framework.
v1.9.0+
. You can run npm i -g serverless
if you don't already have it.serverless create -t azure-nodejs -p <appName>
cd <appName>
npm install
Deploy your new service to Azure! The first time you do this, you will be asked to authenticate with your Azure account, so the serverless
CLI can manage Functions on your behalf. Simply follow the provided instructions, and the deployment will continue as soon as the authentication process is completed.
erless deploy
Note: Once you've authenticated, a new Azure “service principal” will be created, and used for subsequent deployments. This prevents you from needing to manually login again. See below if you'd prefer to use a custom service principal instead.
Invoke a function, in order to test that it works:
erless invoke -f hello
Stream the output logs for your function:
erless logs -f hello
Make some code changes, deploy
again, view logs, etc. and provide us feedback on how to make the experience even better!
Note: If you're working on a single function, you can use the
serverless deploy function -f <function>
command instead ofserverless deploy
, which will simply deploy the specified function instead of the entire service.
If at any point, you no longer need your service, you can run the following command to remove the Azure Functions that were created, and ensure you don't incur any unexpected charges:
erless remove
The getting started walkthrough illustrates the interactive login experience, which is recommended for most users. However, if you'd prefer to create an Azure “service principal” yourself, you can indicate that this plugin should use its credentials instead, by setting the following environment variables:
Bash
rt azureSubId='<subscriptionId>'
rt azureServicePrincipalTenantId='<tenantId>'
rt azureServicePrincipalClientId='<servicePrincipalName>'
rt azureServicePrincipalPassword='<password>'
Powershell
:azureSubId='<subscriptionId>'
:azureServicePrincipalTenantId='<tenantId>'
:azureServicePrincipalClientId='<servicePrincipalName>'
:azureServicePrincipalPassword='<password>'
Please create issues in this repo for any problems or questions you find. Before sending a PR for any major changes, please create an issue to discuss.
We're still in the process of getting everying running 100%, but please refer to the Serverless contributing guidlines for information on how to contribute and code of conduct.