You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| --name | A unique name that is used to deploy the bot in Azure. It could be the same name as your local bot. DO NOT include spaces in the name. |
81
+
| --name | A unique name that is used to deploy the bot in Azure. It could be the same name as your local bot. DO NOT include spaces or underscores in the name. |
82
82
| --location | Geographic location used to create the bot service resources. For example, `eastus`, `westus`, `westus2`, and so on. |
83
83
| --lang | The language to use to create the bot: `Csharp`, or `Node`; default is `Csharp`. |
84
84
| --resource-group | Name of resource group in which to create the bot. You can configure the default group using `az configure --defaults group=<name>`. |
| --name | A unique name that is used to deploy the bot in Azure. It could be the same name as your local bot. DO NOT include spaces in the name. |
96
+
| --name | A unique name that is used to deploy the bot in Azure. It could be the same name as your local bot. DO NOT include spaces or underscores in the name. |
97
97
| --location | Geographic location used to create the bot service resources. For example, `eastus`, `westus`, `westus2`, and so on. |
98
98
| --lang | The language to use to create the bot: `Csharp`, or `Node`; default is `Csharp`. |
99
99
| --resource-group | Name of resource group in which to create the bot. You can configure the default group using `az configure --defaults group=<name>`. |
In this article, we'll show you how to deploy C# and JavaScript samples that are in the [botbuilder-samples](https://github.com/Microsoft/BotBuilder-Samples)
19
-
repo to Azure.
19
+
repo to Azure.
20
20
21
-
Instructions to deploy sample bots is _different_ from the instructions to [deply a bot that you might create with all the resource
22
-
provisioned in Azure](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-deploy-az-cli?view=azure-bot-service-4.0&tabs=csharp).
21
+
Instructions to deploy sample bots is _different_ from the instructions to [deploy a bot that you might create with all the resources already provisioned in Azure](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-deploy-az-cli?view=azure-bot-service-4.0&tabs=csharp).
23
22
24
-
Note that deploying bots from the [botbuilder-samples](https://github.com/Microsoft/BotBuilder-Samples) repo to Azure will involve paying for
25
-
the services you use. The [billing and cost management](https://docs.microsoft.com/en-us/azure/billing/) article helps you
26
-
understand Azure billing, monitor usage and costs, and manage your account and subscriptions.
23
+
> [!IMPORTANT]
24
+
> Deploying a bot from the [botbuilder-samples](https://github.com/Microsoft/BotBuilder-Samples) repo to Azure will provision Azure services and will involve paying for the services you use.
25
+
> The [billing and cost management](https://docs.microsoft.com/en-us/azure/billing/) article helps you understand Azure billing, monitor usage and costs, and manage your account and subscriptions.
27
26
28
-
It would be useful to read this article before following the steps, so that you fully understand what is involved in deploying a bot.
27
+
It would be useful to read this article once through before following the steps, so that you fully understand what is involved in deploying a bot.
29
28
30
29
## Prerequisites
30
+
31
31
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
- Install the latest version of the [Azure cli tool](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).
34
-
- Install the latest `botservice` extension for the `az` tool.
32
+
- Install [.NET Core SDK](https://dotnet.microsoft.com/download) >=v2.2. Use `dotnet --version` to see what version you have.
33
+
- Install the latest version of the [Azure cli tool](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest). Use `az --version` to see what version you have.
34
+
- Install the latest `botservice` extension for the `az` tool.
35
35
- First, remove the old version using `az extension remove -n botservice` command. Next, use the `az extension add -n botservice` command to install the latest version.
36
36
- Install latest version of the [MSBot](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/MSBot) tool.
37
37
- You'll need [LUIS CLI](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/LUIS#installation) if the the clone operation includes LUIS or Dispatch resources.
38
38
- You'll need [QnA Maker CLI](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/QnAMaker#as-a-cli) if the clone operation includes QnA Maker resources.
- Install and configure [ngrok](https://github.com/Microsoft/BotFramework-Emulator/wiki/Tunneling-%28ngrok%29).
41
-
- Knowledge of [.bot](v4sdk/bot-file-basics.md) file.
41
+
- Knowledge of [.bot](v4sdk/bot-file-basics.md) files.
42
+
43
+
### C\#
44
+
45
+
`msbot clone services` does not upload your code files to Azure, just the DLL and a few other files. You need to compile the sample before running this command.
46
+
47
+
### Service names
48
+
49
+
In addition to deploying your bot, the `msbot clone services` command provisions all associated services to your chosen subscription.
50
+
51
+
If any those name-service combinations already exist in the subscription, the command will generate an error, and you will need to delete your partial deployment before starting again. This includes LUIS applications, QnA Maker knowledge bases, and Dispatch models.
42
52
43
53
## Deploy JavaScript and C# bots using az cli
44
54
@@ -47,82 +57,94 @@ Open a command prompt to log in to the Azure portal.
47
57
```cmd
48
58
az login
49
59
```
50
-
A browser window will open, allowing you to sign in.
51
60
52
-
### Set the subscription
61
+
A browser window will open, allowing you to sign in.
62
+
63
+
### Set the subscription
64
+
53
65
Set the subscription by using the following command:
54
66
55
67
```cmd
56
68
az account set --subscription "<azure-subscription>"
57
-
```
69
+
```
58
70
59
71
If you are not sure which subscription to use for deploying the bot, you can view the list of `subscriptions` for your account by using `az account list` command.
60
72
61
-
Navigate to the bot folder.
62
-
```cmd
73
+
Navigate to the bot folder.
74
+
75
+
```cmd
63
76
cd <local-bot-folder>
64
77
```
65
78
66
-
### Azure subscription account
67
-
Before proceeding, read the instructions that apply to you based on the type of email account you use to log in to Azure.
79
+
### Clone the sample
68
80
69
-
**MSA email account**
81
+
**Azure subscription account**: Before proceeding, read the instructions that apply to you based on the type of email account you use to log in to Azure.
70
82
71
-
If you are using a [MSA](https://en.wikipedia.org/wiki/Microsoft_account) email account, you will need to create the appId and appSecret to use with `msbot clone services` command.
83
+
**Creating services**: The `msbot clone services` command will create Azure services for the bot.
72
84
73
-
- Go to the [Application Registration Portal](https://apps.dev.microsoft.com/). Click on **Add an app** to register your application, create **Application Id**, and **Generate New Password**.
74
-
- Save both application id and the new password you just generated, so you that can use them with `msbot clone services` command.
85
+
1. It lists the services it will create and prompts you to confirm the operation before continuing. If you decline, the command exits without creating any of the services.
86
+
1. It has you authenticate with Azure before proceeding.
87
+
88
+
**LUIS services**: If your bot uses LUIS or Dispatch, you will need to include your LUIS authoring key in the `msbot clone services` command.
89
+
90
+
#### MSA email account
91
+
92
+
If you are using a [MSA](https://en.wikipedia.org/wiki/Microsoft_account) email account, you will need to create the appId and appSecret to use with `msbot clone services` command.
93
+
94
+
- Go to the [Application Registration Portal](https://apps.dev.microsoft.com/). Click on **Add an app** to register your application, create **Application Id**, and **Generate New Password**.
95
+
- Save both application id and the new password you just generated, so you that can use them with `msbot clone services` command.
75
96
- To deploy, use the command that applies to your bot.
If your are using an email account provided to you by your business or school to log in to Azure, you don't need to create the application id and password. To deploy, use the command that applies to your bot.
It is important to note that the deployment process creates a _new .bot file and encrypts it using a secret_. While the bot is being deployed, you'll see the following message in the command-line asking you to save the .bot file secret.
131
+
132
+
It is important to note that the deployment process creates a _new .bot file and encrypts it using a secret_. While the bot is being deployed, you'll see the following message in the command-line asking you to save the .bot file secret.
113
133
114
134
`The secret used to decrypt myAzBot.bot is:`
115
135
`hT6U1SIPQeXlebNgmhHYxcdseXWBZlmIc815PpK0WWA=`
116
136
117
137
`NOTE: This secret is not recoverable and you should save it in a safe place according to best security practices.
118
-
Copy this secret and use it to open the <file.bot> the first time.`
119
-
138
+
Copy this secret and use it to open the <file.bot> the first time.`
139
+
120
140
Save the .bot file secret for later use. The new encrypted .bot file is used in the Azure portal with the botFileSecret. If you need to change the bot file name or secret later on, go to **App Service Settings -> Application Settings** section in the portal. Note that in the appsettings.json or .env file, the bot file name is updated with the latest bot file that was created.
121
141
122
142
### Test your bot
123
-
In the emulator, use production endpoint to test your app. If you want to test it locally, make sure your bot is running on your local machine.
143
+
144
+
In the emulator, use production endpoint to test your app. If you want to test it locally, make sure your bot is running on your local machine.
124
145
125
146
### To update your bot code in Azure
147
+
126
148
DO NOT use `msbot clone services` command to update the bot code in Azure. You must use the `az bot publish` command as shown below:
When you deploy a bot, typically these reources are created in the Azure portal:
163
+
When you deploy a bot, typically these resources are created in the Azure portal:
142
164
143
165
| Resources | Description |
144
166
|----------------|-------------|
@@ -153,5 +175,6 @@ To see documentation on `az bot` commands, see the [reference](https://docs.micr
153
175
If you are unfamiliar with Azure resource group, see this [terminology](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview#terminology) topic.
154
176
155
177
## Next steps
178
+
156
179
> [!div class="nextstepaction"]
157
180
> [Set up continous deployment](bot-service-build-continuous-deployment.md)
Copy file name to clipboardExpand all lines: articles/includes/deployment-note-cli.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,11 @@ It is highly recommended that you use the `verbose` option to help troubleshoot
4
4
5
5
| Arguments | Description |
6
6
|--------------|-------------|
7
-
|`folder`| Location of the `bot.receipe` file. By default the receipe file is created in the `DeploymentsScript/MSBotClone`. DO NOT MODIFY this file.|
7
+
|`folder`| Location of the `bot.recipe` file. By default the recipe file is created in the `DeploymentsScript/MSBotClone`. DO NOT MODIFY this file.|
8
8
|`location`| Geographic location used to create the bot service resources. For example, eastus, westus, westus2 etc.|
9
9
|`proj-file`| For C# bot it is the .csproj file. For JS bot it is the startup project file name (e.g. index.js) of your local bot.|
10
-
|`name`| A unique name that is used to deploy the bot in Azure. It could be the same name as your local bot. DO NOT include spaces in the name.|
10
+
|`name`| A unique name that is used to deploy the bot in Azure. It could be the same name as your local bot. DO NOT include spaces or underscores in the name.|
11
+
|`luisAuthoringKey`| Your authoring key for the appropriate LUIS authoring region for the LUIS resources. |
11
12
12
13
Before Azure resources can be created, you'll be prompted to complete authentication. Follow the instructions that appear on the screen to complete this step.
0 commit comments