Skip to content

Commit

Permalink
[eclipse#316] Do not install Prometheus and Grafana by default.
Browse files Browse the repository at this point in the history
The README has been updated accordingly.

Fixes eclipse#316

Signed-off-by: Kai Hudalla <[email protected]>
  • Loading branch information
sophokles73 committed Nov 15, 2021
1 parent d59ed86 commit 4f7f46c
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 54 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ jobs:
config: .github/kind-config.yaml
node_image: kindest/node:${{ matrix.k8s }}
if: ${{ steps.list-changed.outputs.changed == 'true' }}
- name: Describe nodes
if: ${{ steps.list-changed.outputs.changed == 'true' }}
run: |
kubectl describe nodes
- name: Deploy ingress controller
if: ${{ steps.list-changed.outputs.changed == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion charts/hono/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: hono
description: |
Eclipse Hono™ provides remote service interfaces for connecting large numbers of IoT devices to a back end and
interacting with them in a uniform way regardless of the device communication protocol.
version: 1.10.9
version: 1.10.10
# Version of Hono being deployed by the chart
appVersion: 1.10.0
keywords:
Expand Down
37 changes: 18 additions & 19 deletions charts/hono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ eclipse-hono-adapter-mqtt-vertx LoadBalancer 10.102.204.69
eclipse-hono-artemis ClusterIP 10.97.31.154 <none> 5671/TCP
eclipse-hono-dispatch-router ClusterIP 10.98.111.236 <none> 5673/TCP
eclipse-hono-dispatch-router-ext LoadBalancer 10.109.220.100 10.109.220.100 15671:30671/TCP,15672:30672/TCP
eclipse-hono-grafana ClusterIP 10.110.61.181 <none> 3000/TCP
eclipse-hono-prometheus-server ClusterIP 10.96.70.135 <none> 9090/TCP
eclipse-hono-service-auth ClusterIP 10.109.97.44 <none> 5671/TCP
eclipse-hono-service-auth-headless ClusterIP None <none> <none>
eclipse-hono-service-device-registry ClusterIP 10.105.190.233 <none> 5671/TCP
Expand Down Expand Up @@ -97,18 +95,6 @@ content-type: application/json; charset=utf-8
content-length: 260
```

## Accessing the Grafana dashboard

Hono comes with an example Grafana dashboard which provides some insight into the messages flowing through the protocol adapters.
The following command needs to be run first in order to forward the Grafana service's endpoint to the local host:

```bash
kubectl port-forward service/eclipse-hono-grafana 3000 -n hono
```

Then the dashboard can be opened by pointing your browser to `http://localhost:3000` using credentials `admin:admin`.


## Uninstalling the chart

To uninstall/delete the `eclipse-hono` release from the target name space:
Expand Down Expand Up @@ -136,18 +122,31 @@ helm install --dependency-update -n hono -f /path/to/config.yaml eclipse-hono ec
```


## Prevent installation of Prometheus and Grafana
## Installing Prometheus and Grafana

The chart by default installs a Prometheus instance for collecting metrics from Hono's
The chart supports installation and configuration of an example Prometheus instance for collecting metrics from Hono's
components and a Grafana instance for visualizing the metrics on dashboards in a web browser.

Both Prometheus and Grafana are not required to run Hono. The following configuration properties
can be used to prevent installation of the Prometheus and Grafana servers.
Both Prometheus and Grafana are completely optional and are not required to run Hono. The following configuration
properties can be used to install the Prometheus and Grafana servers along with Hono:

```bash
helm install --dependency-update -n hono --set prometheus.createInstance=false --set grafana.enabled=false eclipse-hono eclipse-iot/hono
helm install --dependency-update -n hono --set prometheus.createInstance=true --set grafana.enabled=true eclipse-hono eclipse-iot/hono
```

### Accessing the Example Grafana Dashboard

Hono comes with an example Grafana dashboard which provides some insight into the messages flowing through the protocol
adapters. The following command needs to be run first in order to forward the Grafana service's endpoint to the local host:

```bash
kubectl port-forward service/eclipse-hono-grafana 3000 -n hono
```

Then the dashboard can be opened by pointing your browser to `http://localhost:3000` using credentials `admin:admin`.



## Using specific Container Images

The chart can be customized to use container images other than the default ones.
Expand Down
21 changes: 14 additions & 7 deletions charts/hono/ci/datagrid-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Contributors to the Eclipse Foundation
# Copyright (c) 2020, 2021 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -14,14 +14,21 @@
# profile for installing Hono
# - without monitoring infrastructure
# - with example Infinispan data grid
# - with MQTT adapter only

useLoadBalancer: false

prometheus:
createInstance: false

grafana:
enabled: false

dataGridExample:
enabled: true

adapters:
amqp:
enabled: false
coap:
enabled: false
http:
enabled: false
mqtt:
enabled: true
lora:
enabled: false
19 changes: 13 additions & 6 deletions charts/hono/ci/device-connection-service-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,26 @@
# - with example Infinispan data grid
# - with Device Connection service
# - using Spring Boot based images
# - with Lora adapter only

useLoadBalancer: false

prometheus:
createInstance: false

grafana:
enabled: false

dataGridExample:
enabled: true

deviceConnectionService:
enabled: true

honoImagesType: "spring"

adapters:
amqp:
enabled: false
coap:
enabled: false
http:
enabled: false
mqtt:
enabled: false
lora:
enabled: true
19 changes: 13 additions & 6 deletions charts/hono/ci/mongodb-based-device-registry-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Contributors to the Eclipse Foundation
# Copyright (c) 2020, 2021 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -15,6 +15,7 @@
# - with MongoDB based device registry
# - with MongoDB instance
# - without monitoring infrastructure
# - with AMQP adapter only

deviceRegistryExample:
type: mongodb
Expand All @@ -26,8 +27,14 @@ mongodb:

useLoadBalancer: false

prometheus:
createInstance: false

grafana:
enabled: false
adapters:
amqp:
enabled: true
coap:
enabled: false
http:
enabled: false
mqtt:
enabled: false
lora:
enabled: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Contributors to the Eclipse Foundation
# Copyright (c) 2021 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -12,12 +12,25 @@
#

# profile for installing Hono
# - without monitoring infrastructure
# - with monitoring infrastructure
# - with HTTP adapter only

useLoadBalancer: false

prometheus:
createInstance: false
createInstance: true

grafana:
enabled: false
enabled: true

adapters:
amqp:
enabled: false
coap:
enabled: false
http:
enabled: true
mqtt:
enabled: false
lora:
enabled: false
19 changes: 13 additions & 6 deletions charts/hono/ci/quarkus-native-images-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,23 @@
# - without monitoring infrastructure
# - with example Infinispan data grid
# - using Quarkus based native images
# - with CoAP adapter only

useLoadBalancer: false

prometheus:
createInstance: false

grafana:
enabled: false

dataGridExample:
enabled: true

honoImagesType: quarkus-native

adapters:
amqp:
enabled: false
coap:
enabled: true
http:
enabled: false
mqtt:
enabled: false
lora:
enabled: false
14 changes: 9 additions & 5 deletions charts/hono/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1752,10 +1752,11 @@ commandRouterService:
prometheus:
# createInstance indicates whether a Prometheus server should be created
# using the Prometheus chart.
# Set this property to false if you want to use an already existing server
# instead. In that case, set the "name" and "port" properties to the
# existing server's host name and port.
createInstance: true
# Set this property to true if you want the chart to install an example Prometheus server that
# is configured to scrape Hono's components.
# If you want to use an already existing Prometheus server, set this property to false
# and set the "host" and "port" properties to the existing server's host name and port.
createInstance: false
# host contains the host name of an existing Prometheus server.
# This property is used to configure a corresponding datasource in Grafana
# if createInstance is set to false.
Expand Down Expand Up @@ -1804,7 +1805,7 @@ prometheus:
enabled: false

grafana:
enabled: true
enabled: false
adminPassword: admin

# labels to be added to the Grafana Deployment
Expand All @@ -1815,6 +1816,9 @@ grafana:
podLabels:
app.kubernetes.io/component: dashboard

# do not run tests after deployment
testFramework:
enabled: false

## Expose the grafana service to be accessed from outside the cluster (LoadBalancer service).
## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it.
Expand Down

0 comments on commit 4f7f46c

Please sign in to comment.