Support for local MQTT broker (preview)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the issue with sudo iotedgehubdev setup -c "<CONNECTION STRING>" and iotedgehubdev start -d deployment.json, using the manifest shown in the issue. Inspect the edgeHub startup failure at Microsoft.Azure.Devices.Edge.Hub.Service.Program.cs:36 and compare behavior with and without experimentalFeatures__mqttBrokerEnabled; done means the MQTT-enabled deployment starts without the missing environment-variable error.
Written by the indexing model from the issue text.
Description
Currently, when attempting to enable the experimental local MQTT broker I'm seeing issues with edgeHub not able to start and complaining about missing environment variables. I got about 6 deep trying to supply these env vars manually before giving up on that route.
Repro steps:
sudo iotedgehubdev setup -c "<CONNECTION STRING>"
iotedgehubdev start -d deployment.json
Example deployment manifest:
{
"$schema-template": "1.0.0",
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"schemaVersion": "1.1",
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25",
"loggingOptions": "",
"registryCredentials": {}
}
},
"systemModules": {
"edgeAgent": {
"type": "docker",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.2",
"createOptions": "{}"
}
},
"edgeHub": {
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.2",
"createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}],\"1883/tcp\":[{\"HostPort\":\"1883\"}]}}}"
},
"env": {
"experimentalFeatures__mqttBrokerEnabled": {
"value": "true"
},
"experimentalFeatures__enabled": {
"value": "true"
},
"RuntimeLogLevel": {
"value": "debug"
}
}
}
},
"modules": {
}
}
},
"$edgeHub": {
"properties.desired": {
"schemaVersion": "1.2",
"routes": {
"Upstream": "FROM /messages/* INTO $upstream"
},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
},
"mqttBroker": {
"authorizations": [
{
"identities": ["{{iot:identity}}"],
"allow": [
{
"operations": ["mqtt:connect"]
}
]
},
{
"identities": ["{{iot:identity}}"],
"allow": [
{
"operations": ["mqtt:publish", "mqtt:subscribe"],
"resources": ["test_topic"]
}
]
}
]
}
}
}
}
}
Example error:
...
at Microsoft.Azure.Devices.Edge.Hub.Service.Program.Main() in /home/vsts/work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs:line 36
Error: IOTEDGE_DEVICEID
Caused by:
environment variable not found
Removing the 'experimentalFeatures__mqttBrokerEnabled' env variable allows edgeHub to start normally.
- Dominant language
- Python
- Stars
- 91
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/iotedgehubdev
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
Azure/iotedgehubdev#416 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Azure/iotedgehubdev#415 ·
-
Not able to install Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Azure/iotedgehubdev#413 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/iotedgehubdev#412 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/iotedgehubdev#411 · 1 comment ·
All issues in Azure/iotedgehubdev
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100