Galleon: config standalone.xml in feature-pack

174 views
Skip to first unread message

Marcus Klimstra

unread,
Feb 28, 2020, 8:05:39 AM2/28/20
to WildFly
Hi,

While working on a custom Galleon feature-pack I'm having some trouble figuring out how to customize the standalone.xml configuration. I have posted a detailed description of my problem on StackOverflow:

https://stackoverflow.com/questions/60375504/configuring-wildfly-standalone-xml-in-galleon-feature-pack

I hope that someone could take a look at this. Thanks in advance!

Kabir Khan

unread,
Feb 28, 2020, 12:06:45 PM2/28/20
to Marcus Klimstra, WildFly
Hi,

I am in the middle of some travel, but will try to look next week. Have you tried looking in the wildfly galleon-pack folder? There should be some examples there (while I can appreciate it will probably look a bit daunting to someone not familiar with all our stuff!).

Thanks,

Kabir
--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/1707ef8e-b779-413b-bfca-d257b7dca371%40googlegroups.com.

Kabir Khan

unread,
Feb 29, 2020, 1:14:01 PM2/29/20
to Marcus Klimstra, WildFly
I think (but would have to play with it to be sure) that your first example with the subsystem parameter should work. Am I correct in thinking your subsystem resource has no parameters?


On Fri, 28 Feb 2020 at 17:06, Kabir Khan <kk...@redhat.com> wrote:
Hi,

I am in the middle of some travel, but will try to look next week. Have you tried looking in the wildfly galleon-pack folder? There should be some examples there (while I can appreciate it will probably look a bit daunting to someone not familiar with all our stuff!).

Thanks,

Kabir

On Friday, 28 February 2020, Marcus Klimstra <mgb.kl...@gmail.com> wrote:
Hi,

While working on a custom Galleon feature-pack I'm having some trouble figuring out how to customize the standalone.xml configuration. I have posted a detailed description of my problem on StackOverflow:

https://stackoverflow.com/questions/60375504/configuring-wildfly-standalone-xml-in-galleon-feature-pack

I hope that someone could take a look at this. Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.

Marcus Klimstra

unread,
Mar 1, 2020, 5:27:49 AM3/1/20
to WildFly
Hi Kabir,

Thanks for your response! Yes, I did see the galleon-pack folder within the Wildfly repository. It was linked from this article along with 2 other useful repos: 
There are multiple examples in there with parent-child relationships, which I used as inspiration for what I have now. But I did not find any reference to the "host" parameter that is giving me trouble.

Hopefully I'm understanding your question about the subsystem resource having no parameters correctly. The subsystem is supposed to have the following overall structure:

<subsystem xmlns="urn:org.camunda.bpm.jboss:1.1">
  <process-engines>
    <process-engine name="default" default="true">
      ...
    </process-engine>
  </process-engines>
  <job-executor>
    ...
  </job-executor>
</subsystem>

So indeed: the subsystem itself has no direct parameters, only the process-engines and job-executor sub-elements. My aim was to skip the more complicated process-engines sub-element for now, and focus on the job-executor one first, which led to this attempt:

<feature spec="subsystem.camunda-bpm-platform">
  <param name="subsystem" value="subsystem.camunda-bpm-platform"/>
  <feature spec="subsystem.camunda-bpm-platform.job-executor">
    <param name="job-executor" value="default"/>
    <param name="core-threads" value="3"/>
    <param name="max-threads"  value="5"/>
    <param name="queue-length" value="10"/>
  </feature>
</feature>

Resulting in the error "Foreign key parameter host of {com.github.marcus-nl.camunda-galleon}subsystem.camunda-bpm-platform.job-executor reference subsystem.camunda-bpm-platform does not exist" that I cannot unravel.

Good travels!

On Saturday, 29 February 2020 19:14:01 UTC+1, Kabir Khan wrote:
I think (but would have to play with it to be sure) that your first example with the subsystem parameter should work. Am I correct in thinking your subsystem resource has no parameters?


On Fri, 28 Feb 2020 at 17:06, Kabir Khan <kk...@redhat.com> wrote:
Hi,

