geoserver-cloud
A Helm chart for Geoserver-cloud
About this chart
Helm chart for geoserver-cloud
A Helm chart for Geoserver
include this chart as dependency of your own chart:
just include the following section in your Chart.yaml:
dependencies:
- name: geoserver-cloud
repository: https://camptocamp.github.io/helm-geoserver-cloud
version: <version-numer-here>
See the value file for configuration options.
Developing on geoserver-cloud code using this chart
To develop in this chart, we recommend that you use k3d if you want to use your machine. Please follow the following steps to ensure that you have all the requirements for development:
install k3d
basically just do:
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=v4.4.8 bash
install kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
or follow the steps of the official documentation
install helm (version 3!!!!)
follow the steps of the official documentation
install k3d
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=v4.4.8 bash
create a cluster on your machine
The following configuration will create a single-node "cluster" on your machine, the kubelet parameters ensure that it works also if you have an almost full development PC. It will also bind the port localhost:8081 of your machine with the ingress controller port 80, just adapt accordingly to your needs. You also need a local image registry to push your local images into the cluster.
# create a local registry
k3d registry create registry.localhost --port 5000
# create a local cluster and enable the registry
k3d cluster create k3d-cluster-1 --registry-use k3d-registry.localhost --k3s-agent-arg '--kubelet-arg=eviction-soft-grace-period=imagefs.available=60s,nodefs.available=60s' --k3s-agent-arg '--kubelet-arg=eviction-soft=imagefs.available<1%,nodefs.available<1%' --k3s-agent-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%' --k3s-agent-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%' -p "8081:80@loadbalancer" --agents 2
start the chart
# update the dependencies the first time as well
helm dependency update
# then install the chart
helm install geoserver .
test that it is working.
If everything went well you should see something similar with kubectl:
~# kubectl get po
NAME READY STATUS RESTARTS AGE
geoserver-postgresql-0 1/1 Running 0 6m17s
geoserver-discovery-6694fdccb6-92sxn 1/1 Running 0 6m17s
geoserver-config-7b64cf454-hjqrv 1/1 Running 0 6m17s
geoserver-rabbitmq-0 1/1 Running 0 6m17s
geoserver-gateway-7d99c5c864-wpbt4 1/1 Running 0 6m17s
geoserver-webui-67dfc967d7-x8cx8 1/1 Running 0 6m17s
geoserver-rest-577ddb7854-pjhv2 1/1 Running 0 6m17s
geoserver-wms-7798c78cfd-ngwdm 1/1 Running 0 6m17s
geoserver-wcs-748c9fb64b-flxts 1/1 Running 0 6m17s
geoserver-wfs-65947f5d4d-88g26 1/1 Running 0 6m17s
and you should be able to access the webui on http://localhost:8081/web/
use a local docker image and import it into the cluster
- build your image, tag and name it:
docker build -t k3d-registry.localhost:5000/geoserver-cloud-webui:test .
And push it to the localhost registry
docker push k3d-registry.localhost:5000/geoserver-cloud-webui:test
and then upgrade (or start) the chart with the following argument:
helm upgrade --set geoserver.webui.image.repository=k3d-registry.localhost:5000/geoserver-cloud-webui --set geoserver.webui.image.tag=test geoserver .
NB: this should not be the case with modern OS, but you might need to add the following to your /etc/hosts configuration:
127.0.0.1 k3d-registry.localhost
Chart Requirements
| Repository | Name | Version |
|---|---|---|
| https://charts.bitnami.com/bitnami | rabbitmq | 8.0.1 |
Values
| Key | Type | Default | Description |
|---|---|---|---|
| geoserver.config.affinity | object | {} | |
| geoserver.config.env | list | [] | |
| geoserver.config.image.repository | string | "geoservercloud/config-service" | |
| geoserver.config.image.tag | string | "" | |
| geoserver.config.nodeSelector."node.kubernetes.io/role" | string | "sig" | |
| geoserver.config.podAnnotations | object | {} | |
| geoserver.config.podSecurityContext.runAsUser | int | 630 | |
| geoserver.config.replicaCount | int | 1 | |
| geoserver.config.resources.limits.memory | string | "600Mi" | |
| geoserver.config.resources.requests.cpu | string | "100m" | |
| geoserver.config.resources.requests.memory | string | "300Mi" | |
| geoserver.config.securityContext | object | {} | |
| geoserver.config.service.port | int | 8080 | |
| geoserver.config.service.type | string | "ClusterIP" | |
| geoserver.config.tolerations[0].effect | string | "NoSchedule" | |
| geoserver.config.tolerations[0].key | string | "node.kubernetes.io/role" | |
| geoserver.config.tolerations[0].operator | string | "Equal" | |
| geoserver.config.tolerations[0].value | string | "sig" | |
| geoserver.database.dropOnDelete | bool | false | |
| geoserver.database.extensions[0] | string | "pg_stat_statements" | |
| geoserver.database.secretConfig | string | "jdbcconfig" | |
| geoserver.discovery.affinity | object | {} | |
| geoserver.discovery.env | list | [] | |
| geoserver.discovery.image.repository | string | "geoservercloud/discovery-service" | |
| geoserver.discovery.image.tag | string | "" | |
| geoserver.discovery.nodeSelector."node.kubernetes.io/role" | string | "sig" | |
| geoserver.discovery.podAnnotations | object | {} | |
| geoserver.discovery.podSecurityContext.runAsUser | int | 630 | |
| geoserver.discovery.replicaCount | int | 1 | |
| geoserver.discovery.resources.limits.cpu | string | "300m" | |
| geoserver.discovery.resources.limits.memory | string | "600Mi" | |
| geoserver.discovery.resources.requests.cpu | string | "100m" | |
| geoserver.discovery.resources.requests.memory | string | "300Mi" | |
| geoserver.discovery.securityContext | object | {} | |
| geoserver.discovery.service.port | int | 8761 | |
| geoserver.discovery.service.type | string | "ClusterIP" | |
| geoserver.discovery.tolerations[0].effect | string | "NoSchedule" | |
| geoserver.discovery.tolerations[0].key | string | "node.kubernetes.io/role" | |
| geoserver.discovery.tolerations[0].operator | string | "Equal" | |
| geoserver.discovery.tolerations[0].value | string | "sig" | |
| geoserver.gateway.affinity | object | {} | |
| geoserver.gateway.env | list | [] | |
| geoserver.gateway.image.repository | string | "geoservercloud/gateway-service" | |
| geoserver.gateway.image.tag | string | "" | |
| geoserver.gateway.nodeSelector."node.kubernetes.io/role" | string | "sig" | |
| geoserver.gateway.podAnnotations | object | {} | |
| geoserver.gateway.podSecurityContext.runAsUser | int | 630 | |
| geoserver.gateway.replicaCount | int | 1 | |
| geoserver.gateway.resources.limits.memory | string | "800Mi" | |
| geoserver.gateway.resources.requests.cpu | string | "100m" | |
| geoserver.gateway.resources.requests.memory | string | "400Mi" | |
| geoserver.gateway.securityContext | object | {} | |
| geoserver.gateway.service.port | int | 8080 | |
| geoserver.gateway.service.type | string | "ClusterIP" | |
| geoserver.gateway.tolerations[0].effect | string | "NoSchedule" | |
| geoserver.gateway.tolerations[0].key | string | "node.kubernetes.io/role" | |
| geoserver.gateway.tolerations[0].operator | string | "Equal" | |
| geoserver.gateway.tolerations[0].value | string | "sig" | |
| geoserver.name | string | "geoserver" | |
| geoserver.rabbitmq.port | int | 5672 | |
| geoserver.rest.affinity | object | {} | |
| geoserver.rest.env | list | [] | |
| geoserver.rest.image.repository | string | "geoservercloud/rest-service" | |
| geoserver.rest.image.tag | string | "" | |
| geoserver.rest.nodeSelector."node.kubernetes.io/role" | string | "sig" | |
| geoserver.rest.podAnnotations | object | {} | |
| geoserver.rest.podSecurityContext.runAsUser | int | 630 | |
| geoserver.rest.replicaCount | int | 1 | |
| geoserver.rest.resources.limits.memory | string | "1Gi" | |
| geoserver.rest.resources.requests.cpu | string | "200m" | |
| geoserver.rest.resources.requests.memory | string | "512Mi" | |
| geoserver.rest.securityContext | object | {} | |
| geoserver.rest.service.port | int |
Deploy geoserver-cloud with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has geoserver-cloud on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgeoserver-cloud is pinned at v0.0.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply