This template deploys:
- An Azure Functions App (Consumption/on-demand plan) with:
- A supporting storage account (for WebJob storage and your own queues)
- An Application Insights account
- A Redis instance (C0) for managing live state
- A simple bot that echoes back replies
Unlike typical Azure templates, this one is completely CLI centric, so there are no "click to deploy" links (sorry Windows folk!)
Grab bash
, check out the Makefile
and you'll be all set.
- Deploy Azure Function environment
- Deploy Storage Account for queues (already part of webjob requirements)
- Configure Azure Function deployment settings
- Deploy Redis
- Retrieve/Set AppService local Git credentials and deployment remote programmatically
- Simple static server inside Functions app
- Simple bot back-end
- Simple web front-end for anonymous chats
- Bot registration
- Provision default queues and tables
- User identity management
- State machine
- Deploy Cognitive Services Account
- Enable deployment slots
If you don't have anything installed, this is what you need to do (generic instructions for Debian-based systems - may require sudo
or tweaking your $PATH
):
apt install nodejs npm python-pip
pip install -U azure-cli
az login
az account list # check available accounts
az account set -s <UUID> # set working account
# edit the Makefile defaults for a new site
make params
make deploy
make setup-scm
The following steps require a Microsoft Live ID account (which is typically not how you log in to the Azure Portal in a corporate environment).
- Using your Azure credentials, log in to the Azure Portal and navigate to the function app
- Get the function URL for the
/bot
Azure Function (including key) - Login to https://dev.botframework.com with your Live ID, register a new bot
- Paste the function URL in the
Messaging Endpoint
field - Click on the
Create Microsoft App ID and password
button to go toapps.dev.microsoft.com
, log in with your Live ID and generate a new App ID and password - Save those somewhere safe (like an
.env
file in the project root, which is not visible togit
) - (Optionally) retrieve the Application Insights instrumentation key from the
Application Settings
tab in the Azure Functions instance - Go to the Azure Portal and set the
MICROSOFT_APP_ID
andMICROSOFT_APP_PASSWORD
environment variables in theApplication Settings
tab