Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Devis Lucato 570645bf2e Simulation seed data (#33)
* Complete seed data, complete all the device models as per specs
* Rename “device type” to “device model”
* Clean JS syntax, check with JS Lint
* Generate device IDs from device model ID, instead of device model Name
* Complete health check endpoint
2017-08-16 12:37:56 -07:00
Devis Lucato abbd305492 Implement device bootstrap scenario and decouple from IoT Hub manager (#30)
* When a new device is created, mark it as a simulated device and 
* When a device connects report some properties like device type, messages schema, and initial location. Use MQTT for twin operations
* Remove dependency on IoT Hub manager and access IoT Hub directly
* Refactor state machine to reduce complexity and reuse code
* Add launch settings for Visual Studio
* Remove env var used for the web service TCP port
* Improve logging of exceptions to avoid log flooding
* Fix messages format, to always use the “_unit” convention
* Bump version to 0.1.4
2017-08-08 18:10:43 -07:00
Devis Lucato 454ffe86ae Allow to inject custom device types (#24)
* Allow to inject custom device models
* Improve parsing of Jint response to support dictionaries and objects
* Sync scripts with template
* Change Truck geolocation format
* Update docker scripts
2017-07-21 12:20:25 -07:00
Devis Lucato 892a55e7e4 Generate telemetry using external scripts (#22)
Use external Javascript functions to generate the telemetry for simulated devices. The path of folder that contain the Javascript files can be configured, so it's possible to mount JS files from anywhere. Files are loaded at runtime. The name of the files is specified in the Device Type JSON files, which are managed in the same way, with a configurable path and loaded at runtime.
Javascript files are interpreted using Jint https://github.com/sebastienros/jint .
Documentation here: https://github.com/Azure/device-simulation-dotnet/wiki/Device-Types
2017-07-11 10:28:55 -07:00
Devis Lucato 360ec08524 Remove Akka and update to new template (#21)
Remove Akka and use .NET Thread Pool to manage multiple threads sending telemetry. The lack of Akka means some extra work that we'll need in order to distribute the simulation over multiple servers. For the time being, we assume that the simulation runs in one instance only. If Akka's move to .NET Core is ready we can move back to Akka, otherwise we need some partitioning logic to distribute the load over multiple machines.

Upgrade the project to the latest template, e.g. scripts and documentations. Minor fixes for cross-platform development (VS2017 and Rider).

Complete the /status endpoint to check if IoT Hub Manager is available. In order to run the simulation, IoT Hub Manager is required. Without this check, it was too difficult to debug whether the service could connect to IoT Hub Manager or not, particularly when using Docker Compose.

Added Docker Compose file, to bootstrap this service and IoT Hub Manager containers. Add script to publish to Docker Hub. Move Docker image version/tag to a version file, so that the version is not hard coded in multiple places.

Fix an issue with the logger using too much memory when serializing exceptions.

Improve handling of exceptions caused by unreachable external dependencies when using the HTTP client.
2017-07-07 13:49:03 -07:00
Devis Lucato 8a4e79cf00 Migrate to .NET Core (#9)
Upgrade source code, project files and scripts to use .NET Core. Mono is not required anymore, and also the Docker image will now use only .NET Core.
The configuration format has changed to be in line with ASP.NET Core configuration providers.
The simulation runner is temporarily disabled, because Akka.NET is not ready for .NET Core, and I'm in the middle of removing Akka from the project as well.
Due to the move from .NET Core, some internal APIs are different, for instance you might notice changes in the web service exception filter, in the Autofac dependency injection setup, in the use of Kestrel as a HTTP server.
Since the microservice is now built and packaged with the `dotnet` command, some paths have changed, and scripts have been updated accordingly. I tested the scripts in Windows and MacOS, hopefully catching all the edge cases. The scripts are now actually simpler, which is a nice and unexpected result of the migration.
2017-06-20 18:52:50 -07:00
Devis Lucato 15c6855f62 Initialize project with files from template 2017-05-25 18:22:07 -07:00
Devis Lucato 33b3e53a15 Install Mono 5.x in the CI environment 2017-04-30 19:54:04 -07:00
Devis Lucato fe70b90f45 Update build script error logic 2017-04-30 19:38:34 -07:00
Devis Lucato da56943aae Initial commit 2017-04-30 19:08:53 -07:00