TIBCOSoftware / js-docker

Container deployment of TIBCO JasperReports® Server
144 stars 146 forks source link

Customizing quartz config not working as expected #40

Closed ronnn closed 3 years ago

ronnn commented 4 years ago

Hello,

We use js-docker as a basis to build a customized image that is deployed to our OpenShift environment. Most of the customizations work, but for the quartz configuration that we need to schedule reports and send them via mail the process is a little bit confusing and doesn't work as expected. We added JasperReports Server customizations for additional jars, a custom error page and external auth (those work fine).

Additionally we added the js.quartz.properties file. However this is not working because the entrypoint.sh file executes the buildomatic deploy-webapp-pro step after the customizations which in turn overrides our configuration file. At least that is what I think happens after reading "TIBCO JasperReports® Server Installation Guide Software Release 7.5" at page 56:

<js-install>/buildomatic/build_conf/default/webapp/WEB-INF/js.quartz.properties
Copied to <tomcat>/webapps/jasperserver-pro/WEB-INF/js.quartz.properties"

We found #19 and based on this I implemented a hacky fix by modifying the entrypoint.sh and echoing the correct config to the js.quartz.properties file in the tomcat WEB-INF folder after the buildomatic part. With this scheduling and sending mails works.

Is this the preferred way we should do this or is there another, cleaner way to make this work? I would prefer a solution that doesn't require the modification of the entrypoint.sh file, because with how it is now we always have to check if and what was changed in that file to adapt our custom entrypoint if necessary. At least when we pull the latest changes from GitHub.

Thanks, Ron

bdurrow commented 3 years ago

I'm not associated with TIBCO or Jaspersoft but I just started a project where I am deploying JasperReports Server to openshift 4.6. Based on my read of the included entrypoint.sh, it provides a way to apply customizations after the call to deploy-webapp-pro . Check out https://github.com/TIBCOSoftware/js-docker/blob/cb49f87b74c19dded3a4486da8e70685a54bae64/scripts/entrypoint.sh#L108. Depending on the size of your customizations you could prepare a .zip and put them in a secret (configmaps have historically corrupted binaries such as zips) then mount that secret to ${MOUNTS_HOME}/customization or a directory identified by ${JRS_CUSTOMIZATION}. MOUNTS_HOME defaults to /usr/local/share/jasperserver-pro. If your customizations were too large to include in a secret you could put them into a PV. I prefer not to use a PV for this kind of data though because if the PV can't mount at startup it leads to service availability problems which is something we have had trouble with in the past. Another option is you can override the entrypoint to call a script you have added via configmap to stage the files to the customization directory from object store, nfs, version control or other network resource that is reliably available. Then at the end of the script exec PATH/TO/entrypoint.sh

If you have any helpful tips about deploying in Openshift I will gladly take them - I created a gist as a place to collect this info. Any contribution in the comments are appreciated.

rreddyv-tibco commented 3 years ago

We fixed the issue as part of this release https://github.com/TIBCOSoftware/js-docker/releases/tag/v4.1 and it will work as expected . Hence closing the issue.