Skip to content

Add shell script to install WildFly Glow#838

Open
jmesnil wants to merge 1 commit intowildfly:mainfrom
jmesnil:main
Open

Add shell script to install WildFly Glow#838
jmesnil wants to merge 1 commit intowildfly:mainfrom
jmesnil:main

Conversation

@jmesnil
Copy link
Member

@jmesnil jmesnil commented Sep 5, 2025

With this PR merged, a script can be used to install https://github.com/wildfly/wildfly-glow by running:

$ curl -s https://wildfly.org/sh/install-glow | sh
🔍 Fetching latest release from GitHub...
💡 To install another version of WildFly Glow, you can use the GLOW_VERSION environment variable.
⬇️  Downloading: https://github.com/wildfly/wildfly-glow/releases/download/1.5.0.Final/wildfly-glow-1.5.0.Final.zip
📦 Extracting WildFly Glow...
🚀 Installing to /Users/jmesnil/tmp/wildfly-glow
💡 To install shell command completion, you can run:
      source <(./wildfly-glow/wildfly-glow completion)
✅ Installation of WildFly Glow 1.5.0.Final complete!

Bby default, the latest version of WildFly Glow is installed but this can be changed by using the GLOW_VERSION environment variable.

You can try this script from my fork of wildfly.org:

$ curl -s http://jmesnil.github.io/wildfly.org/sh/install-glow | sh

Once this script is installed, it can become the documented way to install WildFly Glow and subsequent PR should be open to update:

@jmesnil jmesnil force-pushed the main branch 4 times, most recently from ef72bc8 to b935a02 Compare September 5, 2025 11:40
@jmesnil jmesnil requested a review from jfdenise September 5, 2025 11:52
echo "🔍 Fetching ${WILDFLY_VERSION} release from GitHub..."
else
echo "🔍 Fetching latest release from GitHub..."
WILDFLY_VERSION=$(curl -s https://api.github.com/repos/$REPO/releases/latest \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what this will be in the period between a beta and its Final?

I'm too lazy to research, so Ill ask first. ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answering myself, this is driven by whether the 'Set as Latest Release' checkbox is checked when creating the release.

https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

@darranl Do you check that box for betas?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answering myself some more, 'make-latest' on https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28 say you can't make a pre-release the latest. I assume their GUI would be consistent with the REST api documented there, so I figure it's not possible to mark a Beta (which should have the 'This is a pre-release' box ticked) as the latest.

Copy link
Member Author

@jmesnil jmesnil Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also updated our Release Procedure to call out when these checkboxes ("pre-release", "latest") must be checked when we publish a release)

echo "💡 You can use the JBOSS_HOME environment variable:"
echo " export JBOSS_HOME=$(pwd)/wildfly"

