Giter Site home page Giter Site logo

hono-simulator's Introduction

Eclipse Hono™ Simulator

A set of tools for simulating an IoT workload for Eclipse Hono. This supports generating MQTT and HTTP, telemetry and events. It also allows records metrics to a prometheus instance for monitoring and analysis.

Operator

Deploying the different parts of the simulator can be tricky. But there is an operator which will set up Prometheus, the web console and deploy the different producer and consumers.

OperatorHub.io

You can directly download install the operator via OperatorHub.io.

Manual operator installation

All you need is the OLM installed and then:

oc apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator-simulators.crd.yaml
oc apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator-simulatorconsumers.crd.yaml
oc apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator-simulatorproducers.crd.yaml
oc apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator.v0.1.0.clusterserviceversion.yaml

Or, if you use plain Kubernetes:

kubectl apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator-simulators.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator-simulatorconsumers.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator-simulatorproducers.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/ctron/iot-simulator-operator/master/operator/iot-simulator.v0.1.0.clusterserviceversion.yaml

Also see: OLM scripts

Creating instances

First you need to create a simulator instance:

apiVersion: iot.dentrassi.de/v1alpha1
kind: Simulator
metadata:
  name: hono1
  namespace: iot-simulator
spec:
  endpoint:
    messaging: # Messaging endpoint information
      user: foo
      password: bar
      host: messaging.host.hono.svc
      port: '5671'
      caCertificate: ''
    registry: # Device registry endpoint
      url: 'https://your-device-registry'
      apiVersion: LEGACY # or V1
    adapters:
      mqtt:
        host: mqtt-adapter.hono.svc
        port: 8883
      http:
        url: 'https://http-adapter.hono.svc'

Followed by a consumer:

apiVersion: iot.dentrassi.de/v1alpha1
kind: SimulatorConsumer
metadata:
  name: consumer1
  namespace: iot-simulator
spec:
  simulator: hono1 # metadata.name of the Simulator resource
  tenant: myapp1.iot
  type: telemetry
  replicas: 1

And a producer:

apiVersion: iot.dentrassi.de/v1alpha1
kind: SimulatorProducer
metadata:
  name: producer1
  namespace: iot-simulator
spec:
  simulator: hono1 # metadata.name of the Simulator resource
  tenant: myapp1.iot
  type: telemetry # or 'event'
  protocol: http # or 'mqtt'
  replicas: 1
  numberOfDevices: 10

Web Console

The operator will allow you to deploy a web console alongside for a quick overview.

Screesshot of console

Also see: ctron/iot-simulator-console

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.