Git Product home page Git Product logo

galleon's Introduction

wildfly logo

WildFly Application Server

https://wildfly.org

  • Fast Startup
  • Small Footprint
  • Modular Design
  • Unified Configuration and Management

And of course Jakarta EE!

Building

Prerequisites:

  • JDK 11 or newer - check java -version
  • Maven 3.6.0 or newer - check mvn -v
  • On *nix systems, make sure that the maximum number of open files for the user running the build is at least 4096 (check ulimit -n) or more, depending on what other i/o intensive processes the user is running.

To build with your own Maven installation:

mvn install

Alternatively, you can use the Maven Wrapper script that downloads and installs (if necessary) the required Maven version to ~/.m2/wrapper and runs it from there. On Linux, run

./mvnw install

On Windows

mvnw install

Starting and Stopping WildFly

Change to the bin directory after a successful build

$ cd build/target/wildfly-[version]/bin

Start the server in domain mode

./domain.sh

Start the server in standalone mode

./standalone.sh

To stop the server, press Ctrl + C, or use the admin console

./jboss-cli.sh --connect command=:shutdown

Check 'Getting Started Guide' in the WildFly documentation for more information about how to start and stop WildFly.

Documentation

Contributing

Please see the instructions available in the contribution guide.

Build vs. Dist directories

After running mvn install, WildFly will be available in two distinct directories, build and dist.

  • The build directory contains a build of WildFly that is based on Maven artifact resolution for module configuration
  • The dist directory, on the other hand, contains a full distributable build of WildFly

Using the build directory makes iterating with subsystem or module development easier since there is no need to rebuild the whole of WildFly or copy JAR files around on every change.

The dist directory is better suited when a full build of WildFly is needed for development or test purposes.

Running the Testsuite

The testsuite module contains several submodules including the following:

  • "smoke" -- core tests that should be run as part of every build of the AS. Failures here will fail the build.
  • "api" -- tests of features that involve end user use of the public JBoss AS 8 API. Should be run with no failures before any major commits.
  • "cluster" -- tests of the WildFly HA clustering features. Should be run with no failures before any major commits.
  • "domain" -- tests of the domain management features. Should be run with no failures before any major commits.
  • "integration" -- tests of a WildFly standalone server's internals. Should be run with no failures before any major commits.
  • "spec" -- tests of features that only involve end user use of the Jakarta EE spec APIs. Should be run with no failures before any major commits.

For basic smoke tests, simply: mvn test

To run all the tests

mvn install -DallTests

