Back to Charts

Parse

stable/parse/README.md

latest31.4 KB
Original Source

Parse

Parse is an open source version of the Parse backend that can be deployed to any infrastructure that can run Node.js.

This Helm chart is deprecated

Given the stable deprecation timeline, the Bitnami maintained Parse Helm chart is now located at bitnami/charts.

The Bitnami repository is already included in the Hubs and we will continue providing the same cadence of updates, support, etc that we've been keeping here these years. Installation instructions are very similar, just adding the bitnami repo and using it during the installation (bitnami/<chart> instead of stable/<chart>)

bash
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/<chart>           # Helm 3
$ helm install --name my-release bitnami/<chart>    # Helm 2

To update an exisiting stable deployment with a chart hosted in the bitnami repository you can execute

bash
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm upgrade my-release bitnami/<chart>

Issues and PRs related to the chart itself will be redirected to bitnami/charts GitHub repository. In the same way, we'll be happy to answer questions related to this migration process in this issue created as a common place for discussion.

TL;DR;

console
$ helm install my-release stable/parse

Introduction

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

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the BKPR.

Prerequisites

  • Kubernetes 1.12+
  • Helm 2.11+ or Helm 3.0-beta3+
  • 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:

console
$ helm install my-release stable/parse

The command deploys Parse 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:

console
$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

The following table lists the configurable parameters of the Parse chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
nameOverrideString to partially override parse.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override parse.fullname template with a stringnil
volumePermissions.enabledEnable init container that changes volume permissions in the data directory (for cases where the default k8s runAsUser and fsUser values do not work)false
volumePermissions.image.registryInit container volume-permissions image registrydocker.io
volumePermissions.image.repositoryInit container volume-permissions image namebitnami/minideb
volumePermissions.image.tagInit container volume-permissions image tagbuster
volumePermissions.image.pullPolicyInit container volume-permissions image pull policyAlways
volumePermissions.resourcesInit container resource requests/limitnil
service.typeKubernetes Service typeLoadBalancer
service.portService HTTP port (Dashboard)80
service.loadBalancerIPloadBalancerIP for the Parse Servicenil
service.externalTrafficPolicyEnable client source IP preservationCluster
service.nodePorts.httpKubernetes http node port""
server.image.registryParse image registrydocker.io
server.image.repositoryParse image namebitnami/parse
server.image.tagParse image tag{TAG_NAME}
server.image.pullPolicyImage pull policyIfNotPresent
server.image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
server.securityContext.enabledEnable security context for Parse Servertrue
server.securityContext.fsGroupGroup ID for Parse Server container1001
server.securityContext.runAsUserUser ID for Parse Server container1001
server.hostHostname to use to access Parse server (when ingress.enabled=true is set to ingress.server.hosts[0].name by default)nil
server.portParse server port1337
server.mountPathParse server API mount path/parse
server.appIdParse server App IdmyappID
server.masterKeyParse server Master Keyrandom 10 character alphanumeric string
server.enableCloudCodeEnable Parse Cloud Clodefalse
server.cloudCodeScriptsDictionary of Cloud Code scriptsnil
server.existingCloudCodeScriptsCMConfigMap with Cloud Code scripts (Note: Overrides cloudCodeScripts).nil
server.resourcesThe [resources] to allocate for container{}
server.livenessProbeLiveness probe configuration for ServerCheck values.yaml file
server.readinessProbeReadiness probe configuration for ServerCheck values.yaml file
server.affinityAffinity for pod assignment{} (The value is evaluated as a template)
server.nodeSelectorNode labels for pod assignment{} (The value is evaluated as a template)
server.tolerationsTolerations for pod assignment[] (The value is evaluated as a template)
server.extraEnvVarsArray containing extra env vars (evaluated as a template)nil
server.extraEnvVarsCMConfigMap containing extra env vars (evaluated as a template)nil
server.extraEnvVarsSecretSecret containing extra env vars (evaluated as a template)nil
dashboard.enabledEnable parse dashboardtrue
dashboard.image.registryDashboard image registrydocker.io
dashboard.image.repositoryDashboard image namebitnami/parse-dashboard
dashboard.image.tagDashboard image tag{TAG_NAME}
dashboard.image.pullPolicyImage pull policyIfNotPresent
dashboard.securityContext.enabledEnable security context for Dashboardtrue
dashboard.securityContext.fsGroupGroup ID for Dashboard container1001
dashboard.securityContext.runAsUserUser ID for Dashboard container1001
dashboard.image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
dashboard.usernameDashboard usernameuser
dashboard.passwordDashboard user passwordrandom 10 character alphanumeric string
dashboard.appNameDashboard application nameMyDashboard
dashboard.parseServerUrlProtocolProtocol used by Parse Dashboard to form the URLs to Parse Server.http
dashboard.resourcesThe [resources] to allocate for container{}
dashboard.livenessProbeLiveness probe configuration for DashboardCheck values.yaml file
dashboard.readinessProbeReadiness probe configuration for DashboardCheck values.yaml file
dashboard.affinityAffinity for pod assignment{} (The value is evaluated as a template)
dashboard.nodeSelectorNode labels for pod assignment{} (The value is evaluated as a template)
dashboard.tolerationsTolerations for pod assignment[] (The value is evaluated as a template)
dashboard.extraEnvVarsArray containing extra env vars (evaluated as a template)nil
dashboard.extraEnvVarsCMConfigMap containing extra env vars (evaluated as a template)nil
dashboard.extraEnvVarsSecretSecret containing extra env vars (evaluated as a template)nil
persistence.enabledEnable Parse persistence using PVCtrue
persistence.storageClassPVC Storage Class for Parse volumenil (uses alpha storage class annotation)
persistence.accessModePVC Access Mode for Parse volumeReadWriteOnce
persistence.sizePVC Storage Request for Parse volume8Gi
ingress.enabledEnable ingress controller resourcefalse
ingress.annotationsIngress annotations[]
ingress.certManagerAdd annotations for cert-managerfalse
ingress.dashboard.hosts[0].nameHostname to your Parse Dashboard installationghost.local
ingress.dashboard.hosts[0].pathPath within the url structure/
ingress.dashboard.hosts[0].tlsUtilize TLS backend in ingressfalse
ingress.dashboard.hosts[0].tlsHostsArray of TLS hosts for ingress record (defaults to ingress.hosts[0].name if nil)nil
ingress.dashboard.hosts[0].tlsSecretTLS Secret (certificates)ghost.local-tls-secret
ingress.server.hosts[0].nameHostname to your Parse Server installationghost.local
ingress.server.hosts[0].pathPath within the url structure/
ingress.server.hosts[0].tlsUtilize TLS backend in ingressfalse
ingress.server.hosts[0].tlsHostsArray of TLS hosts for ingress record (defaults to ingress.hosts[0].name if nil)nil
ingress.server.hosts[0].tlsSecretTLS Secret (certificates)ghost.local-tls-secret
ingress.secrets[0].nameTLS Secret Namenil
ingress.secrets[0].certificateTLS Secret Certificatenil
ingress.secrets[0].keyTLS Secret Keynil
mongodb.usePasswordEnable MongoDB password authenticationtrue
mongodb.passwordMongoDB admin passwordnil
mongodb.persistence.enabledEnable MongoDB persistence using PVCtrue
mongodb.persistence.storageClassPVC Storage Class for MongoDB volumenil (uses alpha storage class annotation)
mongodb.persistence.accessModePVC Access Mode for MongoDB volumeReadWriteOnce
mongodb.persistence.sizePVC Storage Request for MongoDB volume8Gi

The above parameters map to the env variables defined in bitnami/parse. For more information please refer to the bitnami/parse image documentation.

Note:

For the Parse application function correctly, you should specify the parseHost parameter to specify the FQDN (recommended) or the public IP address of the Parse service.

Optionally, you can specify the loadBalancerIP parameter to assign a reserved IP address to the Parse service of the chart. However please note that this feature is only available on a few cloud providers (f.e. GKE).

To reserve a public IP address on GKE:

bash
$ gcloud compute addresses create parse-public-ip

The reserved IP address can be associated to the Parse service by specifying it as the value of the loadBalancerIP parameter while installing the chart.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

console
$ helm install my-release \
  --set dashboard.username=admin,dashboard.password=password \
    stable/parse

The above command sets the Parse administrator account username and password to admin and password respectively.

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

console
$ helm install my-release -f values.yaml stable/parse

Tip: You can use the default values.yaml

Configuration and installation details

Rolling VS Immutable tags

It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.

Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.

Deploy your Cloud functions with Parse Cloud Code

The Bitnami Parse image allows you to deploy your Cloud functions with Parse Cloud Code (a feature which allows running a piece of code in your Parse Server instead of the user's mobile devices). In order to add your custom scripts, they must be located inside the chart folder files/cloud so they can be consumed as a ConfigMap.

Alternatively, you can specify custom scripts using the cloudCodeScripts parameter as dict.

In addition to these options, you can also set an external ConfigMap with all the Cloud Code scripts. This is done by setting the existingCloudCodeScriptsCM parameter. Note that this will override the two previous options.

Persistence

The Bitnami Parse image stores the Parse data and configurations at the /bitnami/parse path of the container.

Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube. See the Parameters section to configure the PVC or to disable persistence.

Adjust permissions of persistent volume mountpoint

As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it.

By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.

You can enable this initContainer by setting volumePermissions.enabled to true.

Adding extra environment variables

In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the extraEnvVars (available in the server and dashboard sections) property.

yaml
extraEnvVars:
  - name: PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION
    value: true

Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the extraEnvVarsCM or the extraEnvVarsSecret values.

Upgrading

To 10.0.0

Backwards compatibility is not guaranteed. The following notables changes were included:

  • parse-dashboard is bumped to the branch 2 (major version)
  • Labels are adapted to follow the Helm charts best practices.

To 5.1.0

Parse & Parse Dashboard containers were moved to a non-root approach. There shouldn't be any issue when upgrading since the corresponding securityContext is enabled by default. Both container images and chart can be upgraded by running the command below:

$ helm upgrade my-release stable/parse

If you use a previous container image (previous to 3.1.2-r14 for Parse or 1.2.0-r69 for Parse Dashboard), disable the securityContext by running the command below:

$ helm upgrade my-release stable/parse --set server.securityContext.enabled=false,dashboard.securityContext.enabled=false,server.image.tag=XXX,dashboard.image.tag=YYY

To 3.0.0

Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. Use the workaround below to upgrade from versions previous to 3.0.0. The following example assumes that the release name is parse:

console
$ kubectl patch deployment parse-parse-dashboard --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
$ kubectl patch deployment parse-parse-server --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
$ kubectl patch deployment parse-mongodb --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'