Skip to content

Commit 5df3802

Browse files
authored
Merge pull request #186784 from MicrosoftDocs/master
Merge master to live for 1/29/22 4 p.m.
2 parents 3f795a9 + e9554f1 commit 5df3802

File tree

149 files changed

+1163
-299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1163
-299
lines changed

.openpublishing.publish.config.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,19 @@
788788
"url": "https://github.com/Azure/azure-docs-bicep-samples/",
789789
"branch": "main",
790790
"branch_mapping": {}
791-
}
791+
},
792+
{
793+
"path_to_root": "msdocs-python-flask-webapp-quickstart",
794+
"url": "https://github.com/Azure-Samples/msdocs-python-flask-webapp-quickstart",
795+
"branch": "main",
796+
"branch_mapping": {}
797+
},
798+
{
799+
"path_to_root": "msdocs-python-django-webapp-quickstart",
800+
"url": "https://github.com/Azure-Samples/msdocs-python-django-webapp-quickstart",
801+
"branch": "main",
802+
"branch_mapping": {}
803+
}
792804
],
793805
"branch_target_mapping": {
794806
"live": [
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com) or on a workstation with the [Azure CLI installed](/cli/azure/install-azure-cli).
8+
9+
First, create a resource group to act as a container for all of the Azure resources related to this application.
10+
11+
#### [bash](#tab/terminal-bash)
12+
13+
```azurecli
14+
# Use 'az account list-locations --output table' to list locations
15+
LOCATION='eastus'
16+
RESOURCE_GROUP_NAME='msdocs-python-webapp-quickstart'
17+
18+
az group create \
19+
--location $LOCATION \
20+
--name $RESOURCE_GROUP_NAME
21+
```
22+
23+
#### [PowerShell terminal](#tab/terminal-powershell)
24+
25+
```azurecli
26+
# Use 'az account list-locations --output table' to list locations
27+
$LOCATION='eastus'
28+
$RESOURCE_GROUP_NAME='msdocs-python-webapp-quickstart'
29+
30+
# Create a resource group
31+
az group create `
32+
--location $LOCATION `
33+
--name $RESOURCE_GROUP_NAME
34+
```
35+
36+
---
37+
38+
Next, create an App Service plan using the [az appservice plan create](/cli/azure/appservice/plan#az_appservice_plan_create) command.
39+
40+
* The `--sku` parameter defines the size (CPU, memory) and cost of the app service plan. This example uses the B1 (Basic) service plan, which will incur a small cost in your Azure subscription. For a full list of App Service plans, view the [App Service pricing](https://azure.microsoft.com/pricing/details/app-service/linux/) page.
41+
* The `--is-linux` flag selects the Linux as the host operating system.
42+
43+
#### [bash](#tab/terminal-bash)
44+
45+
```azurecli
46+
APP_SERVICE_PLAN_NAME='msdocs-python-webapp-quickstart'
47+
48+
az appservice plan create \
49+
--name $APP_SERVICE_PLAN_NAME \
50+
--resource-group $RESOURCE_GROUP_NAME \
51+
--sku B1 \
52+
--is-linux
53+
```
54+
55+
#### [PowerShell terminal](#tab/terminal-powershell)
56+
57+
```azurecli
58+
$APP_SERVICE_PLAN_NAME='msdocs-python-webapp-quickstart'
59+
60+
az appservice plan create `
61+
--name $APP_SERVICE_PLAN_NAME `
62+
--resource-group $RESOURCE_GROUP_NAME `
63+
--sku B1 `
64+
--is-linux
65+
```
66+
67+
---
68+
69+
Finally, create the App Service web app using the [az webapp create](/cli/azure/webapp#az_webapp_create) command.
70+
71+
* The *app service name* is used as both the name of the resource in Azure and to form the fully qualified domain name for your app in the form of `https://<app service name>.azurewebsites.com`.
72+
* The runtime specifies what version of Python your app is running. This example uses Python 3.9. To list all available runtimes, use the command `az webapp list-runtimes --linux --output table`.
73+
74+
#### [bash](#tab/terminal-bash)
75+
76+
```azurecli
77+
# Change 123 to any three characters to form a unique name across Azure
78+
APP_SERVICE_NAME='msdocs-python-webapp-quickstart-123'
79+
80+
az webapp create \
81+
--name $APP_SERVICE_NAME \
82+
--runtime 'PYTHON|3.9' \
83+
--plan $APP_SERVICE_PLAN_NAME \
84+
--resource-group $RESOURCE_GROUP_NAME \
85+
--query 'defaultHostName' \
86+
--output table
87+
```
88+
89+
#### [PowerShell terminal](#tab/terminal-powershell)
90+
91+
```azurecli
92+
# Change 123 to any three characters to form a unique name across Azure
93+
$APP_SERVICE_NAME='msdocs-python-webapp-quickstart-123'
94+
95+
az webapp create `
96+
--name $APP_SERVICE_NAME `
97+
--runtime 'PYTHON:3.9' `
98+
--plan $APP_SERVICE_PLAN_NAME `
99+
--resource-group $RESOURCE_GROUP_NAME `
100+
--query 'defaultHostName' `
101+
--output table
102+
```
103+
104+
---
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
In the Azure portal:
8+
9+
1. Enter *app services* in the search bar at the top of the Azure portal.
10+
1. Select the item labeled **App Services** under the under **Services** heading on the menu that appears below the search bar.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
On the **App Services** page, select **+ Create**
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
On the **Create Web App** page, fill out the form as follows.
8+
9+
1. **Resource Group** &rarr; Select **Create new** and use a name of *msdocs-python-webapp-quickstart*.
10+
1. **Name** &rarr; *msdocs-python-webapp-quickstart-XYZ* where XYZ is any three random characters. This name must be unique across Azure.
11+
1. **Runtime stack** &rarr; **Python 3.9**.
12+
1. **Region** &rarr; Any Azure region near you.
13+
1. **App Service Plan** &rarr; Under **Sku and size**, select **Change size** to select a different App Service plan.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
The App Service plan controls how many resources (CPU/memory) are available to your app and the cost of those resources.<br>
8+
<br>
9+
For this example, select **Dev / Test** at the top of the screen and then select the **B1** (Basic) plan. The B1 Basic plan will incur a small charge against your Azure account but is recommended for better performance over the F1 (Free) plan.<br>
10+
<br>
11+
When finished, select **Apply** to apply your changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
On the main **Create Web App** page, select the **Review + create** at the bottom of the screen.<br>
8+
<br>
9+
This will take you to the Review page. Select **Create** to create your App Service.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
Locate the Azure icon in the left-hand toolbar. Select it to bring up the Azure Tools for VS Code extension.<br>
8+
<br>
9+
If you do not see the Azure Tools icon, make sure you have the Azure Tools extension for VS Code installed.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
In the Azure Tools extension for VS Code:
8+
9+
1. Locate the **App Service** section in the Azure Tools extension.
10+
1. Right-click the Azure subscription you want to create your web app in.
11+
1. Select **Create New Web App...** from the context menu.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
author: DavidCBerry13
3+
ms.author: daberry
4+
ms.topic: include
5+
ms.date: 01/29/2022
6+
---
7+
In the dialog box at the top of the screen, enter the name *msdocs-python-webapp-quickstart-XYZ* for this web app, where *XYZ* is any three unique characters.<br>
8+
<br>
9+
When deployed, this name is used in the DNS name of the app in the form `https://<app-name>.azurewebsites.net`.

0 commit comments

Comments
 (0)