version=$(./wildfly/bin/jboss-cli.sh --commands="embed-server,:read-attribute(name=product-version)" | grep result | cut -d '"' -f 4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we already have $WILDFLY_VERSION above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bstansberry Yes, but it's a sanity check to get the version actually reported by the installed server.
WILDFLY_VERSION is the version that I wish to install, this version is what got installed. I don't foresee any reason for the 2 versions to be different but having a local execution of WildFly is a neat way to make sure the server is working fine.

@jmesnil jmesnil changed the title Add shell script to install WildFly Glow Add shell scripts to install WildFly & Glow Sep 10, 2025
@jmesnil jmesnil requested a review from bstansberry September 10, 2025 06:44
@jmesnil jmesnil force-pushed the main branch 2 times, most recently from e2eeea2 to c631d99 Compare September 10, 2025 07:35
Copy link
Contributor

@darranl darranl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should not be merging PRs like this until we have had a discussion about the installation user stories we want to support - at this time once we support something new IMO it should be for the long term.

Also please never ever report that a user would pipe a shell script from a http URL!

@jmesnil
Copy link
Member Author

jmesnil commented Sep 10, 2025

Also please never ever report that a user would pipe a shell script from a http URL!

Did I do that? I want to have the scripts on https://wildfly.org to make sure TLS is used.
And I want to use https://wildfly.org instead of a random GitHub URL so that users are confident that this is coming from WildFly and not some random places.

IMO we should not be merging PRs like this until we have had a discussion about the installation user stories we want to support - at this time once we support something new IMO it should be for the long term.

I don't see these scripts as a new type of installations. They take what exists (WildFly & Glow archives) and make simple to do it in an automated fashion. They are also more secure as their verify the checksums of the archives (is it that often done when users download from https://www.wildfly.org/downloads/?).

If you look at our Container image (https://github.com/wildfly/wildfly-container/blob/97674dd438413a45961b684c56c758b60b169ff7/Dockerfile#L29-L33), this is the same steps.

I'm fine with discussing our installation user stories and make sure that these scripts belong to our approach but I don't see WildFly archives disappear anytime soon so if we can make their installation simpler, that's to the benefit of our users.

@jmesnil jmesnil added the hold label Sep 10, 2025
@darranl
Copy link
Contributor

darranl commented Sep 10, 2025

If it has been identified that wildfly and wildfly-glow are two things we want users to be able to install why have we excluded options like:

sdk install wildfly

sdk install wildfly-glow?

@jmesnil
Copy link
Member Author

jmesnil commented Sep 10, 2025

semi-related, our Getting Started guide really needs a fresh coat of paint https://docs.wildfly.org/37/Getting_Started_Developing_Applications_Guide.html#getting-started-with-wildfly

@jmesnil
Copy link
Member Author

jmesnil commented Sep 10, 2025

I never excluded sdkman.io! If we have more ways to install WildFly / WildFly Glow, all the best. It does need to be one or the other.
They can serve different purposes: SDKMan is better suited for development, these scripts are better suited for automated installation imho.

But I wanted to have a simple way to install these 2 things without additional packaging software & dependencies (that's important for their use in containers).

If there was only a sdkman solution, I would need would be something like:

RUN curl -s "https://get.sdkman.io" | bash && \
         sdk install wildly-glow 1.5.0.Final &&  \
         echo "do my thing with wildfly-glow" && \
         sdk uninstall wildly-glow 1.5.0.Final && \
         rm -rf ~/.sdkman

That's doable but at this point, I might go download WildFly Glow directly.

...and sdkman itself is installed by piping a shell script from a https URL :)

@darranl
Copy link
Contributor

darranl commented Sep 10, 2025

sdkman provides many candidates that can be installed, some of which are applicable here and others being related.

Anyone working with WildFly is going to need Java and very likely would like Maven to be availble.

There are other projects related to our ecosystem such as jbang or quarkus-cli. Servlers like Apache ActiveMQ, Jetty, Tomcat are also candidates.

Tooling is avaialble for things like JDK Mission Control which may be needed more for production installs.

When it comes to versioning it can support default versions for candidates but at the same time it can support specifying prior versions and could even support users being able to select the latest Beta without it needing to be a default. Users could also install multiple versions, switch between them and uninstall as needed.

Also in that part of the discussion sdkman and WildFly are now both developed in the same open source foundation, sdkman also has it's own userbase which in turn may discover WildFly as a result of being in the list - regarding WildFly Glow Users of sdkman for example may be using Tomcat, this could also be an opportunity to use glow to try their war with WildFly.

@jmesnil
Copy link
Member Author

jmesnil commented Sep 10, 2025

@darranl I am convinced that adding to WildFly to SDKMan would be a very good thing and simple to setup when I look at the docs.

I still think there is room for these installation scripts even if their use would be narrow and overlap with some of SDKMan use cases.

Let's look at our buddies at Quarkus, they provide multiple ways to install Quarkus CLI, some of them overlapping. But that's fine because regardless of how you install it, you end up with the same software at the end.

@darranl
Copy link
Contributor

darranl commented Sep 10, 2025

Maybe that page is a good model for us to start to define the user stories we want to cover?

From this I think it feels like we have two modes we would like to support:

  1. The full zip / distribution installation.
  2. The slimmed installation driven by Glow.

@jmesnil
Copy link
Member Author

jmesnil commented Sep 10, 2025

another could be

  1. a slimmed installation driven by Prospero.

We want users to use a provisioned server but there is 2 ways to achieve this:

  1. trim your installation and then deploy your applications. It's more an "operational" mode, as you can update wildfly independently of your deployments.
  2. create a trimmed installation based on your deployments. That one is more "dev" oriented as WildFly will always be reinstalled based on your deployments.

@jmesnil jmesnil changed the title Add shell scripts to install WildFly & Glow Add shell script to install WildFly Glow Oct 20, 2025
@jmesnil
Copy link
Member Author

jmesnil commented Oct 20, 2025

To move forward, I've updated this PR so that it only deals with WildFly Glow installation (I removed the script that would install WildFly).

This script makes it simpler to use WildFly Glow to build container images (as shown in https://github.com/jmesnil/wildfly-container/blob/glow_integration/Dockerfile).
This is key to bring provisioning capabilities to users that are currently using the wildfly-container images without disrupting their workflow.

Having discussions to install WildFly Glow from other means (such as SDKMan) does not prevent to use it as it is. SDKMan is fine to manage SDK/JDK for developers but is not well suited for building containers.

@jfdenise Can you please review it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants