Back to Charts

Magento

stable/magento/README.md

latest21.5 KB
Original Source

Magento

Magento is a feature-rich flexible e-commerce solution. It includes transaction options, multi-store functionality, loyalty programs, product categorization and shopper filtering, promotion rules, and more.

This Helm chart is deprecated

The Bitnami maintained Magento Helm chart is now located at bitnami/charts, as it now requires Elasticsearch.

In order to ensure that Bitnami maintained charts follow a series of conventions and meet our requirements, all the dependencies must be maintained by Bitnami.

This requirement conflicts with one of the technical requirements of Helm:

All Chart dependencies should also be submitted independently

TL;DR;

console
$ helm install stable/magento

Introduction

This chart bootstraps a Magento 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 as a database for the Magento application.

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.4+ with Beta APIs enabled
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

console
$ helm install --name my-release stable/magento

The command deploys Magento on the Kubernetes cluster in the default configuration. The configuration 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.

Configuration

The following table lists the configurable parameters of the Magento 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)
image.registryMagento image registrydocker.io
image.repositoryMagento Image namebitnami/magento
image.tagMagento Image tag{TAG_NAME}
image.debugSpecify if debug values should be setfalse
image.pullPolicyImage pull policyAlways if imageTag is latest, else IfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
magentoHostMagento host to create application URLsnil
magentoLoadBalancerIPloadBalancerIP for the magento Servicenil
magentoUsernameUser of the applicationuser
magentoPasswordApplication passwordrandom 10 character long alphanumeric string
magentoEmailAdmin email[email protected]
magentoFirstNameMagento Admin First NameFirstName
magentoLastNameMagento Admin Last NameLastName
magentoModeMagento modedeveloper
magentoAdminUriMagento prefix to access Magento Adminadmin
allowEmptyPasswordAllow DB blank passwordsyes
ingress.enabledEnable ingress controller resourcefalse
ingress.annotationsIngress annotations[]
ingress.certManagerAdd annotations for cert-managerfalse
ingress.hosts[0].nameHostname to your Magento installationmagento.local
ingress.hosts[0].pathPath within the url structure/
ingress.hosts[0].tlsUtilize TLS backend in ingressfalse
ingress.hosts[0].tlsHostsArray of TLS hosts for ingress record (defaults to ingress.hosts[0].name if nil)nil
ingress.hosts[0].tlsSecretTLS Secret (certificates)magento.local-tls-secret
ingress.secrets[0].nameTLS Secret Namenil
ingress.secrets[0].certificateTLS Secret Certificatenil
ingress.secrets[0].keyTLS Secret Keynil
externalDatabase.hostHost of the external databasenil
externalDatabase.portPort of the external database3306
externalDatabase.userExisting username in the external dbbn_magento
externalDatabase.passwordPassword for the above usernamenil
externalDatabase.databaseName of the existing databasebitnami_magento
externalElasticsearch.hostHost of the external elasticsearch servernil
externalElasticsearch.portPort of the external elasticsearch servernil
mariadb.enabledWhether to use the MariaDB charttrue
mariadb.rootUser.passwordMariaDB admin passwordnil
mariadb.db.nameDatabase name to createbitnami_magento
mariadb.db.userDatabase user to createbn_magento
mariadb.db.passwordPassword for the databaserandom 10 character long alphanumeric string
elasticsearch.enabledUse the Elasticsearch chart as search enginefalse
service.typeKubernetes Service typeLoadBalancer
service.portService HTTP port80
service.httpsPortService HTTPS port443
nodePorts.httpsKubernetes https node port""
service.externalTrafficPolicyEnable client source IP preservationCluster
service.nodePorts.httpKubernetes http node port""
service.nodePorts.httpsKubernetes https node port""
service.loadBalancerIPloadBalancerIP for the Magento Servicenil
livenessProbe.enabledTurn on and off liveness probetrue
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated1000
livenessProbe.periodSecondsHow often to perform the probe10
livenessProbe.timeoutSecondsWhen the probe times out5
livenessProbe.successThresholdMinimum consecutive successes for the probe1
livenessProbe.failureThresholdMinimum consecutive failures for the probe6
readinessProbe.enabledTurn on and off readiness probetrue
readinessProbe.initialDelaySecondsDelay before readiness probe is initiated30
readinessProbe.periodSecondsHow often to perform the probe5
readinessProbe.timeoutSecondsWhen the probe times out3
readinessProbe.successThresholdMinimum consecutive successes for the probe1
readinessProbe.failureThresholdMinimum consecutive failures for the probe3
persistence.enabledEnable persistence using PVCtrue
persistence.magento.storageClassPVC Storage Class for Magento volumenil (uses alpha storage annotation)
persistence.magento.accessModePVC Access Mode for Magento volumeReadWriteOnce
persistence.magento.sizePVC Storage Request for Magento volume8Gi
resourcesCPU/Memory resource requests/limitsMemory: 512Mi, CPU: 300m
podAnnotationsPod annotations{}
metrics.enabledStart a side-car prometheus exporterfalse
metrics.image.registryApache exporter image registrydocker.io
metrics.image.repositoryApache exporter image namelusotycoon/apache-exporter
metrics.image.tagApache exporter image tagv0.5.0
metrics.image.pullPolicyImage pull policyIfNotPresent
metrics.image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
metrics.podAnnotationsAdditional annotations for Metrics exporter pod{prometheus.io/scrape: "true", prometheus.io/port: "9117"}
metrics.resourcesExporter resource requests/limit{}

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

Note:

Setting elasticsearch.enabled to true will launch seven more pods by default. Use it with caution.

Note:

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

Optionally, you can specify the magentoLoadBalancerIP parameter to assign a reserved IP address to the Magento 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 magento-public-ip

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

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

console
$ helm install --name my-release \
  --set magentoUsername=admin,magentoPassword=password,mariadb.mariadbRootPassword=secretpassword \
    stable/magento

The above command sets the Magento administrator account username and password to admin and password respectively. Additionally, it sets the MariaDB root user password to secretpassword.

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

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

Tip: You can use the default values.yaml

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.

Persistence

The Bitnami Magento image stores the Magento data and configurations at the /bitnami/magento path of the container.

Persistent Volume Claims are used to keep the data across deployments. There is a known issue in Kubernetes Clusters with EBS in different availability zones. Ensure your cluster is configured properly to create Volumes in the same availability zone where the nodes are running. Kuberentes 1.12 solved this issue with the Volume Binding Mode.

Upgrading

To 6.0.0

Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec.

This version updates the apiVersion of the deployment resources was updated to apps/v1 in tune with the api's deprecated, resulting in compatibility breakage.

This major version signifies this change.

To 5.0.0

Manual intervention is needed if configuring Elasticsearch 6 as Magento search engine is desired.

Follow the Magento documentation in order to configure Elasticsearch, setting Search Engine to Elasticsearch 6.0+. If using the Elasticsearch server included in this chart, hostname and port can be obtained with the following commands:

$ kubectl get svc -l app=elasticsearch,component=client,release=RELEASE_NAME -o jsonpath="{.items[0].metadata.name}"
$ kubectl get svc -l app=elasticsearch,component=client,release=RELEASE_NAME -o jsonpath="{.items[0].spec.ports[0].port}"

Where RELEASE_NAME is the name of the release. Use helm list to find it.

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 magento:

console
$ kubectl patch deployment magento-magento --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
$ kubectl delete statefulset magento-mariadb --cascade=false