05 Climate anomaly detection - gloveboxes/HealthySpacesAnomalyDetection GitHub Wiki
Create climate monitor Azure resources
We need to create the following resources:
- Azure Event Hub that will receive data from Azure IoT Central.
- Azure Stream Analytics Service to process and normalize the data from IoT Central.
- Azure Storage to store the data.
For more information, refer to Create a storage account.
Install the Azure CLI tools
If you haven't installed the Azure CLI tools then follow the How to install the Azure CLI guide to install the Azure CLI on your computer.
Login into your Azure subscription
From a command prompt, run the following command to login to your Azure account.
az login
Generate list of Azure locations
List the Azure Locations to determine the location closest to you.
az account list-locations -o table
Create a resource group
The following command will create a resource group at location westus. Replace this location with your preferred location from the location list. A resource group is an administrative unit that keeps all related services together.
az group create --name ClimateMonitor --location westus
Create an Azure Storage account
Climate data from the Altair emulator will be stored in an Azure Storage Account for analysis.
Create an Azure Storage account environment variable
An Azure Storage Account must have a globally unique name. Append lower case characters to the end of workspacestorage. For example, a unique Azure Storage Account name could be workspacestoragedng.
Create the Azure Storage Account
az storage account create -n workspacestorage<append_unique_letters> -g WorkSpaces --sku Standard_LRS
Get the Azure Storage Account connection string
az storage account show-connection-string -n <REPLACE_WITH_NAME_OF_STORAGE_ACCOUNT_CREATED> -g WorkSpaces
Save the Azure Storage Account connection string somewhere safe as you'll need it when exporting data from IoT Central.
Create an Azure Storage Account Container
az storage container create --name workspaces --account-name workspacestorage<append_unique_letters> --connection-string "REPLACE_WITH_STORAGE_ACCOUNT_CONNECTION_STRING"