wildfly-extras / prospero Goto Github PK
View Code? Open in Web Editor NEWProspero is a tool combining Galleon feature packs and wildfly-channels to provision and update Wildfly server.
License: Apache License 2.0
Prospero is a tool combining Galleon feature packs and wildfly-channels to provision and update Wildfly server.
License: Apache License 2.0
Separate CLI argument handling from installation/update/etc actions.
Create Console abstraction for progress updates and user communication.
Create prospero.bat script to start the prospero on Windows
Switch GalleonUtils#JBOSS_FORK_EMBEDDED when wildfly releases with galleon-plugins 6.0.0.Alpha2+
restore, history and update ops should reuse the same local-repo settings as install
Resolver that can use channels to supply artefact versions during Galleon provisioning
Adapt externalized versions so that new major/minor versions are detected based on available artifacts.
eg. prospero-known-combintations.yaml
could define:
- name-pattern: "test"
location: "org.prospero.test:test-feature-pack"
channelGav: "org.prospero:test:test-channel"
repositories:
- id: "central"
url: "https://repo1.maven.org/maven2/"
and following channel artifacts were present in the repository:
User could then use any of test-1.0
, test-1.1
or test-2.0
to select fpl to install.
Note, there would have to be a mechanism for changing definition in newer versions
During provisioning Galleon starts embedded Wildfly server. To do so it needs to start a new module loader. If the Galleon has been started within a jboss-modules env, it fails to start as module.path system property points to wrong module root.
rename --channel-file as well
If prospero should downgrade some component based on the channel, then:
When provisioning server generate data linking maven GAV to provisioned artifacts. When updating server, generate a local repo based on that data to avoid downloading already available resources
Make the channels configurable from CLI/config file
User can run
prospero install --fpl=xp
to install XP.
The xp-X.Y
should install specific XP X.Y version.
Prospero should establish correct EAP version to install XP with.
A minimal dependency jar able to download all required packages from installer channel and perform self update.
Perform update without asking user for confirmation
Repository can contain a definition file detailing update policies for a stream similar to https://github.com/jboss-set/maven-dependency-updater#configuration
Add operations to manipulate configured repositories and channels
Example operations:
prospero repositories list
prospero repositories add central https://repo1.maven.org/maven2/
prospero repositories remove central
prospero channels list
prospero repositories add https://localhost/channel.yaml
prospero repositories remove https://localhost/channel.yaml
prospero-config.yaml
in .installation folder should allow use of ${jboss.home}
or similar to resolve to the server's installation root directory
scenario: new FP is added by community without Channels - strict resolution
alt. FP defines if it provides Channels
A stream can define that only a single version is allowed:
{
"repositoryUrl" : "http://foobar/foo/bar",
"streams" : [{
"groupId" : "foo.bar",
"artifactId" : "foo",
"version" : "1.2.3"
}]
}
Only updates to "foo.bar:foo:1.2.3" will be allowed. Cannot be combined with other version rules
Build a zip with all dependencies, Linux and Windows startup scripts.
Resolve artifact updates concurrently to speed up the process
If I run prospero install --dir=eap ...
and the eap/
directory is non-empty (e.g. contains an old server instance), should prospero report an error, as a safety measure?
Add help operation listing available operations and their parameters.
Add --help argument to operations to display the operation's parameter
--offline
should be equivalent to --offline=true
User should have a way to list predefined FPLs ("eap", "eap-8.0", ...). Maybe they should use a different CLI option than the "custom" FPLs in the install command?
When provisioning server, store maven metadata within server. Use the metadata and provisioned jars to avoid having to download unchanged jars.
Some dependencies (eg. feature packs) might need to be cached to achieve that as they're not otherwise persisted.
[thofman@rama prospero]$ dist/build/target/prospero-1.0-SNAPSHOT/bin/prospero.sh install --dir wf-core --provision-config wildfly-core-config.yaml --fpl "wildfly-core@maven(org.jboss.universe:community-universe):19.0"
Listening for transport dt_socket at address: 8787
Installing wildfly-core@maven(org.jboss.universe:community-universe):19.0
Feature-packs resolved.0%
Packages installed. 100%
JBoss modules installed. 100%
Generating configurationError while executing operation 'install': Failed to invoke config generator org.wildfly.galleon.plugin.config.generator.WfConfigGenerator
Jun 28, 2022 12:28:51 PM org.wildfly.prospero.cli.commands.InstallCommand call
ERROR: Error while executing operation 'install': Failed to invoke config generator org.wildfly.galleon.plugin.config.generator.WfConfigGenerator
org.jboss.galleon.ProvisioningException: Failed to invoke config generator org.wildfly.galleon.plugin.config.generator.WfConfigGenerator
at org.wildfly.galleon.plugin.WfInstallPlugin.generateConfigs(WfInstallPlugin.java:740)
at org.wildfly.galleon.plugin.WfInstallPlugin.postInstall(WfInstallPlugin.java:471)
at org.jboss.prospero//org.jboss.galleon.runtime.ProvisioningRuntime$3.visitPlugin(ProvisioningRuntime.java:263)
at org.jboss.prospero//org.jboss.galleon.runtime.ProvisioningRuntime$3.visitPlugin(ProvisioningRuntime.java:260)
at org.jboss.prospero//org.jboss.galleon.layout.ProvisioningLayout$Handle.visitPlugins(ProvisioningLayout.java:285)
at org.jboss.prospero//org.jboss.galleon.layout.ProvisioningLayout.visitPlugins(ProvisioningLayout.java:838)
at org.jboss.prospero//org.jboss.galleon.runtime.ProvisioningRuntime.provision(ProvisioningRuntime.java:260)
at org.jboss.prospero//org.jboss.galleon.ProvisioningManager.doProvision(ProvisioningManager.java:644)
at org.jboss.prospero//org.jboss.galleon.ProvisioningManager.provision(ProvisioningManager.java:403)
at org.jboss.prospero//org.wildfly.prospero.actions.Provision.lambda$provision$0(Provision.java:113)
at org.jboss.prospero//org.wildfly.prospero.galleon.GalleonUtils.executeGalleon(GalleonUtils.java:51)
at org.jboss.prospero//org.wildfly.prospero.actions.Provision.provision(Provision.java:113)
at org.jboss.prospero//org.wildfly.prospero.cli.commands.InstallCommand.call(InstallCommand.java:128)
at org.jboss.prospero//org.wildfly.prospero.cli.commands.InstallCommand.call(InstallCommand.java:22)
at org.jboss.prospero//picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at org.jboss.prospero//picocli.CommandLine.access$1300(CommandLine.java:145)
at org.jboss.prospero//picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at org.jboss.prospero//picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at org.jboss.prospero//picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at org.jboss.prospero//picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at org.jboss.prospero//picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at org.jboss.prospero//picocli.CommandLine.execute(CommandLine.java:2078)
at org.jboss.prospero//org.wildfly.prospero.cli.CliMain.main(CliMain.java:53)
at org.jboss.modules.Module.run(Module.java:353)
at org.jboss.modules.Module.run(Module.java:321)
at org.jboss.modules.Main.main(Main.java:604)
Caused by: java.lang.IllegalStateException: WFLYEMB0018: Cannot get reflective method 'create' for: org.wildfly.core.embedded.EmbeddedStandaloneServerFactory
at org.wildfly.core.embedded.EmbeddedProcessFactory.createStandaloneServer(EmbeddedProcessFactory.java:184)
at org.wildfly.core.embedded.EmbeddedProcessFactory.createStandaloneServer(EmbeddedProcessFactory.java:114)
at org.wildfly.galleon.plugin.config.generator.BaseConfigGenerator.doStartServer(BaseConfigGenerator.java:212)
at org.wildfly.galleon.plugin.config.generator.WfConfigGenerator.startServer(WfConfigGenerator.java:151)
at org.wildfly.galleon.plugin.config.generator.WfProvisionedConfigHandler.prepare(WfProvisionedConfigHandler.java:430)
at org.jboss.prospero//org.jboss.galleon.runtime.ResolvedConfig.handle(ResolvedConfig.java:129)
at org.wildfly.galleon.plugin.config.generator.WfConfigGenerator.doGenerate(WfConfigGenerator.java:93)
at org.wildfly.galleon.plugin.config.generator.WfConfigGenerator.generate(WfConfigGenerator.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wildfly.galleon.plugin.WfInstallPlugin.generateConfigs(WfInstallPlugin.java:731)
... 25 more
Caused by: java.lang.NoSuchMethodException: org.wildfly.core.embedded.EmbeddedStandaloneServerFactory.create(java.io.File, org.jboss.modules.ModuleLoader, java.util.Properties, java.util.Map, [Ljava.lang.String;)
at java.base/java.lang.Class.getMethod(Class.java:2108)
at org.wildfly.core.embedded.EmbeddedProcessFactory.createStandaloneServer(EmbeddedProcessFactory.java:182)
... 37 more
I think the root cause is that when looking for the create
method here: https://github.com/wildfly/wildfly-core/blob/main/embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java#L177
the ModuleLoader
class passed as the argument of the getMethod()
call comes from a different class loader.
List updates, but don't perform updates
When using the standalone distribution, the user can update Prospero libraries.
The mechanism can use channel to list dependencies. On update new libraries would be downloaded and replace existing ones. To work around Windows limitations, part of the work might need to be done in startup script (switch libraries).
Note this is partially implemented in prospero-bootstrap
When using prospero provisioned as standalone FP, SLF4J warning is issued:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
In shaded jar this is fixed by adding slf4j-nop library
Add docs.examples.config
package to the installation
When provisioning additional package 'docs.examples.configs', Galleon provisions a 2nd server to generate additional configurations.
Output can be confusing for customers as the provisioning steps are displayed twice
The one-off zip contains a maven repository with channel definition and updated jars.
The prospero apply-patch patch.zip
operation registers the new channel and repository, and performs update.
The prospero remove-patch <ID>
operation de-registers the new channel and repository, and performs update (effectively removing changes from the patch).
The prospero list-patch
operation lists installed patches.
@spyrkob can you help me understand what are expected valid combinations of arguments when provisioning a server?
Two options that work for me:
prospero install --dir=eap --fpl=eap
-- this works with "well known" fpl shortcuts like "eap" or "wildfly"prospero install --dir=eap --fpl=org.jboss.eap:wildfly-ee-galleon-pack --channel-file=provision.json
where the provision.json file looks like:
{
"channels": [
{"gav": "org.jboss.eap.channels:eap-8.0-beta:1.0.0.Beta-redhat-00001"}
],
"repositories": [
{
"id": "central",
"url": "https://repo1.maven.org/maven2/"
},
{
"id": "mrrc",
"url": "https://maven.repository.redhat.com/ga/"
},
{
"id": "channel",
"url": "file:///home/thofman/tmp/m2-repo"
}
]
}
I suppose it should also be possible to not use the --channel-file=provision.json
and specify everything via arguments? Right now --channel-file
is required.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.