We will now setup Dynatrace, Azure, and the workshop environment. You need all of these in place before you are presented with the lab excercises.

What you'll learn in this section

πŸ”· Setup your temporary Azure subscription from the Azure Pass promo code you received from workshop staff.

πŸ”· Automatically provision workshop environment and sample application

To complete this workshop, you will be provided an Azure Pass Promo code. A workshop staff will provide that code to prior or during the day of the workshop.

That Azure Pass Promo code enables you to have a separate Azure subscription setup under a separate account to provision all the resources needed to complete the workshop.

This free Azure subscription will be available to you for the next 5 days or until when the $100 credit is utilized by the Azure resources (whichever comes first).

Tasks to complete this step

  1. To setup your workshop using free Azure Pass subscription, navigate to Microsoft's Azure Pass website
  2. Click on Start. image
  3. Use a personal email address to signin or create a new Microsoft account email. image image
  4. Confirm the email address you want to use for your Azure pass subscription and "promo" code provided to allow for the Azure subscription to be setup. image

For this workshop, we will set-up a free Dynatrace Azure SaaS tenant with an temporary license complete with all the features of our all-in-one performance monitoring platform to monitor Azure resources and complete the workshop exercises.

Tasks to complete this step

  1. Open up browser and go to Azure Portal - https://portal.azure.com/
    • Search for Marketplace from the top search bar
      image
    • Once in the Azure Marketplace, search for Azure Native Dynatrace Service click on tile when the search displays the results. image
    • From the drop-down under plan, select Dynatrace for Azure Trial and click on subscribe image
    • Click on "Create" a new Dynatrace environment image
    • On the create Dynatrace environment screen (Basic's)
      • Select the Azure Pass - Sponsorship subscription
      • create a new resource group called azure-native-dynatrace
      • fill in the resource name as dt-trial
      • The rest of the settings can take the defaults
      • Click on "Review + Create" button image
      • On the next screen click on "Create" button image
      • It will take 3-5 minutes for the deployment to complete. Once the deployment comples successfully, your screen should reflect as below. Click on Go to resource button image

Tasks to complete this step

  1. Navigate to https://portal.azure.com/
  2. Click on the Cloud Shell button image image
    image
  3. Once the storage is created, you should see the Unix bash shell. image
  4. Make a dedicated Azure shell Browser tab by clicking this new tab icon. image
  5. To verify which subscription is configured for the Azure CLI, run this command.
      az account show
    
  1. Within your Azure Cloud Shell window, run this command to download the workshop scripts:
      git clone https://github.com/dt-alliances-workshops/azure-modernization-dt-orders-setup.git
    
  2. To validate all the workshops scripts have download, please run these commands within the Azure Cloud Shell window to display the directories
      cd azure-modernization-dt-orders-setup/
      ls -al
    

In this section, we'll Access the new UI for Grail

Also, we'll setup a access token within your Dynatrace envrionment that will be used by the provisioning script to configure Dynatrace automatically via the API.

Access the new UI with Grail

  1. Open up browser and go to Azure Portal - https://portal.azure.com/
    • Search for Dynatrace azure resource dt-trial from the top search bar
      image
    • Click on Go to Dynatrace Link image
  2. Login to Dynatrace
  3. On the Left menu, you'll notice a banner to access the new UI that was introduced with Grail.
  1. You are now accessing the new UI with Grail. image

Create Dynatrace Access Token

All we wanted to do here, is quickly get a Dynatrace token and save it for use in the Lab setup. To capture the token, follow these steps:

  1. Login into Dynatrace
  2. From the Left menu, click Apps -> Choose the Access Tokens app.image
  3. On the Access token page, click the Generate new token button
  4. On the new token page, Enter a name like azure-workshop
  5. Add Write API Tokens to the scope.
  6. Click on Generate token button on the bottom.
  7. Since this token is only shown once and you will need it in the next labs, copy this value to a local TEXT file before you leave this page. (For example Notepad, Notepad++, Notes.app)image
  8. You will use this token in the next step as you setup the lab resources.

The next steps of this guide will have you gather various information from your Dynatrace environment needed to configure your environment and for the lab exercises.

From your Dynatrace environment, you will capture:

Capture Inputs Script

In the code repo you cloned, there is a simple UNIX shell script that prompts for values and writes them to a file called gen/workshop-credentials.json. Later in the labs, there are a few other simple UNIX shell scripts that will automate the step that reads this file so that you don't need to type or copy-paste these values over and over again during the workshop.

Lets begin..

  1. Run the input credentials Unix script
cd ~/azure-modernization-dt-orders-setup/provision-scripts
./input-credentials.sh
  1. Enter in the approprite values for the three inputs
      ==================================================================
      Please enter your Dynatrace credentials as requested below: 
      Press <enter> to keep the current value
      ===================================================================
      Dynatrace Base URL              (current: ) : 
      Dynatrace Access API Token      (current: ) : 
      Azure Subscription ID           (current: ) : 
      ===================================================================
    
  2. Confirm all of the inputs are correct
    • πŸ““ There are some derived values the script generated based on your input.
  3. Once you confirm, the data is saved off ../gen/workshop-credentials.json and will be used by the provision script in the next step.
  4. Towards the end of the script it will output two things you'll want to save in a notepad session to use in Lab2 later.
      ========================================================================================================
      ***** Please save the values below in a notepad for Lab2 when we install the Dynatrace Operator on AKS Cluster ***** 
      --------------------------------------------------------------------------------------
      Dynatrace Operator & Data Ingest Token  :       dt0c01.ABC123.ABC124
      API URL for Dynatrace Tenant            :       https://dtenvid.live.dynatrace.com/api
      =========================================================================================================
    

This step will automatically provision several Azure resources and Dynatrace configuration needed for the workshop via a shell script.

The process to provision everything will take ~15-20 minutes.

What exactly is this script doing?

1 . Add Azure resources

2 . Set Dynatrace configuration

Tasks to complete this step

  1. Open up Azure Cloud shell open
  2. Copy the command from below and hit enter it into your Azure Cloud shell and hit enter.
      ./provision-workshop.sh grail
    
  3. You should see a prompt similar to as one below.
      ===================================================================
      About to setup Dynatrace Grail Workshop
      Dynatrace Server: https://name.live.dynatrace.com
      SETUP_TYPE   = grail
      ===================================================================
      Proceed? (y/n) : 
    
  4. Enter y at the prompt to begin the provisioning of the workshop. Once the script is complete you should see output as shown below
      =============================================
      Provisioning workshop resources COMPLETE
      End: Thu 25 Nov 2021 12:45:29 PM UTC
      =============================================
    

Tasks to complete this step

  1. Go back to the window where you have the Azure Portal screen open
  2. Search for Resource Groups from the search bar at the top image
  3. Click on Resource Groups. From the list of resource group select dynatrace-azure-grail-modernize.
  4. Once you're within the resource group, you will see all of the different types of resources we've automatically provisioned for this workshop image

Verify AKS Cluster is provisioned

  1. Run this command in Azure Cloud shell to get familiar with the command line options for kubectl.
    kubectl --help
    
  2. Configure kubectl to connect to the new cluster by downloading the cluster credentials.
    az aks get-credentials --resource-group dynatrace-azure-grail-modernize --name dynatrace-azure-grail-cluster    
    
  3. Verify you are connected. You should see dynatrace-azure-grail-cluster as the output.
    kubectl config current-context
    
  4. List the nodes in the cluster
    kubectl get nodes
    
    The output should look like this:
    NAME                                STATUS   ROLES   AGE   VERSION
    aks-nodepool1-74092643-vmss000000   Ready    agent   21h   v1.19.11
    aks-nodepool1-74092643-vmss000001   Ready    agent   21h   v1.19.11
    
    You can see even more detail with this command.
    kubectl describe nodes
    

Optional Verification of AKS Cluster via Azure Portal

image

image

In this section, you should have completed the following:

βœ… Setup your Azure subscription utlizing the Azure Pass Token

βœ… Provisioned a trail Dynatrace Grail tenant through the Azure Marketplace

βœ… Setup the Azure Cloud Shell to run various UNIX commands

βœ… Captured environment and token info needed for workshop provisioning automation scripts

βœ… Provisioned workshop Azure resources