Stream data
We are now ready to test our Data Orchestrator instance.
If you already have an Data Orchestrator compliant device, you can configure it and connect it straight away, and it will just work with your new installation - provided you skip SSL checks on the broker's certificate. If you don't, you can use Data Orchestrator's stream-qt5-test to emulate an Data Orchestrator device and generate a datastream. You can do this either on the same machine where you are running Data Orchestrator, or from another machine or device on the same network.
Using a container for stream-qt5-test
Data Orchestrator's stream-qt5-test can be pulled from Docker Hub with:
$ docker pull astarte/astarte-stream-qt5-test:1.0.4
Its most basic invocation (from your astarte repository tree) is:
$ docker run --net="host" -e "DEVICE_ID=$(astartectl utils device-id generate-random)" -e "PAIRING_URL=http://api.astarte.localhost/pairing" -e "REALM=test" -e "PAIRING_JWT=$(astartectl utils gen-jwt pairing -k test_private.pem)" -e "IGNORE_SSL_ERRORS=true" astarte/astarte-stream-qt5-test:1.0.4
This will generate a random datastream from a brand new, random Device ID. You can tweak those parameters to whatever suits you better by having a look at the Dockerfile. You can spawn any number of instances you like, or you can have the same Device ID send longer streams of data by saving the container's persistency through a Docker Volume. If you wish to do so, simply add -v /persistency:<your persistency path> to your docker run invocation.
Refer to stream-qt5-test README for more details on which variables can be passed to the container.
Also, please note that the --net="host" parameter is required to make localhost work. If this is not desirable, you can change PAIRING_URL to an host reachable from within the container network. Obviously, that parameter isn't required if you're running the container on a different machine and PAIRING_URL is pointing to a different URL.