Setup on Kubernetes

You can deploy Docker based images, for example dirigiblelabs/dirigible-tomcat on the Kubernetes Cluster.

Prerequisites

Steps

  1. Create an YAML deployment configuration dirigible.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
apiVersion: v1
kind: Service
metadata:
  name: dirigible
  labels:
    app: dirigible
spec:
  ports:
  - port: 8080
    name: dirigible
  clusterIP: None
  selector:
    app: dirigible
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: dirigible
spec:
  serviceName: "dirigible"
  replicas: 1
  template:
    metadata:
      labels:
        app: dirigible
    spec:
      terminationGracePeriodSeconds: 10
      containers:
        - name: dirigible
          image: dirigiblelabs/dirigible-tomcat:latest
          ports:
            - containerPort: 8080
              name: dirigible
          volumeMounts:
            - name: root
              mountPath: /usr/local/tomcat/dirigible
          env:
            - name: DIRIGIBLE_REPOSITORY_LOCAL_ROOT_FOLDER
              value: /usr/local/tomcat/dirigible/repository
            - name: DIRIGIBLE_REPOSITORY_LOCAL_ROOT_FOLDER_IS_ABSOLUTE
              value: "true"
            - name: DIRIGIBLE_DATABASE_H2_ROOT_FOLDER_DEFAULT
              value: /usr/local/tomcat/dirigible/h2
            - name: DIRIGIBLE_CMS_INTERNAL_ROOT_FOLDER
              value: /usr/local/tomcat/dirigible/cmis
            - name: DIRIGIBLE_CMS_INTERNAL_ROOT_FOLDER_IS_ABSOLUTE
              value: "true"
            - name: DIRIGIBLE_LOG_FOLDER
              value: /usr/local/tomcat/logs
      serviceAccountName: dirigible
  volumeClaimTemplates:
    - metadata:
        name: root
      spec:
        accessModes: [ "ReadWriteOnce" ]
        resources:
          requests:
            storage: 1Gi
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/tls-acme: "true"
  name: dirigible
spec:
  rules:
    - host: dirigible.apps.eu-central-1.<your-host>
      http:
        paths:
          - path: /
            backend:
              serviceName: dirigible
              servicePort: 8080
---

apiVersion: v1
kind: ServiceAccount
metadata:
  name: dirigible
  labels:
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: Reconcile
---
apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRole
metadata:
  name: dirigible
  labels:
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: Reconcile
rules:
  - apiGroups:
    - '*'
    attributeRestrictions: null
    resources:
    - '*'
    verbs:
    - '*'
  - attributeRestrictions: null
    nonResourceURLs:
    - '*'
    verbs:
    - '*'
---
apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRoleBinding
metadata:
  name: dirigible
  labels:
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: Reconcile
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: dirigible
subjects:
  - kind: ServiceAccount
    name: dirigible

  1. Deploy on the Kubernetes Cluster with:

kubectl apply -f dirigible.yml

  1. Open a web browser and go to:

http://dirigible.[Kubernetes Platform Host]/

  1. Login with user dirigible and password dirigible, which are set by default in the Docker image used above.
Edit