-
Notifications
You must be signed in to change notification settings - Fork 110
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
GEOS-11555: fix installation of extensions in various configurations #102
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
| COMMUNITY_PLUGIN_BASE_URL | Specifies the **base** URL for downloading the latest community-contributed GeoServer plugins. | `https://build.geoserver.org/geoserver/` | | | ||
| COMMUNITY_PLUGIN_URL | Specifies the URL for downloading the latest community-contributed GeoServer plugins | `${COMMUNITY_PLUGIN_BASE_URL}2.25.x/community-latest` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is clearer to end both URLs in the same way (with or without slash). Without slash is visually clearer (and matches the original COMMUNITY_PLUGIN_URL
).
| COMMUNITY_PLUGIN_BASE_URL | Specifies the **base** URL for downloading the latest community-contributed GeoServer plugins. | `https://build.geoserver.org/geoserver/` | | | |
| COMMUNITY_PLUGIN_URL | Specifies the URL for downloading the latest community-contributed GeoServer plugins | `${COMMUNITY_PLUGIN_BASE_URL}2.25.x/community-latest` | | |
| COMMUNITY_PLUGIN_BASE_URL | Specifies the **base** URL for downloading the latest community-contributed GeoServer plugins. | `https://build.geoserver.org/geoserver` | | | |
| COMMUNITY_PLUGIN_URL | Specifies the URL for downloading the latest community-contributed GeoServer plugins | `${COMMUNITY_PLUGIN_BASE_URL}/2.25.x/community-latest` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although... I now notice that ADDITIONAL_LIBS_DIR
seems to include the trailing slash. In that case, end both of these URLs with a slash?
README.md
Outdated
The following values cannot really be safely changed (as they are used to download extensions and community modules as the docker image first starts up). | ||
| VAR NAME | DESCRIPTION | SAMPLE VALUE | | ||
|--------------|-----------|------------| | ||
| WGET_OPTS | Options for the `wget` command | `--no-check-certificate` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't it your intention to remove this --no-check-certificate
? (Which is a good idea to remove in my opinion :-) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is removed by this PR, but there is the variable WGET_OPTS
in case you would for some reason need to set some options for wget. By default, this is empty, just mentioning a sample value here.
Sorry for the multiple comments, I should have done it properly as a single review. I thought I had only one quick suggestion :-) Fixing up the if/else errors and the community plugin installs in the install script seems like a good idea. One thing that worries me a bit are the extra environment variables. There are a lot already. Could your fix work without the extra environment variables?
|
Co-authored-by: Reinout van Rees <[email protected]>
I BTW missed one ;-)) It could make sense to split them into multiple tables to get some clarity and better overview. Suggesting Geoserver, Tomcat, Extensions |
I would be very unhappy with installing community modules into a release intended for production - the point of them is to get feedback on snapshot / nightly build releases to support development. If people want to use extensions in production - stop messing around and fund / complete them. Really we are already pushing our luck distributing these as nightly builds as they have not been given to the project steering committee for review and publication yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally found some time to have a look at this and added some first comments. Will try to get this running in a next step. But in general I really like these enhancements.
Could you already rebase your branch against master? There are conflicts currently...
--build-arg COMMUNITY_PLUGIN_URL=https://build.geoserver.org/geoserver/2.25.x/community-latest/ \ | ||
--build-arg GS_VERSION=2.24-SNAPSHOT \ | ||
-t 2.25.x . | ||
--build-arg WAR_ZIP_URL=https://build.geoserver.org/geoserver/2.27.x/geoserver-2.27.x-latest-war.zip \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples do not (yet) work as there is not (yet) a 2.27.x
folder: See https://build.geoserver.org/geoserver
@@ -226,25 +240,25 @@ Following is the list of the all the environment variables that can be passed do | |||
| CATALINA_OPTS | Catalina options. Check [ref](https://www.baeldung.com/tomcat-catalina_opts-vs-java_opts) | `-Djava.awt.headless=true` | | |||
| GEOSERVER_DATA_DIR | Geoserver data directory location | `/opt/geoserver_data/` | | |||
| GEOSERVER_REQUIRE_FILE | Geoserver configuration used interally | `/opt/geoserver_data/global.xml` | | |||
| INSTALL_EXTENSIONS | Indicates whether additional GeoServer extensions should be installed | `false` | | |||
| DOWNLOAD_EXTENSIONS | Indicates whether additional GeoServer extensions should be installed | `false` | | |||
| INSTALL_EXTENSIONS | Indicates whether additional GeoServer extensions should be installed | `true` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of DOWNLOAD_EXTENSIONS
is exactly the same as for INSTALL_EXTENSIONS
. I guess this was not adjusted after copy and pasting? ;-)
COMMUNITY_EXTENSIONS_VERSION="${GEOSERVER_VERSION/-SNAPSHOT/.x}" | ||
COMMUNITY_EXTENSIONS_VERSION="${COMMUNITY_EXTENSIONS_VERSION%.*}-SNAPSHOT" | ||
fi | ||
COMMUNITY_PLUGIN_BASE_URL=${COMMUNITY_PLUGIN_BASE_URL:-"https://build.geoserver.org/geoserver"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike others (like COMMUNITY_PLUGIN_URL
) this new env COMMUNITY_PLUGIN_BASE_URL
is not declared in the Dockerfile. I think it makes sense to also add it there for the sake of completeness (and to avoid confusion)
GEOSERVER_RELEASE_BRANCH="${GEOSERVER_RELEASE_BRANCH%.*}.x" | ||
|
||
fi | ||
COMMUNITY_PLUGIN_URL=${COMMUNITY_PLUGIN_URL:-"${COMMUNITY_PLUGIN_BASE_URL}/${GEOSERVER_RELEASE_BRANCH}/community-latest/"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general: wouldn't it make sense to set the meaningful/working defaults for COMMUNITY_PLUGIN_BASE_URL
and COMMUNITY_PLUGIN_URL
in the Dockerfile, so we would not have to set them here?
Maybe this is a misunderstanding? I don't think there is any intention to build community plugins into images. One intention of this PR is to optionally allow users to include experimental community plugins on startup/boot time of the container |
Yes - but only when testing a nightly build please (we do not want to mix a release image with community plugins). aside: I am considering a proposal to change the policy and make a distribution that includes community plugins as a "tech preview" or something. But until that time we do not have permission to distribute this stuff for production - instead they are shared with the public by the individual developers seeking support/funding. When ready the developer will provide to geoserver project for IP review and distribution as part of GeoServer. |
This position is your personal ideology Jody, but has nothing to do with the GeoServer project at a large. Since community module existed, users have been free to install community modules in releases as they pleased, in their bin, win installers and war packages. In the docker image as it stands, an artificial limitation has been added. My suggestion is simple: stop treating users as babies. Mixing release and community modules can result in a GeoServer not starting any longer, it is possible and it has actually happened... but as long as the users are made aware of the risks (stick it in bold font in the docs) it's fine. No need to be patronizing. |
With this PR, I want to address the issues GEOS-11555 and GEOS-11258 about some inabilities of the extension installer script.
In my opinion, it should be possible to add community modules also to official images. So, I added a warning message instead of blocking it.
Also, I tried to get rid of the confusion in the naming of the variable
INSTALL_EXTENSIONS
which was controlling the download behavior. Thus, I introduced a variableDOWNLOAD_EXTENSIONS
which controls this and made theINSTALL_EXTENSIONS
to really control the installation of extensions.On one point, I'm not sure: Should we fail the startup when we are unable to download extensions?
On one hand, the full functionality might not he available and cannot be detected with any sort of health check and on the other hand, maybe it's better to run without an extension than not run at all.