diff --git a/README.md b/README.md index 682409e99615cbeee0209bf585a4ff0cf0fd7dff..c41d58ea07315ec0f6c59c6cc94691231acf0aaa 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,27 @@ This is a wrapper to build an Openshift image of Z-Push. -We need to add some missing packages so we follow the procedure at +## How it works + +We take: + +* The official Z-Push git repo in the form of a submodule +* A `s2i` builder from Software Collections providing a PHP 7.3 environment, PHP composer etc +* A Dockerfile that adds some customisations to the builder +* Config files hosted on Openshift + +and we produce an image that is deployed on Openshift. + +## Custom Builder in detail + +We need to add some missing packages to the default builder so we follow the procedure at [KB0004498](https://cern.service-now.com/service-portal?id=kb_article&n=KB0004498) -It is just using the `centos/php-73-centos7` S2I builder and checking -out Z-Push from a submodule. +The custom builder is using the top-level Docker file to prepare the image, including custom patches on top of the Z-Push code. + +We use the official [Software Collections s2i builder for PHP 7.3](https://github.com/sclorg/s2i-php-container/tree/master/7.3). -## Create the custom builder (first time only) +## Create the custom builder (only needed once per Openshift project) This is using the top-level `Dockerfile`. @@ -26,7 +40,7 @@ oc new-build \ --strategy=docker https://gitlab.cern.ch/mail/zpush-openshift.git ``` -## Create an app based on the custom builder (first time only) +## Create an app based on the custom builder (Only needed once per Openshift project) For `test`: ``` @@ -61,5 +75,55 @@ oc logs -f bc/zpush A few volumes are needed: +``` +- configMap: + defaultMode: 422 + name: httpd-config + name: httpd-config +- configMap: + defaultMode: 422 + name: zpush-config + name: zpush-config +- emptyDir: {} + name: zpush-log +- emptyDir: {} + name: zpush-var +- emptyDir: {} + name: apache-run +``` + +mounted on: + +``` +- mountPath: /etc/httpd/conf.d/z-push.conf + name: httpd-config + subPath: z-push.conf +- mountPath: /opt/app-root/src/config.php + name: zpush-config + subPath: z-push.conf.php +- mountPath: /opt/app-root/src/backend/caldav/config.php + name: zpush-config + subPath: caldav.conf.php +- mountPath: /opt/app-root/src/backend/carddav/config.php + name: zpush-config + subPath: carddav.conf.php +- mountPath: /opt/app-root/src/backend/combined/config.php + name: zpush-config + subPath: combined.conf.php +- mountPath: /opt/app-root/src/backend/searchldap/config.php + name: zpush-config + subPath: galsearch-ldap.conf.php +- mountPath: /opt/app-root/src/backend/imap/config.php + name: zpush-config + subPath: imap.conf.php +- mountPath: /opt/app-root/src/backend/sqlstatemachine/config.php + name: zpush-config + subPath: state-sql.conf.php +- mountPath: /opt/app-root/src/policies.ini + name: zpush-config + subPath: policies.ini +- mountPath: /var/log/z-push/ + name: zpush-log +``` -## Configure Z-Push +## Z-Push configuration