Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

spike83
Copy link

@spike83 spike83 commented Oct 1, 2024

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 variable DOWNLOAD_EXTENSIONS which controls this and made the INSTALL_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.

README.md Outdated
Comment on lines 249 to 250
| 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` |
Copy link
Contributor

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).

Suggested change
| 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` |

Copy link
Contributor

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` |
Copy link
Contributor

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 :-) )

Copy link
Author

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.

install-extensions.sh Outdated Show resolved Hide resolved
@reinout
Copy link
Contributor

reinout commented Oct 1, 2024

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?

  • DOWNLOAD_EXTENSIONS: if you specify an extension, it should be fine to download it if missing. Why the extra check?
  • COMMUNITY_PLUGIN_BASE_URL: a variable in the bash script is probably handy, but I don't think it needs to be configurable?

@spike83
Copy link
Author

spike83 commented Oct 2, 2024

DOWNLOAD_EXTENSIONS is basically the functionality from the former INSTALL_EXTENSIONS variable to disable the download. This will prevent some errors when run in an environment where the geoserver has no internet access.

COMMUNITY_PLUGIN_BASE_URL allows changing the server for the build artifacts but keep the logic of the structure underneath it.

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

@jodygarnett
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants