Coming soon I will be authoring a course for Pluralsight titled – “Identify Existing Products, Services and Technologies in Use For Microsoft Azure” . This course targets software developers who are looking to get started with Microsoft Azure services to build modern cloud-enabled solutions and want to further extend their knowledge of those services by learning how to use existing products, services, and technologies offered by Microsoft Azure.
Microsoft Azure is a host for almost any application, but determining how to use it within existing workflows is paramount for success. In this course, Identify Existing Products, Services and Technologies in Use, you will learn how to integrate existing workflows, technologies, and processes with Microsoft Azure.
We explore Microsoft Azure with the following technologies:
Languages, Frameworks, and IDEs –
IntelliJ IDEA
WebStorm
Visual Studio Code
.NET Core
C#
Java
JavaScript
Spring
NodeJS
Docker
Microsoft Azure Products
Azure App Services
Azure Kubernetes
Azure Functions
Azure IoT Hub
Hopefully we can take a developer familiar with the languages, frameworks, and ides available and make have them up and running on Microsoft Azure after this short course.
WordPress charges for each domain attached to a blog. That is a bit much when you consider .net, .org, .whatever domains that are used on top of the .com domain most use. To get the use out of a single domain, a permanent redirect can be used. Since Azure has a fixed price, invariant of how many domains you host there; it can be used for the permanent redirect.
Purchase a domain name and make sure you have access to the DNS registry for your domain provider (such as GoDaddy).
For example, to add DNS entries for contoso.com and http://www.contoso.com, you must be able to configure the DNS settings for the contoso.comroot domain.
To map a custom DNS name to a web app, the web app’s App Service plan must be a paid tier (Shared, Basic, Standard, or Premium). In this step, you make sure that the App Service app is in the supported pricing tier.
Note
App Service Free and Shared (preview) hosting plans are base tiers that run on the same Azure VM as other App Service apps. Some apps may belong to other customers. These tiers are intended to be used only for development and testing purposes.
Sign in to Azure
Open the Azure portal and sign in with your Azure account.
Navigate to the app in the Azure portal
From the left menu, select App Services, and then select the name of the app.
You see the management page of the App Service app.
Check the pricing tier
In the left navigation of the app page, scroll to the Settings section and select Scale up (App Service plan).
The app’s current tier is highlighted by a blue border. Check to make sure that the app is not in the F1 tier. Custom DNS is not supported in the F1tier.
If the App Service plan is not in the F1 tier, close the Scale up page and skip to Map a CNAME record.
Scale up the App Service plan
Select any of the non-free tiers (D1, B1, B2, B3, or any tier in the Production category). For additional options, click See additional options.
Click Apply.
When you see the following notification, the scale operation is complete.
Map your domain
You can use either a CNAME record or an A record to map a custom DNS name to App Service. Follow the respective steps:
Find the page for managing DNS records. Every domain provider has its own DNS records interface, so consult the provider’s documentation. Look for areas of the site labeled Domain Name, DNS, or Name Server Management.
Often, you can find the DNS records page by viewing your account information, and then looking for a link such as My domains. Go to that page and then look for a link that is named something like Zone file, DNS Records, or Advanced configuration.
The following screenshot is an example of a DNS records page:
In the example screenshot, you select Add to create a record. Some providers have different links to add different record types. Again, consult the provider’s documentation.
Note
For certain providers, such as GoDaddy, changes to DNS records don’t become effective until you select a separate Save Changes link.
Create the CNAME record
Add a CNAME record to map a subdomain to the app’s default hostname (<app_name>.azurewebsites.net, where <app_name> is the name of your app).
For the http://www.contoso.com domain example, add a CNAME record that maps the name www to <app_name>.azurewebsites.net.
After you add the CNAME, the DNS records page looks like the following example:
Enable the CNAME record mapping in Azure
In the left navigation of the app page in the Azure portal, select Custom domains.
In the Custom domains page of the app, add the fully qualified custom DNS name (http://www.contoso.com) to the list.
Select the + icon next to Add hostname.
Type the fully qualified domain name that you added a CNAME record for, such as http://www.contoso.com.
Select Validate.
The Add hostname page is shown.
Make sure that Hostname record type is set to CNAME (www.example.com or any subdomain).
Select Add hostname.
It might take some time for the new hostname to be reflected in the app’s Custom domains page. Try refreshing the browser to update the data.
Find the page for managing DNS records. Every domain provider has its own DNS records interface, so consult the provider’s documentation. Look for areas of the site labeled Domain Name, DNS, or Name Server Management.
Often, you can find the DNS records page by viewing your account information, and then looking for a link such as My domains. Go to that page and then look for a link that is named something like Zone file, DNS Records, or Advanced configuration.
The following screenshot is an example of a DNS records page:
In the example screenshot, you select Add to create a record. Some providers have different links to add different record types. Again, consult the provider’s documentation.
Note
For certain providers, such as GoDaddy, changes to DNS records don’t become effective until you select a separate Save Changes link.
Create the A record
To map an A record to an app, App Service requires two DNS records:
An A record to map to the app’s IP address.
A TXT record to map to the app’s default hostname <app_name>.azurewebsites.net. App Service uses this record only at configuration time, to verify that you own the custom domain. After your custom domain is validated and configured in App Service, you can delete this TXT record.
For the contoso.com domain example, create the A and TXT records according to the following table (@ typically represents the root domain).
Find the page for managing DNS records. Every domain provider has its own DNS records interface, so consult the provider’s documentation. Look for areas of the site labeled Domain Name, DNS, or Name Server Management.
Often, you can find the DNS records page by viewing your account information, and then looking for a link such as My domains. Go to that page and then look for a link that is named something like Zone file, DNS Records, or Advanced configuration.
The following screenshot is an example of a DNS records page:
In the example screenshot, you select Add to create a record. Some providers have different links to add different record types. Again, consult the provider’s documentation.
Note
For certain providers, such as GoDaddy, changes to DNS records don’t become effective until you select a separate Save Changes link.
Create the CNAME record
Add a CNAME record to map a wildcard name to the app’s default hostname (<app_name>.azurewebsites.net).
For the *.contoso.com domain example, the CNAME record will map the name * to <app_name>.azurewebsites.net.
When the CNAME is added, the DNS records page looks like the following example:
Enable the CNAME record mapping in the app
You can now add any subdomain that matches the wildcard name to the app (for example, sub1.contoso.com and sub2.contoso.com match *.contoso.com).
In the left navigation of the app page in the Azure portal, select Custom domains.
Select the + icon next to Add hostname.
Type a fully qualified domain name that matches the wildcard domain (for example, sub1.contoso.com), and then select Validate.
The Add hostname button is activated.
Make sure that Hostname record type is set to CNAME record (www.example.com or any subdomain).
Select Add hostname.
It might take some time for the new hostname to be reflected in the app’s Custom domains page. Try refreshing the browser to update the data.
Select the + icon again to add another hostname that matches the wildcard domain. For example, add sub2.contoso.com.
Using the Azure Portal. First Navigate to your Web App, Select Tools -> Kudu -> Go:
How to View, Add, Edit, and Remove files in Azure Web App using Kudu
Finally this post was about how you actually view, edit, add, and remove files from the Web App. Once you have your Kudu service Dashboard open you will see some basic information and links for more complex tasks:
View Current Files
View current files in your application by Clicking on Debug Console -> CMD:
Once you are viewing the folder structure you can get to your application home directory by clicking the site folder:
Edit Files
To edit a file click the pencil icon:
Locate the web.config (or create it) and change the text to the following:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rulename="Redirect old-domain to new-domain"stopProcessing="true">
There was a need to host some javascript in a WordPress page due to how sessionize embeds speaker sessions. Due to WordPress’ limitations on javascript usage, the script could not be used in the page. To bypass this limitation, an Azure website can host the script; and then be used as an iFrame inside the WordPress page. To accomplish this requires the following steps:
Create an Azure Website
Change the page to include the script
Host the script as an iFrame in WordPress page
Create an Azure Website
Azure Web Apps provides a highly scalable, self-patching web hosting service. This quickstart shows how to deploy a basic HTML+CSS site to Azure Web Apps. You’ll complete this quickstart in Cloud Shell, but you can also run these commands locally with Azure CLI.
If you don’t have an Azure subscription, create a free account before you begin.
Open Azure Cloud Shell
Azure Cloud Shell is a free, interactive shell that you can use to run the steps in this article. Common Azure tools are preinstalled and configured in Cloud Shell for you to use with your account. Just select the Copy button to copy the code, paste it in Cloud Shell, and then press Enter to run it. There are a few ways to open Cloud Shell:
Select Try It in the upper-right corner of a code block.
Open Cloud Shell in your browser.
Select the Cloud Shell button on the menu in the upper-right corner of the Azure portal.
Install web app extension for Cloud Shell
To complete this quickstart, you need to add the az web app extension. If the extension is already installed, you should update it to the latest version. To update the web app extension, type az extension update -n webapp.
To install the webapp extension, run the following command:
az extension add -n webapp
When the extension has been installed, the Cloud Shell shows information to the following example:
The installed extension 'webapp' is in preview.
Download the sample
In the Cloud Shell, create a quickstart directory and then change to it.
mkdir quickstart
cd quickstart
Next, run the following command to clone the sample app repository to your quickstart directory.
Make a note of the resourceGroup value. You need it for the clean up resources section.
Browse to the app
In a browser, go to the Azure web app URL: http://<app_name>.azurewebsites.net.
The page is running as an Azure App Service web app.
Congratulations! You’ve deployed your first HTML app to App Service.
Change the page to include the script
In the Cloud Shell, type nano index.html to open the nano text editor. Change the body of the app to include only the javascript tag you need.
Save your changes and exit nano. Use the command ^O to save and ^X to exit.
You’ll now redeploy the app with the same az webapp up command.
az webapp up -n <app_name>
Once deployment has completed, switch back to the browser window that opened in the Browse to the app step, and refresh the page.
Host the script as an iFrame in WordPress page
In your WordPress page, add the following text in square brackets – iframe src=”https://<app_name>.azurewebsites.net/” where app_name is the name of the application you created in Azure.