mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-19 18:16:12 +10:00
Merge branch 'moodle-goes-official'
This commit is contained in:
@@ -15,7 +15,7 @@ Popular applications, provided by [Bitnami](https://bitnami.com), ready to launc
|
||||
- [MediaWiki (stable)](https://github.com/kubernetes/charts/tree/master/stable/mediawiki)
|
||||
- [Memcached (incubator)](https://github.com/bitnami/charts/tree/master/incubator/memcached)
|
||||
- [MongoDB (stable)](https://github.com/kubernetes/charts/tree/master/stable/mongodb)
|
||||
- [Moodle (incubator)](https://github.com/bitnami/charts/tree/master/incubator/moodle)
|
||||
- [Moodle (stable)](https://github.com/kubernetes/charts/tree/master/stable/moodle)
|
||||
- [MySQL (incubator)](https://github.com/bitnami/charts/tree/master/incubator/mysql)
|
||||
- [nginx (incubator)](https://github.com/bitnami/charts/tree/master/incubator/nginx)
|
||||
- [NodeJS (incubator)](https://github.com/bitnami/charts/tree/master/incubator/node)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.git
|
||||
@@ -1,15 +0,0 @@
|
||||
name: moodle
|
||||
version: 0.1.2
|
||||
description: Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments
|
||||
keywords:
|
||||
- moodle
|
||||
- learning
|
||||
- php
|
||||
home: http://www.moodle.org/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-moodle
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/moodle/img/moodle-stack-110x117.png
|
||||
@@ -1,100 +0,0 @@
|
||||
# Moodle
|
||||
|
||||
[Moodle](https://www.moodle.org) Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm install .
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [Moodle](https://github.com/bitnami/bitnami-docker-moodle) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
It also packages the [Bitnami MariaDB chart](https://github.com/kubernetes/charts/tree/master/stable/mariadb) which is required for bootstrapping a MariaDB deployment for the database requirements of the Moodle application.
|
||||
|
||||
## 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 ./moodle
|
||||
```
|
||||
|
||||
The command deploys Moodle on the Kubernetes cluster in the default configuration. The [configuration](#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 tables lists the configurable parameters of the Moodle chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|------------------------------------|----------------------------------------|---------------------------------------------|
|
||||
| `image` | Moodle image | `bitnami/moodle:{VERSION}` |
|
||||
| `imagePullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `moodleUsername` | User of the application | `user` |
|
||||
| `moodlePassword` | Application password | _random 10 character alphanumeric string_ |
|
||||
| `moodleEmail` | Admin email | `user@example.com` |
|
||||
| `smtpHost` | SMTP host | `nil` |
|
||||
| `smtpPort` | SMTP port | `nil` |
|
||||
| `smtpProtocol` | SMTP Protocol | `nil` |
|
||||
| `smtpUser` | SMTP user | `nil` |
|
||||
| `smtpPassword` | SMTP password | `nil` |
|
||||
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
|
||||
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `nil` (uses alpha storage class annotation) |
|
||||
| `persistence.apache.accessMode` | PVC Access Mode for Apache volume | `ReadWriteOnce` |
|
||||
| `persistence.apache.size` | PVC Storage Request for Apache volume | `1Gi` |
|
||||
| `persistence.moodle.storageClass` | PVC Storage Class for Moodle volume | `nil` (uses alpha storage class annotation) |
|
||||
| `persistence.moodle.accessMode` | PVC Access Mode for Moodle volume | `ReadWriteOnce` |
|
||||
| `persistence.moodle.size` | PVC Storage Request for Moodle volume | `8Gi` |
|
||||
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
|
||||
| `mariadb.persistence.enabled` | Enable MariaDB persistence using PVC | `true` |
|
||||
| `mariadb.persistence.storageClass` | PVC Storage Class for MariaDB volume | `generic` |
|
||||
| `mariadb.persistence.accessMode` | PVC Access Mode for MariaDB volume | `ReadWriteOnce` |
|
||||
| `mariadb.persistence.size` | PVC Storage Request for MariaDB volume | `8Gi` |
|
||||
|
||||
The above parameters map to the env variables defined in [bitnami/moodle](http://github.com/bitnami/bitnami-docker-moodle). For more information please refer to the [bitnami/moodle](http://github.com/bitnami/bitnami-docker-moodle) image documentation.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set moodleUsername=admin,moodlePassword=password,mariadb.mariadbRootPassword=secretpassword \
|
||||
stable/moodle
|
||||
```
|
||||
|
||||
The above command sets the Moodle 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/moodle
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Bitnami Moodle](https://github.com/bitnami/bitnami-docker-moodle) image stores the Moodle data and configurations at the `/bitnami/moodle` and `/bitnami/apache` paths 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 [Configuration](#configuration) section to configure the PVC or to disable persistence.
|
||||
@@ -1,9 +0,0 @@
|
||||
dependencies:
|
||||
- condition: ""
|
||||
enabled: false
|
||||
name: mariadb
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
tags: null
|
||||
version: 0.5.9
|
||||
digest: sha256:ffd85614e09ad85c32cff0ab8a60aaf8780c3aaa3c7c46d80548973818bf12d3
|
||||
generated: 2017-02-24T10:48:01.064141178+05:30
|
||||
@@ -1,4 +0,0 @@
|
||||
dependencies:
|
||||
- name: mariadb
|
||||
version: 0.5.x
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
@@ -1,29 +0,0 @@
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
1. Get the Moodle URL by running:
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT/
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
|
||||
** Please ensure an external IP is associated to the {{ template "fullname" . }} service before proceeding **
|
||||
** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }} **
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP/
|
||||
{{- else if contains "ClusterIP" .Values.serviceType }}
|
||||
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo http://127.0.0.1:8080/
|
||||
kubectl port-forward $POD_NAME 8080:80
|
||||
{{- end }}
|
||||
|
||||
2. Login with the following credentials
|
||||
|
||||
echo Username: {{ .Values.moodleUsername }}
|
||||
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.moodle-password}" | base64 --decode)
|
||||
@@ -1,24 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "mariadb.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
@@ -1,23 +0,0 @@
|
||||
{{- if .Values.persistence.enabled -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-apache
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
{{- if .Values.persistence.apache.storageClass }}
|
||||
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }}
|
||||
{{- else }}
|
||||
volume.alpha.kubernetes.io/storage-class: default
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.apache.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.apache.size | quote }}
|
||||
{{- end -}}
|
||||
@@ -1,90 +0,0 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
image: "{{ .Values.image }}"
|
||||
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
|
||||
env:
|
||||
- name: MARIADB_HOST
|
||||
value: {{ template "mariadb.fullname" . }}
|
||||
- name: MARIADB_PORT
|
||||
value: "3306"
|
||||
- name: MARIADB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mariadb.fullname" . }}
|
||||
key: mariadb-root-password
|
||||
- name: MOODLE_USERNAME
|
||||
value: {{ default "" .Values.moodleUsername | quote }}
|
||||
- name: MOODLE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
key: moodle-password
|
||||
- name: MOODLE_EMAIL
|
||||
value: {{ default "" .Values.moodleEmail | quote }}
|
||||
- name: SMTP_HOST
|
||||
value: {{ default "" .Values.smtpHost | quote }}
|
||||
- name: SMTP_PORT
|
||||
value: {{ default "" .Values.smtpPort | quote }}
|
||||
- name: SMTP_USER
|
||||
value: {{ default "" .Values.smtpUser | quote }}
|
||||
- name: SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
key: smtp-password
|
||||
- name: SMTP_PROTOCOL
|
||||
value: {{ default "" .Values.smtpProtocol | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
- name: https
|
||||
containerPort: 443
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 120
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 10 }}
|
||||
volumeMounts:
|
||||
- name: moodle-data
|
||||
mountPath: /bitnami/moodle
|
||||
- name: apache-data
|
||||
mountPath: /bitnami/apache
|
||||
volumes:
|
||||
- name: moodle-data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "fullname" . }}-moodle
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: apache-data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "fullname" . }}-apache
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
@@ -1,23 +0,0 @@
|
||||
{{- if .Values.persistence.enabled -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-moodle
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
{{- if .Values.persistence.moodle.storageClass }}
|
||||
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.moodle.storageClass | quote }}
|
||||
{{- else }}
|
||||
volume.alpha.kubernetes.io/storage-class: default
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.moodle.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.moodle.size | quote }}
|
||||
{{- end -}}
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
type: Opaque
|
||||
data:
|
||||
{{ if .Values.moodlePassword }}
|
||||
moodle-password: {{ default "" .Values.moodlePassword | b64enc | quote }}
|
||||
{{ else }}
|
||||
moodle-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
||||
smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
|
||||
@@ -1,20 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
- name: https
|
||||
port: 443
|
||||
targetPort: https
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
@@ -1,87 +0,0 @@
|
||||
## Bitnami Moodle` image version
|
||||
## ref: https://hub.docker.com/r/bitnami/moodle/tags/
|
||||
##
|
||||
image: bitnami/moodle:3.2.1-r3
|
||||
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
||||
## User of the application
|
||||
## ref: https://github.com/bitnami/bitnami-docker-moodle#configuration
|
||||
##
|
||||
moodleUsername: user
|
||||
|
||||
## Application password
|
||||
## Defaults to a random 10-character alphanumeric string if not set
|
||||
## ref: https://github.com/bitnami/bitnami-docker-moodle#configuration
|
||||
##
|
||||
# moodlePassword:
|
||||
|
||||
## Admin email
|
||||
## ref: https://github.com/bitnami/bitnami-docker-moodle#configuration
|
||||
moodleEmail: user@example.com
|
||||
|
||||
## SMTP mail delivery configuration
|
||||
## ref: https://github.com/bitnami/bitnami-docker-moodle/#smtp-configuration
|
||||
# smtpHost:
|
||||
# smtpPort:
|
||||
# smtpUser:
|
||||
# smtpPassword:
|
||||
# smtpProtocol:
|
||||
|
||||
##
|
||||
## MariaDB chart configuration
|
||||
##
|
||||
mariadb:
|
||||
## MariaDB admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
# mariadbRootPassword:
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
|
||||
## Default: volume.alpha.kubernetes.io/storage-class: default
|
||||
##
|
||||
# storageClass: generic
|
||||
accessMode: ReadWriteOnce
|
||||
size: 8Gi
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
##
|
||||
serviceType: LoadBalancer
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
apache:
|
||||
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
|
||||
## Default: volume.alpha.kubernetes.io/storage-class: default
|
||||
##
|
||||
# storageClass: generic
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
moodle:
|
||||
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
|
||||
## Default: volume.alpha.kubernetes.io/storage-class: default
|
||||
##
|
||||
# storageClass: generic
|
||||
accessMode: ReadWriteOnce
|
||||
size: 8Gi
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
cpu: 300m
|
||||
Reference in New Issue
Block a user