Using Eclipse

  1. Install the latest version of eclipse
  2. Make sure Xmx in eclipse.ini is at least 1280M, and it's using Java 11
  3. Launch eclipse and install the m2e plugin, make sure it uses your repo configs (get it from: http://www.eclipse.org/m2e/ or install "Maven Integration for Eclipse" from the Eclipse Marketplace)
  4. In eclipse preferences Java->Compiler->Errors/Warnings->Deprecated and restricted set forbidden reference to WARNING
  5. In eclipse preferences Java->Code Style, import the cleanup, templates, and formatter configs in ide-configs/eclipse in the wildfly-core repository.
  6. In eclipse preferences Java->Editor->Save Actions enable "Additional Actions", and deselect all actions except for "Remove trailing whitespace"
  7. Use import on the root pom, which will pull in all modules
  8. Wait (m2e takes a while on initial import)

License

galleon's People

Contributors

aloubyansky avatar bstansberry avatar dependabot[bot] avatar erhardsiegl avatar iweiss avatar jamezp avatar jfdenise avatar ppalaga avatar rsvoboda avatar spyrkob avatar tomashofman avatar yersan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

galleon's Issues

provision-spec and provisioned-spec are not found in release 5.0.1.Final

When I use the galleon-5.0.1.Final release I am unable to get the provision-spec and provisioned-spec to work. I was able to install wildfly without a hitch, but I get an error that these commands are not found. The install and pwd commands are just to indicate that other commands are found. I'm running this in the openjdk:17-slim-buster docker image.

root@5bb8817a6788:~# galleon-5.0.1.Final/bin/galleon.sh 
[root]$ install
Error: Missing feature-pack
[root]$ pwd
/root
[root]$ provision-spec
Command named provision-spec was not found.
[root]$ provisioned-spec
Command named provisioned-spec was not found.
[root]$ provisioned-spec display --dir=/root/my-wildfly-server
Command named provisioned-spec display --dir=/root/my-wildfly-server was not found.
[root]$ ls
galleon-5.0.1.Final  galleon-5.0.1.Final.zip  my-wildfly-server  potato.xml

Galleon still uses EA sources.

Using galleon 4.2.5.Final
When I use command galleon install wildfly#18.0.1.Final --layers=jaxrs,cdi --dir=c:\devel2\galleon-demo2 or maven wildfly-galleon-pack plugin, its still trying to download jars from redhat EA, the way I found being discussed at https://developer.jboss.org/thread/280712

For example, wildfly 18.0.1 tries do download jackson-core-asl:jar:1.9.13.redhat-00006. 18.0.0 wants picketlink-impl:2.5.5.SP12-redhat-00006. This is a problem for environments where local nexus repositories do not allow EA sources.

Feature pack does not work and won't be applied

This is my command
galleon install wildfly:17.0#17.0.1.Final --verbose --dir=c:/wildfly17-galleon-jpa --layers=jpa,h2-database --config=standalone-full --file=c:\postgresql-1.0.zip
I expect the Wildfly 17.0.1 is built only with JPA and H2 layers and the drivers of postgre are applied from within feature pack zip file.
This is the official zip file https://github.com/jfdenise/galleon-openshift/releases/download/1.0/postgresql-1.0.zip

The problem is that the command simply does nothing and returns without doing anything and without building the server.

Unwanted value expansion in wildfly-ee-galleon-pack for a value attribute.

Configuration

File: my-featurepack/src/main/resources/layers/standalone/my-layer/layer-spec.xml

<feature spec="subsystem.elytron.dir-context">
  <param name="dir-context" value="myname"/>
  <param name="url" value="${env.LDAP_URL}"/>
  <param name="principal" value="uid=user,cn=users,ou=something,o=my,c=com"/>
</feature>

Result

<param name="principal" value="uid=user,cn=users,ou=something,o=my,c=com"/>

The type of the value attribute is determined by = and , in the value.

  • If there is a , in the value, it becomes a list.
  • If there is a = in the value, it becomes a dictionary.
{
  "operation" => "add",
  "address" => [...],
  "principal" => {
    "uid" => "user",
    "cn" => "users",
    "ou" => "something",
    "o" => "my",
    "c" => "com"
  }, ...
}

This exception is thrown:

WFLYCTL0097: Wrong type for 'principal'. Expected [EXPRESSION, STRING] but was OBJECT"

Expected result

{
  "operation" => "add",
  "address" => [...],
  "principal" => "uid=user,cn=users,ou=something,o=my,c=com",
  ...
}

Possible solution:

Add a type="String" to the principal value in the wildfly-ee-galleon-pack for the param?

<feature-spec xmlns="urn:jboss:galleon:feature-spec:1.0" name="subsystem.elytron.dir-context">
  <params>
    <param name="principal" nillable="true" type="String"/>
  </params>
</feature-spec>

Also it would be nice to have some documentation about the translation of these values to there respectable wildfly operations.
I just hit a new type and problem that does not work for me.

<param name="attribute-mapping" nillable="true" type="List&lt;String&gt;"/>
attribute-mapping:
- filter-base-dn: "{{ wildfly_ldap_authorization_group_base_dn }}"
  filter: "(member={1})"
  from: cn
  to: Roles

I suspect wrapping a string in [...] and than use the = and the , to make it into objects.:

<param name="attribute-mapping" value="[filter-base-dn=${env.LDAP_AUTHROIZATION_GROUP_BASE_DN},filter=(member={1}),from=cn,to=Roles]"/>

Possible workarounds:

The = is easy to prevent, just escape it \=, then it becomes a list.
For the , there is no good solution, the only way that i could think of is adding a default to an environment variable expression.

<param name="principal" value="${env.LDAP_PRINCIPAL:uid=user,cn=users,ou=something,o=my,c=com}"/>

Turns out i can use &quot; in the variable to ensure it is a string.

<param name="principal" value="&quot;uid=user,cn=users,ou=something,o=my,c=com&quot;"/>

Failed to resolve Maven universe org.jboss.universe:community-universe

Hello

How to use galleon without internet access.
I have a nexus server that has access to the internet.
I added the repository
jboss-public-repository-group
http://myserver:8081/nexus/content/repositories/jboss-public-repository-group/ which is a mirror.

but I still have the messages
install wildfly-core:current --dir=myinstallation -v
Error: Install failed.

  • Failed to resolve Maven universe org.jboss.universe:community-universe
  • Failed to determine the latest version of org.jboss.universe:community-universe:jar:resolver-status.properties. Make sure the remote Maven repository is properly configured and available.

`$maven get-info

Configuration Item Value

Default release policy daily
Default snapshot policy never
Enable release true
Enable snapshot false
Local repository C:\Users\me.m2\repository
Maven xml settings C:\tools\org\apache\maven\3.5.3\conf\settings.xml
Offline false
Remote repositories jboss-public-repository-group
url=http://repository.jboss.org/nexus/content/groups/public/
type=default
release=true
releaseUpdatePolicy=daily
snapshot=false
snapshotUpdatePolicy=never
maven-central
url=http://repo1.maven.org/maven2/
type=default
release=true
releaseUpdatePolicy=daily
snapshot=false
snapshotUpdatePolicy=never
public
url=http://sap-nexus.sap.aphp.fr:8081/nexus/content/groups/public/
type=default
release=true
releaseUpdatePolicy=daily
snapshot=false
snapshotUpdatePolicy=never
releases
url=http://myserver:8081/nexus/content/repositories/releases/
type=default
release=true
releaseUpdatePolicy=daily
snapshot=false
snapshotUpdatePolicy=never
jboss-public-repository-group
url=http://myserver:8081/nexus/content/repositories/jboss-public-repository-group/
type=default
release=true
releaseUpdatePolicy=daily
snapshot=false
snapshotUpdatePolicy=never`

I tried maven remove-repository maven-central
to remove "maven-central" and replace it with my nexus server. but I did not find the right syntax
I still have "maven-central" not found

A+JYT

"do.sh package" results in Error

According to README.adoc:
./do.sh package` will only build the tool.

However it results in

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:20 min
[INFO] Finished at: 2019-12-28T18:22:09+01:00
[INFO] ------------------------------------------------------------------------
Command named package was not found.
Error: Command: named package was not found.

ClassNotFoundException: org.apache.activemq.artemis.core.config.StoreConfiguration after update 30 to 31

Hi, layer messaging-activemq throws an error on wildfly 31. Version 30 works fine. To reconstruct the problem, see example project here: https://github.com/martin-v/wildfly-test/

13:04:56,799 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "sampleproject.war" (runtime-name: "sampleproject.war")
13:04:56,816 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 27) WFLYIO001: Worker 'default' has auto-configured to 4 IO threads with 32 max task threads based on your 2 available processors
13:04:56,835 INFO  [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting Jakarta Connectors Subsystem (WildFly/IronJacamar 3.0.8.Final)
13:04:56,838 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 31) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "messaging-activemq"),
    ("server" => "default")
]): java.lang.NoClassDefFoundError: org/apache/activemq/artemis/core/config/StoreConfiguration
        at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.ServerAdd.performRuntime(ServerAdd.java:262)
        at [email protected]//org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:103)
        at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:1048)
        at [email protected]//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:769)
        at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:460)
        at [email protected]//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:368)
        at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.artemis.core.config.StoreConfiguration from [Module "org.wildfly.extension.messaging-activemq" from local module loader @52c3cb31 (finder: local module finder @4b79ac84 (roots: /opt/server/modules,/opt/server/modules/system/layers/base))]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:200)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
        ... 12 more
[...]
13:04:57,312 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "WFLYCTL0193: Failed executing subsystem messaging-activemq boot operations"
13:04:57,313 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("parallel-subsystem-boot") failed - address: ([]) - failure description: "\"WFLYCTL0193: Failed executing subsystem messaging-activemq boot operations\""
13:04:57,314 ERROR [org.jboss.as.server] (ServerService Thread Pool -- 24) WFLYSRV0022: Deploy of deployment "sampleproject.war" was rolled back with no failure message
13:04:57,319 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment sampleproject.war (runtime-name: sampleproject.war) in 3ms

Using Maven repository manager as a mirror does not seem to work

I am running Galleon inside a Docker container to to build a customized Wildfly distribution.

Lately my builds of that container started to randomly fail with Could not transfer artifact <some artifact> from/to maven-central (https://repo1.maven.org/maven2/): Connect timed out. To counter that I've tried using my local Sonatype Nexus OSS instance as a mirror, but I have trouble getting it to work.

I've added settings.xml to the Docker image and loaded it using maven set-settings-file <path to settings xml file> command, following https://docs.wildfly.org/galleon/#_relying_on_maven_settings

The contents of the settings.xml file are:

<settings>
  <mirrors>
    <mirror>
      <id>nexus</id>
      <name>Nexus</name>
      <url>https://<my nexus instance>/nexus/repository/public/</url>
      <mirrorOf>*</mirrorOf>
    </mirror>
  </mirrors>
</settings>

But that had no effect. I've also tried using <mirrorOf>maven-central,jboss-public-repository-group,jboss-ga</mirrorOf> because that's what Galleon command maven get-info shows as the default repositories. Still no effect.

I've also tried adding my own repository maven add-repository --url=https://<my nexus instance>/nexus/repository/public/ --name=nexus but it had no effect. Galleon still hit Maven Central. maven get-info shows the repository I've added below the default ones, so maybe the default ones are contacted first. Then I've tried to delete the default repositories, but surprisingly I got the following error:

maven remove-repository maven-central
Error: Remove repository failed.
 * Repository maven-central doesn't exist

Then I thought that maybe I could replace the default repositories with custom ones, but it just created repositories with duplicate names. Adding a custom repository with same name a second time does not error out either, but overwrites previous definition.

Am I missing something? https://docs.wildfly.org/galleon/#_cli_tool_maven_configuration says that "Advanced mirroring (eg: external:*) is not supported." that seems to imply that basic mirroring is supposed to work?

Galleon fails updating 23-->23.0.1 (CentOS 7)

Version: galleon-4.2.8.Final

[wildfly]$ update
Feature-packs resolved.
Some updates and/or patches are available.
======= ============= ============ ==============
Product Current Build Update Update Channel
======= ============= ============ ==============
wildfly 23.0.0.Final 23.0.1.Final 23.0

Proceed with latest updates [y/n]?
Feature-packs resolved.
Packages installed.
JBoss modules installed.
Configurations generated.
Replaying your changes on top

  • standalone/log/
  • standalone/coordConfig/
  • modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.18.Fixed.jar
  • standalone/tmp/vfs/
  • modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.4.1.Fixed.jar
  • standalone/configuration/standalone_xml_history/
  • modules/com/
  • modules/org/
  • standalone/data/
  • standalone/ismobile/
    C modules/system/layers/base/org/jboss/logging/main/module.xml
    C standalone/configuration/application-users.properties
    C modules/system/layers/base/org/jboss/logmanager/main/module.xml
    C domain/configuration/mgmt-users.properties
    C standalone/configuration/mgmt-users.properties
    C standalone/configuration/application-roles.properties
    C standalone/configuration/logging.properties
    C domain/configuration/application-roles.properties
    C domain/configuration/application-users.properties
    C standalone/configuration/standalone-full.xml
    Error: Update failed.
  • Failed to copy /tmp/68e33f20-8069-437a-bbe9-bb4524513eb2/staged to /opt/wildfly

Failed to update Wildfly with galleon 4.0.2

Hello!
What is current working procedure for Wildfly update or install?
I tried commands on galleon 4.0.1:

 ./galleon.sh check-updates --dir=/opt/wildfly
Up to date. No available updates nor patches.

./galleon.sh install wildfly:current#17.0.0.Final --dir=/opt/wildfly-17.0.0.Final
Error: Install failed.
 * Failed to resolve org.wildfly:wildfly-galleon-pack:zip:17.0.0.Final
  * Could not transfer artifact org.wildfly:wildfly-galleon-pack:zip:17.0.0.Final from/to jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   * Could not transfer artifact org.wildfly:wildfly-galleon-pack:zip:17.0.0.Final from/to jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    * PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
     * PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      * unable to find valid certification path to requested target

The same commands works well with galleon 3.0.2 on the same computer.

--layers=messaging-activemq does not add any default configuration into standalone.xml (and other attempted workarounds)

I am trying to switch from using the unzipped wildfly to a galleon based install in order to better manage version updates. However I am having a lot of difficulty in getting the galleon setup right. I use pretty much a standard standalone.xml and then have to add activemq for JMS message beans, and infinispan for my own cached beans. So far the experience has not proven easy.

  1. When installing using just --layers, then adding messaging-activemq does not add any default configuration into standalone.xml. I have to pick through an old standalone-full.xml to find the relevant sections and add then use jboss-cli to add them. This does not seem to be the case for other layers, and also I am concerned that a small mistake could have unforeseen and unfindable production issues down the line. Is it intentional that adding a messaging-activemq layer does not also add a default configuration?

  2. I can install using --default-configs=standalone/standalone.xml or --layers but not both! So this also does not give me a path to install a basic standalone server installation with JMS message beans out the box. Is it possible to install both a default standalone server (with all default configs) and then add a messaging-activemq on top, also with default configurations?

  3. Now I am resorting to installing --default-configs=standalone/standalone-full.xml just to get the default configs, and then considering removing sections I don't need with jboss-cli. Surely there is a better way to do this?

  4. I also looked at updating an existing --default-configs=standalone/standalone.xml afterwards by doing another galleon call using --layers, but the second call just does nothing with no error messages shown.

  5. I see from the galleon command line help that there are some commands for "universe" updates, but nothing in the documentation anywhere about "universes" and so I don't know how to do this or even if it is a viable option.

Or am I just using this galleon tool wrong, or is galleon actually not the recommended way of doing this anymore?

Make the capability of persisting hashes of a server public

When working on wildfly-extras/prospero#255, which needs a capability to generate hashes of the existing server installation without galleon metadata files, the hashes are needed for the comparison to the generated metadata files.

The hashes generation comes from:
https://github.com/wildfly/galleon/blob/5.1.0.Final/core/src/main/java/org/jboss/galleon/ProvisioningManager.java#L831, and I think it would be good if we can reuse the capability in prospero.

So I propose to make ProvisioningManager.persistHashes() public, and change the parameter to the serverDir.

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.