02 - First Deploy (Dedicated)¶
Provision resources and publish your first Node.js v4 function app to an App Service (Dedicated) plan.
Prerequisites¶
- You completed 01 - Run Locally.
- You are signed in to Azure CLI and have Contributor access.
- You already exported:
$RG,$APP_NAME,$PLAN_NAME,$STORAGE_NAME,$LOCATION(usekoreacentralfor this guide).
What You'll Build¶
- A Linux Node.js Function App on Dedicated B1 with Always On support.
- A first deployment pipeline (
func azure functionapp publish) and endpoint verification. - All 20 functions indexed and serving requests on Dedicated infrastructure.
Network Scenario Choices
This tutorial deploys with public networking (B1 tier). For private networking, upgrade to Standard (S1+):
| Scenario | Description | Guide |
|---|---|---|
| Public Only | No VNet (this tutorial, B1) | Current page |
| Private Egress | VNet + Storage PE (S1+ required) | Private Egress |
| Private Ingress | + Site Private Endpoint (S1+ required) | Private Ingress |
| Fixed Outbound IP | + NAT Gateway (S1+ required) | Fixed Outbound |
Infrastructure Context
Plan: Dedicated (B1) | Network: Public | Always On: ✅
Dedicated deploys on a traditional App Service Plan. Unlike Premium, there are no pre-warmed instances or elastic scaling — you get a fixed compute allocation. Storage uses connection string authentication by default. No content file share is required (WEBSITE_RUN_FROM_PACKAGE=1).
flowchart TD
INET[Internet] -->|HTTPS| FA[Function App\nDedicated B1\nLinux Node.js 20]
subgraph PLAN["App Service Plan\nB1 Basic"]
FA
ALWAYS["Always On ✅"]
end
FA --> ST["Storage Account\nBlob + Queue"]
FA --> AI[Application Insights]
FA -.->|System-Assigned MI| ENTRA[Microsoft Entra ID]
style FA fill:#ff8c00,color:#fff
style PLAN fill:#E3F2FD,stroke:#1976D2
style ST fill:#FFF3E0
style ALWAYS fill:#FFF3E0,stroke:#FF9800 Steps¶
-
Set environment variables for the deployment.
export RG="rg-func-node-ded-demo" export LOCATION="koreacentral" export STORAGE_NAME="stnddedi0410" export PLAN_NAME="plan-ndded-04100022" export APP_NAME="func-ndded-04100022"Command/Parameter Purpose export RG="..."Sets the resource group name for the deployment. export LOCATION="..."Chooses the Azure region for the deployment. export STORAGE_NAME="..."Defines a unique name for the storage account. export PLAN_NAME="..."Sets the name for the App Service (Dedicated) plan. export APP_NAME="..."Defines a globally unique name for the Function App. Globally unique names required
Both
$APP_NAMEand$STORAGE_NAMEmust be globally unique across all Azure subscriptions. If you get a naming conflict, append a random suffix (e.g.,func-ndded-04091234). -
Authenticate and set subscription context.
Command/Parameter Purpose az loginAuthenticates your CLI session with Azure. az account set --subscriptionTargets the specific Azure subscription for resource creation. -
Create resource group.
Command/Parameter Purpose az group createProvisions a new Azure resource group container. --name "$RG"Specifies the resource group name. --location "$LOCATION"Sets the geographical region for the group. Expected output (abridged):
-
Create storage account.
az storage account create \ --name "$STORAGE_NAME" \ --resource-group "$RG" \ --location "$LOCATION" \ --sku "Standard_LRS" \ --kind "StorageV2" \ --allow-blob-public-access falseCommand/Parameter Purpose az storage account createProvisions a new Azure Storage account. --sku "Standard_LRS"Selects locally-redundant storage for cost-efficiency. --kind "StorageV2"Uses the general-purpose v2 storage account type. --allow-blob-public-access falseDisables public access to blobs for better security. Expected output (abridged):
-
Create the App Service Plan (B1, Linux).
Dedicated uses
az appservice plan createUnlike Premium which uses
az functionapp plan create, Dedicated plans useaz appservice plan create. This is because Dedicated plans are standard App Service Plans, not elastic function-specific plans.az appservice plan create \ --name "$PLAN_NAME" \ --resource-group "$RG" \ --location "$LOCATION" \ --sku "B1" \ --is-linuxCommand/Parameter Purpose az appservice plan createProvisions a standard Azure App Service Plan. --sku "B1"Selects the Basic B1 pricing tier. --is-linuxConfigures the plan for Linux-based workers. Expected output (abridged):
-
Create the Function App on the Dedicated plan.
az functionapp create \ --name "$APP_NAME" \ --resource-group "$RG" \ --plan "$PLAN_NAME" \ --storage-account "$STORAGE_NAME" \ --runtime "node" \ --runtime-version "20" \ --functions-version "4" \ --os-type "Linux"Command/Parameter Purpose az functionapp createProvisions the core Function App resource. --plan "$PLAN_NAME"Links the app to the Dedicated App Service Plan. --runtime "node"Selects the Node.js execution environment. --runtime-version "20"Pins the Node.js version to v20. --functions-version "4"Uses version 4 of the Azure Functions runtime host. --os-type "Linux"Deploys the app on a Linux infrastructure. Node.js 20 EOL approaching
Azure CLI warns:
Use node version 24 as 20 will reach end-of-life on 2026-04-30. Consider using--runtime-version 22or later for new projects.Expected output (abridged):
{ "name": "func-ndded-04100022", "state": "Running", "kind": "functionapp,linux", "defaultHostName": "func-ndded-04100022.azurewebsites.net" }Application Insights auto-created
az functionapp createautomatically creates an Application Insights resource with the same name as the function app (e.g.,func-ndded-04100022), not$APP_NAME-ai. TheAPPLICATIONINSIGHTS_CONNECTION_STRINGapp setting is auto-configured.No content file share needed
Unlike Premium and Consumption plans, Dedicated does not require
WEBSITE_CONTENTAZUREFILECONNECTIONSTRINGorWEBSITE_CONTENTSHARE. Deployments useWEBSITE_RUN_FROM_PACKAGE=1(set automatically) which stores the package in blob storage. -
Set required app settings for triggers.
az functionapp config appsettings set \ --name "$APP_NAME" \ --resource-group "$RG" \ --settings \ "EventHubConnection__fullyQualifiedNamespace=placeholder.servicebus.windows.net" \ "QueueStorage=$(az storage account show-connection-string --name $STORAGE_NAME --resource-group $RG --query connectionString --output tsv)"Command/Parameter Purpose az functionapp config appsettings setUpdates the application settings for the Function App. az storage account show-connection-stringRetrieves the connection string for the storage account. --settingsDefines the key-value pairs required by the function triggers. EventHub placeholder required
If your app includes an Event Hub trigger, the function host may fail to start without a valid
EventHubConnectionsetting. Set a placeholder namespace to allow function indexing. -
Publish the app.
Command/Parameter Purpose cd apps/nodejsMoves the terminal into the source code directory. func azure functionapp publishBundles, uploads, and deploys the app source code. Expected output (abridged):
-
Validate deployment.
Command/Parameter Purpose az functionapp function listQueries ARM to retrieve the list of indexed functions. --output tableFormats the function list as a readable text table. Function indexing delay
After the first publish, it may take 30–60 seconds for all functions to appear in the ARM API. If the list is empty, wait and retry.
Expected output (abridged — showing key functions):
Name Language -------------------------------------------- ---------- func-ndded-04100022/helloHttp node func-ndded-04100022/health node func-ndded-04100022/info node func-ndded-04100022/queueProcessor node func-ndded-04100022/blobProcessor node func-ndded-04100022/scheduledCleanup nodeLanguage field
The
Languagecolumn showsnode, notJavascript. This is the actual value returned by the ARM API for Node.js v4 apps. -
Test the deployed endpoints.
Command/Parameter Purpose curl --request GETSends an HTTP GET request to verify the health endpoint. Expected output:
Command/Parameter Purpose curl --request GETSends an HTTP GET request to verify the hello endpoint. Expected output:
Command/Parameter Purpose curl --request GETSends an HTTP GET request to verify the info endpoint. Globally unique names required
Both
$APP_NAMEand$STORAGE_NAMEmust be globally unique across all Azure subscriptions. If you get a naming conflict, append a random suffix (e.g.,func-ndded-04091234). -
Authenticate and set subscription context.
Command/Parameter Purpose az loginAuthenticates your CLI session with Azure. az account set --subscriptionTargets the specific Azure subscription for resource creation. -
Create resource group.
Command/Parameter Purpose az group createProvisions a new Azure resource group container. --name "$RG"Specifies the resource group name. --location "$LOCATION"Sets the geographical region for the group. Expected output (abridged):
-
Create storage account.
az storage account create \ --name "$STORAGE_NAME" \ --resource-group "$RG" \ --location "$LOCATION" \ --sku "Standard_LRS" \ --kind "StorageV2" \ --allow-blob-public-access falseCommand/Parameter Purpose az storage account createProvisions a new Azure Storage account. --name "$STORAGE_NAME"Sets the unique name for the storage account. --resource-group "$RG"Assigns the storage account to the specified resource group. --location "$LOCATION"Places the storage account in the chosen region. --sku "Standard_LRS"Selects locally-redundant storage for cost-efficiency. --kind "StorageV2"Uses the general-purpose v2 storage account type. --allow-blob-public-access falseDisables public access to blobs for better security. Expected output (abridged):
-
Create the App Service Plan (B1, Linux).
Dedicated uses
az appservice plan createUnlike Premium which uses
az functionapp plan create, Dedicated plans useaz appservice plan create. This is because Dedicated plans are standard App Service Plans, not elastic function-specific plans.az appservice plan create \ --name "$PLAN_NAME" \ --resource-group "$RG" \ --location "$LOCATION" \ --sku "B1" \ --is-linuxCommand/Parameter Purpose az appservice plan createProvisions a standard Azure App Service Plan. --name "$PLAN_NAME"Sets the name for the App Service (Dedicated) plan. --resource-group "$RG"Links the plan to the target resource group. --location "$LOCATION"Places the plan in the chosen region. --sku "B1"Selects the Basic B1 pricing tier. --is-linuxConfigures the plan for Linux-based workers. Expected output (abridged):
-
Create the Function App on the Dedicated plan.
az functionapp create \ --name "$APP_NAME" \ --resource-group "$RG" \ --plan "$PLAN_NAME" \ --storage-account "$STORAGE_NAME" \ --runtime "node" \ --runtime-version "20" \ --functions-version "4" \ --os-type "Linux"Command/Parameter Purpose az functionapp createProvisions the core Function App resource. --name "$APP_NAME"Sets the globally unique name for the Function App. --resource-group "$RG"Places the app in the specified resource group. --plan "$PLAN_NAME"Links the app to the Dedicated App Service Plan. --storage-account "$STORAGE_NAME"Connects the app to the specified storage account. --runtime "node"Selects the Node.js execution environment. --runtime-version "20"Pins the Node.js version to v20. --functions-version "4"Uses version 4 of the Azure Functions runtime host. --os-type "Linux"Deploys the app on a Linux infrastructure. Node.js 20 EOL approaching
Azure CLI warns:
Use node version 24 as 20 will reach end-of-life on 2026-04-30. Consider using--runtime-version 22or later for new projects.Expected output (abridged):
{ "name": "func-ndded-04100022", "state": "Running", "kind": "functionapp,linux", "defaultHostName": "func-ndded-04100022.azurewebsites.net" }Application Insights auto-created
az functionapp createautomatically creates an Application Insights resource with the same name as the function app (e.g.,func-ndded-04100022), not$APP_NAME-ai. TheAPPLICATIONINSIGHTS_CONNECTION_STRINGapp setting is auto-configured.No content file share needed
Unlike Premium and Consumption plans, Dedicated does not require
WEBSITE_CONTENTAZUREFILECONNECTIONSTRINGorWEBSITE_CONTENTSHARE. Deployments useWEBSITE_RUN_FROM_PACKAGE=1(set automatically) which stores the package in blob storage. -
Set required app settings for triggers.
az functionapp config appsettings set \ --name "$APP_NAME" \ --resource-group "$RG" \ --settings \ "EventHubConnection__fullyQualifiedNamespace=placeholder.servicebus.windows.net" \ "QueueStorage=$(az storage account show-connection-string --name $STORAGE_NAME --resource-group $RG --query connectionString --output tsv)"Command/Parameter Purpose az functionapp config appsettings setUpdates the application settings for the Function App. --name "$APP_NAME"Targets the specific Function App. --resource-group "$RG"Specifies the resource group containing the app. --settingsDefines the key-value pairs required by the function triggers. az storage account show-connection-stringRetrieves the connection string for the storage account. EventHub placeholder required
If your app includes an Event Hub trigger, the function host may fail to start without a valid
EventHubConnectionsetting. Set a placeholder namespace to allow function indexing. -
Publish the app.
Command/Parameter Purpose cd apps/nodejsMoves the terminal into the source code directory. func azure functionapp publishBundles, uploads, and deploys the app source code. "$APP_NAME"Specifies the target Function App for publication. Expected output (abridged):
-
Validate deployment.
Command/Parameter Purpose az functionapp function listQueries ARM to retrieve the list of indexed functions. --name "$APP_NAME"Targets the specific Function App. --resource-group "$RG"Specifies the resource group containing the app. --output tableFormats the function list as a readable text table. Function indexing delay
After the first publish, it may take 30–60 seconds for all functions to appear in the ARM API. If the list is empty, wait and retry.
Expected output (abridged — showing key functions):
Name Language -------------------------------------------- ---------- func-ndded-04100022/helloHttp node func-ndded-04100022/health node func-ndded-04100022/info node func-ndded-04100022/queueProcessor node func-ndded-04100022/blobProcessor node func-ndded-04100022/scheduledCleanup nodeLanguage field
The
Languagecolumn showsnode, notJavascript. This is the actual value returned by the ARM API for Node.js v4 apps. -
Test the deployed endpoints.
Command/Parameter Purpose curl --request GETSends an HTTP GET request to verify the health endpoint. "https://..."Specifies the URL of the deployed function endpoint. Expected output:
Command/Parameter Purpose curl --request GETSends an HTTP GET request to verify the hello endpoint. "https://..."Targets the specific hello API endpoint with a parameter. Expected output:
Command/Parameter Purpose curl --request GETSends an HTTP GET request to verify the info endpoint. "https://..."Targets the info API endpoint for environment details. Expected output:
Verification¶
The output confirms that Azure indexed your function definitions and the app serves requests. Verify:
az functionapp function listshows functions with languagenodecurlto the health endpoint returns200 OKwith{"status":"healthy",...}curlto/api/hello/Dedicatedreturns{"message":"Hello, Dedicated"}
See Also¶
- Tutorial Overview & Plan Chooser
- Node.js Language Guide
- Platform: Hosting Plans
- Operations: Deployment
- Recipes Index