Changes for page XWiki (Helm)

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

From version 16.1
edited by Itzhak Daniel
on 2024/04/29 00:40
Change comment: There is no comment for this version
To version 20.1
edited by Itzhak Daniel
on 2024/04/29 01:50
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -12,7 +12,7 @@
12 12  
13 13  == Background ==
14 14  
15 -[[Behemoth LTD>>https://www.behemoth.co.il/]] was in a search for a 'knowledge base' software, a central place to collect and collaborate on documents which hold information, instructions, guide, etc. The requirement was simple, it required to be able to run on Kubernetes without too much customization, building, testing and other complex CI/CD prerequisite.
15 +[[Behemoth LTD>>https://www.behemoth.co.il/]] was in a search for a 'knowledge base' software, a central place to collect and collaborate on documents which hold information, instructions, guides, etc. The requirement was simple, can run on Kubernetes without too much customization, building, testing and other complex CI/CD prerequisite.
16 16  
17 17  Things may change in the future, as Kubernetes becomes the de-facto way to run Apps, so do some homework before continuing, [[Awesome Selfhosted>>https://github.com/awesome-selfhosted/awesome-selfhosted#wikis]].
18 18  
... ... @@ -49,7 +49,7 @@
49 49  git clone --depth 1 --branch master https://github.com/xwiki/xwiki-docker.git
50 50  {{/code}}
51 51  
52 -Once you have the repo locally, modify the //Dockerfile// as shown below:
52 +Once you have the repo locally, modify the [[//Dockerfile//>>attach:Dockerfile]] as shown below:
53 53  
54 54  {{code language="git" title="# Diff"}}
55 55  @@ -89,6 +89,11 @@ COPY xwiki/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
... ... @@ -71,15 +71,15 @@
71 71  
72 72  {{code language="sh" layout="LINENUMBERS" title="# Docker"}}
73 73  cd ./16/mysql-tomcat/
74 -docker build -t behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-2 .
74 +docker build -t behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-3 .
75 75  docker login
76 -docker push behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-2
76 +docker push behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-3
77 77  {{/code}}
78 78  
79 79  {{code language="sh" layout="LINENUMBERS" title="# Podman"}}
80 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
81 +buildah build -f Dockerfile -t behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-3
82 +podman push --creds=[Username:[Password]] behemothil/xwiki-mysql-tomcat-nonroot:16.2.0-3
83 83  {{/code}}
84 84  
85 85  === Deploy ===
... ... @@ -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 (only if your cluster doesn't know how to provision storage for itself):
89 +After the path/loop devices were created, create the [[PVs>>attach:pv_storage.yaml]] (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
... ... @@ -207,7 +207,7 @@
207 207  1. [[Github - XWiki Contrib - Helm Charts>>https://github.com/xwiki-contrib/xwiki-helm]]
208 208  1. [[Github - XWiki - Docker>>https://github.com/xwiki/xwiki-docker/]]
209 209  1. [[Docker Hub - XWiki - Official>>https://hub.docker.com/_/xwiki]]
210 -1. [[Docker Hub - Behemoth LTD - Custom XWiki Non-root Image>>https://hub.docker.com/repository/docker/behemothil/xwiki-mysql-tomcat-nonroot/general]]
210 +1. [[Docker Hub - Behemoth LTD - Custom XWiki Non-root Image>>https://hub.docker.com/r/behemothil/xwiki-mysql-tomcat-nonroot]]
211 211  )))
212 212  
213 213  (% class="col-xs-12 col-sm-4" %)
Dockerfile
Size
... ... @@ -1,1 +1,1 @@
1 -6730
1 +6722
Content
... ... @@ -91,7 +91,7 @@
91 91  
92 92  # Added by Behemoth LTD - Apr 28th, 2024
93 93  # Fixing permissions error when using non-root user/group (30001:30001) to start the app
94 -RUN chown -R 30001:30001 /usr/local/tomcat/webapps
94 +RUN chown -R 30001:30001 /usr/local/tomcat
95 95  USER 30001:30001
96 96  
97 97  # At this point the image is done and what remains below are the runtime configuration used by the user to configure