Add shell script to install WildFly Glow#838
Conversation
ef72bc8 to
b935a02
Compare
public/sh/install-wildfly
Outdated
| 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 \ |
There was a problem hiding this comment.
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. ;)
There was a problem hiding this comment.
Answering myself, this is driven by whether the 'Set as Latest Release' checkbox is checked when creating the release.
@darranl Do you check that box for betas?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I've also updated our Release Procedure to call out when these checkboxes ("pre-release", "latest") must be checked when we publish a release)
public/sh/install-wildfly
Outdated
| 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) |
There was a problem hiding this comment.
Don't we already have $WILDFLY_VERSION above?
There was a problem hiding this comment.
@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.
e2eeea2 to
c631d99
Compare
darranl
left a comment
There was a problem hiding this comment.
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!
Did I do that? I want to have the scripts on https://wildfly.org to make sure TLS is used.
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. |
|
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:
|
|
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 |
|
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. 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: 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 :) |
|
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. |
|
@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. |
|
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:
|
|
another could be
We want users to use a provisioned server but there is 2 ways to achieve this:
|
|
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). 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? |
Signed-off-by: Jeff Mesnil <[email protected]>
With this PR merged, a script can be used to install https://github.com/wildfly/wildfly-glow by running:
Bby default, the latest version of WildFly Glow is installed but this can be changed by using the
GLOW_VERSIONenvironment variable.You can try this script from my fork of wildfly.org:
Once this script is installed, it can become the documented way to install WildFly Glow and subsequent PR should be open to update: