You have been contracted to deploy, monitor and manage an online shopping website in Azure for a start-up company called "eShopOnWeb".
After evaluating the requirements, your team has provided you with a set of Azure Bicep templates and scripts that will deploy the "eShopOnWeb" application and its underlying infrastructure resources into Azure. The Azure environment consists of a VNet, subnets, NSG(s), LoadBalancer(s), NAT rules, a SQL Server VM, a Visual Studio VM, a VM scale set, and an AKS cluster.
Upon successful testing, you present your deployment solution to the company's leadership for approval along with Azure CLI, PowerShell, and Azure Cloud Shell options for quick deployment.
They were very excited about how quickly your team was able to create a deployment solution, and give you the green light to proceed.
Your job will be to use Datadog to configure the eShopOnWeb solution to be monitored so you can demonstrate to the company's leadership team that you can effectively manage it.
You will need an Azure Subscription with the Owner role assigned to deploy the eShopOnWeb Azure environment at the subscription scope.
You can complete this entire hack in a web browser using the Azure Portal, Datadog Portal, and Azure Cloud Shell.
However, if you work with Azure and on a regular basis, these are tools you should consider having installed on your local workstation:
- Azure Subscription
- Windows Subsystem for Linux
- Managing Cloud Resources
- Visual Studio Code
- Terraform for Azure
Note Datadog is commonly automated via Terraform. Some of the challenges have you use Terraform to configure Datadog features. Terraform is already included in the Azure Cloud Shell. If you want Terraform to work on your local workstation, you will need to Install Terraform on Windows with Bash.
Your coach will provide you with a Resources.zip
file that contains resource files you will use to complete some of the challenges for this hack.
The Azure Bicep templates and scripts developed by your team to deploy the eShopOnWeb Azure environment are included in this package.
If you have installed all of the tools listed above and plan to work on your local workstation, you should download and unpack the Resources.zip
file there too.
If you plan to use the Azure Cloud Shell, download and unpack this file in your Azure Cloud Shell environment.
# Unpack the zip file
unzip Resources.zip
# Navigate to the "Resources" folder
cd Resources
The rest of the challenges will refer to the relative paths inside the Resources.zip
file where you can find the various resources to complete the challenges.
For this challenge, you will deploy the eShopOnWeb application and its underlying infrastructure resources to Azure using a set of pre-developed Bicep templates. Once the application and its infrastructure are deployed, you will complete the hack's challenges using Datadog to monitor it.
You will find the provided main.bicep
template and its associated script files in the /Challenge-00/
folder of the Resources.zip
file provided to you by your coach.
Navigate to this location in your Azure Cloud Shell or Windows Terminal. You may use either the Azure CLI or the PowerShell Az module to deploy the Bicep template.
-
Log into your Azure Subscription with the Azure CLI:
az login
NOTE: If you are using the Azure Cloud Shell, you can skip this step as the Azure CLI is already logged into your Azure subscription.
-
Deploy the template by running the following Azure CLI command from wherever you have unpacked the
/Challenge-00/
folder:az deployment sub create --name "<deploymentName>" --location "<azure-region>" -f main.bicep --verbose
- We recommend you use your initials for the
<deploymentName>
value. - The
<azure-region>
value must be one of the pre-defined Azure Region names. You can view the list of available region names by running the following command:az account list-locations -o table
- You will be prompted to enter values for the local admin Username and Password for the Azure virtual machines and scale set instances. Enter a username and password that adheres to Azure VM Username Requirements and Azure VM Password Requirements
- NOTE: This deployment will take approximately 20-25 minutes.
- We recommend you use your initials for the
-
Log into your Azure Subscription with the PowerShell:
Connect-AzAccount -Tenant '<Tenant ID>' -Environment 'AzureCloud' -Subscription '<Subscription ID>'
NOTE: If you are using the Azure Cloud Shell, you can skip this step as PowerShell is already logged into your Azure subscription.
-
Deploy the template by running the following PowerShell command from wherever you have unpacked the
/Challenge-00/
folder:New-AzDeployment -Name "<deploymentName>" -Location "<azure-region>" -TemplateUri "main.bicep" -Verbose
- We recommend you use your initials for the
<deploymentName>
value. - The
<azure-region>
value must be one of the pre-defined Azure Region names. You can view the list of available region names by running the following command:az account list-locations -o table
- You will be prompted to enter values for the local admin Username and Password for the Azure virtual machines and scale set instances. Enter a username and password that adheres to Azure VM Username Requirements and Azure VM Password Requirements
- NOTE: This deployment will take approximately 20-25 minutes.
- We recommend you use your initials for the
- Once the deployment has completed, navigate to the Public IP Address resource, pip-wth-monitor-web-d-XX , in the Azure Portal.
- In the Overview blade, copy the DNS name to your clipboard.
- Open a web browser, paste your DNS name in the address bar and press ENTER. Your browser should render the eShopOnWeb site.
In order to use Datadog in Azure you need to have a Datadog account, which is also referred to as an "organization". There are two options for doing this:
- Create a new Datadog organization via the Azure Native Integration for Datadog.
- Link an existing Datadog organization to your Azure subscription.
Things to consider:
- Azure Native Integration for Datadog enables the easy creation of a Datadog account/organization via the Azure Marketplace within the Azure Portal
- Your Azure subscription must be activated with a credit card to use Azure Marketplace offerings
- Billing for Datadog usage is handled via the Azure Marketplace
- Billing for Datadog usage starts immediately after deployment with no option for a free trial
Here's how to do it:
- In the Azure Portal, navigate to the Azure Marketplace and deploy Datadog into your subscription using the
Datadog Pro Pay-As-You-Go
offering. - Create a new Datadog organization when asked to choose between linking to an existing Datadog org or creating a new one.
- Select the existing resource group
XXX-rg-wth-monitor-d-XX
to deploy the Datadog resource.Note The "XXX" in the resource group name will vary based on the Azure region the eShopOnWeb Azure environment has been deployed to.
- Ensure that the Azure resource details show the location as
West US 2
and the Datadog site isUS3
. - You do not need to enable single sign-on through Azure Active Directory for this workshop, but we recommend doing so in a production environment.
- Proceed with the deployment, and once the deployment is finished, click the link Set Password in Datadog.
- Choose a password that you will remember for the duration of this workshop.
- Proceed to log in to Datadog.
- The username/email can be found in the Azure portal, top right.
- Click View account to see the full email address.
- Use the password from the previous step.
TIP: We recommend keeping the Datadog and Azure portals open in separate browser tabs for the duration of this workshop.
Things to consider:
- Account creation and billing is done via the Datadog website.
- You can only link Datadog organizations to Azure that are hosted in Datadog's
US3
site (which is hosted in Azure). - Datadog offers a 14-day free trial when creating an account via their website.
TIP: If you are completing this hack using a personal Azure subscription, we recommend creating a Datadog organization with a 14-day free trial, then linking it to Azure.
Here's how to do it:
- Go to the Datadog website and click the "Free Trial" button on the homepage.
- For the first question, (Where do you want your data housed?), please select "United States (US3)" and fill in the remaining questions on the web form.
- For the remaining integration, use the Azure Portal to link your trial Datadog organization to your Microsoft Azure subscription.
- In the Azure Portal, navigate to the Azure Marketplace and deploy Datadog into your subscription using the
Datadog Pro Pay-As-You-Go
offering. - Follow the Microsoft documentation, QuickStart: Link to existing Datadog Organization, to complete the configuration.
- Verify you have access to the contents of the
Resources.zip
package provided by your Coach. - Verify you can see the website deployed
- Verify the resources contained in architecture diagram below are present in your own Azure subscription.
- Verify that you have deployed Datadog into your Azure lab environment.