1. Provision Infrastructure
๐ฏ Goal: Provision the infrastructure for the workshop.
๐๏ธ Architecture
First, letโs take a closer look at the application weโll be using for this workshop. Itโs a solution comprising two microservices, one written in C# and the other in Java, and a set of Azure resources. The solution allows users to onboard and manage simplistic smart-home devices in this case a temperature sensor. A simulator component will act as the sensor, generate the temperatures each device would measure and sends them to our small device management solution over EventHub.
While this solution is rather oversimple and not really a real-world example, its purpose is to provide you with hands-on experience in instrumenting various services written in different languages. This way, youโll become more comfortable with instrumenting your own solutions. Below, youโll find a diagram outlining our solution and the required resources.
๐ ๏ธ Provisioning
๐ Starting Point: Make sure that you use 00-workshop branch.
We recommend opening the project in VS Code within Dev Container or using GitHub Codespaces.
Before we dive into the workshop, itโs essential to have your Azure resources prepared. Think of this as laying the foundation for our upcoming steps.
To simplify this process for everyone, we have provided Bicep and Bash scripts that can create the entire infrastructure in one go.
Hereโs what you need to do:
-
Create a
.env
in the root of the project and add the following content to it.ENV_RESOURCE_GROUP_NAME= # name of the resource group that will be created in your Azure subscription ENV_LOCATION="westeurope" # Azure region to use for the created infrastructure ENV_PROJECT_NAME= # project name that will be used for all created resources; should contain only lowercase letters or numbers
-
Run the following command in the root of the repository
az login az account set --subscription <name or ID of your subscription> make provision
-
Take a coffee break โ๏ธ
When you return, your resources should be provisioned and ready to go ๐.
๐ Note: If you are interested in how its deployed and all the Bicep scripts, here they all are: /infrastructure
Running the script will provision the following essential resources for your application:
- ๐ AKS (Azure Kubernetes Service): This is where your applications will be hosted.
- ๐๏ธ CosmosDB: This serves as your device registry.
- ๐ KeyVault: A secure place to store your application secrets.
- ๐จ EventHub: For real-time event streaming or in our case used to send and receive device temperature and health data.
- ๐พ Storage Account: This component is essential for the secure storage of EventHub checkpoints.
- ๐ฆ ACR (Azure Container Registry): To store the application container images.
Head to you Azure portal and make sure your resources are indeed provisioned. Fell free to have a small look around, before heading to the next chapter to deploy the solution on your AKS cluster.
Navigation
Previous Section โช โ Return to Main Index ๐ โ Next Section โฉ๏ธ