Azure-docs: Usage error when creating web app in app service plan

Created on 17 Jan 2020  Â·  9Comments  Â·  Source: MicrosoftDocs/azure-docs

When creating a Web App in step 2. of "Host the web app in App Service", the az cli command fails and returns a usage error.

az webapp create -n <your web app name> -g <your resource group name> -p <your app service plan name> --deployment-local-git
usage error: --runtime | --deployment-container-image-name | --multicontainer-config-type TYPE --multicontainer-config-file FILE


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author doc-bug iot-husvc triaged

All 9 comments

@Simon-HL Thank you for bringing this to our attention. We will step through this tutorial, identify the root cause and update the document accordingly.

@Simon-HL The issue appears to be that there is an issue with the container or access to the container. Was the following step followed: Download the web app from GitHub:

git clone https://github.com/Azure-Samples/web-apps-node-iot-hub-data-visualization.git
cd web-apps-node-iot-hub-data-visualization

All the following steps in the tutorial are completed in the following directory: web-apps-node-iot-hub-data-visualization

Now, when you go to run the az cli command to create the webapp, my assumption here is that you should be in the same directory where the above was downloaded to:

az webapp create -n <your web app name> -g <your resource group name> -p <your app service plan name> --deployment-local-git

Is this what is occurring in your case or are there additional parameters required, such as:

--runtime
--deployment-container-image-name
--multicontainer-config-type TYPE
--multicontainer-config-file FILE

In looking at az webapp create, it appears that the documentation may need to be updated.

az webapp create --name
--plan
--resource-group
[--deployment-container-image-name]
[--deployment-local-git]
[--deployment-source-branch]
[--deployment-source-url]
[--docker-registry-server-password]
[--docker-registry-server-user]
[--multicontainer-config-file]
[--multicontainer-config-type {COMPOSE, KUBE}]
[--runtime]
[--startup-file]
[--subscription]
[--tags]

@robinsh There is an issue with this tutorial in that Step 2 of the Host the webapp in App Service, the az cli command is expecting some additional parameters:

Step 2:
az webapp create -n <your web app name> -g <your resource group name> -p <your app service plan name> --deployment-local-git

is looking for the following additional parameters:

--runtime
--deployment-container-image-name
--multicontainer-config-type TYPE
--multicontainer-config-file FILE

reassign JimacoMS3

@JimacoMS3 I'm writing that down for future reference!

@Mike-Ubezzi-MSFT @Simon-HL Can you try including the runtime parameter in the command? Specifically "node|10.6"? (or greater) as in the following command:

az webapp create -n <your web app name> -g <your resource group name> -p <your app service plan name> -r "node|10.6" --deployment-local-git

Please let me know if that works.

@Simon-HL Can you update this issue with the result of implementing -r "node|10.6" in step 2 as detailed in the previous comment. This will be helpful.

@Mike-Ubezzi-MSFT @Simon-HL Can you try including the runtime parameter in the command? Specifically "node|10.6"? (or greater) as in the following command:

az webapp create -n <your web app name> -g <your resource group name> -p <your app service plan name> -r "node|10.6" --deployment-local-git

Please let me know if that works.

That worked

@Simon-HL Thanks again for your help on this! FYI a fix to the topic has been merged into our private repo and will go live this afternoon. @Mike-Ubezzi-MSFT FYI.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paulmarshall picture paulmarshall  Â·  3Comments

bdcoder2 picture bdcoder2  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments