Configure Jboss EAP with Puppet: How to set the 'jboss_bind_address'

175 views
Skip to first unread message

Wei Chen

unread,
Oct 15, 2015, 7:44:41 AM10/15/15
to Puppet Users
Hi,

I am trying to configure the Jboss EAP 6.X with an example code. It works and its init.pp looks as follow:
...
]# cat init.pp
# Puppet class jboss_install to install jboss rpm and start
# the jboss server as service
class jboss_eap (
 $jboss_bind_address = '',
 $jboss_bind_address_management = '',
 $jboss_multicast_address = ''
) {

class jboss_rpm_install {
 # Required RPM package
 $jboss_core_rpm = [ "jbossas-appclient",
 "jbossas-bundles",
 "jbossas-core",
 "jbossas-hornetq-native",
 "jbossas-jbossweb-native",
 "jbossas-modules-eap",
 "jbossas-product-eap",
 "jbossas-standalone",
 "jbossas-welcome-content-eap"
 ]
package { $jboss_core_rpm: ensure => "installed" }
}

class jboss_config {
require jboss_rpm_install
 # Ensure Jboss home, will be created by rpm
 file { '/etc/jbossas':
 ensure => directory,
 owner => 'jboss',
 group => 'jboss'
 }

 # Copy master standalone template xml
 file { '/usr/share/jbossas/standalone/configuration/standalone.xml':
 ensure => file,
 owner => 'jboss',
 content => template('jboss_eap/standalone-full-ha.xml'),
 mode => '0600'
 }

 # Ensure Jboss user, will be created by rpm
 user { jboss:
 ensure => present,
 managehome => true,
 gid => 'jboss',
 comment => 'Ensure JBoss User'
 }
}
include jboss_rpm_install
include jboss_config

 # Start Jboss service
 service { jbossas:
 enable => true,
 ensure => true ? { true => running, default => undef },
 require => Class['jboss_config']
 }


}
...

One can see at the very beginning, the 'jboss_bind_address' is not set. In this case it will take the default value of '0.0.0.127', the socalled localhost. And I can call up the Jboss Web-Admin-Console with


But this is not what I want. What I want is I can call up the Jboss from any machine. So I change these to as follow:
...
$jboss_bind_address = '144.144.163.52',
$jboss_bind_address_management = '144.144.163.52',
...

But seems it doesn't work. The IP is not taken into used. I guess I have to fill some code anywhere in 'init.pp'. But how?

Can someone help?

Many thanks!

Wei

jcbollinger

unread,
Oct 16, 2015, 9:24:37 AM10/16/15
to Puppet Users


On Thursday, October 15, 2015 at 6:44:41 AM UTC-5, Wei Chen wrote:]# cat init.pp
# Puppet class jboss_install to install jboss rpm and start
# the jboss server as service
class jboss_eap (
 $jboss_bind_address = '',
 $jboss_bind_address_management = '',
 $jboss_multicast_address = ''
) {

[...]
 
One can see at the very beginning, the 'jboss_bind_address' is not set. In this case it will take the default value of '0.0.0.127', the socalled localhost. And I can call up the Jboss Web-Admin-Console with


But this is not what I want. What I want is I can call up the Jboss from any machine. So I change these to as follow:
...
$jboss_bind_address = '144.144.163.52',
$jboss_bind_address_management = '144.144.163.52',
...

But seems it doesn't work. The IP is not taken into used. I guess I have to fill some code anywhere in 'init.pp'. But how?


The $jboss_bind_address and $jboss_bind_address_management are parameters of the class you presented.  The assignments in the class header define their default values; if you want those parameters to take different values then you should bind the wanted values to them via Hiera.


John

Rich Burroughs

unread,
Oct 16, 2015, 2:35:25 PM10/16/15
to Puppet Users
Yes exactly, you want to override those defaults in Hiera as John says.

If you are implementing a module off of the Forge, you shouldn't have to edit the module itself. They should be designed so you can use them with your own data already.


Rich
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c1f61802-fc7b-45d9-9423-0780f151267c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages