Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctron/hono-simulator
Simulating IoT payloads for Eclipse Hono
https://github.com/ctron/hono-simulator
eclipse-hono eclipse-iot iot
Last synced: 4 days ago
JSON representation
Simulating IoT payloads for Eclipse Hono
- Host: GitHub
- URL: https://github.com/ctron/hono-simulator
- Owner: ctron
- License: epl-2.0
- Created: 2018-07-12T08:53:37.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2023-06-14T22:28:54.000Z (over 1 year ago)
- Last Synced: 2024-05-02T06:15:07.116Z (6 months ago)
- Topics: eclipse-hono, eclipse-iot, iot
- Language: Java
- Homepage: https://dentrassi.de/iot-simulator
- Size: 400 KB
- Stars: 7
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://operatorhub.io/operator/iot-simulator "IoT simulator on OperatorHub.io").
### Manual operator installation
All you need is the [OLM](https://github.com/operator-framework/operator-lifecycle-manager "Operator Lifecycle Manager") 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.yamlOr, 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.yamlAlso see: [OLM scripts](https://github.com/ctron/iot-simulator-operator/tree/master/operator)
## Creating instances
First you need to create a simulator instance:
~~~yaml
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:
~~~yaml
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:
~~~yaml
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](docs/console.png)
Also see: [ctron/iot-simulator-console](https://github.com/ctron/iot-simulator-console "IoT simulator console")