I am in the middle of some travel, but will try to look next week. Have you tried looking in the wildfly galleon-pack folder? There should be some examples there (while I can appreciate it will probably look a bit daunting to someone not familiar with all our stuff!).

Thanks,

Kabir

On Friday, 28 February 2020, Marcus Klimstra <mgb.k...@gmail.com> wrote:
Hi,

While working on a custom Galleon feature-pack I'm having some trouble figuring out how to customize the standalone.xml configuration. I have posted a detailed description of my problem on StackOverflow:

https://stackoverflow.com/questions/60375504/configuring-wildfly-standalone-xml-in-galleon-feature-pack

I hope that someone could take a look at this. Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wil...@googlegroups.com.

Kabir Khan

unread,
Mar 1, 2020, 5:45:29 AM3/1/20
to Marcus Klimstra, WildFly
Did you try removing the parameter to the subsystem, i.e.:

<feature spec="subsystem.camunda-bpm-platform"> <!-- param name="subsystem" value="subsystem.camunda-bpm-platform"/ --> <feature spec="subsystem.camunda-bpm-platform.job-executor"> <param name="job-executor" value="default"/> <param name="core-threads" value="3"/> <param name="max-threads" value="5"/> <param name="queue-length" value="10"/> </feature> </feature>

This seems to me to be more in line with what we do with subsystems. I have not actually done much in this area myself, but others will be around on Monday who will have. There seems to be some naming convention depending on if a child is registered against child=*, or child=singleton, but I need to look more properly. Still that should not affect the subsystem registration. It will be good to have this documented once I know better.

Thanks,

Kabir

To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/d1849e72-5127-45bf-a909-328294121a54%40googlegroups.com.

Emmanuel Hugonnet

unread,
Mar 2, 2020, 4:24:06 AM3/2/20
to wil...@googlegroups.com
IIRC the host becomes part of the address thus you have to set it to reference the correct subsystem in the sub-elements.

Emmanuel

Le 01/03/2020 à 11:45, Kabir Khan a écrit :
> Did you try removing the parameter to the subsystem, i.e.:
>
> <feature spec="subsystem.camunda-bpm-platform"> <!-- param name="subsystem" value="subsystem.camunda-bpm-platform"/ --><feature
> spec="subsystem.camunda-bpm-platform.job-executor"> <param name="job-executor" value="default"/> <param name="core-threads" value="3"/>
> <param name="max-threads" value="5"/> <param name="queue-length" value="10"/> </feature> </feature>
> This seems to me to be more in line with what we do with subsystems. I have not actually done much in this area myself, but others will be
> around on Monday who will have. There seems to be some naming convention depending on if a child is registered against child=*, or
> child=singleton, but I need to look more properly. Still that should not affect the subsystem registration. It will be good to have this
> documented once I know better.
>
> Thanks,
>
> Kabir
>
> On Sun, 1 Mar 2020 at 10:27, Marcus Klimstra <mgb.kl...@gmail.com <mailto:mgb.kl...@gmail.com>> wrote:
>
> Hi Kabir,
>
> Thanks for your response! Yes, I did see the galleon-pack folder within the Wildfly repository. It was linked from this article
> <https://wildfly.org/news/2019/12/17/Ship-your-WildFly-additions-via-Galleon-feature-packs/> along with 2 other useful repos: 
>
> * WildFly Core’s Core Feature Pack
> <https://github.com/wildfly/wildfly-core/tree/10.0.3.Final/core-galleon-pack/src/main/resources/layers/standalone>
> * WildFly’s Servlet Feature Pack
> <https://github.com/wildfly/wildfly/tree/18.0.1.Final/servlet-galleon-pack/src/main/resources/layers/standalone>
> * WildFly’s Full Feature Pack <https://github.com/wildfly/wildfly/tree/18.0.1.Final/galleon-pack/src/main/resources/layers/standalone>
> <https://groups.google.com/d/msgid/wildfly/1707ef8e-b779-413b-bfca-d257b7dca371%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com
> <mailto:wildfly+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wildfly/d1849e72-5127-45bf-a909-328294121a54%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/d1849e72-5127-45bf-a909-328294121a54%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com
> <mailto:wildfly+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wildfly/CAJfxLg6%3D%3DOiQU0rkr97M8cfPhaxV2LOK-9zA0XzEGBRvH8Yxcg%40mail.gmail.com
> <https://groups.google.com/d/msgid/wildfly/CAJfxLg6%3D%3DOiQU0rkr97M8cfPhaxV2LOK-9zA0XzEGBRvH8Yxcg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

