Skip to content

Azure IoT Edge Module

1.4

NF supports being run using Azure IoT Edge Modules. When run in this mode, NF automatically sends data to the local IoT Edge hub for further processing.

Deploying NF using Azure Modules uses the same containers as the Docker deployment and is substantially similar. This minimal manifest file will deploy redis and Normal Framework onto a gateway:

{
  "modulesContent": {
"$edgeAgent": {
  "properties.desired": {
    "schemaVersion": "1.0",
    "runtime": {
      "type": "docker",
      "settings": {
    "minDockerVersion": "v1.25",
    "loggingOptions": "",
      "registryCredentials": {
          "normalframework": {
          "username": "normalframework",
          "password": "<repository password>",
          "address": "normalframework.azurecr.io"
          }
      }
      }
    },
    "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\"}]}}}"
    },
    "env": {
      "SslProtocols": {
        "value": "tls1.2"
      }
    }
      }
    },
    "modules": {
    "nf": {
    "version": "1.0",
    "type": "docker",
    "status": "running",
    "restartPolicy": "always",
    "settings": {
        "image": "normalframework.azurecr.io/normalframework/nf-full:1.4",
        "createOptions": "{\"NetworkingConfig\": {\"EndpointsConfig\": {\"host\": {}}}, \"HostConfig\": {\"NetworkMode\": \"host\", \"CapDrop\": []}}"

    }
      },
      "redis": {
    "version": "1.0",
    "type": "docker",
    "status": "running",
      "restartPolicy": "always",
    "settings": {
        "image": "normalframework.azurecr.io/normalframework/redis:1.4",
        "createOptions": "{\"HostConfig\":{\"CapDrop\":[]}}"
    }
      }
    }
  }
},
"$edgeHub": {
  "properties.desired": {
    "schemaVersion": "1.0",
    "routes": {
    },
    "storeAndForwardConfiguration": {
      "timeToLiveSecs": 7200
    }
  }
}
  }
}