Provision Data Storage for a Web App in Azure
This IT Pro Challenge hands-on lab shows learners how to create an Azure Storage Account, an Azure SQL database, an Azure Database for MySQL, and an Azure Cosmos DB. Learners will populate the Azure Cosmos DB with sample data, and add an Azure Cognitive Search Service that indexes the Azure Cosmos DB data.
In this IT Pro Challenge, learners will understand how to use the Azure portal to create and configure an Azure Storage Account. Participants will also provision an Azure SQL database, an Azure Database for MySQL, and an Azure Cosmos DB. Learners will populate the Azure Cosmos DB with data and then create an Azure Cognitive Search that indexes that data. As proof of concept, learners will configure a web app to use each of the database resources they created. The skills acquired in this lab are useful for careers as a system administrator.
The scenario for this lab is that you are a system administrator; your company is migrating its primary web app from an on-premise datacenter to Azure. You are tasked with configuring storage for the data used by the web application. To accomplish this, you will create an Azure Storage Account, two relational databases (Azure SQL database and Azure Database for MySQL), an Azure Cosmos DB, add an Azure Cognitive Search Service, and configure the provided web app to use each of the resources that you created.
Create and populate a storage account with blob containers
First, you will log in to the Azure portal and create an Azure Storage Account with two blob containers (public, private). Then you will upload at least one file to each container and create a Shared Access Signature (SAS) token that allows read-access to the private blob container. SAS tokens allow you to grant secure, limited access to the resources in the storage account without using keys.
Provision an Azure SQL database
Next, you will provision an Azure SQL Server with an administrator account and a basic tier database. You will also note and copy the connection string for the database.
Provision an Azure Database for MySQL server
Now you will provision an Azure Database for a MySQL Server. You will also create a server admin user, create a database on the server, and note the connection string. You also need to add a table with an INT column and populate that table with a few rows of data.
__NOTE: __This lab doesn’t dictate the method of provisioning the Azure Database, but the Bash (Linux) Cloud Shell contains the full MySQL Command Line Interface (CLI).
Provision an Azure Cosmos DB database
For this step, you will provide an Azure Cosmos DB account that uses the SQL API, then create a database in the account and a collection in the database. You will be provided some sample files to upload to the collection you just created. This example uses a real estate database, so the sample files all contain property street, city, state, and zip data.
Add a search account
Finally, you will create an Azure Cognitive Search Service, index the Azure Cosmos DB data, and note the access key. You need to set all columns as retrievable and make one of the columns filterable. Azure Cognitive Search Service (formerly known as Azure Search Service) is a cloud-based search service that allows Azure developers to use APIs to query indexes in databases.
Once you complete all of the steps and configurations, it’s time to confirm that you configured the Storage Account correctly. You will use a provided web app to test every configuration that you made.
By taking this lab, you will learn how to create and configure an Azure Storage Account, two relational databases, as well as an Azure Cosmos DB. You will also learn how to use the Azure Cognitive Search Service to index the Azure Cosmos DB.