Changes for page XWiki (Helm)
Last modified by Itzhak Daniel on 2024/04/29 16:35
From version 11.1
edited by Itzhak Daniel
on 2024/04/29 00:08
on 2024/04/29 00:08
Change comment:
There is no comment for this version
To version 13.1
edited by Itzhak Daniel
on 2024/04/29 00:25
on 2024/04/29 00:25
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -86,7 +86,7 @@ 86 86 87 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 88 89 -After the path/loop devices were created, create the PVs: 89 +After the path/loop devices were created, create the PVs (only if your cluster doesn't know how to provision storage for itself): 90 90 91 91 {{code language="sh" layout="LINENUMBERS" title="# kubectl stdin"}} 92 92 kubectl create -f - <<EOF ... ... @@ -144,9 +144,36 @@ 144 144 145 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 146 147 - DownloadtheCharts andValues file:147 +Now we can install XWiki's charts (repo) and download it's //values.yaml// file: 148 148 149 +{{code language="sh" layout="LINENUMBERS" title="# Charts and Values"}} 150 +helm repo add xwiki-helm https://xwiki-contrib.github.io/xwiki-helm 151 +helm repo update xwiki-helm 149 149 153 +curl -LO https://raw.githubusercontent.com/xwiki-contrib/xwiki-helm/master/charts/xwiki/values.yaml 154 +{{/code}} 155 + 156 +Modify the values.yaml file, our example has: 157 + 158 +* Using custom image (so it won't run as //root//). 159 +* Increased memory/core usage allowance. 160 +* Running as UID/GID 30001. 161 +* Dropping all capabilities. 162 +* Using MySQL. 163 +* Enabling persistence. 164 +* Ingress (Nginx). 165 +* TLS (Cert manager) 166 + 167 +You can download our example from the attachment area. 168 + 169 +Once you have your custom //values.yaml// file, deploy the app with Helm: 170 + 171 +{{code language="sh" layout="LINENUMBERS" title="# Helm install"}} 172 +helm install --namespace behemoth-wiki --create-namespace \ 173 + --values values.yaml \ 174 + behemoth-xwiki xwiki-helm/xwiki 175 +{{/code}} 176 + 150 150 151 151 ))) 152 152
- pv_storage.yaml
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.itzhak - Size
-
... ... @@ -1,0 +1,1 @@ 1 +999 bytes - Content
-
... ... @@ -1,0 +1,50 @@ 1 +--- 2 +kind: PersistentVolume 3 +apiVersion: v1 4 +metadata: 5 + name: behemoth-xwiki-db 6 + namespace: behemoth-wiki 7 + labels: 8 + type: behemoth-xwiki-db 9 +spec: 10 + storageClassName: behemoth-xwiki-db 11 + capacity: 12 + storage: 5Gi 13 + accessModes: 14 + - ReadWriteOnce 15 + hostPath: 16 + path: "/mnt/kubenernetes/behemoth-xwiki/db" 17 + nodeAffinity: 18 + required: 19 + nodeSelectorTerms: 20 + - matchExpressions: 21 + - key: kubernetes.io/hostname 22 + operator: In 23 + values: 24 + - k8s-2 25 + 26 +--- 27 +kind: PersistentVolume 28 +apiVersion: v1 29 +metadata: 30 + name: behemoth-xwiki-www 31 + namespace: behemoth-wiki 32 + labels: 33 + type: behemoth-xwiki-www 34 +spec: 35 + storageClassName: behemoth-xwiki-www 36 + capacity: 37 + storage: 5Gi 38 + accessModes: 39 + - ReadWriteOnce 40 + hostPath: 41 + path: "/mnt/kubenernetes/behemoth-xwiki/www" 42 + nodeAffinity: 43 + required: 44 + nodeSelectorTerms: 45 + - matchExpressions: 46 + - key: kubernetes.io/hostname 47 + operator: In 48 + values: 49 + - k8s-2 50 +