Setting up slots or multiple environments for Azur

2020-07-22 16:47发布

问题:

I am working on developing a Microsoft Bot using Azure Bot Service, in that want to set up different environments or slots for QA, Dev, Staging like how we do in azure app services.

In settings I did not find Deployment Slots option but under settings each setting have Slot Setting check box, is that means can we configure slots in Azure Bot Service as well or do I have to create multiple Bot Service resources each one for each environment?

回答1:

You'll want to create separate bots, for each environment (i.e. one for Dev and one for Production).

The process to configure and work with a staging deployment looks generally like this:

  1. Create two bot apps in your subscription, one for the production code and one for staging.
  2. Create a deployment source, if you don't already have one. This example uses GitHub.
  3. For your production function app, complete the above steps in Set up continuous deployment and set the deployment branch to the master branch of your GitHub repo.
  4. Choose deployment branch
  5. Repeat this step for the staging function app, but choose the staging branch instead in your GitHub repo. If your deployment source doesn't support branching, use a different folder.
  6. Make updates to your code in the staging branch or folder, then verify that those changes are reflected in the staging deployment.
  7. After testing, merge changes from the staging branch into the master branch. This will trigger deployment to the production function app. If your deployment source doesn't support branches, overwrite the files in the production folder with the files from the staging folder.