just some fun with IOT edge
- init git submodules
git submodule update --init --recursive
- Build your solution
iotedgedev solution build
- Now go to the azure portal and create an iot hub
- under the devices section in the iot hub create a new device
- after the device is created, open it in the azure portal and copy the connection string
- Run your solution in the simulator
$env:DEVICE_CONNECTION_STRING=(Read-Host -MaskInput)
iotedgedev simulator setup
iotedgedev simulator start --file ./config/deployment.amd64.json
- with docker cli you can check that everything is up and running
docker ps
Note: for the first start you must provision the database. see database access
You need for the next step your iot hub connection string.
$env:IOTHUB_CONNECTION_STRING=(Read-Host -MaskInput)
iotedgedev iothub monitor
To access the database you can use the following connection string on your development machine.
Server=tcp:localhost,1433;Initial Catalog=master;Persist Security Info=False;Encrypt=True;TrustServerCertificate=True;User Id=sa;Password=ThisIsAStrongPassword1!!11;
This can be used on the left side with the database project after starting the solution. There you will find a SQL script that will setup a database table for you. After this the application is up and running.
Note: Right now grafana needs to setup after every restart of the solution. This will be fixed later.
To access grafanan search in the Ports
section of you VSCode for an exposed port with the label Grafana
. Then you can just open the browser on the vscode generate external port.
After that you can login with admin
as username and password.
A sample query for an Dashboard is the following:
Select [Timestamp], [Temperature], [Type] AS metric From [dbo].[Temperature] ORDER BY [Timestamp] DESC
To start Krafana and influx run:
docker compose -f docker-compose-kafka.yml up -d
To stop run
docker compose -f docker-compose-kafka.yml down -d
To connect to it, use localhost as DNS name.
You can access the broker conainer with docker exec -it broker bash
Use VS Code's Kafka extension to browse brokers or to list and create topics.
You can use the Kafka-CLI inside the broker container to produce messages.
kafka-console-producer --bootstrap-server=localhost:9092 --topic=quickstart
You can access the GUI via localhost:8086