Code Monkey home page Code Monkey logo

prospero's People

Contributors

bstansberry avatar christinadsl avatar dependabot[bot] avatar ettoreleandrotognoli avatar gaol avatar jfdenise avatar jmesnil avatar liweinan avatar michpetrov avatar moulalis avatar parsharma avatar soul2zimate avatar spyrkob avatar tomashofman avatar wolfc avatar xstefank avatar yersan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

prospero's Issues

Improve CLI handling

Separate CLI argument handling from installation/update/etc actions.

Create Console abstraction for progress updates and user communication.

Add support for versioned syntax of eap and wildfly installation types

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:

  • org.prospero:test:test-channel:1.0.0
  • org.prospero:test:test-channel:1.1.0
  • org.prospero:test:test-channel:2.0.0

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

Unset module.path around Galleon execution

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.

Prospero should be able to downgrade the component.

If prospero should downgrade some component based on the channel, then:

  • currently the component is not upgraded, no warning is printed, channel is not respected
  • channel should be respected, component should be downgraded. Warning about this downgrade may be useful

Use provisioned artifacts as update cache

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

Bootstrap mode for installer

A minimal dependency jar able to download all required packages from installer channel and perform self update.

Add management operations to list, add and remove maven repositories and channels

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

Add strict version rule to channel definition

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

Add help and syntax description

Add help operation listing available operations and their parameters.

Add --help argument to operations to display the operation's parameter

Make predefined FPLs visible to the user

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?

Investigate using modules as a maven cache

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.

Class loader issue with jboss-modules

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

Add self update operation

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

Fix slf4j warning when running from jboss-modules

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

Hide galleon's provisioning of 2nd server

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

Add operation to apply and remove one-off patch from a zip

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.

Clarifying valid argument combinations

@spyrkob can you help me understand what are expected valid combinations of arguments when provisioning a server?

Two options that work for me:

  1. prospero install --dir=eap --fpl=eap -- this works with "well known" fpl shortcuts like "eap" or "wildfly"
  2. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.