{"id":19230612,"url":"https://github.com/ctron/iot-simulator-example","last_synced_at":"2026-02-02T15:35:44.320Z","repository":{"id":140053044,"uuid":"235768484","full_name":"ctron/iot-simulator-example","owner":"ctron","description":"Example deployment for EnMasse with Hono and the IoT Simulator","archived":false,"fork":false,"pushed_at":"2020-02-06T15:12:15.000Z","size":1453,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T14:10:01.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-23T10:07:13.000Z","updated_at":"2020-03-13T01:08:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"d101728b-90c4-441d-9704-1e399dc48fcd","html_url":"https://github.com/ctron/iot-simulator-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ctron/iot-simulator-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fiot-simulator-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fiot-simulator-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fiot-simulator-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fiot-simulator-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctron","download_url":"https://codeload.github.com/ctron/iot-simulator-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fiot-simulator-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29014358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T14:58:54.169Z","status":"ssl_error","status_checked_at":"2026-02-02T14:58:51.285Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T15:39:54.434Z","updated_at":"2026-02-02T15:35:44.303Z","avatar_url":"https://github.com/ctron.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoT Simulator\n\n## Background \n\nThis module is used to demonstrate the power of [EnMasse](https://enmasse.io/), a streamlined and easy to use messaging infrastructure that can be deployed on a custom Kubernetes instance or openshift cluster. This system becomes extremely useful for the Edge computing / IOT workload where many types of devices and communication protocols must be supported while maintaining the scalabilty and autonomy provided by modern Container orchestration platforms. \n\nThis example specifically demonstrates the power of the newer IOT features provided by EnMasse and powered by Ecipse hono. With these addons EnMasse will give the user the ability to build scalable and resilient messaging architectures connecting the edge to the cloud. \n\nThe diagram shown below gives a good overview of the end to end system \n![EnMasse Overview](https://raw.githubusercontent.com/astoycos/iot-simulator-example/master/doc/enmasse_iot_view.png)\n\n## The setup \n\nThis demostration is split up into 4 major modules that are deployed in 4 different pods during use \n\n1. Simulator\n    * Manages the Producer and Consumer\n2. Producer \n    * Generates arbitrary MQTT or HTTP telemetry messages that are sent to EnMasse's IoT protocol adapter (Eclipse Hono)\n3. Consumer \n    * Consumes the Telemetry messages produced by the Enmasse instance \n4. Web Console\n    * Displays information about the data exchange between producer and consumer\n\n\n# Deploy the IoT simulator\n\nThis Demo can be deployed on either a **remote** or **local** OpenShift instance \n\n## Remotely \n\nSee this [link](https://docs.openshift.com/container-platform/4.3/welcome/index.html) for more information on creating a remotely hosted openshift instance \n\n## Locally: CodeReadyContainers(CRC)\n\nIf using CRC, first create a new machine using the following command:\n\n    crc start\n\n## Prepare your OpenShift cluster\n\n1. Log in as admin\n2. Make new project titled \"enmasse-infra\" \n    \n       oc new-project enmasse-infra\n\n## Getting EnMasse\n\nThere are two ways to Deploy enmasse to your cluster, either **manually** or via the provided [**Enmasse operator**](https://operatorhub.io/operator/enmasse)\n\nRegardless please download and install the EnMasse tarball since we do some setup with these via the command line\n\nDownload EnMasse:\n\n    curl -sL https://github.com/EnMasseProject/enmasse/releases/download/0.30.2/enmasse-0.30.2.tgz -o enmasse.tar.gz\n\nUnpack the archive:\n\n    mkdir enmasse\n    cd enmasse\n    tar --strip-components=1 -xzf ../enmasse.tar.gz\n    cd ..\n\n### Operator\n\nUsing Openshift's web console navagate to the \"Operatorhub\" tab and search for \"enmasse\" \n\n![step 1](https://raw.githubusercontent.com/astoycos/iot-simulator-example/master/doc/Screenshot%20from%202020-01-27%2015-04-07.jpg)\n\nClick \"install\" \n\n![step2](https://raw.githubusercontent.com/astoycos/iot-simulator-example/master/doc/Screenshot%20from%202020-01-27%2015-07-39.jpg)\n\nChoose to \"install in a specific namespace\" and make sure the project enmasse-infra is selected \n\n![step3](https://raw.githubusercontent.com/astoycos/iot-simulator-example/master/doc/Screenshot%20from%202020-01-27%2015-08-15.jpg)\n\n### Manually\n\nMake sure you are on the correct openshift project \n\n    $ oc project enmasse-infra\n    Now using project \"enmasse-infra\" on server \"https://api.my-cluster.my-domain:6443\".`\n\nInstall the bundle  \n\n    oc apply -f enmasse/install/bundles/enmasse`\n \n\n## Configuring EnMasse\n   \n    oc apply -f enmasse/install/preview-bundles/iot\n    oc apply -f enmasse/install/components/example-authservices/standard-authservice.yaml\n    oc apply -f enmasse/install/components/example-roles\n    oc apply -f enmasse/install/components/example-plans\n\n## Enable EnMasse's IoT feature\n\nEnable the feature:\n\n    oc apply -f deploy/010-Infrastructure\n\nAnd wait for the configuration to be ready:\n\n    oc get iotconfig\n\nThe output should show `Ready` in the column `PHASE`:\n\n    NAME      PHASE\n    default   Ready\n\n## Create a new IoT project\n\nCreate the new project:\n\n    oc new-project myapp\n    oc apply -f deploy/020-Project\n\nAnd wait for the project to be ready (This will normally take a few minutes):\n\n    oc get iotproject\n\nThe output should show `Ready` in the column `PHASE`:\n\n    NAME   IOT TENANT   DOWNSTREAM HOST                          DOWNSTREAM PORT   TLS    PHASE\n    iot    myapp.iot    messaging-vv2rt4cho5.enmasse-infra.svc   5671              true   Ready\n\n## Deploy the simulator\n\n    oc new-project iot-simulator\n    oc apply -f deploy/030-SimulatorOperator\n\n## Create a new simulator instance\n\nGet the necessary information:\n\n    export MESSAGING_HOST=$(oc -n myapp get addressspace iot -o 'jsonpath={ .status.endpointStatuses[?(@.name==\"messaging\")].serviceHost }')\n    export CA_CERT=$(oc -n myapp get addressspace iot -o 'jsonpath={ .status.caCert }')\n    export MGMT_TOKEN=$(oc whoami -t)\n\nAnd then apply the configuration and deploy simulator module to cluster:\n\n    cat deploy/040-Simulator/010-Simulator.yaml.in | envsubst | oc apply -f -\n\n**Note:** When using `$(oc whoami -t)`, you will use the current user's token for authenticating. The user of this\n          token must have permissions to access the `IoTProject` created earlier on. As this also is the token of\n          a user, the token will expire. Normally after 24h of logging in the user. Alternatively you can create a\n          service account, get that token, and use it instead.\n\n## Deploy the Producer and Consumer modules\n\n    oc apply -f deploy/050-Workload\n    \n## See Results \n\nWait until the above steps are complete (i.e the simulator, producer, consumer, and web-console pods are running) \n\nIf everything is working correctly you should be able to open the web console at \n   \n    iot-simulator-console-iot-simulator.apps.\u003cyour cluster\u003e\n   \n\n![web-console](https://raw.githubusercontent.com/astoycos/iot-simulator-example/master/doc/Screenshot%20from%202020-01-27%2015-59-52.jpg)\n\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fiot-simulator-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctron%2Fiot-simulator-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fiot-simulator-example/lists"}