signature.asc

Marcus Klimstra

unread,
Mar 2, 2020, 6:48:25 AM3/2/20
to WildFly
Hi Kabir and Emmanuel,

I had indeed tried those variants (and several others).

Removing the parameter to the subsystem gives the exact same error as before: "Foreign key parameter host of {com.github.marcus-nl.camunda-galleon}subsystem.camunda-bpm-platform.job-executor reference subsystem.camunda-bpm-platform does not exist"
Setting the host in the child element: "Feature spec subsystem.camunda-bpm-platform.job-executor does not define parameter host"

Could it be that there are issues with the generated feature spec.xml files? (See bpm-platform/spec-xml and job-executor/spec-xml) This is the part that is the most mysterious to me:

1. How are these files generated, based on what? I'm guessing from the resource definition classes in the subsystem such as BpmPlatformRootDefinition and JobExecutorDefinition.

2. Where does "host" param come from? What does it mean? I cannot trace it back to those resource definition classes, nor could I find it mentioned in the documentation. 

I looked at the generated feature specs for wildfly-core and so far they all contain such host params, and also host feature refs, for example:

<feature-spec xmlns="urn:jboss:galleon:feature-spec:1.0" name="core-service.management.access.audit">
   <annotation name="jboss-op">
       <elem name="name" value="add"/>
       <elem name="op-params" value=""/>
       <elem name="addr-params" value="host,core-service,access"/>
   </annotation>
   <annotation name="feature-branch">
       <elem name="id" value="core-service.management"/>
   </annotation>
   <refs>
       <ref feature="core-service.management"/>
       <ref feature="host" nillable="true"/><!-- this is not present in any of the Camunda subsystem spec.xml's -->
   </refs>
   <params>
       <param name="host" feature-id="true" default="GLN_UNDEFINED"/><!-- this is only present for "subsystem.camunda-bpm-platform" -->
        <param name="core-service" feature-id="true" default="management"/>
       <param name="access" feature-id="true" default="audit"/>
   </params>
</feature-spec>

Whereas in the case of the Camunda subsystem the host param is only present in the spec of the parent, not the child, and there is no "host" feature ref at all.

Regards, Marcus
>     To unsubscribe from this group and stop receiving emails from it, send an email to wil...@googlegroups.com
>     <mailto:wil...@googlegroups.com>.
>     To view this discussion on the web visit
>     https://groups.google.com/d/msgid/wildfly/d1849e72-5127-45bf-a909-328294121a54%40googlegroups.com
>     <https://groups.google.com/d/msgid/wildfly/d1849e72-5127-45bf-a909-328294121a54%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wil...@googlegroups.com
> <mailto:wil...@googlegroups.com>.

Emmanuel Hugonnet

unread,
Mar 2, 2020, 10:37:34 AM3/2/20
to WildFly
Are you generating for host and domain too ?

I'm wondering if that's the issue: just generating for standalone as it seems this is your current target.

The host comes from the merging of feature specs for standalone, domain and host configurations.

I think this is a bug in the merging of the extension feature specs because the host shouldn't be there.

Emmanuel

