This directory contains all the scripts and code to track the International Space Station with Azure Digital Twins.
- Populate Graph Structure here
- Grafana Azure Active Directory Authentication here
- Useful Azure Digital Twins Queries
- Add Hololens src into iss-hololens directory with [string replacable parameters] which can be replaced by the powershell.
- Add Option to deploy with IoT Hub ingestion rather than event hub ingestion
-
Azure Subcription
You'll need an Azure subscription to complete this quickstart. If you don't have one already, create one for free now.
-
Azure Command Line Interface
You'll also need to make sure you have the latest Azure cli installed, you can do this here.
You will also need the Azure Powershell Module using the following command
Install-Module -Name Az -AllowClobber -Scope CurrentUser -Force
-
Git Command Line Interface
You will also need to make sure you have git installed, you can do this following instructions here.
-
dotnet SDK
The dotnet 6 SDK is required to run this quickstart. You can install it here.
-
Azure Function Core tools
Azure Function Core tools are also required to run this quickstart. You can install it here.
-
Bicep CLI
On top of this you then need to make sure you have Bicep cli installed by running the following command
az bicep install
-
Powershell
You will also need to make sure you have Powershell installed, you can do this here.
Once you've got your Azure Suscription, and have the azure cli installed, you can start by running the following commands to setup the entire environment.
az login
You'll then need to set the scope of your subscription.
az account set --subscription <your-subscription-id>
Then run the command below to create deploy the entire environment.
./iss-digitaltwins.ps1 <your-subscription-id> <location> <your-digitaltwins-name> <your-aad-login-domain e.g. https://login.microsoft.com>
The above script will prompt you for to allow some changes for Azure Digital Twins Data History.
The script above will do the following
- Create a new Resource Group deploy Azure Resources
- Configure Grafana Dashboards and connect it to the Azure Active Directory and Azure Data Explorer
- Configure Azure Digital Twins Data History
- Deploy All custom code for the applications
- Configure the Hololens App to point at the deployed environment
- Generate Links for the applications
☕ This script takes around 15-20 minutes to run while to run - so you'll want to go boil the kettle.
Once the scripts (steps 1-5) are completed you should have the following architecture deployed in your Azure subscription.
There are four applications which are deployed (automatically above) in order for this to work.
(after running the scripts to deploy the environment you should be able to find the code for the applications here )
Once your bicep is installed, this digital twin explorer should open with the your digital twin.
Navigate to the azure digital twin explorer for the ISS digital twin.
https://explorer.digitaltwins.azure.net?eid=<your-digital-twin-host-name>&query=SELECT%20*%20From%20DigitalTwins
You will see that you have a number of sensor twins already configured (this should be the case if the ISS Telemetry stream is working).
At the moment there's not much graphical context to the sensors. This means the Dashboard called "Mission Control Panels" won't work as there's no Structure for you to browse through.
So let's group the sensors by their discipline (Mission Control Callsigns) by running the following script
./step-7-organize-iss-sensors.ps1 <your-digitaltwins-name> <your-resource-group-name>
☕ This script takes a while to run - so you'll want to go and get another cup of tea or something.
This will create a new twin for each disicpline and add the sensors to those twins and should look something like this.
When you want to remove all the azure resources which this project setup simply run the following script
./step-10-teardown.ps1 <your-resource-group-name> iss.azure
This command will delete everything deployed by the bicep deployment you ran earlier.