- removed s3 backup as it does not work out of the box
- added minikube example
This commit is contained in:
parent
f64b1c10b5
commit
060a94b43d
@ -40,17 +40,3 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10G
|
storage: 10G
|
||||||
---
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: zammad-backup
|
|
||||||
namespace: zammad
|
|
||||||
annotations:
|
|
||||||
volume.beta.kubernetes.io/storage-class: standard
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteMany
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10G
|
|
@ -1,7 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: zammad-backup
|
|
||||||
namespace: zammad
|
|
||||||
data:
|
|
||||||
S3_PATH: s3://BUCKET_NAME/
|
|
@ -1,9 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: zammad-backup-s3
|
|
||||||
namespace: zammad
|
|
||||||
type: Opaque
|
|
||||||
data:
|
|
||||||
ACCESS_KEY: 'bash ACCESS_KEY | base64'
|
|
||||||
SECRET_KEY: 'bash SECRET_KEY | base64'
|
|
@ -1,38 +0,0 @@
|
|||||||
apiVersion: apps/v1beta1
|
|
||||||
kind: StatefulSet
|
|
||||||
metadata:
|
|
||||||
name: zammad-backup
|
|
||||||
namespace: zammad
|
|
||||||
labels:
|
|
||||||
component: backup
|
|
||||||
app: zammad
|
|
||||||
spec:
|
|
||||||
serviceName: zammad-backup
|
|
||||||
replicas: 1
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
component: backup
|
|
||||||
app: zammad
|
|
||||||
spec:
|
|
||||||
terminationGracePeriodSeconds: 10
|
|
||||||
volumes:
|
|
||||||
- name: zammad-home
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: zammad-home
|
|
||||||
- name: zammad-backup
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: zammad-backup
|
|
||||||
containers:
|
|
||||||
- name: zammad-backup
|
|
||||||
image: zammad/zammad-docker-compose:zammad-postgresql
|
|
||||||
command:
|
|
||||||
- /usr/local/bin/backup.sh
|
|
||||||
args:
|
|
||||||
- zammad-backup
|
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /home/zammad
|
|
||||||
name: zammad-home
|
|
||||||
- mountPath: /var/tmp/zammad
|
|
||||||
name: zammad-backup
|
|
@ -1,51 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: batch/v1beta1
|
|
||||||
kind: CronJob
|
|
||||||
metadata:
|
|
||||||
name: zammad-backup
|
|
||||||
namespace: zammad
|
|
||||||
labels:
|
|
||||||
component: cronjob
|
|
||||||
app: backup
|
|
||||||
spec:
|
|
||||||
failedJobsHistoryLimit: 0
|
|
||||||
successfulJobsHistoryLimit: 0
|
|
||||||
concurrencyPolicy: Forbid
|
|
||||||
schedule: "0 0 * * *"
|
|
||||||
jobTemplate:
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
component: cronjob
|
|
||||||
app: backup
|
|
||||||
spec:
|
|
||||||
volumes:
|
|
||||||
- name: zammad-backup
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: zammad-backup
|
|
||||||
containers:
|
|
||||||
- name: zammad-backup-s3
|
|
||||||
imagePullPolicy: Always
|
|
||||||
image: robbydooo/docker-backup-to-s3
|
|
||||||
args:
|
|
||||||
- "/start.sh"
|
|
||||||
- "no-cron"
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: zammad-backup
|
|
||||||
env:
|
|
||||||
- name: ACCESS_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: zammad-backup-s3
|
|
||||||
key: ACCESS_KEY
|
|
||||||
- name: SECRET_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: zammad-backup-s3
|
|
||||||
key: SECRET_KEY
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /data
|
|
||||||
name: zammad-backup
|
|
||||||
restartPolicy: OnFailure
|
|
@ -5,19 +5,20 @@
|
|||||||
- On every node you need to set `sysctl -w vm.max_map_count=262144`
|
- On every node you need to set `sysctl -w vm.max_map_count=262144`
|
||||||
- Change the ingress to your needs.
|
- Change the ingress to your needs.
|
||||||
|
|
||||||
## Amazon S3 Backup
|
|
||||||
|
|
||||||
If you want to be synced with a S3 bucket, then just fill the `30_secret_backup.yaml` with your secret and access keys.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo -n "ACCESS_KEY" | base64
|
|
||||||
echo -n "SECRET_KEY" | base64
|
|
||||||
```
|
|
||||||
|
|
||||||
Change the bucket path in the `20_configmap_backup.yaml`.
|
|
||||||
|
|
||||||
That's it.
|
|
||||||
|
|
||||||
## Deploy zammad
|
## Deploy zammad
|
||||||
|
|
||||||
Hit `kubectl apply -f ./` and wait till everything is setup.
|
### Install on Minikube example
|
||||||
|
|
||||||
|
* Install kubectl
|
||||||
|
* https://kubernetes.io/docs/tasks/tools/install-kubectl/
|
||||||
|
* Install Minkube
|
||||||
|
* https://github.com/kubernetes/minikube
|
||||||
|
* minikube start --memory=4096 --cpus=2
|
||||||
|
* minikube ssh
|
||||||
|
* su -
|
||||||
|
* sysctl -w vm.max_map_count=262144
|
||||||
|
* kubectl apply -f .
|
||||||
|
* minikube dashboard
|
||||||
|
* switch to namespace "zammad"
|
||||||
|
* open "Overview" and wait until all pods are green
|
||||||
|
Loading…
Reference in New Issue
Block a user