Changes for page XWiki (Helm)

Last modified by Itzhak Daniel on 2024/04/29 16:35

From version 10.1
edited by Itzhak Daniel
on 2024/04/28 21:18
Change comment: Uploaded new attachment "Dockerfile", version 1.1
To version 11.1
edited by Itzhak Daniel
on 2024/04/29 00:08
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -30,7 +30,7 @@
30 30  
31 31  === Note about Storage ===
32 32  
33 -Behemoth LTD is running an on-prem Kubernetes solution, we (currently?) don't have any shared storage solution ([[ceph>>https://docs.ceph.com/]], [[nfs>>https://github.com/kubernetes-csi/csi-driver-nfs]], [[...>>https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner]]) , which require two things:
33 +Behemoth LTD is running an on-prem Kubernetes solution, we (currently) don't have any shared storage solution ([[ceph>>https://docs.ceph.com/]], [[nfs>>https://github.com/kubernetes-csi/csi-driver-nfs]], [[...>>https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner]]) , which require two things from us:
34 34  
35 35  1. Creating the path/loop device prior of creating PV.
36 36  1. The PV is manually created.
... ... @@ -84,7 +84,70 @@
84 84  
85 85  === Deploy ===
86 86  
87 -We're going to deploy XWiki as a [[statefulset>>https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/]], the Database (MySQL) and the App, each will have a volume to store their content.
87 +We're going to deploy XWiki as a [[statefulset>>https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/]] using [[Helm>>https://helm.sh/]], the Database (MySQL) and the App, each will have a volume to store their information. As I mentioned, in our case, we need to perform several additional steps.
88 +
89 +After the path/loop devices were created, create the PVs:
90 +
91 +{{code language="sh" layout="LINENUMBERS" title="# kubectl stdin"}}
92 +kubectl create -f - <<EOF
93 +---
94 +kind: PersistentVolume
95 +apiVersion: v1
96 +metadata:
97 + name: behemoth-xwiki-db
98 + namespace: behemoth-wiki
99 + labels:
100 + type: behemoth-xwiki-db
101 +spec:
102 + storageClassName: behemoth-xwiki-db
103 + capacity:
104 + storage: 5Gi
105 + accessModes:
106 + - ReadWriteOnce
107 + hostPath:
108 + path: "/mnt/kubenernetes/behemoth-xwiki/db"
109 + nodeAffinity:
110 + required:
111 + nodeSelectorTerms:
112 + - matchExpressions:
113 + - key: kubernetes.io/hostname
114 + operator: In
115 + values:
116 + - k8s-uk-2
117 +
118 +---
119 +kind: PersistentVolume
120 +apiVersion: v1
121 +metadata:
122 + name: behemoth-xwiki-www
123 + namespace: behemoth-wiki
124 + labels:
125 + type: behemoth-xwiki-www
126 +spec:
127 + storageClassName: behemoth-xwiki-www
128 + capacity:
129 + storage: 5Gi
130 + accessModes:
131 + - ReadWriteOnce
132 + hostPath:
133 + path: "/mnt/kubenernetes/behemoth-xwiki/www"
134 + nodeAffinity:
135 + required:
136 + nodeSelectorTerms:
137 + - matchExpressions:
138 + - key: kubernetes.io/hostname
139 + operator: In
140 + values:
141 + - k8s-uk-2
142 +EOF
143 +{{/code}}
144 +
145 +This will create 2 PVs that we'll use later. Notice //nodeAffinity//, linking the deployment to a specific node (the pods can run only at that location, as the PV is defined only there).
146 +
147 +Download the Charts and Values file:
148 +
149 +
150 +
88 88  )))
89 89  
90 90  (% class="col-xs-12 col-sm-4" %)