This plugin enables Azure Functions support within the Serverless Framework.
- Clone gitrepo:
git clone -b dev https://github.com/pragnagopa/boilerplate-azurefunctions.git
. - npm install
- Create a Service Principal User with portal or Azure CLI
- Get tenant ID
- Get Azure subscription ID
- Get application ID. Note this is also referred to as the client id.
- azureSubId: YourAzureSubscriptionID
- azureServicePrincipalTenantId: servicePrincipalTenantId
- azureservicePrincipalClientId: servicePrincipalClientId
- azureServicePrincipalPassword: servicePrincipalPassword
Note: If you created Service Principal User from Portal, servicePrincipalPassword is the authentication key
Open up your serverless.yml
file and update the following information:
service: my-azure-functions-app # Name of the Azure function App you want to create
- Deploy a Service:
Use this when you have made changes to your Functions or you simply want to deploy all changes within your Service at the same time.
serverless deploy
- Deploy the Function:
Use this to quickly upload and overwrite your Azure function, allowing you to develop faster.
serverless deploy function -f httpjs
- Invoke the Function:
Invokes an Azure Function on Azure
serverless invoke --path httpQueryString.json -f httpjs
- Stream the Function Logs:
Open up a separate tab in your console and stream all logs for a specific Function using this command.
serverless logs -f httpjs -t
- Remove the Service:
Removes all Functions and Resources from your Azure subscription.
serverless remove