Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctron/iot-simulator-operator
Kubernetes operator for the IoT simulator
https://github.com/ctron/iot-simulator-operator
iot kubernetes operator
Last synced: 4 days ago
JSON representation
Kubernetes operator for the IoT simulator
- Host: GitHub
- URL: https://github.com/ctron/iot-simulator-operator
- Owner: ctron
- License: epl-2.0
- Created: 2019-02-04T13:57:40.000Z (almost 6 years ago)
- Default Branch: develop
- Last Pushed: 2020-01-27T09:49:11.000Z (almost 5 years ago)
- Last Synced: 2024-06-20T22:34:58.292Z (5 months ago)
- Topics: iot, kubernetes, operator
- Language: Go
- Homepage: https://dentrassi.de/iot-simulator
- Size: 23.1 MB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IoT Simulator Operator
This is the Kubernetes operator repository for the IoT simulator.
See https://github.com/ctron/hono-simulator for more information.
## Creating a simulator
First you need to create a simulator base, assuming that your cluster
apps base domain is `apps.your.cluster` and the project you
deployed EnMasse to the project `enmasse-infra` and the IoT simulator
to the project `iot-simulator`:~~~yaml
kind: Simulator
apiVersion: iot.dentrassi.de/v1alpha1
metadata:
name: hono1
spec:
endpoint:
adapters:
http:
url: https://iot-http-adapter-enmasse-infra.apps.your.cluster
mqtt:
host: iot-mqtt-adapter-enmasse-infra.apps.your.cluster
port: 443
messaging:
caCertificate:
host: messaging-.enmasse-infra.svc
port: 5671
user: consumer
password: foobar
registry:
url: https://device-registry.apps.your.cluster
~~~Next you need a consumer, created for the IoT tenant `iot-simulator.iot`:
~~~yaml
kind: SimulatorConsumer
apiVersion: iot.dentrassi.de/v1alpha1
metadata:
name: consumer1
spec:
replicas: 1
simulator: hono1
tenant: iot-simulator.iot
type: telemetry
~~~Then you can create a producer:
~~~yaml
kind: SimulatorProducer
apiVersion: iot.dentrassi.de/v1alpha1
metadata:
name: producer1
spec:
numberOfDevices: 10
protocol: http
replicas: 1
simulator: hono1
tenant: iot-simulator.iot
type: telemetry
~~~## OpenShift
When running in OpenShift, the operator will automatically set up ImageStreams,
Builds and Routes.### Routes
You should be able to see statistics on the Web UI
, as soon as
you created producers and consumers.### Builds
By default it will build the matching version from the original repository.
However you can use the `Simulator` custom resource, to let the operator
tweak the build. You may use this to try you own variations of the simulator.~~~yaml
kind: Simulator
apiVersion: iot.dentrassi.de/v1alpha1
metadata:
name: hono1
spec:
simulator:
builds:
hono-simulator:
git:
# Full configuration
uri: https://github.com/ctron/hono-simulator
ref: develop
iot-simulator-console:
git:
# Only change branch
ref: develop
~~~## Building for OLM
~~~
docker build -t docker.io/ctron/iot-simulator-source:latest -f catalog.Dockerfile .
~~~Load with `oc apply -f`:
~~~yaml
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: iot-simulator-source
namespace: default
spec:
sourceType: grpc
image: docker.io/ctron/iot-simulator-source:latest
~~~Also see:
* https://github.com/operator-framework/operator-registry#building-a-catalog-of-operators-using-operator-registry