limesurvey

by martialblog

Helm chartv0.9.0App 6-apache

Limesurvey is the number one open-source survey software.

About this chart

LimeSurvey

LimeSurvey is the number one open-source survey software.

TL;DR

helm repo add martialblog https://martialblog.github.io/helm-charts
helm repo update

helm install my-release \
  --set mariadb.enabled=true \
  --set mariadb.auth.rootPassword=CHANGE-ME \
  --set mariadb.auth.password=CHANGE-ME \
  martialblog/limesurvey

Introduction

This chart bootstraps LimeSurvey deployment on a Kubernetes cluster using the Helm package manager.

It also packages the Bitnami MariaDB chart which is required for bootstrapping a MariaDB deployment for the database requirements of the application. You can also provide your own database instance.

Prerequisites

  • Kubernetes 1.13+
  • Helm 3+
  • PV provisioner support in the underlying infrastructure

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registrynil

LimeSurvey Image parameters

NameDescriptionValue
image.registryLimeSurvey image registrydocker.io
image.repositoryLimeSurvey image repositorymartialblog/limesurvey
image.tagLimeSurvey image tag (immutable tags are recommended)6-apache
image.pullPolicyLimeSurvey image pull policyIfNotPresent
image.pullSecretsLimeSurvey image pull secrets[]

LimeSurvey Configuration parameters

NameDescriptionValue
limesurvey.admin.userLimeSurvey initial Admin Usernameadmin
limesurvey.admin.passwordLimeSurvey initial Admin Passwordnil
limesurvey.admin.nameLimeSurvey initial Admin Full NameAdministrator
limesurvey.admin.emailLimeSurvey initial Admin Email[email protected]
limesurvey.listenPortLimeSurvey Container port for webserver8080
limesurvey.publicUrlLimeSurvey Public URL for public scriptsnil
limesurvey.baseUrlLimeSurvey Application Base URLnil
limesurvey.mysqlEngineMySQL engine used for survey tables (MyISAM or InnoDB)MyISAM
limesurvey.urlFormatLimeSurvey URL Format (pathget)
limesurvey.showScriptNameLimeSurvey Script name in URL (truefalse)
limesurvey.tablePrefixLimeSurvey Database table prefix; set this to a single whitespace if you don't want a table prefix.lime_
limesurvey.tableSessionLimeSurvey Table sessions; For storing sessions in the databasefalse
limesurvey.debugLimeSurvey Debug level (0, 1, 2)0
limesurvey.debugSqlLimeSurvey SQL Debug level (0, 1, 2)0
limesurvey.encrypt.keypairLimeSurvey Data encryption keypairnil
limesurvey.encrypt.publicKeyLimeSurvey Data encryption public keynil
limesurvey.encrypt.secretKeyLimeSurvey Data encryption secret keynil
limesurvey.encrypt.nonceLimeSurvey Data encryption noncenil
limesurvey.encrypt.secretBoxKeyLimeSurvey Data encryption secret box keynil

Persistence Parameters

NameDescriptionValue
persistence.enabledEnable persistence using Persistent Volume Claimstrue
persistence.accessModesPersistent Volume access modes[ReadWriteOnce]
persistence.sizePersistent Volume size5Gi
persistence.storageClassNamePersistent Volume storage class namenil
persistence.subPathPersistent Volume sub pathnil
persistence.finalizersPersistent Volume finalizers[kubernetes.io/pvc-protection]
persistence.selectorLabelsPersistent Volume selector labels{}
persistence.annotationspersistent volume claim annotations{}
persistence.existingClaimThe name of an existing PVC to use for persistencenil

Traffic Exposure Parameters

NameDescriptionValue
service.typeLimeSurvey service typeClusterIP
service.portLimeSurvey service port80
ingress.enabledEnable ingress record generation for LimeSurveyfalse
ingress.classNameIngressClass that will be be used to implement the Ingress""
ingress.hostsAn array with hosts for the Ingresslimesurvey.local
ingress.annotationsAdditional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.{}
ingress.tlsEnable TLS configuration for the host defined at ingress.hostname parameterfalse

Other parameters

NameDescriptionValue
imagePullSecretsDocker registry secret names as an array[]
nameOverrideString to override the Chart Namenil
fullnameOverrideString to fully override the Chart Namenil
extraVolumeMountsAdditional volumes as an array[]
extraEmptyDirMountsAdditional emptyDir volumes as an array[]
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment{}
affinityAffinity for pod assignment{}
podAnnotationsAnnotations for LimeSurvey pods[]
updateStrategy.typeDeployment strategy typeRollingUpdate
updateStrategy.rollingUpdateDeployment rolling update configuration parameters{}
replicaCountNumber of LimeSurvey replicas to deploy1
autoscaling.enabledEnable Horizontal POD autoscaling for LimeSurveyfalse
autoscaling.minReplicasMinimum number of LimeSurvey replicas1
autoscaling.maxReplicasMaximum number of LimeSurvey replicas11
autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage80
podSecurityContext.fsGroupSet LimeSurvey pod's Security Context fsGroup33
podSecurityContext.runAsUserSet LimeSurvey pod's Security Context runAsUser33
podSecurityContext.runAsGroupSet LimeSurvey pod's Security Context runAsGroup33
containerSecurityContext.enabledEnable LimeSurvey containers' Security Contexttrue
containerSecurityContext.allowPrivilegeEscalationDefault LimeSurvey containers' Security Contexttrue

Database Parameters

LimeSurvey requires a MySQL- or PostgreSQL-compatible database.

You can either provide your own:

externalDatabase:
  host: hostname.example
  database: limesurvey-db
  username: limesurvey
  password: "your-super-secret-password"

or you can let the Helm chart provision one for you (based on Bitnami MariaDB Helm chart):

mariadb:
  enabled: true
  auth:
    rootPassword: "please-change-me"
    database: limesurvey
    username: limesurvey
    password: "please-change-me"

In both cases the application will automatically be configured to use these credentials. Please refer to the values.yaml for all possible configuration values.

Configuration and installation details

LimeSurvey Administrator Password

If the initial Admin Password limesurvey.admin.password is not provided it will be set to a random string. You can extract the password from the Secret:

kubectl get secrets --template={{.data.limesurvey-admin-password}} | base64 -d

Upgrading

To 0.9.0

This release bumps the LimeSurvey container used. LimeSurvey 5 is the new LTS. Follow the official instructions for more information.

To 0.6.0

This release bumps the Bitnami MariaDB to 10.6. Follow the official instructions official instructions.

Testing

This Helm chart is tested with helm unittest (test format spec). You can find the test specifications in the ./tests/ directory. Tests are automatically run in CI.

To run the tests locally, use the following command:

# Required for pulling the MariaDB chart
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency build

podman run --rm -v "${PWD}:/apps" docker.io/quintush/helm-unittest:3.7.1-0.2.8 --helm3 .

Deploy limesurvey with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has limesurvey 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartlimesurvey is pinned at v0.9.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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