Le 02/03/2020 à 12:48, Marcus Klimstra a écrit :
> Hi Kabir and Emmanuel,
>
> I had indeed tried those variants (and several others).
>
> Removing the parameter to the subsystem gives the exact same error as before: "Foreign key parameter host of
> {com.github.marcus-nl.camunda-galleon}subsystem.camunda-bpm-platform.job-executor reference subsystem.camunda-bpm-platform does not exist"
> Setting the host in the child element: "Feature spec subsystem.camunda-bpm-platform.job-executor does not define parameter host"
>
> Could it be that there are issues with the generated feature spec.xml files? (See bpm-platform/spec-xml
> <https://gist.github.com/marcus-nl/3dc61f34f2f37f4366ea1310865046e2#file-2_camunda-bpm-platform_spec-xml> and job-executor/spec-xml
> <https://gist.github.com/marcus-nl/3dc61f34f2f37f4366ea1310865046e2#file-3_job-executor_spec-xml>) This is the part that is the most
> mysterious to me:
>
> 1. How are these files generated, based on what? I'm guessing from the resource definition classes in the subsystem such
> as BpmPlatformRootDefinition
> <https://github.com/camunda/camunda-bpm-platform/blob/master/distro/wildfly/subsystem/src/main/java/org/camunda/bpm/container/impl/jboss/extension/resource/BpmPlatformRootDefinition.java> and JobExecutorDefinition.
> <https://github.com/camunda/camunda-bpm-platform/blob/master/distro/wildfly/subsystem/src/main/java/org/camunda/bpm/container/impl/jboss/extension/resource/JobExecutorDefinition.java>
>
> 2. Where does "host" param come from? What does it mean? I cannot trace it back to those resource definition classes, nor could I find it
> mentioned in the documentation. 
>
> I looked at the generated feature specs for wildfly-core and so far they all contain such host params, and *also *host feature refs, for
> example:
>
> |
> <feature-specxmlns="urn:jboss:galleon:feature-spec:1.0"name="core-service.management.access.audit">
>    <annotationname="jboss-op">
>        <elemname="name"value="add"/>
>        <elemname="op-params"value=""/>
>        <elemname="addr-params"value="host,core-service,access"/>
>    </annotation>
>    <annotationname="feature-branch">
>        <elemname="id"value="core-service.management"/>
>    </annotation>
>    <refs>
>        <reffeature="core-service.management"/>
>        <reffeature="host"nillable="true"/><!-- this is not present in any of the Camunda subsystem spec.xml's -->
>    </refs>
>    <params>
>        <paramname="host"feature-id="true"default="GLN_UNDEFINED"/><!-- this is only present for "subsystem.camunda-bpm-platform" -->     
>   <paramname="core-service"feature-id="true"default="management"/>
>        <paramname="access"feature-id="true"default="audit"/>
> <https://groups.google.com/d/msgid/wildfly/1707ef8e-b779-413b-bfca-d257b7dca371%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/wildfly/1707ef8e-b779-413b-bfca-d257b7dca371%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> >
> >     --
> >     You received this message because you are subscribed to the Google Groups "WildFly" group.
> >     To unsubscribe from this group and stop receiving emails from it, send an email to wil...@googlegroups.com <javascript:>
> >     <mailto:wil...@googlegroups.com <javascript:>>.
> <https://groups.google.com/d/msgid/wildfly/d1849e72-5127-45bf-a909-328294121a54%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/wildfly/d1849e72-5127-45bf-a909-328294121a54%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "WildFly" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to wil...@googlegroups.com <javascript:>
> > <mailto:wil...@googlegroups.com <javascript:>>.
> <https://groups.google.com/d/msgid/wildfly/CAJfxLg6%3D%3DOiQU0rkr97M8cfPhaxV2LOK-9zA0XzEGBRvH8Yxcg%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/wildfly/CAJfxLg6%3D%3DOiQU0rkr97M8cfPhaxV2LOK-9zA0XzEGBRvH8Yxcg%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com
> <mailto:wildfly+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/9208b6ec-d0a7-420f-b99d-2366ff809cdc%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/9208b6ec-d0a7-420f-b99d-2366ff809cdc%40googlegroups.com?utm_medium=email&utm_source=footer>.

signature.asc

Marcus Klimstra

unread,
Mar 3, 2020, 6:34:04 AM3/3/20
to WildFly
Generating for domain as well did the trick. Thank you!

For anyone interested, this is the feature-group-spec I ended up with:

> To unsubscribe from this group and stop receiving emails from it, send an email to wil...@googlegroups.com
> <mailto:wil...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages