removed Kubernetes manifests as Helm chart will be ready soon - just wait for #35c3 ;-)
This commit is contained in:
parent
0b0e4c0cbf
commit
1cf7e94f43
@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: zammad
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad
|
||||
namespace: zammad
|
||||
spec:
|
||||
storageClassName: standard
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10G
|
||||
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad-backup
|
||||
namespace: zammad
|
||||
spec:
|
||||
storageClassName: standard
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10G
|
||||
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad-elasticsearch
|
||||
namespace: zammad
|
||||
spec:
|
||||
storageClassName: standard
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10G
|
||||
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad-postgresql
|
||||
namespace: zammad
|
||||
spec:
|
||||
storageClassName: standard
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10G
|
@ -1,59 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-configmap
|
||||
namespace: zammad
|
||||
data:
|
||||
config: |-
|
||||
#
|
||||
# kubernetes nginx config for zammad
|
||||
#
|
||||
|
||||
server_tokens off;
|
||||
|
||||
upstream zammad-railsserver {
|
||||
server localhost:3000;
|
||||
}
|
||||
|
||||
upstream zammad-websocket {
|
||||
server localhost:6042;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
server_name _;
|
||||
|
||||
root /opt/zammad/public;
|
||||
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stderr;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
|
||||
expires max;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header CLIENT_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 86400;
|
||||
proxy_pass http://zammad-websocket;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header CLIENT_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 180;
|
||||
proxy_pass http://zammad-railsserver;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
|
||||
gzip_proxied any;
|
||||
}
|
||||
}
|
@ -1,112 +0,0 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: zammad
|
||||
namespace: zammad
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: zammad
|
||||
component: services
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- name: zammad
|
||||
persistentVolumeClaim:
|
||||
claimName: zammad
|
||||
- name: nginx-configmap
|
||||
configMap:
|
||||
name: nginx-configmap
|
||||
items:
|
||||
- key: config
|
||||
path: default
|
||||
|
||||
initContainers:
|
||||
- name: zammad-init
|
||||
image: zammad/zammad-docker-compose:zammad
|
||||
args: [ "zammad-init" ]
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: zammad
|
||||
mountPath: /opt/zammad
|
||||
|
||||
containers:
|
||||
- name: zammad-nginx
|
||||
image: zammad/zammad-docker-compose:zammad
|
||||
args: [ "zammad-nginx" ]
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: nginx
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: zammad
|
||||
mountPath: /opt/zammad
|
||||
- name: nginx-configmap
|
||||
mountPath: /etc/nginx/sites-enabled
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
|
||||
- name: zammad-railsserver
|
||||
image: zammad/zammad-docker-compose:zammad
|
||||
args: ["zammad-railsserver"]
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: railsserver
|
||||
containerPort: 3000
|
||||
volumeMounts:
|
||||
- name: zammad
|
||||
mountPath: /opt/zammad
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
|
||||
- name: zammad-scheduler
|
||||
image: zammad/zammad-docker-compose:zammad
|
||||
args: [ "zammad-scheduler" ]
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: zammad
|
||||
mountPath: /opt/zammad
|
||||
|
||||
- name: zammad-websocket
|
||||
image: zammad/zammad-docker-compose:zammad
|
||||
args: [ "zammad-websocket" ]
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: websocket
|
||||
containerPort: 6042
|
||||
volumeMounts:
|
||||
- name: zammad
|
||||
mountPath: /opt/zammad
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 6042
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 6042
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
@ -1,34 +0,0 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: zammad-memcached
|
||||
namespace: zammad
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: memcached
|
||||
component: cache
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
|
||||
containers:
|
||||
- name: zammad-memcached
|
||||
image: zammad/zammad-docker-compose:zammad-memcached
|
||||
args: [ "zammad-memcached" ]
|
||||
ports:
|
||||
- containerPort: 11211
|
||||
name: memcached
|
||||
imagePullPolicy: Always
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 11211
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 11211
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
@ -1,40 +0,0 @@
|
||||
apiVersion: apps/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: zammad-postgresql
|
||||
namespace: zammad
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: database
|
||||
app: postgresql
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- name: zammad-postgresql
|
||||
persistentVolumeClaim:
|
||||
claimName: zammad-postgresql
|
||||
|
||||
containers:
|
||||
- name: zammad-postgresql
|
||||
image: zammad/zammad-docker-compose:zammad-postgresql
|
||||
ports:
|
||||
- name: postgresql
|
||||
containerPort: 5432
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: zammad-postgresql
|
||||
mountPath: /var/lib/postgresql
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 5432
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 5432
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
@ -1,53 +0,0 @@
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: zammad-elasticsearch
|
||||
namespace: zammad
|
||||
labels:
|
||||
app: elasticsearch
|
||||
component: searchindex
|
||||
spec:
|
||||
serviceName: zammad-elasticsearch
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: searchindex
|
||||
app: elasticsearch
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- name: zammad-elasticsearch
|
||||
persistentVolumeClaim:
|
||||
claimName: zammad-elasticsearch
|
||||
initContainers:
|
||||
- name: prepare-container
|
||||
image: busybox
|
||||
command: [ "sh", "-c", "sysctl -w vm.max_map_count=262144; chown -R 1000:1000 /usr/share/elasticsearch"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/elasticsearch/data
|
||||
name: zammad-elasticsearch
|
||||
containers:
|
||||
- name: zammad-elasticsearch
|
||||
image: zammad/zammad-docker-compose:zammad-elasticsearch
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: elasticsearch
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/elasticsearch/data
|
||||
name: zammad-elasticsearch
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
@ -1,23 +0,0 @@
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: backup
|
||||
namespace: zammad
|
||||
spec:
|
||||
schedule: "0 0 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
volumes:
|
||||
- name: zammad-backup
|
||||
persistentVolumeClaim:
|
||||
claimName: zammad-backup
|
||||
containers:
|
||||
- name: zammad-backup
|
||||
image: zammad/zammad-docker-compose:zammad-postgresql
|
||||
args: [ "zammad-backup-db" ]
|
||||
volumeMounts:
|
||||
- name: zammad-backup
|
||||
mountPath: /var/tmp/zammad
|
@ -1,71 +0,0 @@
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad
|
||||
namespace: zammad
|
||||
labels:
|
||||
app: zammad
|
||||
component: services
|
||||
spec:
|
||||
ports:
|
||||
- name: nginx
|
||||
port: 80
|
||||
selector:
|
||||
app: zammad
|
||||
component: services
|
||||
type: NodePort
|
||||
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad-elasticsearch
|
||||
namespace: zammad
|
||||
labels:
|
||||
app: elasticsearch
|
||||
component: searchindex
|
||||
spec:
|
||||
ports:
|
||||
- name: elasticsearch
|
||||
port: 9200
|
||||
selector:
|
||||
app: elasticsearch
|
||||
component: searchindex
|
||||
type: NodePort
|
||||
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad-memcached
|
||||
namespace: zammad
|
||||
labels:
|
||||
app: memcached
|
||||
component: cache
|
||||
spec:
|
||||
ports:
|
||||
- name: memcached
|
||||
port: 11211
|
||||
selector:
|
||||
app: memcached
|
||||
component: cache
|
||||
type: NodePort
|
||||
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: zammad-postgresql
|
||||
namespace: zammad
|
||||
labels:
|
||||
app: postgresql
|
||||
component: database
|
||||
spec:
|
||||
ports:
|
||||
- name: postgresql
|
||||
port: 5432
|
||||
selector:
|
||||
app: postgresql
|
||||
component: database
|
||||
type: NodePort
|
@ -1,26 +0,0 @@
|
||||
kind: Ingress
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: zammad.example.com
|
||||
namespace: zammad
|
||||
labels:
|
||||
app: zammad
|
||||
component: services
|
||||
host: zammad.example.com
|
||||
annotations:
|
||||
ingress.kubernetes.io/ssl-redirect: 'true'
|
||||
kubernetes.io/tls-acme: 'true'
|
||||
ingress.kubernetes.io/proxy-body-size: 50m
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- zammad.example.com
|
||||
secretName: zammad-example-com-tls
|
||||
rules:
|
||||
- host: zammad.example.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: zammad
|
||||
servicePort: 80
|
@ -1,43 +0,0 @@
|
||||
# Zammad kubernetes example deployment
|
||||
|
||||
This is a proof of concept of a Kubernetes deployment, which should be considered
|
||||
beta and not ready for production.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.8.x Cluster with at least 1 worker node, 2 CPUs and 6 GB of RAM
|
||||
- Change the ingress to your needs
|
||||
|
||||
|
||||
## Deploy Zammad
|
||||
|
||||
### Install on Minikube
|
||||
|
||||
* Install kubectl
|
||||
* https://kubernetes.io/docs/tasks/tools/install-kubectl/
|
||||
* Install Minkube
|
||||
* https://github.com/kubernetes/minikube
|
||||
* minikube start --memory=6144 --cpus=2
|
||||
* minikube addons enable ingress
|
||||
* echo "$(minikube ip) zammad.example.com" | sudo tee -a /etc/hosts
|
||||
* kubectl apply -f .
|
||||
* minikube dashboard
|
||||
* switch to namespace "zammad"
|
||||
* open "Overview" and wait until all pods are green
|
||||
* access zammad on:
|
||||
* http://zammad.example.com
|
||||
|
||||
|
||||
### Install on Google Kubernetes Engine
|
||||
* connect to cluster via gcloud command
|
||||
* kubectl proxy
|
||||
* kubectl apply -f .
|
||||
* open dashboard in browser
|
||||
* http://127.0.0.1:8001/ui
|
||||
* if everything is green add backends / ingress rules to create external endpoint
|
||||
|
||||
|
||||
## If you want to help to improve the Kuberntes deployments here are some todos:
|
||||
* add cpu & mem limits
|
||||
* add rolling upgrade strategy to deployments
|
||||
* add RBAC
|
Loading…
Reference in New Issue
Block a user