Azure-Samples / Iot-Telemetry-Simulator

The IoT Telemetry Simulator allows you to test Azure IoT Hub or Eventhub ingestion at scale. The implementation is communicating with Azure IoT Hub using multiplexed AMQP connections. An automation library allows you to run it as load test as part of a CI/CD pipeline.
MIT License
67 stars 49 forks source link

Feature Request: Multi platform build for docker images #48

Open aguywithcode opened 1 year ago

aguywithcode commented 1 year ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Running the docker image on Arm64 Architecture (e.g. M1 Mac) does not work

docker run --platform linux/amd64 -it -e "IotHubConnectionString='HostName=HQ-Dev-IoT-Hub.azure-devices.net;SharedAccessKeyName=device;SharedAccessKey=85o1yfMXqxigSMC4nO0OVts0ZerAk2tvqEVUu+gu038='" mcr.microsoft.com/oss/azure-samples/azureiot-telemetrysimulator

Any log messages given by the failure

Unhandled exception. System.IO.IOException: Function not implemented at System.IO.FileSystemWatcher.StartRaisingEvents() at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed() at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value) at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher() at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter) at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter) at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b1_0() at Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration1..ctor(Func1 changeTokenProducer, Action1 changeTokenConsumer, TState state) at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func1 changeTokenProducer, Action changeTokenConsumer) at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source) at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider..ctor(JsonConfigurationSource source) at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder) at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at IotTelemetrySimulator.Program.<>c.b__1_0(IConfigurationBuilder builder) in /src/src/IotTelemetrySimulator/Program.cs:line 23 at Microsoft.Extensions.Hosting.HostingHostBuilderExtensions.<>cDisplayClass6_0.b__0(HostBuilderContext context, IConfigurationBuilder builder) at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration() at Microsoft.Extensions.Hosting.HostBuilder.Build() at IotTelemetrySimulator.Program.Main(String[] args) in /src/src/IotTelemetrySimulator/Program.cs:line 12 qemu: uncaught target signal 6 (Aborted) - core dumped

Expected/desired behavior

The simulator should connect to my IoTHub and send the data samples

OS and Version?

macOS Ventura 13.4.1 (m1)

Versions

1.15.0

Mention any other details that might be useful

Can successfully build and run locally and can docker build and push to my ACR repo and successfully pull and run.


Thanks! We'll be in touch soon.

aguywithcode commented 1 year ago

Verified it was an emulation issue was able to resolve by using docker buildx to create a multiplatform image