Home > other >  How to deploy an Azure Bot
How to deploy an Azure Bot

Time:09-28

I have created a simple Azure Bot from a Typescript template from this tutorial. I have tested it in the Bot Framework Emulator and now want to deploy it to Azure. I am trying to follow the instructions here. I get as far as the step "Deploy via ARM template with existing resource group" (I have already created a Resource Group).

So I am trying to run this command from the command line:

az deployment group create --resource-group "<name-of-resource-group>" --template-file "<path-to-template-with-preexisting-rg.json>" --parameters appId="<app-id-from-previous-step>" appSecret="<password-from-previous-step>" botId="<id or bot-app-service-name>" newWebAppName="<bot-app-service-name>" existingAppServicePlan="<name-of-app-service-plan>" appServicePlanLocation="<region-location-name>" --name "<bot-app-service-name>"

I'm getting an error: az deployment: 'group' is not in the 'az deployment' command group. Sure enough when I look at the help for az deployment, there is no group command. There is a create command, but if I remove group I get into a series of other errors which just seem to lead me down a rabbit hole.

In my desperation, I tried installing the BotFrameworkComposer app (Linux) and to create a project from there. It gives me an error Error calling npm to fetch template. Please ensure that node and npm are installed and available on your system. Full error message: Command failed with ENOENT: npm root -g --prefix. So I tried opening the bot resource that I created in the Azure portal using the "Open in Composer" button and nothing opens. So I copied the link from the button into the browser (as it suggests) but the app doesn't open.

CodePudding user response:

I'm getting an error: az deployment: 'group' is not in the 'az deployment' command group. Sure enough when I look at the help for az deployment, there is no group command.

What version is your AZ CLI?

I am using 2.27.2 and I have it.

C:\>az -v
azure-cli                         2.27.2

core                              2.27.2
telemetry                          1.0.6
C:\>az deployment --help

Group
    az deployment : Manage Azure Resource Manager template deployment at subscription scope.

Subgroups:
    group     : Manage Azure Resource Manager template deployment at resource group.
    mg        : Manage Azure Resource Manager template deployment at management group.
    operation : Manage deployment operations at subscription scope.
    sub       : Manage Azure Resource Manager template deployment at subscription scope.
    tenant    : Manage Azure Resource Manager template deployment at tenant scope.
C:\>az deployment group --help

Group
    az deployment group : Manage Azure Resource Manager template deployment at resource group.

Commands:
    cancel   : Cancel a deployment at resource group.
    create   : Start a deployment at resource group.
    delete   : Delete a deployment at resource group.
    export   : Export the template used for a deployment.
    list     : List deployments at resource group.
    show     : Show a deployment at resource group.
    validate : Validate whether a template is valid at resource group.
    wait     : Place the CLI in a waiting state until a deployment condition is met.
    what-if  : Execute a deployment What-If operation at resource group scope.
  • Related