voxpupuli / puppet-wildfly

Puppet module to install, configure and manage Wildfly (8/9/10+), JBoss EAP (6.1+/7.0+) and some Wildfly based products like apiman, Keycloak and Infinispan.
Apache License 2.0
29 stars 78 forks source link

Domain mode bypasses setup #68

Closed xaniasd closed 8 years ago

xaniasd commented 9 years ago

Hi,

Specifying parameters for a domain node has no actual effect on the settings file host-master.xml and the code of class wildfly::setup shows why (https://github.com/biemond/biemond-wildfly/blob/master/manifests/setup.pp#L16) . How can I use a different binding address (other than 127.0.0.1) for instance?

jairojunior commented 9 years ago

@xaniasd I've been discussing this in another issue: https://github.com/biemond/biemond-wildfly/issues/36#issuecomment-113781155

Unfortunately, I did not have time to came up with a solution. If you need to handle binding address in domain you'll need to use wildfly_cli.

xaniasd commented 9 years ago

@jairojunior I see that the port management is more complex but the binding address is doable. I got it working as follows:

define wildfly::config::interfaces($inet_address_value){
  $root = $wildfly::mode ? {
    'domain' => 'host',
    default  => 'server'
  }

  augeas { $name:
    lens    => 'Xml.lns',
    incl    => "${wildfly::dirname}/${wildfly::mode}/configuration/${wildfly::config}",
    changes => "set ${root}/interfaces/interface[#attribute/name='${name}']/inet-address/#attribute/value ${inet_address_value}",
    onlyif  => "match ${root}/interfaces/interface[#attribute/name='${name}']/inet-address[#attribute/value='${inet_address_value}'] size == 0"
  }
}

If I find something similar for port settings I'll let you know.

jairojunior commented 9 years ago

@xaniasd Unfortunately, it only solves part of the problem, host*.xml files also have interface configuration.

I think we should replace augeas for wildfly_cli in the future, since it's more portable across different operations mode (standalone and domain).

By the way, I don't think domain mode and Puppet are a good match. Maybe this comment will make you think about it: https://github.com/cpitman/puppet-jboss_admin/issues/68#issuecomment-95934493

Thank you for collaborating. =)

xaniasd commented 9 years ago

Hi Jairo,

very valid points, both of them :) I'm using Puppet to manage an existing installation as a first step. Second step is changing it to standalone instances.

regards

jairojunior commented 9 years ago

Glad to hear that. =)

jairojunior commented 8 years ago

Just fixed it with JBOSS_OPTS in the latest PR.