Changes for page XWiki (Helm)

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

From version 9.1
edited by Itzhak Daniel
on 2024/04/28 21:16
Change comment: There is no comment for this version
To version 8.1
edited by Itzhak Daniel
on 2024/04/28 20:44
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -20,77 +20,28 @@
20 20  
21 21  Here is the list of things you need to have:
22 22  
23 -* Kubernetes 1.27+.
24 -** Automatic storage provisioner.
25 -** Ingress-nginx.
26 -** Cert-manager.
27 -* Helm 3.12+.
28 -* XWiki 16.2.0.
29 -** Custom Image (non-root).
23 +* Kubernetes 1.27 (probably will work with later versions as well).
24 +** Automatic storage provisioner (Behemoth LTD special case).
25 +* Helm 3.12 (probably will work with later versions as well).
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:
29 +Behemoth LTD is running an on-prem Kubernetes solutions, 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.
37 37  
38 -You may not need that if your cluster knows to provision storage by itself.
34 +== Deploying ==
39 39  
40 -== CI/CD ==
41 -
42 -At the beginning we tried to avoid making any custom changes to the images in question (XWiki and Bitnami's MySQL). But XWiki running as root, didn't fly. So we had to create a custom image with minor changes to enable it to run as a unprivileged uid/gid: 30001.
43 -
44 -=== Building and Publish ===
45 -
46 -You will need to perform the following actions:
47 -
48 -{{code language="sh" layout="LINENUMBERS" title="# Clone the repository"}}
49 -git clone --depth 1 --branch master https://github.com/xwiki/xwiki-docker.git
50 -{{/code}}
51 -
52 -Once you have the repo locally, modify the //Dockerfile// as shown below:
53 -
54 -{{code language="git" title="# Diff"}}
55 -@@ -89,6 +89,11 @@ COPY xwiki/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
56 - # across runs)
57 - VOLUME /usr/local/xwiki
58 -
59 -+# Added by Behemoth LTD - Apr 28th, 2024
60 -+# Fixing permissions error when using non-root user/group (30001:30001) to start the app
61 -+RUN chown -R 30001:30001 /usr/local/tomcat/webapps
62 -+USER 30001:30001
63 -+
64 - # At this point the image is done and what remains below are the runtime configuration used by the user to configure
65 - # the container that will be created out of the image. Namely the user can override some environment variables with
66 - # docker run -e "var1=val1" -e "var2=val2" ...
67 -
68 -{{/code}}
69 -
70 -Once the changes have been made, build and push it to your repository.
71 -
72 -{{code language="sh" layout="LINENUMBERS" title="# Docker"}}
73 -cd ./16/mysql-tomcat/
74 -docker build -t behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-2 .
75 -docker login
76 -docker push behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-2
77 -{{/code}}
78 -
79 -{{code language="sh" layout="LINENUMBERS" title="# Podman"}}
80 -cd ./16/mysql-tomcat/
81 -buildah build -f Dockerfile -t behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-2
82 -docker push --creds=[Username:[Password]] behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-2
83 -{{/code}}
84 -
85 -=== Deploy ===
86 -
87 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.
37 +
38 +=== ===
88 88  )))
89 89  
90 90  (% class="col-xs-12 col-sm-4" %)
91 91  (((
92 92  {{box title="**Contents**"}}
93 -{{toc numbered="true"/}}
44 +{{toc/}}
94 94  {{/box}}
95 95  )))
96 96  )))