Changes for page XWiki (Helm)
Last modified by Itzhak Daniel on 2024/04/29 16:35
From version 12.1
edited by Itzhak Daniel
on 2024/04/29 00:08
on 2024/04/29 00:08
Change comment:
Uploaded new attachment "pv_storage.yaml", version 1.1
To version 10.1
edited by Itzhak Daniel
on 2024/04/28 21:18
on 2024/04/28 21:18
Change comment:
Uploaded new attachment "Dockerfile", version 1.1
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 1 removed)
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 from us: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: 34 34 35 35 1. Creating the path/loop device prior of creating PV. 36 36 1. The PV is manually created. ... ... @@ -84,70 +84,7 @@ 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/]] 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 - 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. 151 151 ))) 152 152 153 153 (% class="col-xs-12 col-sm-4" %)
- pv_storage.yaml
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.itzhak - Size
-
... ... @@ -1,1 +1,0 @@ 1 -999 bytes - Content
-
... ... @@ -1,50 +1,0 @@ 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 -