-
-
Notifications
You must be signed in to change notification settings - Fork 41
Docker
There's a published image available on Docker Hub called pmcilreavy/azureeventgridsimulator:latest.
The image is not configured with any topics or subscribers. The configuration can be passed in via command line environment variables or via a JSON file.
Here's an example of running a container and passing in the configuration via environment variables to create 1 topic with 2 HTTP subscribers.
docker run \
--detach \
--publish 60101:60101 \
-v $(pwd)/docker:/aegs \
-e ASPNETCORE_ENVIRONMENT=Development \
-e ASPNETCORE_Kestrel__Certificates__Default__Path=/aegs/azureEventGridSimulator.pfx \
-e ASPNETCORE_Kestrel__Certificates__Default__Password=Y0urSup3rCrypt1cPa55w0rd! \
-e TZ=Australia/Brisbane \
-e AEGS_topics__0__name=ExampleTopic \
-e AEGS_topics__0__port=60101 \
-e AEGS_topics__0__key=TheLocal+DevelopmentKey= \
-e AEGS_topics__0__subscribers__http__0__name=RequestCatcherSubscription \
-e AEGS_topics__0__subscribers__http__0__endpoint=https://azureeventgridsimulator.requestcatcher.com/ \
-e AEGS_topics__0__subscribers__http__0__disableValidation=true \
-e AEGS_topics__0__subscribers__http__1__name=AzureFunctionSubscription \
-e AEGS_topics__0__subscribers__http__1__endpoint=http://host.docker.internal:7071/runtime/webhooks/EventGrid?functionName=ExampleFunction \
-e AEGS_topics__0__subscribers__http__1__disableValidation=true \
-e AEGS_Serilog__MinimumLevel__Default=Verbose \
pmcilreavy/azureeventgridsimulator:latestNote: Environment variable names are case-sensitive on Linux. Use lowercase
topicsandsubscribersto match the JSON property names.
To create a certificate file suitable for use with Docker:
dotnet dev-certs https --export-path ./docker/azureEventGridSimulator.pfx --password Y0urSup3rCrypt1cPa55w0rd!There is a docker-compose.yml file in the docker/ folder that you can use to build and run the simulator along with Azure emulators for local development.
cd docker
docker-compose up --build --detachThe Docker Compose setup includes:
| Service | Description |
|---|---|
| Azure Event Grid Simulator | The main simulator |
| Azure Service Bus Emulator | For testing Service Bus subscribers locally |
| Azure Event Hubs Emulator | For testing Event Hub subscribers locally |
| Azurite | Azure Storage emulator (required by Event Hubs emulator, also for Storage Queue subscribers) |
| SQL Server | Required by the Service Bus emulator |
| Seq | Structured log viewer (accessible at http://localhost:8081) |
See docker/appsettings.docker.json for an example configuration with HTTP, Service Bus, Storage Queue, and Event Hub subscribers.
- Configuration - Complete configuration reference
- Topics - HTTPS certificate setup
Getting Started
Subscribers
Features
Deployment
Reference