Deploy App Service in Azure Stack Hub
This article describes how to deploy App Service in Azure Stack Hub.
Apply the 1910 update to your Azure Stack Hub integrated system or deploy the latest Azure Stack Hub Development Kit (ASDK) before you deploy Azure App Service 1.8.
You can give your users the ability to create web and API applications. To let users create these apps, you need to:
- Add the App Service resource provider to your Azure Stack Hub deployment using the steps described in this article.
- After you install the App Service resource provider, you can include it in your offers and plans. Users can then subscribe to get the service and start creating apps.
Before you run the resource provider installer, make sure that you've followed the guidance in Before you get started and have read the release notes which accompany the 1.8 release. Reading this content helps you learn about new functionality, fixes, and any known issues which could affect your deployment.
Run the App Service resource provider installer
Installing the App Service resource provider takes at least an hour. The length of time needed depends on how many role instances you deploy. During the deployment, the installer runs the following tasks:
- Create a blob container in the specified Azure Stack Hub storage account.
- Create a DNS zone and entries for App Service.
- Register the App Service resource provider.
- Register the App Service gallery items.
To deploy App Service resource provider, follow these steps:
Run appservice.exe as an admin from a computer that can access the Azure Stack Hub Admin Azure Resource Management Endpoint.
Select Deploy App Service or upgrade to the latest version.
Review and accept the Microsoft Software License Terms and then select Next.
Review and accept the third-party license terms and then select Next.
Make sure that the App Service cloud configuration information is correct. If you used the default settings during ASDK deployment, you can accept the default values. But, if you customized the options when you deployed the ASDK, or are deploying on an Azure Stack Hub integrated system, you must edit the values in this window to reflect the differences.
For example, if you use the domain suffix mycloud.com, your Azure Stack Hub Tenant Azure Resource Manager endpoint must change to management.<region>.mycloud.com. Review these settings, and then select Next to save the settings.
On the next App Service Installer page you will connect to your Azure Stack Hub:
Select the connection method you wish to use - Credential or Service Principal
- If you're using Azure Active Directory (Azure AD), enter the Azure AD admin account and password that you provided when you deployed Azure Stack Hub. Select Connect.
- If you're using Active Directory Federation Services (AD FS), provide your admin account. For example, email@example.com. Enter your password, and then select Connect.
- The service principal which you use must have Owner rights on the Default Provider Subscription
- Provide the Service Principal ID, Certificate File and Password and select Connect.
In Azure Stack Hub Subscriptions, select the Default Provider Subscription. Azure App Service on Azure Stack Hub must be deployed in the Default Provider Subscription.
In the Azure Stack Hub Locations, select the location that corresponds to the region you're deploying to. For example, select local if you're deploying to the ASDK.
Now you can deploy into an existing virtual network that you configured using these steps, or let the App Service installer create a new virtual network and subnets. To create a VNet, follow these steps:
a. Select Create VNet with default settings, accept the defaults, and then select Next.
b. Alternatively, select Use existing VNet and Subnets. Complete the following actions:
- Select the Resource Group that contains your virtual network.
- Choose the Virtual Network name that you want to deploy to.
- Select the correct Subnet values for each of the required role subnets.
- Select Next.
Enter the info for your file share and then select Next. The address of the file share must use the Fully Qualified Domain Name (FQDN) or the IP address of your File Server. For example, \\appservicefileserver.local.cloudapp.azurestack.external\websites, or \\10.0.0.1\websites. If you're using a file server, which is domain joined, you must provide the full username including domain. For example, myfileserverdomain\FileShareOwner.
The installer tries to test connectivity to the file share before proceeding. But, if you're deploying to an existing virtual network, this connectivity test might fail. You're given a warning and a prompt to continue. If the file share info is correct, continue the deployment.
On the next App Service Installer page, follow these steps:
a. In the Identity Application ID box, enter the GUID for the app you're using for identity (from Azure AD).
b. In the Identity Application certificate file box, enter (or browse to) the location of the certificate file.
c. In the Identity Application certificate password box, enter the password for the certificate. This password is the one that you made note of when you used the script to create the certificates.
d. In the Azure Resource Manager root certificate file box, enter (or browse to) the location of the certificate file.
e. Select Next.
For each of the three certificate file boxes, select Browse and navigate to the appropriate certificate file. You must provide the password for each certificate. These certificates are the ones that you created in the Create required certificates step. Select Next after entering all the information.
Box Certificate file name example App Service default SSL certificate file _.appservice.local.AzureStack.external.pfx App Service API SSL certificate file api.appservice.local.AzureStack.external.pfx App Service Publisher SSL certificate file ftp.appservice.local.AzureStack.external.pfx
If you used a different domain suffix when you created the certificates, your certificate file names don't use local.AzureStack.external. Instead, use your custom domain info.
Enter the SQL Server details for the server instance used to host the App Service resource provider database and then select Next. The installer validates the SQL connection properties.
The App Service installer tries to test connectivity to the SQL Server before proceeding. If you're deploying to an existing virtual network, this connectivity test might fail. You're given a warning and a prompt to continue. If the SQL Server info is correct, continue the deployment.
Review the role instance and SKU options. The defaults populate with the minimum number of instances and the minimum SKU for each role in an ASDK deployment. A summary of vCPU and memory requirements is provided to help plan your deployment. After you make your selections, select Next.
For production deployments, following the guidance in Capacity planning for Azure App Service server roles in Azure Stack Hub.
Role Minimum instances Minimum SKU Notes Controller 1 Standard_A2 - (2 vCPU, 3584 MB) Manages and maintains the health of the App Service cloud. Management 1 Standard_A2 - (2 vCPUs, 3584 MB) Manages the App Service Azure Resource Manager and API endpoints, portal extensions (admin, tenant, Functions portal), and the data service. To support failover, increased the recommended instances to 2. Publisher 1 Standard_A1 - (1 vCPU, 1792 MB) Publishes content via FTP and web deployment. FrontEnd 1 Standard_A1 - (1 vCPU, 1792 MB) Routes requests to App Service apps. Shared Worker 1 Standard_A1 - (1 vCPU, 1792 MB) Hosts web or API apps and Azure Functions apps. You might want to add more instances. As an operator, you can define your offering and choose any SKU tier. The tiers must have a minimum of one vCPU.
Windows Server 2016 Core isn't a supported platform image for use with Azure App Service on Azure Stack Hub. Don't use evaluation images for production deployments.
In the Select Platform Image box, choose your deployment Windows Server 2016 virtual machine (VM) image from the images available in the compute resource provider for the App Service cloud. Select Next.
On the next App Service Installer page, follow these steps:
a. Enter the Worker Role VM admin user name and password.
b. Enter the Other Roles VM admin user name and password.
c. Select Next.
On the App Service Installer summary page, follow these steps:
a. Verify the selections you made. To make changes, use the Previous buttons to visit previous pages.
b. If the configurations are correct, select the check box.
c. To start the deployment, select Next.
On the next App Service Installer page, follow these steps:
a. Track the installation progress. App Service on Azure Stack Hub can take up to 240 minutes to deploy based on the default selections and age of the base Windows 2016 Datacenter image.
b. After the installer successfully finishes, select Exit.
If you've provided the App Service RP with a SQL Always On Instance you must add the appservice_hosting and appservice_metering databases to an availability group and synchronize the databases to prevent any loss of service in the event of a database failover.
If you're deploying to an existing virtual network and using an internal IP address to connect to your file server, you must add an outbound security rule. This rule enables SMB traffic between the worker subnet and the file server. In the administrator portal, go to the WorkersNsg Network Security Group and add an outbound security rule with the following properties:
- Source: Any
- Source port range: *
- Destination: IP addresses
- Destination IP address range: Range of IPs for your file server
- Destination port range: 445
- Protocol: TCP
- Action: Allow
- Priority: 700
- Name: Outbound_Allow_SMB445
Validate the App Service on Azure Stack Hub installation
In the Azure Stack Hub administrator portal, go to Administration - App Service.
In the overview, under status, check to see that the Status displays All roles are ready.
Test drive App Service on Azure Stack Hub
After you deploy and register the App Service resource provider, test it to make sure that users can deploy web and API apps.
You must have a tenant subscription to create apps that use App Service on Azure Stack Hub. The only tasks that a service admin can complete in the administrator portal are related to the resource provider administration of App Service. This includes adding capacity, configuring deployment sources, and adding Worker tiers and SKUs.
To create web, API, and Azure Functions apps, you must use the user portal and have a tenant subscription.
To create a test web app, follow these steps:
In the Azure Stack Hub user portal, select + Create a resource > Web + Mobile > Web App.
Under Web App, enter a name in Web app.
Under Resource Group, select New. Enter a name for the Resource Group.
Select App Service plan/Location > Create New.
Under App Service plan, enter a name for the App Service plan.
Select Pricing tier > Free-Shared or Shared-Shared > Select > OK > Create.
A tile for the new web app appears on the dashboard. Select the tile.
On Web App, select Browse to view the default website for this app.
Deploy a WordPress, DNN, or Django website (optional)
In the Azure Stack Hub user portal, select +, go to the Azure Marketplace, deploy a Django website, and then wait for the deployment to finish. The Django web platform uses a file system-based database. It doesn't require any additional resource providers, such as SQL or MySQL.
If you also deployed a MySQL resource provider, you can deploy a WordPress website from the Marketplace. When you're prompted for database parameters, enter the user name as User1@Server1, with the user name and server name of your choice.
If you also deployed a SQL Server resource provider, you can deploy a DNN website from the Marketplace. When you're prompted for database parameters, choose a database in the computer running SQL Server that's connected to your resource provider.
Prepare for additional admin operations for App Service on Azure Stack Hub: