diff --git a/README.md b/README.md index 96c3ade4c..4e429c13f 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ Popular applications, provided by [Bitnami](https://bitnami.com), ready to launc - [MariaDB (stable)](https://github.com/kubernetes/charts/tree/master/stable/mariadb) - [MariaDB Cluster (incubator)](https://github.com/bitnami/charts/tree/master/incubator/mariadb-cluster) - [NodeJS (incubator)](https://github.com/bitnami/charts/tree/master/incubator/node) +- [JasperReports Server (incubator)](https://github.com/bitnami/charts/tree/master/incubator/jasperserver) +- [Moodle (incubator)](https://github.com/bitnami/charts/tree/master/incubator/moodle) +- [MySQL (incubator)](https://github.com/bitnami/charts/tree/master/incubator/mysql) +- [Dokuwiki (incubator)](https://github.com/bitnami/charts/tree/master/incubator/dokuwiki) ## Before you begin diff --git a/incubator/apache/Chart.yaml b/incubator/apache/Chart.yaml index b5453bc7c..226b3f2e8 100644 --- a/incubator/apache/Chart.yaml +++ b/incubator/apache/Chart.yaml @@ -1,5 +1,5 @@ name: apache -version: 0.3.4 +version: 0.3.6 description: Chart for Apache HTTP Server keywords: - apache diff --git a/incubator/apache/values.yaml b/incubator/apache/values.yaml index 3947d9390..26f2b9d53 100644 --- a/incubator/apache/values.yaml +++ b/incubator/apache/values.yaml @@ -1,7 +1,7 @@ ## Bitnami Apache image version ## ref: https://hub.docker.com/r/bitnami/apache/tags/ ## -imageTag: 2.4.23-r9 +imageTag: 2.4.23-r12 ## Specify a imagePullPolicy ## 'Always' if imageTag is 'latest', else set to 'IfNotPresent' diff --git a/incubator/dokuwiki/.helmignore b/incubator/dokuwiki/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/incubator/dokuwiki/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/incubator/dokuwiki/Chart.yaml b/incubator/dokuwiki/Chart.yaml new file mode 100644 index 000000000..b5cfd99e0 --- /dev/null +++ b/incubator/dokuwiki/Chart.yaml @@ -0,0 +1,15 @@ +name: dokuwiki +version: 0.1.0 +description: DokuWiki is a standards-compliant, simple to use wiki optimized for creating documentation. It is targeted at developer teams, workgroups, and small companies. All data is stored in plain text files, so no database is required. +keywords: +- dokuwiki +- wiki +- php +home: http://www.dokuwiki.org/ +sources: +- https://github.com/bitnami/bitnami-docker-dokuwiki +maintainers: +- name: Bitnami + email: containers@bitnami.com +engine: gotpl +icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-110x117.png diff --git a/incubator/dokuwiki/README.md b/incubator/dokuwiki/README.md new file mode 100644 index 000000000..9be5cacc5 --- /dev/null +++ b/incubator/dokuwiki/README.md @@ -0,0 +1,91 @@ +# DokuWiki + +[DokuWiki](https://www.dokuwiki.org) DokuWiki is a standards-compliant, simple to use wiki optimized for creating documentation. It is targeted at developer teams, workgroups, and small companies. All data is stored in plain text files, so no database is required. + +## TL;DR; + +```console +$ helm install . +``` + +## Introduction + +This chart bootstraps a [DokuWiki](https://github.com/bitnami/bitnami-docker-dokuwiki) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + + +## 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 ./dokuwiki +``` + +The command deploys DokuWiki 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 DokuWiki chart and their default values. + +| Parameter | Description | Default | +|--------------------------------------|------------------------------------------|---------------------------------------------------------| +| `image` | DokuWiki image | `bitnami/dokuwiki:{VERSION}` | +| `imagePullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | +| `dokuwikiUsername` | User of the application | `user` | +| `dokuwikiFullName` | User's full name | `Full Name` | +| `dokuwikiPassword` | Application password | _random 10 character alphanumeric string_ | +| `dokuwikiEmail` | User email | `user@example.com` | +| `dokuwikiWikiName` | Wiki name | `My Wiki` | +| `serviceType` | Kubernetes Service type | `LoadBalancer` | +| `persistence.enabled` | Enable persistence using PVC | `true` | +| `persistence.apache.storageClass` | PVC Storage Class for apache volume | `generic` | +| `persistence.apache.accessMode` | PVC Access Mode for apache volume | `ReadWriteOnce` | +| `persistence.apache.size` | PVC Storage Request for apache volume | `1Gi` | +| `persistence.dokuwiki.storageClass` | PVC Storage Class for DokuWiki volume | `generic` | +| `persistence.dokuwiki.accessMode` | PVC Access Mode for DokuWiki volume | `ReadWriteOnce` | +| `persistence.dokuwiki.size` | PVC Storage Request for DokuWiki volume | `8Gi` | +| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` | + +The above parameters map to the env variables defined in [bitnami/dokuwiki](http://github.com/bitnami/bitnami-docker-dokuwiki). For more information please refer to the [bitnami/dokuwiki](http://github.com/bitnami/bitnami-docker-dokuwiki) 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 dokuwikiUsername=admin,dokuwikiPassword=password \ + stable/dokuwiki +``` + +The above command sets the DokuWiki 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 --name my-release -f values.yaml stable/dokuwiki +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Persistence + +The [Bitnami DokuWiki](https://github.com/bitnami/bitnami-docker-dokuwiki) image stores the DokuWiki data and configurations at the `/bitnami/dokuwiki` 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. diff --git a/incubator/dokuwiki/templates/NOTES.txt b/incubator/dokuwiki/templates/NOTES.txt new file mode 100644 index 000000000..7fa32a072 --- /dev/null +++ b/incubator/dokuwiki/templates/NOTES.txt @@ -0,0 +1,27 @@ + +1. Get the DokuWiki 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 }} + + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + Watch the status with: 'kubectl get svc -w {{ template "fullname" . }} --namespace {{ .Release.Namespace }}' + + 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. Get your DokuWiki login credentials by running: + + echo Username: {{ .Values.dokuwikiUsername }} + echo Password: $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.dokuwiki-password[*]}"`)) diff --git a/incubator/dokuwiki/templates/_helpers.tpl b/incubator/dokuwiki/templates/_helpers.tpl new file mode 100644 index 000000000..38a7acaf7 --- /dev/null +++ b/incubator/dokuwiki/templates/_helpers.tpl @@ -0,0 +1,17 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} +{{- 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 24 -}} +{{- end -}} + diff --git a/incubator/dokuwiki/templates/apache-pvc.yaml b/incubator/dokuwiki/templates/apache-pvc.yaml new file mode 100644 index 000000000..39fd68974 --- /dev/null +++ b/incubator/dokuwiki/templates/apache-pvc.yaml @@ -0,0 +1,19 @@ +{{- 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: + volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }} +spec: + accessModes: + - {{ .Values.persistence.apache.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.apache.size | quote }} +{{- end -}} diff --git a/incubator/dokuwiki/templates/deployment.yaml b/incubator/dokuwiki/templates/deployment.yaml new file mode 100644 index 000000000..b0002b6cf --- /dev/null +++ b/incubator/dokuwiki/templates/deployment.yaml @@ -0,0 +1,72 @@ +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: DOKUWIKI_USERNAME + value: {{ default "" .Values.dokuwikiUsername | quote }} + - name: DOKUWIKI_FULL_NAME + value: {{ default "" .Values.dokuwikiFullName | quote }} + - name: DOKUWIKI_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "fullname" . }} + key: dokuwiki-password + - name: DOKUWIKI_EMAIL + value: {{ default "" .Values.dokuwikiEmail | quote }} + - name: DOKUWIKI_WIKI_NAME + value: {{ default "" .Values.dokuwikiWikiName | 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: dokuwiki-data + mountPath: /bitnami/dokuwiki + - name: apache-data + mountPath: /bitnami/apache + volumes: + - name: dokuwiki-data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ template "fullname" . }}-dokuwiki + {{- else }} + emptyDir: {} + {{- end }} + - name: apache-data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ template "fullname" . }}-apache + {{- else }} + emptyDir: {} + {{- end }} diff --git a/incubator/dokuwiki/templates/dokuwiki-pvc.yaml b/incubator/dokuwiki/templates/dokuwiki-pvc.yaml new file mode 100644 index 000000000..7bb23460d --- /dev/null +++ b/incubator/dokuwiki/templates/dokuwiki-pvc.yaml @@ -0,0 +1,19 @@ +{{- if .Values.persistence.enabled -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "fullname" . }}-dokuwiki + labels: + app: {{ template "fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + annotations: + volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.dokuwiki.storageClass | quote }} +spec: + accessModes: + - {{ .Values.persistence.dokuwiki.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.dokuwiki.size | quote }} +{{- end -}} diff --git a/incubator/dokuwiki/templates/secrets.yaml b/incubator/dokuwiki/templates/secrets.yaml new file mode 100644 index 000000000..48b36ed60 --- /dev/null +++ b/incubator/dokuwiki/templates/secrets.yaml @@ -0,0 +1,16 @@ +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.dokuwikiPassword }} + dokuwiki-password: {{ .Values.dokuwikiPassword | b64enc | quote }} + {{- else }} + dokuwiki-password: {{ randAlphaNum 10 | b64enc | quote }} + {{- end }} diff --git a/incubator/dokuwiki/templates/svc.yaml b/incubator/dokuwiki/templates/svc.yaml new file mode 100644 index 000000000..6736e0476 --- /dev/null +++ b/incubator/dokuwiki/templates/svc.yaml @@ -0,0 +1,20 @@ +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" . }} diff --git a/incubator/dokuwiki/values.yaml b/incubator/dokuwiki/values.yaml new file mode 100644 index 000000000..08cfe8107 --- /dev/null +++ b/incubator/dokuwiki/values.yaml @@ -0,0 +1,62 @@ +## Bitnami DokuWiki image version +## ref: https://hub.docker.com/r/bitnami/dokuwiki/tags/ +## +image: bitnami/dokuwiki:20160626a-r2 + +## 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: + +## User of the application +## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables +## +dokuwikiUsername: user + +## Application password +## Defaults to a random 10-character alphanumeric string if not set +## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables +# dokuwikiPassword: + +## Admin email +## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables +## +dokuwikiEmail: user@example.com + +## User's Full Name +## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables +## +dokuwikiFullName: Full Name + +## Name of the Wiki +## ref: https://github.com/bitnami/bitnami-docker-dokuwiki#environment-variables +## +dokuwikiWikiName: My Wiki + +## 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: + storageClass: generic + accessMode: ReadWriteOnce + size: 1Gi + dokuwiki: + 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 diff --git a/incubator/jasperserver/.helmignore b/incubator/jasperserver/.helmignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/incubator/jasperserver/.helmignore @@ -0,0 +1 @@ +.git diff --git a/incubator/jasperserver/Chart.yaml b/incubator/jasperserver/Chart.yaml new file mode 100644 index 000000000..e3ab56b7f --- /dev/null +++ b/incubator/jasperserver/Chart.yaml @@ -0,0 +1,18 @@ +name: jasperserver +version: 0.1.0 +description: The JasperReports server can be used as a stand-alone or embedded reporting and BI server that offers web-based reporting, analytic tools and visualization, and a dashboard feature for compiling multiple custom views +keywords: +- BI +- java +- jasper +- reporting +- analytic +- visualization +home: http://community.jaspersoft.com/project/jasperreports-server +sources: +- https://github.com/bitnami/bitnami-docker-jasperserver +maintainers: +- name: Bitnami + email: containers@bitnami.com +engine: gotpl +icon: http://community-static.jaspersoft.com/sites/default/files/styles/project_icon/public/projects/icons/js_reports-server_rg2_0.png diff --git a/incubator/jasperserver/README.md b/incubator/jasperserver/README.md new file mode 100644 index 000000000..8af7e4c00 --- /dev/null +++ b/incubator/jasperserver/README.md @@ -0,0 +1,94 @@ +# jasperserver + +[jasperserver](http://community.jaspersoft.com/project/jasperreports-server) The JasperReports server can be used as a stand-alone or embedded reporting and BI server that offers web-based reporting, analytic tools and visualization, and a dashboard feature for compiling multiple custom views + + +## TL;DR; + +```console +$ helm install . +``` + +## Introduction + +This chart bootstraps a [jasperserver](https://github.com/bitnami/bitnami-docker-jasperserver) 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 jasperserver 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 ./jasperserver +``` + +The command deploys jasperserver 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 jasperserver chart and their default values. + +| Parameter Description | Default | +|------------------------------------------|----------------------------------------------|---------------------------------------------------------| +| `image` | jasperserver image | `bitnami/jasperserver:{VERSION}` | +| `imagePullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | +| `jasperserverUsername` | User of the application | `user` | +| `jasperserverPassword` | Application password | _random 10 character long alphanumeric string_ | +| `smtpHost` | SMTP host | `nil` | +| `smtpPort` | SMTP port | `nil` | +| `smtpEmail` | SMTP Email | `nil` | +| `smtpUser` | SMTP user | `nil` | +| `smtpProtocol` | SMTP protocol | `nil` | +| `smtpPassword` | SMTP password | `nil` | +| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` | +| `serviceType` | Kubernetes Service type | `LoadBalancer` | +| `persistence.enabled` | Enable persistence using PVC | `true` | +| `persistence.jasperserver.storageClass` | PVC Storage Class for jasperserver volume | `generic` | +| `persistence.jasperserver.accessMode` | PVC Access Mode for jasperserver volume | `ReadWriteOnce` | +| `persistence.jasperserver.size` | PVC Storage Request for jasperserver volume | `8Gi` | +| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` | + +The above parameters map to the env variables defined in [bitnami/jasperserver](http://github.com/bitnami/bitnami-docker-jasperserver). For more information please refer to the [bitnami/jasperserver](http://github.com/bitnami/bitnami-docker-jasperserver) 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 jasperserverUsername=admin,jasperserverPassword=bitnami,mariadb.mariadbRootPassword=secretpassword \ + stable/jasperserver +``` + +The above command sets the jasperserver 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/jasperserver +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Persistence + +The [Bitnami jasperserver](https://github.com/bitnami/bitnami-docker-jasperserver) image stores the jasperserver data and configurations at the `/bitnami/jasperserver` 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 [Configuration](#configuration) section to configure the PVC or to disable persistence. diff --git a/incubator/jasperserver/requirements.yaml b/incubator/jasperserver/requirements.yaml new file mode 100644 index 000000000..31911a028 --- /dev/null +++ b/incubator/jasperserver/requirements.yaml @@ -0,0 +1,4 @@ +dependencies: +- name: mariadb + version: 0.5.4 + repository: https://kubernetes-charts.storage.googleapis.com/ diff --git a/incubator/jasperserver/templates/NOTES.txt b/incubator/jasperserver/templates/NOTES.txt new file mode 100644 index 000000000..3872a5538 --- /dev/null +++ b/incubator/jasperserver/templates/NOTES.txt @@ -0,0 +1,27 @@ + +1. Get the jasperserver 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 }} + + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + Watch the status with: 'kubectl get svc -w {{ template "fullname" . }} --namespace {{ .Release.Namespace }}' + + 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:8080 +{{- end }} + +2. Get your jasperserver login credentials by running: + + echo Username: {{ .Values.jasperserverUsername }} + echo Password: $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.jasperserver-password[*]}"`)) diff --git a/incubator/jasperserver/templates/_helpers.tpl b/incubator/jasperserver/templates/_helpers.tpl new file mode 100644 index 000000000..4355810df --- /dev/null +++ b/incubator/jasperserver/templates/_helpers.tpl @@ -0,0 +1,24 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} +{{- 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 24 -}} +{{- 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 24 -}} +{{- end -}} diff --git a/incubator/jasperserver/templates/deployment.yaml b/incubator/jasperserver/templates/deployment.yaml new file mode 100644 index 000000000..4b2de92a7 --- /dev/null +++ b/incubator/jasperserver/templates/deployment.yaml @@ -0,0 +1,79 @@ +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: JASPERSERVER_USERNAME + value: {{ default "" .Values.jasperserverUsername | quote }} + - name: JASPERSERVER_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "fullname" . }} + key: jasperserver-password + - name: SMTP_EMAIL + value: {{ default "" .Values.smtpEmail| 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_PROTOCOL + value: {{ default "" .Values.smtpProtocol | quote }} + - name: SMTP_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "fullname" . }} + key: smtp-password + ports: + - name: http + containerPort: 8080 + livenessProbe: + httpGet: + path: /jasperserver/ + port: http + initialDelaySeconds: 300 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /jasperserver/ + port: http + initialDelaySeconds: 5 + timeoutSeconds: 1 + resources: +{{ toYaml .Values.resources | indent 10 }} + volumeMounts: + - name: jasperserver-data + mountPath: /bitnami/jasperserver + volumes: + - name: jasperserver-data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ template "fullname" . }} + {{- else }} + emptyDir: {} + {{- end }} diff --git a/incubator/jasperserver/templates/pvc.yaml b/incubator/jasperserver/templates/pvc.yaml new file mode 100644 index 000000000..97a98ea42 --- /dev/null +++ b/incubator/jasperserver/templates/pvc.yaml @@ -0,0 +1,19 @@ +{{- if .Values.persistence.enabled -}} +kind: PersistentVolumeClaim +apiVersion: v1 +labels: + app: {{ template "fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +metadata: + name: {{ template "fullname" . }} + annotations: + volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.jasperserver.storageClass | quote }} +spec: + accessModes: + - {{ .Values.persistence.jasperserver.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.jasperserver.size | quote }} +{{- end -}} diff --git a/incubator/jasperserver/templates/secrets.yaml b/incubator/jasperserver/templates/secrets.yaml new file mode 100644 index 000000000..0a0a29c8b --- /dev/null +++ b/incubator/jasperserver/templates/secrets.yaml @@ -0,0 +1,17 @@ +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.jasperserverPassword }} + jasperserver-password: {{ .Values.jasperserverPassword | b64enc | quote }} + {{- else }} + jasperserver-password: {{ randAlphaNum 10 | b64enc | quote }} + {{- end }} + smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }} diff --git a/incubator/jasperserver/templates/svc.yaml b/incubator/jasperserver/templates/svc.yaml new file mode 100644 index 000000000..cf77abe82 --- /dev/null +++ b/incubator/jasperserver/templates/svc.yaml @@ -0,0 +1,17 @@ +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 + selector: + app: {{ template "fullname" . }} diff --git a/incubator/jasperserver/values.yaml b/incubator/jasperserver/values.yaml new file mode 100644 index 000000000..276687c08 --- /dev/null +++ b/incubator/jasperserver/values.yaml @@ -0,0 +1,71 @@ +## Bitnami jasperserver image version +## ref: https://hub.docker.com/r/bitnami/jasperserver/tags/ +## +image: bitnami/jasperserver:6.3.0-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: + +## User of the application +## ref: https://github.com/bitnami/bitnami-docker-jasperserver#environment-variables +## +jasperserverUsername: user + +## Application password +## Defaults to a random 10-character alphanumeric string if not set +## ref: https://github.com/bitnami/bitnami-docker-jasperserver#environment-variables +# jasperserverPassword: + +## SMTP mail delivery configuration +## ref: https://github.com/bitnami/bitnami-docker-jasperserver#smtp-configuration +## +# smtpHost: +# smtpPort: +# smtpEmail: +# 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: secretpassword + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + enabled: true + 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 + jasperserver: + 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 diff --git a/incubator/jenkins/Chart.yaml b/incubator/jenkins/Chart.yaml index 458f91879..b368e9e23 100644 --- a/incubator/jenkins/Chart.yaml +++ b/incubator/jenkins/Chart.yaml @@ -1,5 +1,5 @@ name: jenkins -version: 0.3.6 +version: 0.3.7 description: The leading open source automation server keywords: - jenkins diff --git a/incubator/jenkins/values.yaml b/incubator/jenkins/values.yaml index 060c2caa5..15c096f1f 100644 --- a/incubator/jenkins/values.yaml +++ b/incubator/jenkins/values.yaml @@ -1,7 +1,7 @@ ## Bitnami Jenkins image version ## ref: https://hub.docker.com/r/bitnami/jenkins/tags/ ## -imageTag: 2.30-r0 +imageTag: 2.33-r0 ## Specify a imagePullPolicy ## Defaults to 'Always' if imageTag is 'latest', else set to 'IfNotPresent' diff --git a/incubator/magento/Chart.yaml b/incubator/magento/Chart.yaml index aa2c02afa..0fabf329b 100644 --- a/incubator/magento/Chart.yaml +++ b/incubator/magento/Chart.yaml @@ -1,5 +1,5 @@ name: magento -version: 0.3.6 +version: 0.3.7 description: 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. keywords: - magento diff --git a/incubator/magento/requirements.lock b/incubator/magento/requirements.lock index 084010051..7eb30f616 100644 --- a/incubator/magento/requirements.lock +++ b/incubator/magento/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: mariadb - repository: http://storage.googleapis.com/kubernetes-charts - version: 0.5.2 -digest: sha256:400ac77ff2337dce024b0225bbfed9f509d77eb6ff6ee10000d59c5f6a367d51 -generated: 2016-10-20T17:55:13.834613554-07:00 + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 0.5.4 +digest: sha256:7388428c9d365911ec0431462cd31a7feb89dd9b8488e387448f598017dea49d +generated: 2016-12-08T15:17:52.50703327+05:30 diff --git a/incubator/magento/requirements.yaml b/incubator/magento/requirements.yaml index 1417e46ef..31911a028 100644 --- a/incubator/magento/requirements.yaml +++ b/incubator/magento/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: mariadb - version: 0.5.2 - repository: http://storage.googleapis.com/kubernetes-charts + version: 0.5.4 + repository: https://kubernetes-charts.storage.googleapis.com/ diff --git a/incubator/magento/values.yaml b/incubator/magento/values.yaml index 9f31b20ac..acbb1cce3 100644 --- a/incubator/magento/values.yaml +++ b/incubator/magento/values.yaml @@ -1,7 +1,7 @@ ## Bitnami Magento image version ## ref: https://hub.docker.com/r/bitnami/magento/tags/ ## -imageTag: 2.1.2-r3 +imageTag: 2.1.2-r6 ## Specify a imagePullPolicy ## Defaults to 'Always' if imageTag is 'latest', else set to 'IfNotPresent' diff --git a/incubator/mariadb-cluster/Chart.yaml b/incubator/mariadb-cluster/Chart.yaml index 3bd299b9f..249c458a2 100644 --- a/incubator/mariadb-cluster/Chart.yaml +++ b/incubator/mariadb-cluster/Chart.yaml @@ -1,5 +1,5 @@ name: mariadb-cluster -version: 0.3.3 +version: 0.3.5 description: Chart to create a Highly available MariaDB cluster keywords: - mariadb diff --git a/incubator/mariadb-cluster/values.yaml b/incubator/mariadb-cluster/values.yaml index b536c9b52..8e10cd492 100644 --- a/incubator/mariadb-cluster/values.yaml +++ b/incubator/mariadb-cluster/values.yaml @@ -1,7 +1,7 @@ ## Bitnami MariaDB image version ## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ ## -imageTag: 10.1.19-r2 +imageTag: 10.1.19-r4 ## Specify a imagePullPolicy ## 'Always' if imageTag is 'latest', else set to 'IfNotPresent' diff --git a/incubator/memcached/Chart.yaml b/incubator/memcached/Chart.yaml index d0443574f..f9171e06d 100644 --- a/incubator/memcached/Chart.yaml +++ b/incubator/memcached/Chart.yaml @@ -1,5 +1,5 @@ name: memcached -version: 0.3.5 +version: 0.3.7 description: Chart for Memcached keywords: - memcached diff --git a/incubator/memcached/values.yaml b/incubator/memcached/values.yaml index d01593d0e..c897c2d71 100644 --- a/incubator/memcached/values.yaml +++ b/incubator/memcached/values.yaml @@ -1,7 +1,7 @@ ## Bitnami Memcached image version ## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ ## -imageTag: 1.4.33-r1 +imageTag: 1.4.33-r3 ## Specify a imagePullPolicy ## 'Always' if imageTag is 'latest', else set to 'IfNotPresent' diff --git a/incubator/moodle/.helmignore b/incubator/moodle/.helmignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/incubator/moodle/.helmignore @@ -0,0 +1 @@ +.git diff --git a/incubator/moodle/Chart.yaml b/incubator/moodle/Chart.yaml new file mode 100644 index 000000000..56cdc867e --- /dev/null +++ b/incubator/moodle/Chart.yaml @@ -0,0 +1,15 @@ +name: moodle +version: 0.1.1 +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://moodle.org/theme/image.php/moodleorgcleaned_moodleorg/theme_moodleorgcleaned/1479806622/moodle-logo diff --git a/incubator/moodle/README.md b/incubator/moodle/README.md new file mode 100644 index 000000000..29a024853 --- /dev/null +++ b/incubator/moodle/README.md @@ -0,0 +1,96 @@ +# 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 | `Always` if `imageTag` is `latest`, else `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` | +| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` | +| `serviceType` | Kubernetes Service type | `LoadBalancer` | +| `persistence.enabled` | Enable persistence using PVC | `true` | +| `persistence.apache.storageClass` | PVC Storage Class for apache volume | `generic` | +| `persistence.apache.accessMode` | PVC Access Mode for apache volume | `ReadWriteOnce` | +| `persistence.apache.size` | PVC Storage Request for apache volume | `8Gi` | +| `persistence.moodle.storageClass` | PVC Storage Class for moodle volume | `generic` | +| `persistence.moodle.accessMode` | PVC Access Mode for moodle volume | `ReadWriteOnce` | +| `persistence.moodle.size` | PVC Storage Request for moodle volume | `8Gi` | +| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` | + +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` 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 [Configuration](#configuration) section to configure the PVC or to disable persistence. diff --git a/incubator/moodle/requirements.lock b/incubator/moodle/requirements.lock new file mode 100644 index 000000000..7eb30f616 --- /dev/null +++ b/incubator/moodle/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: mariadb + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 0.5.4 +digest: sha256:7388428c9d365911ec0431462cd31a7feb89dd9b8488e387448f598017dea49d +generated: 2016-12-08T15:17:52.50703327+05:30 diff --git a/incubator/moodle/requirements.yaml b/incubator/moodle/requirements.yaml new file mode 100644 index 000000000..31911a028 --- /dev/null +++ b/incubator/moodle/requirements.yaml @@ -0,0 +1,4 @@ +dependencies: +- name: mariadb + version: 0.5.4 + repository: https://kubernetes-charts.storage.googleapis.com/ diff --git a/incubator/moodle/templates/NOTES.txt b/incubator/moodle/templates/NOTES.txt new file mode 100644 index 000000000..de1a9afd1 --- /dev/null +++ b/incubator/moodle/templates/NOTES.txt @@ -0,0 +1,27 @@ + +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 }} + + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + Watch the status with: 'kubectl get svc -w {{ template "fullname" . }} --namespace {{ .Release.Namespace }}' + + 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. Get your moodle login credentials by running: + + echo Username: {{ .Values.moodleUsername }} + echo Password: $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.moodle-password[*]}"`)) diff --git a/incubator/moodle/templates/_helpers.tpl b/incubator/moodle/templates/_helpers.tpl new file mode 100644 index 000000000..4355810df --- /dev/null +++ b/incubator/moodle/templates/_helpers.tpl @@ -0,0 +1,24 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} +{{- 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 24 -}} +{{- 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 24 -}} +{{- end -}} diff --git a/incubator/moodle/templates/apache-pvc.yaml b/incubator/moodle/templates/apache-pvc.yaml new file mode 100644 index 000000000..95a0e576c --- /dev/null +++ b/incubator/moodle/templates/apache-pvc.yaml @@ -0,0 +1,19 @@ +{{- if .Values.persistence.enabled -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + labels: + app: {{ template "fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ template "fullname" . }}-apache + annotations: + volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }} +spec: + accessModes: + - {{ .Values.persistence.apache.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.apache.size | quote }} +{{- end -}} diff --git a/incubator/moodle/templates/deployment.yaml b/incubator/moodle/templates/deployment.yaml new file mode 100644 index 000000000..5d39e4905 --- /dev/null +++ b/incubator/moodle/templates/deployment.yaml @@ -0,0 +1,90 @@ +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_PROTOCOL + value: {{ default "" .Values.smtpProtocol | 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 + ports: + - name: http + containerPort: 80 + - name: https + containerPort: 443 + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 120 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 30 + 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 }} diff --git a/incubator/moodle/templates/moodle-pvc.yaml b/incubator/moodle/templates/moodle-pvc.yaml new file mode 100644 index 000000000..46a8d470e --- /dev/null +++ b/incubator/moodle/templates/moodle-pvc.yaml @@ -0,0 +1,19 @@ +{{- if .Values.persistence.enabled -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + labels: + app: {{ template "fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ template "fullname" . }}-moodle + annotations: + volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.moodle.storageClass | quote }} +spec: + accessModes: + - {{ .Values.persistence.moodle.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.moodle.size | quote }} +{{- end -}} diff --git a/incubator/moodle/templates/secrets.yaml b/incubator/moodle/templates/secrets.yaml new file mode 100644 index 000000000..11a8fc791 --- /dev/null +++ b/incubator/moodle/templates/secrets.yaml @@ -0,0 +1,17 @@ +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 }} diff --git a/incubator/moodle/templates/svc.yaml b/incubator/moodle/templates/svc.yaml new file mode 100644 index 000000000..6736e0476 --- /dev/null +++ b/incubator/moodle/templates/svc.yaml @@ -0,0 +1,20 @@ +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" . }} diff --git a/incubator/moodle/values.yaml b/incubator/moodle/values.yaml new file mode 100644 index 000000000..9e5e0a24c --- /dev/null +++ b/incubator/moodle/values.yaml @@ -0,0 +1,79 @@ +## Bitnami moodle image version +## ref: https://hub.docker.com/r/bitnami/moodle/tags/ +## +image: bitnami/moodle:3.1.3-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: + +## User of the application +## ref: https://github.com/bitnami/bitnami-docker-moodle#environment-variables +## +moodleUsername: user + +## Application password +## Defaults to a random 10-character alphanumeric string if not set +## ref: https://github.com/bitnami/bitnami-docker-moodle#environment-variables +#moodlePassword: + +## Admin email +## ref: https://github.com/bitnami/bitnami-docker-moodle#environment-variables +## +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: secretpassword + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + enabled: true + 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: + storageClass: generic + accessMode: ReadWriteOnce + size: 1Gi + moodle: + 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 diff --git a/incubator/mysql/Chart.yaml b/incubator/mysql/Chart.yaml new file mode 100644 index 000000000..d5e22a3f0 --- /dev/null +++ b/incubator/mysql/Chart.yaml @@ -0,0 +1,15 @@ +name: mysql +version: 0.1.0 +description: MySQL is a fast, reliable, scalable, and easy to use open-source relational database system. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. +keywords: +- mysql +- database +- sql +home: https://mysql.com +sources: +- https://github.com/bitnami/bitnami-docker-mysql +maintainers: +- name: Bitnami + email: containers@bitnami.com +engine: gotpl +icon: https://bitnami.com/assets/stacks/mysql/img/mysql-stack-220x234.png diff --git a/incubator/mysql/README.md b/incubator/mysql/README.md new file mode 100644 index 000000000..3b6d6326c --- /dev/null +++ b/incubator/mysql/README.md @@ -0,0 +1,108 @@ +# MySQL + +[MySQL](https://mysql.com ) MySQL is a fast, reliable, scalable, and easy to use open-source relational database system. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. + + +## TL;DR; + +```bash +$ helm install stable/mysql +``` + +## Introduction + +This chart bootstraps a [MySQL](https://github.com/bitnami/bitnami-docker-mysql) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## 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`: + +```bash +$ helm install --name my-release stable/mysql +``` + +The command deploys MySQL 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: + +```bash +$ 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 MySQL chart and their default values. + +| Parameter | Description | Default | +| -------------------------- | ------------------------------------------ | ---------------------------------------------------------- | +| `image` | MySQL image | `bitnami/mysql:{VERSION}` | +| `imagePullPolicy` | Image pull policy. | `Always` if `imageTag` is `latest`, else `IfNotPresent`. | +| `mysqlRootPassword` | Password for the `root` user. | `nil` | +| `mysqlUser` | Username of new user to create. | `nil` | +| `mysqlPassword` | Password for the new user. | `nil` | +| `mysqlDatabase` | Name for new database to create. | `nil` | +| `persistence.enabled` | Use a PVC to persist data | `true` | +| `persistence.storageClass` | Storage class of backing PVC | `generic` | +| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | +| `persistence.size` | Size of data volume | `8Gi` | +| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` | +| `config` | Multi-line string for my.cnf configuration | `nil` | + +The above parameters map to the env variables defined in [bitnami/mysql](http://github.com/bitnami/bitnami-docker-mysql). For more information please refer to the [bitnami/mysql](http://github.com/bitnami/bitnami-docker-mysql) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install --name my-release \ + --set mysqlRootPassword=secretpassword,mysqlUser=my-user,mysqlPassword=my-password,mysqlDatabase=my-database \ + stable/mysql +``` + +The above command sets the MySQL `root` account password to `secretpassword`. Additionally it creates a standard database user named `my-user`, with the password `my-password`, who has access to a database named `my-database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install --name my-release -f values.yaml stable/mysql +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +### Custom my.cnf configuration + +The Bitnami MySQL image allows you to provide a custom `my.cnf` file for configuring MySQL. +This Chart uses the `config` value to mount a custom `my.cnf` using a [ConfigMap](http://kubernetes.io/docs/user-guide/configmap/). +You can configure this by creating a YAML file that defines the `config` property as a multi-line string in the format of a `my.cnf` file. +For example: + +```bash +cat > mysql-values.yaml <