Skip to content

Commit

Permalink
Merge branch 'psql-ha' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
BWibo committed Feb 16, 2023
2 parents 6c111f2 + 6dfdc39 commit ee9fd5f
Show file tree
Hide file tree
Showing 17 changed files with 315 additions and 71 deletions.
20 changes: 10 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,27 @@ Versions are prefixed with `tum-gis-iot-stack-k8s-` due to usage of
[chart-releaser-action](https://github.com/helm/chart-releaser-action).
For releases `< 1.0.0` minor version step indicate breaking changes.

## [unreleased] - 2023-01-01
## [tum-gis-iot-stack-k8s-0.9.0] - 2023-02-16

### Added

- Expose Grafana SMTP settings in `values.yml`
- Support for high availability
[PostgreSQL database backend](https://artifacthub.io/packages/helm/bitnami/postgresql-ha)

### Changed

### Removed

### Fixed

### Security

### Deprecated
- Reworked [README.md](README.md)
- Documentation updates
- Minor changes to default values
- Bump FROST-Server `2.0.6` --> `2.1.0`
- Expose Grafana SMTP settings in `values.yml`

## [tum-gis-iot-stack-k8s-0.8.2]: - 2023-02-03

### Changed

- Grafana database creation container now uses `template1` db for connection,
as it is usally available on all postgres servers.
as it is usually available on all postgres servers.

## [tum-gis-iot-stack-k8s-0.8.1]: - 2023-02-02

Expand Down Expand Up @@ -59,3 +58,4 @@ For releases `< 1.0.0` minor version step indicate breaking changes.
[tum-gis-iot-stack-k8s-0.8.0]: https://github.com/tum-gis/tum-gis-iot-stack-k8s/compare/tum-gis-iot-stack-k8s-0.1.1...tum-gis-iot-stack-k8s-0.8.0
[tum-gis-iot-stack-k8s-0.8.1]: https://github.com/tum-gis/tum-gis-iot-stack-k8s/compare/tum-gis-iot-stack-k8s-0.8.0...tum-gis-iot-stack-k8s-0.8.1
[tum-gis-iot-stack-k8s-0.8.2]: https://github.com/tum-gis/tum-gis-iot-stack-k8s/compare/tum-gis-iot-stack-k8s-0.8.1...tum-gis-iot-stack-k8s-0.8.2
[tum-gis-iot-stack-k8s-0.9.0]: https://github.com/tum-gis/tum-gis-iot-stack-k8s/compare/tum-gis-iot-stack-k8s-0.8.2...tum-gis-iot-stack-k8s-0.9.0
159 changes: 119 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<h1 align="center">TUM-GIS IoT Stack for Kubernetes</h1>

<p align="center">
<em>an application stack for managing and visualizing sensor data with open standards and tools using <br/><a title="Open Geospatial Consortium Homepage" href="https://www.ogc.org/standards/sensorthings">OGC SensorThingsAPI</a> in a Kubernetes cluster</em>
<em>an application stack for managing, integrating, storing,
and visualizing sensor data with open standards and tools based on <a title="Open Geospatial Consortium Homepage" href="https://www.ogc.org/standards/sensorthings">OGC SensorThingsAPI</a></em>
<br />
<br />
<a href="https://github.com/tum-gis/tum-gis-iot-stack-k8s/issues">Report Bug</a>
Expand All @@ -14,66 +15,143 @@
</a>
</p>

**Warning**:
> This repository is an early stage of development. Use it at your own risk!
## :inbox_tray: Components

* [Fraunhofer IOSB FROST-Server](https://github.com/FraunhoferIOSB/FROST-Server)
* Server implementation of the OGC SensorThings API
* [Grafana](https://grafana.com/)
* Dashboards for your data
* [Node-RED](https://nodered.org/)
* Wiring together hardware devices, APIs and online services
* [caddy](https://caddyserver.com/)
* Caddy webserver for hosting web content like documentations or landing pages for the stack.
* [NGINX Ingress Controller](https://docs.nginx.com/nginx-ingress-controller/)
* Route traffic to the applications of the stack
* Optional dependency, usually not required.
* [cert-manager](https://cert-manager.io/docs/)
* Automatic SSL certificate issuing from e.g. Let's Encrypt
* Optional dependency, usually not required.
## :zzz: TL;DR

Deploy the IoT-Stack in a Kubernetes cluster with
[`ingress-nginx`](https://kubernetes.github.io/ingress-nginx) and
[`cert-manager`](https://cert-manager.io/) available,
and a FQDN (e.g. `www.my-iot-stack.de`) pointing to your Ingress controller.

```bash
helm repo add iot-stack https://tum-gis.github.io/tum-gis-iot-stack-k8s
helm repo update
helm install iot iot-stack/tum-gis-iot-stack-k8s \
-n iot-stack --create-namespace \
--atomic --wait \
--set 'global.ingress.domains={www.my-iot-stack.de}' \
--set '[email protected]'
```

The default username and password for all services is: `user: admin`, `pwd: changeMe`.

For local testing check out the [examples](examples).

## :book: Table of content

- [:zzz: TL;DR](#zzz-tldr)
- [:book: Table of content](#book-table-of-content)
- [:inbox\_tray: Application stack](#inbox_tray-application-stack)
- [:question: Getting started](#question-getting-started)
- [:page\_with\_curl: Documentation](#page_with_curl-documentation)
- [:rocket: Usage](#rocket-usage)
- [:hammer\_and\_wrench: Contributing](#hammer_and_wrench-contributing)
- [Repository setup](#repository-setup)
- [Build Chart documentation](#build-chart-documentation)
- [Contributors](#contributors)
- [:mortar\_board: Research](#mortar_board-research)
- [:memo: License](#memo-license)
- [:handshake: Thanks](#handshake-thanks)

## :inbox_tray: Application stack

- [Fraunhofer IOSB FROST-Server](https://github.com/FraunhoferIOSB/FROST-Server):
Server implementation of the OGC SensorThings API with HTTP and MQTT endpoint.

- [PostgreSQL](https://www.postgresql.org/)/[PostGIS](https://postgis.net/):
Database backend for the FROST-Server. The chart offers two options:

- Basic PostgreSQL/PostGIS chart based on the official
[PostGIS Docker image](https://registry.hub.docker.com/r/postgis/postgis/).

- High availability PostgreSQL with LoadBalancing using
[Bitnami postgresql-ha](https://artifacthub.io/packages/helm/bitnami/postgresql-ha) chart.

- [Grafana](https://grafana.com/):
Data visualization and dashboards.

- [Node-RED](https://nodered.org/):
Wiring together hardware devices, APIs and online services.

- [caddy](https://caddyserver.com/):
Webserver for hosting web content like documentations or landing pages for the deployment.

- [NGINX Ingress Controller](https://docs.nginx.com/nginx-ingress-controller/):
Route traffic to the applications of the stack.
Optional dependency, often provided in your cluster.

- [cert-manager](https://cert-manager.io/docs/):
Automatic SSL certificate issuing from e.g. Let's Encrypt.
Optional dependency, often provided in your cluster.

## :question: Getting started

To get this up an running in seconds, check out the [examples](examples). You will find examples for:

* [Basic example for a local cluster using Docker Desktop](examples/docker-desktop/)
* [Basic example for a local cluster using `minikube`](examples/minikube/)
- [Basic example for a local cluster using Docker Desktop](examples/docker-desktop/)
- [Basic example for a local cluster using `minikube`](examples/minikube/)

The documentation for this helm chart is available in [helm/charts](helm/charts).
## :page_with_curl: Documentation

The documentation of the chart is located in the chart directory:
[helm/charts](helm/charts)

The documentation for internal dependencies is located in their folders too:

- [FROST-Server](helm/charts/charts/frostweb)
- [Basic PostgreSQL/PostGIS](helm/charts/charts/frostdb)
- [Grafana](helm/charts/charts/grafana)
- [Node-RED](helm/charts/charts/nodered)
- [certIssuer](helm/charts/charts/certIssuer)

External dependencies are documented here:

- [Bitnami HA PostgreSQL/PostGIS](https://artifacthub.io/packages/helm/bitnami/postgresql-ha)
- [ingress-nginx](https://kubernetes.github.io/ingress-nginx/)
- [cert-manager](https://cert-manager.io/docs/)

## :rocket: Usage

1. Get a fully-qualified domain name (FQDN) and configure it to point to the public IP address of
the LoadBalancer service of your Nginx ingress controller.
1. Get a fully-qualified domain name (FQDN) and configure it to point to
the public IP address of the LoadBalancer service of your Nginx
ingress controller.

2. Add and update Helm repo

```console
```bash
helm repo add iot-stack https://tum-gis.github.io/tum-gis-iot-stack-k8s
helm repo update
```

3. Adapt settings according to your needs e.g. in [values.yml](helm/charts/values.yaml) or create
a local `values.yml` to overwrite settings. Examples e.g. for a local testing deplayment are
are available in [examples](examples). [values.yml](helm/charts/values.yaml) is documented in
[helm/charts](helm/charts).
3. Adapt settings according to your needs e.g. in [values.yml](helm/charts/values.yaml)
or create a local `values.yml` to overwrite settings.
Examples e.g. for a local testing deployment are are available in
[examples](examples).
[values.yml](helm/charts/values.yaml) is documented in [helm/charts](helm/charts).

4. Install stack

```console
helm install my-iot-stack iot-stack/tum-gis-iot-stack-k8s \
```bash
helm install iot iot-stack/tum-gis-iot-stack-k8s \
-n iot-stack --create-namespace \
--atomic --wait \
--values my-values.yml
```

## :blue_book: Documentation
## :hammer_and_wrench: Contributing

Bug fixes, issue reports and contributions are greatly appreciated.

The detailed documentation
### Repository setup

### Build Chart documentation
#### Build Chart documentation

The documentation of this chart is located in this repository in the
[helm/charts](helm/charts) folder and consists of Markdown files,
that are generated using
[norwoodj/helm-docs](https://github.com/norwoodj/helm-docs).
To keep the documentation in sync with the source files, it is recommended
to use [`pre-commit`](https://github.com/pre-commit/pre-commit) to automatically
update the docs with every commit.

To generate a markdown documentation for this chart
using [norwoodj/helm-docs](https://github.com/norwoodj/helm-docs)
Expand All @@ -83,20 +161,21 @@ run this from the repo root.
docker run --rm --volume "$PWD/helm/charts:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
```

## :hammer_and_wrench: Contributing

Bug fixes, issue reports and contributions are greatly appreciated.

## Contributors
### Contributors

<a href="https://github.com/tum-gis/tum-gis-iot-stack-k8s/graphs/contributors">
<img src="https://contrib.rocks/image?repo=tum-gis/tum-gis-iot-stack-k8s" />
</a>

## :mortar_board: Research

This chart was developed for the course
[Geo Sensor Networks and the Internet of Things](https://wiki.tum.de/display/geosensorweb).

## :memo: License

This Helm chart is distributed under the Apache License 2.0. See [LICENSE](LICENSE) for more information.

## :handshake: Thanks

- [Fraunhofer IOSB](https://www.iosb.fraunhofer.de/de/projekte-produkte/frostserver.html) for their great implementation of the OGC SensorThingsAPI.
7 changes: 6 additions & 1 deletion helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ maintainers:
name: Bruno Willenborg
url: https://www.asg.ed.tum.de/en/gis/our-team/staff/bruno-willenborg/

version: 0.8.2
version: 0.9.0
appVersion: "0.0.1"

dependencies:
Expand Down Expand Up @@ -47,3 +47,8 @@ dependencies:
condition: cert-manager.enabled
version: "~1.11.0"
repository: https://charts.jetstack.io
- name: postgresql-ha
alias: postgresql-ha
condition: postgresql-ha.enabled
version: ">=10.0.0"
repository: https://charts.bitnami.com/bitnami
6 changes: 4 additions & 2 deletions helm/charts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tum-gis-iot-stack-k8s

![Version: 0.8.2](https://img.shields.io/badge/Version-0.8.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square)
![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square)

Helm Chart for the TUM-GI IoT stack.

Expand Down Expand Up @@ -28,6 +28,7 @@ Kubernetes: `>= 1.23.0`
| | frostweb | * |
| | grafana | * |
| | nodered | * |
| https://charts.bitnami.com/bitnami | postgresql-ha(postgresql-ha) | >=10.0.0 |
| https://charts.jetstack.io | cert-manager(cert-manager) | ~1.11.0 |
| https://kubernetes.github.io/ingress-nginx | ingress-nginx(ingress-nginx) | ~4.4.0 |

Expand All @@ -37,7 +38,7 @@ Kubernetes: `>= 1.23.0`
|-----|------|---------|-------------|
| caddy.enabled | bool | `false` | Enable/disable Caddy webserver |
| cert-manager.enabled | bool | `false` | Enable/disable [cert-manager](https://cert-manager.io/docs/). Only enable this if [cert-manager](https://cert-manager.io/docs/) is not available in the cluster. |
| certIssuer.enabled | bool | `false` | Enable/disable [cert-manager](https://cert-manager.io/docs/) namespace Issuers. Set according to other `ingress.XXX` settings. Disable if a `ClusterIssuer` is used. |
| certIssuer.enabled | bool | `true` | Enable/disable [cert-manager](https://cert-manager.io/docs/) namespace Issuers. Set according to other `ingress.XXX` settings. Disable if a `ClusterIssuer` is used. |
| frostdb.enabled | bool | `true` | Enable/disable PostGIS Database. Disable if an external database is used. |
| frostweb.enabled | bool | `true` | Enable/disable FROST-Server web interface. |
| fullnameOverride | string | `""` | Override fullname |
Expand All @@ -56,6 +57,7 @@ Kubernetes: `>= 1.23.0`
| ingress-nginx.enabled | bool | `false` | Enable/disable [NGINX-Ingress](https://github.com/kubernetes/ingress-nginx). This is only required, if there is no IncressController available in your cluster. |
| nameOverride | string | `""` | Override name |
| nodered.enabled | bool | `true` | Enable/disable Node-RED. |
| postgresql-ha.enabled | bool | `false` | Enable/disable Bitnami PostgreSQL HA database backend. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
8 changes: 7 additions & 1 deletion helm/charts/charts/caddy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
apiVersion: v2
name: caddy
description: Caddy webserver
description: Basic chart for Caddy webserver.
type: application

version: 0.4.0
appVersion: "2.6.2-alpine"

maintainers:
- email: [email protected]
name: Bruno Willenborg
url: https://www.asg.ed.tum.de/en/gis/our-team/staff/bruno-willenborg/
8 changes: 7 additions & 1 deletion helm/charts/charts/caddy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.2-alpine](https://img.shields.io/badge/AppVersion-2.6.2--alpine-informational?style=flat-square)

Caddy webserver
Basic chart for Caddy webserver.

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Bruno Willenborg | <[email protected]> | <https://www.asg.ed.tum.de/en/gis/our-team/staff/bruno-willenborg/> |

## Values

Expand Down
12 changes: 11 additions & 1 deletion helm/charts/charts/certIssuer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
apiVersion: v2
name: certIssuer
description: Helm chart to provide namespace Issuers for CertManager
description: Helm chart to provide namespace Issuers for CertManager.
type: application

home: https://github.com/tum-gis/tum-gis-iot-stack-k8s
sources:
- https://github.com/tum-gis/tum-gis-iot-stack-k8s/tree/main/helm/charts/charts/certIssuer

version: 0.4.1
appVersion: "0.1.0"

maintainers:
- email: [email protected]
name: Bruno Willenborg
url: https://www.asg.ed.tum.de/en/gis/our-team/staff/bruno-willenborg/
14 changes: 13 additions & 1 deletion helm/charts/charts/certIssuer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

Helm chart to provide namespace Issuers for CertManager
Helm chart to provide namespace Issuers for CertManager.

**Homepage:** <https://github.com/tum-gis/tum-gis-iot-stack-k8s>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Bruno Willenborg | <[email protected]> | <https://www.asg.ed.tum.de/en/gis/our-team/staff/bruno-willenborg/> |

## Source Code

* <https://github.com/tum-gis/tum-gis-iot-stack-k8s/tree/main/helm/charts/charts/certIssuer>

## Values

Expand Down
15 changes: 13 additions & 2 deletions helm/charts/charts/frostdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
apiVersion: v2
name: frostdb
description: PostGIS database in a local volume for FROST-Server.
type: application
description: Basic chart for a PostgreSQL/PostGIS database.

home: https://github.com/tum-gis/tum-gis-iot-stack-k8s
sources:
- https://github.com/tum-gis/tum-gis-iot-stack-k8s/tree/main/helm/charts/charts/frostdb
- https://registry.hub.docker.com/r/postgis/postgis/
- https://github.com/postgis/docker-postgis

version: 0.5.0
appVersion: "14-3.3-alpine"

maintainers:
- email: [email protected]
name: Bruno Willenborg
url: https://www.asg.ed.tum.de/en/gis/our-team/staff/bruno-willenborg/
Loading

0 comments on commit ee9fd5f

Please sign in to comment.