Giter Site home page Giter Site logo

galleon's Introduction

Galleon Provisioning

Overview

Galleon is a provisioning tool designed to create and maintain software distributions that consist of one or more products (or components). The tool supports:

  • adding products to a distribution;

    • their default and customized configurations;

  • removing products from a distribution;

  • integration of the products in the distribution;

  • resolution and validation of the resulting configuration and runtime dependencies;

  • patching and version updates;

  • product-specific provisioning plugins;

  • detection of the changes in the provisioned distribution (its filesystem content and/or its configuration) applied by the user manually or by means of other management tools

    • to be able to preserve them after a version upgrade (having made sure the changes are compatible in the new version)

    • or create a provisioning configuration that could be used to reproduce the state of the distribution including the user changes;

  • exporting the provisioning configuration of the current state of the distribution with the goal to reproduce it later at another location.

The tool includes a command-line interface and a public API. There is also a Maven plugin that allows provisioning a distribution according to the provided configuration.

Download and Installation of the Command Line Tool

Releases of the command line tool are available on the releases page.

Download and unzip the release zip and add the bin dir to your system path. Use galleon.sh or galleon.bat to launch the tool.

Project Modules

Module galleon-parent

Defines main version and common dependencies of the project.

Module core

General provisioning and feature-pack API. Which allows to provision the desired installation specification at a specified location, install additional and/or uninstall existing feature-packs, export the currently provisioned specification to a file with the purpose to reproduce it at a different location.

Module cli

Command line interface which allows to:

  • Build feature-packs and install them into the Maven repository;

  • Provision an installation by pulling the feature-packs from the Maven repository and installing them at the specified location.;

  • View the currently provisioned installation specification;

  • Export the currently provisioned installation specification to a file with goal to reproduce the installation later.

The Maven assembly plug-in is configured to create a single executable JAR file which contains all the dependencies.

CLI Commands

The CLI commands help is printed by calling the help command.

Full documentation of the CLI commands can be found in this documentation.

Building and launching the tool

The tool can be built by executing the following Maven command:

mvn clean install

The executable JAR will be built in cli/target/galleon-cli.jar

There is also a convenience do.sh script in the root directory of the project. If executed w/o arguments, it’ll build and launch the tool.

./do.sh build will only build the tool. ./do.sh run will only launch the already built tool.

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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

galleon's Issues

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;"/>

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.

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

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

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

--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?

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

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?

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.

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.

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.

Galleon 6.0.0+ not running in docker image - Failed to resolve Maven universe org.jboss.universe:community-universe

Reproducing:

  1. run docker, like debian slim
  2. download and unpacking galleon 6.0.0+
  3. run: galleon/bin/galleon.sh install wildfly:current#32.0.1.Final

Error:
`Error: org.jboss.galleon.universe.maven.MavenUniverseException: Failed to resolve Maven universe org.jboss.universe:community-universe

  • Failed to resolve Maven universe org.jboss.universe:community-universe
  • Failed to determine the latest version of org.jboss.universe:community-universe:jar:[0.0,). Make sure the remote Maven repository is properly configured and available.`

Problem is in code:

repoPath = new StringBuilder(PropertyUtils.getSystemProperty("user.home")).append(File.separatorChar)

this uses PropertyUtils.getSystemProperty("user.home") which is not set correctly in the docker image

I think a better solution would be to use the $HOME environment or similar, or maybe try to set "user.home" in the galleon.sh script.

Current workaround is set manually:
JAVA_OPTS=-Duser.home=$HOME galleon/bin/galleon.sh install wildfly:current#32.0.1.Final

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

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.