discourse
by [riftbit]
A Helm chart for deploying Discourse to Kubernetes
About this chart
Discourse
Discourse is an open source discussion platform. It can be used as a mailing list, discussion forum, long-form chat room, and more.
TL;DR
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/discourse
Introduction
This chart bootstraps a Discourse deployment on a Kubernetes cluster using the Helm package manager.
It also packages Bitnami Postgresql and Bitnami Redis™ which are required as databases for the Discourse application.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.
Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
- ReadWriteMany volumes for deployment scaling
Installing the Chart
To install the chart with the release name my-release:
$ helm install my-release bitnami/discourse
The command deploys Discourse on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
nameOverride | String to partially override discourse.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override discourse.fullname template | "" |
commonLabels | Labels to be added to all deployed resources | {} |
commonAnnotations | Annotations to be added to all deployed resources | {} |
Service parameters
| Name | Description | Value |
|---|---|---|
service.type | Kubernetes Service type | LoadBalancer |
service.port | Service HTTP port | 80 |
service.nodePort | Node Ports to expose | "" |
service.loadBalancerIP | Use loadBalancerIP to request a specific static IP | "" |
service.externalTrafficPolicy | Enable client source IP preservation | Cluster |
service.annotations | Service annotations | {} |
service.loadBalancerSourceRanges | Limits which cidr blocks can connect to service's load balancer | [] |
service.extraPorts | Extra ports to expose (normally used with the sidecar value) | [] |
service.nodePorts.http | Kubernetes http node port | "" |
Discourse parameters
| Name | Description | Value |
|---|---|---|
image.registry | Discourse image registry | docker.io |
image.repository | Discourse image repository | bitnami/discourse |
image.tag | Discourse image tag | 2.7.8-debian-10-r0 |
image.pullPolicy | Discourse image pull policy | IfNotPresent |
image.pullSecrets | Discourse image pull secrets | [] |
image.debug | Specify if debug logs should be enabled | false |
imagePullSecrets | Specify docker-registry secret names as an array | [] |
discourse.host | Discourse host to create application URLs (include the port if =/= 80) | "" |
discourse.siteName | Discourse site name | My Site! |
discourse.username | Admin user of the application | user |
discourse.password | password. WARNING: Minimum length of 10 characters | "" |
discourse.existingSecret | Name of an existing secret containing the password (ignores previous password) | "" |
discourse.email | Admin user email of the application | [email protected] |
discourse.command | Custom command to override image cmd | [] |
discourse.args | Custom args for the custom command | [] |
discourse.containerSecurityContext | Container security context specification | {} |
discourse.resources.limits | The resources limits for the container | {} |
discourse.resources.requests | The requested resources for the container | {} |
discourse.livenessProbe.enabled | Enable/disable livenessProbe | true |
discourse.livenessProbe.initialDelaySeconds | Delay before liveness probe is initiated | 500 |
discourse.livenessProbe.periodSeconds | How often to perform the probe | 10 |
discourse.livenessProbe.timeoutSeconds | When the probe times out | 5 |
discourse.livenessProbe.failureThreshold | Minimum consecutive failures for the probe | 6 |
discourse.livenessProbe.successThreshold | Minimum consecutive successes for the probe | 1 |
discourse.readinessProbe.enabled | Enable/disable readinessProbe | true |
discourse.readinessProbe.initialDelaySeconds | Delay before readiness probe is initiated | 30 |
discourse.readinessProbe.periodSeconds | How often to perform the probe | 10 |
discourse.readinessProbe.timeoutSeconds | When the probe times out | 5 |
discourse.readinessProbe.failureThreshold | Minimum consecutive failures for the probe | 6 |
discourse.readinessProbe.successThreshold | Minimum consecutive successes for the probe | 1 |
discourse.customLivenessProbe | Custom liveness probe to execute (when the main one is disabled) | {} |
discourse.customReadinessProbe | Custom readiness probe to execute (when the main one is disabled) | {} |
discourse.smtp.enabled | Enable/disable SMTP | false |
discourse.smtp.host | SMTP host name | "" |
discourse.smtp.port | SMTP port number | "" |
discourse.smtp.user | SMTP account user name | "" |
discourse.smtp.password | SMTP account password | "" |
discourse.smtp.protocol | SMTP protocol (Allowed values: tls, ssl) | "" |
discourse.smtp.auth | SMTP authentication method | "" |
discourse.smtp.existingSecret | Name of an existing Kubernetes secret. The secret must have the following key configured: smtp-password | "" |
discourse.extraEnvVars | An array to add extra env vars | [] |
discourse.extraEnvVarsCM | Array to add extra configmaps | [] |
discourse.extraEnvVarsSecret | Array to add extra environment variables from a secret | "" |
discourse.extraVolumeMounts | Additional volume mounts (used along with extraVolumes) | [] |
discourse.skipInstall | Do not run the Discourse installation wizard | false |
replicaCount | Number of Discourse & Sidekiq replicas | 1 |
extraVolumes | Array of extra volumes to be added deployment. Requires setting extraVolumeMounts | [] |
sidecars | Attach additional sidecar containers to the pod | [] |
initContainers | Additional init containers to add to the pods | [] |
serviceAccount.create | Whether the service account should be created | false |
serviceAccount.annotations | Annotations to add to the service account |
Deploy discourse with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has discourse 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 chartdiscourse is pinned at v5.0.0 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