-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to launch custom scripts before the start of the app #4030
Comments
Yup, sounds like a good idea. |
Okay after discussion with @edevosc2c , We think something like it is done for geonetwork-ui (datahub) would be a great thing : Whats we are thinking is :
Would it be okay with you @jeanpommier ? |
Can't it all be covered by the init scripts ? An init script can very well copy the webapp_resources to the right place, can't it ? |
The point here is to have built-in support for two major functionalities. The first one being to support the ability to easily override the current files in the container from the files located for example in the datadir or an external volume. So for example, datadir/geonetwork/ressources/webapps would overwrite the files located in And the second one is the ability to execute any custom scripts (mounted as a directory from a volume). We could only support the latter one, but we think customizing the actual files of the app is such a common thing that it is a good idea to have a built-in support. We could have the same script that offer the first functionality in every datadir of our clients, but it would mean more maintenance involved in maintaining them. Take a look a bit at what is being done inside datahub here: https://github.com/geonetwork/geonetwork-ui/blob/main/tools/docker/docker-entrypoint.sh We can still discuss on how to implement them but the general ideas are said. Let me know what you think about them. |
I have been thinking of backporting these changes to previous georchestra docker images. As it won't affect the usability/functionalities of the actual components of georchestra. |
Yup, seems reasonable. |
About the entrypoint implementation, it might be too soon for that but for the records, I'm pointing to a discussion I had some time ago about the pros and cons of |
notes of functionnality wanted, in kubernetes deployment the following geoserver files : https://github.com/georchestra/geoserver_minimal_datadir/blob/master/security/usergroup/my_ldap/config.xml#L5 They are in bad configuration and we need to modify it by hand, I would be great to have an init script that overwrite this values. |
Please note the image's entrypoint already tries to do some magic wrt these file: georchestra/geoserver/webapp/src/docker/docker-entrypoint.d/00-geoserver-bootstrap Lines 13 to 15 in b480219
|
We discussed with @edevosc2c, in priority we will create autoscript run for personalization for the following apps:
if you see others customizations for app I didn't put here please let me know |
|
Additional containers to do in medium priority:
|
* feat: allow using startup scripts with cas datadir georchestra/georchestra#4030 * feat: improve custom scripts to match other repos * feat: taking account of edevos recommandations
merged in master, backport PRs:
|
geOrchestra 23.0.4 was released with the custom scripts support:
georchestra gateway does not have yet custom scripts. The usage is the following: |
Still missing custom scripts on georchestra gateway |
I'm closing this issue in favor of a separate one in georchestra/georchestra-gateway#127 |
Why
It is becoming a major thing that a lot of clients will ask us to have small modifications over the existing georchestra components.
For instance, Datagrandest mostly have only customized images for their needs.
The downside of maintaining custom images is that it adds maintenance cost, (sometimes confusion) and a big lag with the upstream/official image.
Creating a whole new docker image is not always needed, especially for small modifications.
Proposed solution
At the geonetwork-ui project, they introduced the ability to execute custom scripts: geonetwork/geonetwork-ui#507
So I propose to have a similar system in place for every docker image that we manage. I'm not entirely sure how to do it, but the ability to specify the directory where all the custom scripts will be executed is a good idea.
This would allow specifying these scripts inside the datadir for example.
Having this functionality will avoid doing "hacky" stuff, especially in the helm chart of georchestra for customizing the container, example:
Additional comment
geoserver docker image seems to already support this "script" thing: https://github.com/georchestra/georchestra/tree/master/geoserver/webapp/src/docker/docker-entrypoint.d
On top of that this would fit the need explained by @jeanpommier here: georchestra/helm-georchestra#46 (comment)
Ping @jeanmi151 @jeanpommier @pmauduit @fvanderbiest
The text was updated successfully, but these errors were encountered: