coi-gov-pl / puppet-jboss Goto Github PK
View Code? Open in Web Editor NEWInstalls JBoss EAP and WildFly application servers and manage their resources and applications in either a domain or a stand-alone mode
License: Apache License 2.0
Installs JBoss EAP and WildFly application servers and manage their resources and applications in either a domain or a stand-alone mode
License: Apache License 2.0
When running inside Docker container idempotency breaks on Jboss::Internal::Service/Service[..]
. Puppet tries to set enable property from 'false' to 'true'.
[root@wfly jboss]# puppet apply tests/domain/controller.pp
notice: /Stage[main]/Jboss::Internal::Service/Service[wildfly]/enable: enable changed 'false' to 'true'
notice: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::test-running]: Triggered 'refresh' from 1 events
notice: Finished catalog run in 2.37 seconds
[root@wfly jboss]# puppet apply tests/domain/controller.pp
notice: /Stage[main]/Jboss::Internal::Service/Service[wildfly]/enable: enable changed 'false' to 'true'
notice: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::test-running]: Triggered 'refresh' from 1 events
notice: Finished catalog run in 2.50 seconds
This should be addressed, but it's not priority in my opinion. I think like that because use case for this is rather vague: "Managing JBoss inside a Docker container using Puppet". It's not impossible, though.
Requesting support for RHEL/OEL/CentOS 7. RHEL7 was released over two years ago and has become the target for many new systems.
I have the following yaml:
boss::params::product: 'wildfly'
jboss::params::version: '8.2.11.Final'
jboss::params::download_url: '/vagrant/salt/states/puppetmaster/files/wildfly-external-resources/wildfly-8.2.1.Final.zip'
using /vagrant or file:/vagrant will not help. It would be nice to supply the wildfly offline.
Notice: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: [/usr/src/download-wildfly-8.2.11.Final/wildfly-8.2.11.Final.zip]
Notice: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: End-of-central-directory signature not found. Either this file is not
Notice: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: a zipfile, or it constitutes one disk of a multi-part archive. In the
Notice: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: latter case the central directory and zipfile comment will be found on
Notice: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: the last disk(s) of this archive.
Notice: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: unzip: cannot find zipfile directory in one of /usr/src/download-wildfly-8.2.11.Final/wildfly-8.2.11.Final.zip or
Notice: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: /usr/src/download-wildfly-8.2.11.Final/wildfly-8.2.11.Final.zip.zip, and cannot find /usr/src/download-wildfly-8.2.11.Final/wildfly-8.2.11.Final.zip.ZIP, period.
Error: unzip -o -q /usr/src/download-wildfly-8.2.11.Final/wildfly-8.2.11.Final.zip -d /usr/lib/wildfly-8.2.11.Final returned 9 instead of one of [0]
Error: /Stage[main]/Jboss::Internal::Package/Exec[jboss::unzip-downloaded]/returns: change from notrun to 0 failed: unzip -o -q /usr/src/download-wildfly-8.2.11.Final/wildfly-8.2.11.Final.zip -d /usr/lib/wildfly-8.2.11.Final returned 9 instead of one of [0]
For now version of rodjek/rspec-puppet is pinned to specific version. To use newest one we need to setup every fact that is used in codebase. We can do it in two ways:
Will be done in #10
Hi,
We are heavily working with the COI puppet-jboss module and currently develop an extension to manage domain profiles. Currently, we plan to generate profiles based on the "ha" profile suppled by JBoss EAP 6.4. The module extension is almost complete. The "JBoss not running" part is complete and tested, however, right now, we stuck with the "JBoss running" part attempting to implement the jgroups subsystem. In order to manage the jgroups udp and tcp protocols, the JBoss CLI functions add-protocol() and remove-protocol() functions are used, but they are not (yet) implemented in the provider library function jboss_confignode.
Do you see a reasonable way to implement add-protocol() and remove-protocol() in jboss_confignode?
Thanks, and cheers,
Heinz
Travis switched default Ruby to version 2.2 Now all acceptance tests that where running on RVM: default setting fail with message:
NameError: uninitialized constant Syck
There is a need to set RVM to 2.1
in acceptance tests until support for Ruby 2.2 will be available.
Add a system that will search every deployment and undeploy every occurrence of name that was given to deploy. Such system would guaranty that we won`t deploy same application twice.
Behavior should be started by flag in manifest, ex: undeploy_same.
Hi all
Currently I am working on a Red Hat customer project, where I can provide code back via OpenSource licensing. The requirements lead to instantiate jboss-standalone.
At the current point we have to decide whether to extend coi/jboss with this functionality or the create an own module. Can you please kindly provide feedback to me, whether you would be generally accepting and later merging this feature enhancement (given that it would fulfill your contribution guidelines)?
PS.: Please provide feedback as soon as possible.
Kind regards
Sascha
CC: @klenkes74
For now we have 1600 tests examples and it takes to long to run them after every change while developing or refactoring. The tests are over-engineered, with check for every element that is included or imported.
We need to make them more atomic so we will test if class has correct includes without testing includes and their internal parameters.
Using JBOSS CLI is OK but slow due to creating new java process for each and every command. Maybe we could use HTTP management API:
https://docs.jboss.org/author/display/WFLY8/The+HTTP+management+API
Add more tests to raise coverage rating before release. At lease 80% on covered code.
We need to add support for WildFly 10 and JBoss EAP 7
WildFly 10.0.0.Final was released 2016-01-29 and EAP 7 will be released soon (7.0.0 Beta was released 2015-12-16).
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > ensure
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > exists?
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > compiledpath
Debug: Command send to JBoss CLI: /interface=public-additional:read-resource(include-runtime=true, include-defaults=false)
Debug: Output from JBoss CLI [#<Process::Status: pid=3890,exited(1)>]: {
"outcome" => "failed",
"failure-description" => "JBAS014807: Management resource '[(\"interface\" => \"public-additional\")]' not found",
"rolled-back" => true
}
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > OUT > status(): false
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > OUT > ensure(): :absent
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > ensure=(:present)
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > create
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > exists?
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > compiledpath
Debug: Puppet::Type::Jboss_confignode::ProviderJbosscli[/interface=public-additional] > IN > compileprops
Debug: Command send to JBoss CLI: /interface=public-additional:add(up=nil, nic=nil, site-local-address=nil, public-address=nil, any-address=nil, any-ipv4-address=nil, any-ipv6-address=nil, virtual=nil, subnet-match=nil, inet-address=nil, point-to-point=nil, nic-match=nil, loopback-address=nil, link-local-address=nil, multicast=nil, loopback=nil)
Warning: JBoss CLI command failed, try 1/3, last status: 1, message: {
"outcome" => "failed",
"failure-description" => "JBAS014690: any-address is invalid",
"rolled-back" => true
}
Debug: Command send to JBoss CLI: /interface=public-additional:add(up=nil, nic=nil, site-local-address=nil, public-address=nil, any-address=nil, any-ipv4-address=nil, any-ipv6-address=nil, virtual=nil, subnet-match=nil, inet-address=nil, point-to-point=nil, nic-match=nil, loopback-address=nil, link-local-address=nil, multicast=nil, loopback=nil)
Warning: JBoss CLI command failed, try 2/3, last status: 1, message: {
"outcome" => "failed",
"failure-description" => "JBAS014690: any-address is invalid",
"rolled-back" => true
}
Debug: Command send to JBoss CLI: /interface=public-additional:add(up=nil, nic=nil, site-local-address=nil, public-address=nil, any-address=nil, any-ipv4-address=nil, any-ipv6-address=nil, virtual=nil, subnet-match=nil, inet-address=nil, point-to-point=nil, nic-match=nil, loopback-address=nil, link-local-address=nil, multicast=nil, loopback=nil)
Warning: JBoss CLI command failed, try 3/3, last status: 1, message: {
"outcome" => "failed",
"failure-description" => "JBAS014690: any-address is invalid",
"rolled-back" => true
}
Debug: Command send to JBoss CLI: /interface=public-additional:add(up=nil, nic=nil, site-local-address=nil, public-address=nil, any-address=nil, any-ipv4-address=nil, any-ipv6-address=nil, virtual=nil, subnet-match=nil, inet-address=nil, point-to-point=nil, nic-match=nil, loopback-address=nil, link-local-address=nil, multicast=nil, loopback=nil)
Debug: Output from JBoss CLI [#<Process::Status: pid=4041,exited(1)>]: {
"outcome" => "failed",
"failure-description" => "JBAS014690: any-address is invalid",
"rolled-back" => true
}
Error:
Configuration node failed to create:
[CLI command]: /interface=public-additional:add(up=nil, nic=nil, site-local-address=nil, public-address=nil, any-address=nil, any-ipv4-address=nil, any-ipv6-address=nil, virtual=nil, subnet-match=nil, inet-address=nil, point-to-point=nil, nic-match=nil, loopback-address=nil, link-local-address=nil, multicast=nil, loopback=nil)
[Error message]: {
"outcome" => "failed",
"failure-description" => "JBAS014690: any-address is invalid",
"rolled-back" => true
}
/etc/puppet/modules/jboss/lib/puppet/provider/jbosscli.rb:229:in `executeWithFail'
/etc/puppet/modules/jboss/lib/puppet/provider/jbosscli.rb:188:in `bringUp'
/etc/puppet/modules/jboss/lib/puppet/provider/jboss_confignode/jbosscli.rb:14:in `create'
/etc/puppet/modules/jboss/lib/puppet/provider/jboss_confignode/jbosscli.rb:126:in `ensure='
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:178:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:178:in `call_provider'
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:503:in `set'
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:581:in `sync'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:204:in `sync'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:128:in `sync_if_needed'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:81:in `perform_changes'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:20:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:204:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:217:in `eval_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:327:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:326:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/graph/relationship_graph.rb:118:in `traverse'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:138:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:169:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/util/log.rb:149:in `with_destination'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/report.rb:112:in `as_logging_destination'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:168:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:120:in `apply_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:161:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:160:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:119:in `apply_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:227:in `run_internal'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:134:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/context.rb:64:in `override'
/usr/lib/ruby/site_ruby/1.8/puppet.rb:244:in `override'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:133:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:297:in `apply_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:231:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/context.rb:64:in `override'
/usr/lib/ruby/site_ruby/1.8/puppet.rb:244:in `override'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:193:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:154:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:381:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:507:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:381:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:488:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:381:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:146:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8
Error: /Stage[main]/Main/Jboss::Interface[public-additional]/Jboss::Clientry[/interface=public-additional]/Jboss_confignode[/interface=public-additional]/ensure: change from absent to present failed:
Configuration node failed to create:
[CLI command]: /interface=public-additional:add(up=nil, nic=nil, site-local-address=nil, public-address=nil, any-address=nil, any-ipv4-address=nil, any-ipv6-address=nil, virtual=nil, subnet-match=nil, inet-address=nil, point-to-point=nil, nic-match=nil, loopback-address=nil, link-local-address=nil, multicast=nil, loopback=nil)
[Error message]: {
"outcome" => "failed",
"failure-description" => "JBAS014690: any-address is invalid",
"rolled-back" => true
}
When making additional tests before release I found error in tests for interfaces.pp. This need to be resolved asap.
Document jboss::params::download_urlbase
and jboss:params::download_url
on wiki pages after releasing v1.0.3.
Currentlly only those Ruby files are covered by spec tests:
lib/facter/jboss_running.rb
lib/puppet/provider/jboss_jdbcdriver/jbosscli.rb
lib/puppet/provider/jboss_datasource/jbosscli.rb
lib/puppet/provider/jbosscli.rb
lib/facter/jboss_fullconfig.rb
lib/facter/jboss_configfile.rb
lib/puppet/parser/functions/jboss_to_bool.rb
lib/puppet/parser/functions/jboss_to_i.rb
lib/puppet/parser/functions/jboss_to_s.rb
lib/puppet/type/jboss_datasource.rb
lib/puppet/type/jboss_jdbcdriver.rb
lib/puppet_x/coi/jboss/configuration.rb
lib/puppet_x/coi/jboss/functions/jboss_to_bool.rb
lib/puppet_x/coi/jboss/functions/jboss_to_i.rb
lib/puppet_x/coi/jboss/functions/jboss_to_s.rb
lib/puppet_x/coi/jboss/provider/datasource/post_wildfly_provider.rb
lib/puppet_x/coi/jboss/provider/datasource/pre_wildfly_provider.rb
Does files needs to be covered:
lib/puppet/type/jboss_resourceadapter.rb
lib/puppet/type/jboss_confignode.rb
lib/puppet/type/jboss_jmsqueue.rb
lib/puppet/type/jboss_securitydomain.rb
lib/puppet/type/jboss_deploy.rb
lib/puppet/parser/functions/jboss_short_version.rb
lib/puppet/parser/functions/jboss_basename.rb
lib/puppet/parser/functions/jboss_type_version.rb
lib/puppet/parser/functions/jboss_hash_setvalue.rb
lib/puppet/parser/functions/jboss_dirname.rb
lib/puppet/provider/jboss_resourceadapter/jbosscli.rb
lib/puppet/provider/jboss_confignode/jbosscli.rb
lib/puppet/provider/jboss_jmsqueue/jbosscli.rb
lib/puppet/provider/jboss_securitydomain/jbosscli.rb
lib/puppet/provider/jboss_deploy/jbosscli.rb
The goal should be to raise static code analysis that it will no longer raise issues about complexity and duplication. The changes should be backward compatible and don't cause Geppetto IDE to raise warning about invalid types.
After downloading the module:
root@puppetmaster modules]# puppet module install coi-jboss
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
coi-jboss (v1.0.0)
puppetlabs-concat (v1.2.4)
puppetlabs-java (v1.4.2)
puppetlabs-stdlib (v4.9.0)
and the following yaml:
jboss::params::product: 'wildfly'
jboss::params::version: '8.2.1.Final'
I get the following error with PE2015.2 on CentOS
[root@wildflyagent ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Exec[jboss::unzip-downloaded] { require => Class[Jboss::Internal::Prerequisites] }, because Class[Jboss::Internal::Prerequisites] doesn't seem to be in the catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
[root@wildflyagent ~]#
According to README.md
By default module will install default Java JDK using puppetlabs/java module. This can be turned off by using $jboss::java_autoinstall variable or hiera key: jboss::params::java_autoinstall
But in params.pp, the key is not java_autoinstall but java_install
$java_autoinstall = jboss_to_bool(hiera('jboss::params::java_install', true))
There should be a define that could patch and rollback JBoss and WildFly with Red Hat provided ZIP patches via HTTP/S or local files.
Examples:
Apply with HTTP downloading
jboss::patch { 'jboss-eap-6.4.8':
ensure => 'applied', # supporting also present, absent, rollbacked
uri => 'https://proxy.localdomain/redhat/jboss-eap/patches/6.4/jboss-eap-6.4.8-patch.zip',
product => 'jboss-eap',
version => '6.4.8',
}
Apply with local file
jboss::patch { 'jboss-eap-6.4.8':
ensure => 'applied',
uri => 'file:///usr/src/jboss-eap-6.4.8-patch.zip',
}
Apply with puppet://
jboss::patch { 'jboss-eap-6.4.8':
ensure => 'applied',
uri => 'puppet:///module/appserver/patches/jboss-eap-6.4.8-patch.zip',
}
Rollback specific version
jboss::patch { 'jboss-eap-6.4.8':
ensure => 'rollbacked',
product => 'jboss-eap',
version => '6.4.8',
}
README.md
There is a bug that prevents running of beaker acceptance tests on Travis CI's Docker installation. It is wide spread bug affecting other projects to.
/gemshome/gems/beaker-2.24.0/lib/beaker/hypervisor/docker.rb:86:in `block in provision': undefined method `[]' for nil:NilClass (NoMethodError)
from /gemshome/gems/beaker-2.24.0/lib/beaker/hypervisor/docker.rb:49:in `each'
https://travis-ci.org/camptocamp/puppet-openldap/jobs/78376374
COI/JBoss example logs:
The bug is rather new...
There are idempotency errors on jboss::deploy: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository)
Beaker log fragment:
centos-6-x64 21:36:35$ puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.PbcIpb
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Notice: Compiled catalog for localhost.suszynski.org in environment production in 1.41 seconds
Info: Applying configuration version '1457382996'
Warning: JBoss CLI command failed, try 1/3, last status: 1, message: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
Warning: JBoss CLI command failed, try 2/3, last status: 1, message: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
Warning: JBoss CLI command failed, try 3/3, last status: 1, message: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
Error: Could not set 'present' on ensure:
Deployment failed to create:
[CLI command]: deploy /usr/src/servlet3-webapp-2.22.2.war --name=servlet3-webapp-2.22.2.war
[Error message]: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
at 47:/etc/puppet/modules/jboss/manifests/deploy.pp
Error: Could not set 'present' on ensure:
Deployment failed to create:
[CLI command]: deploy /usr/src/servlet3-webapp-2.22.2.war --name=servlet3-webapp-2.22.2.war
[Error message]: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
at 47:/etc/puppet/modules/jboss/manifests/deploy.pp
Wrapped exception:
Deployment failed to create:
[CLI command]: deploy /usr/src/servlet3-webapp-2.22.2.war --name=servlet3-webapp-2.22.2.war
[Error message]: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
Error: /Stage[main]/Main/Jboss::Deploy[servlet3-webapp-2.22.2.war]/Jboss_deploy[servlet3-webapp-2.22.2.war]/ensure: change from absent to present failed: Could not set 'present' on ensure:
Deployment failed to create:
[CLI command]: deploy /usr/src/servlet3-webapp-2.22.2.war --name=servlet3-webapp-2.22.2.war
[Error message]: 'servlet3-webapp-2.22.2.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
at 47:/etc/puppet/modules/jboss/manifests/deploy.pp
Notice: Finished catalog run in 18.27 seconds
centos-6-x64 executed in 21.40 seconds
Exited: 4
Steps to replicate:
puppet apply tests/deploy.pp
twice (first is ok, second is failed)It would be nice to create the user through yaml like
jboss::user:
'admin':
'password': 'Secret01!'
In the newest version of Rake there is no support for Ruby version 1.8. We need to still support it so we need to download rake 10.5 in Gemfile for 1.8. In versions >1.8 we will use newest version of Rake.
Improve documentation coverage by writing Rdocs for methods and classes.
Right now the following code in internal/module/registerlayer.pp class creates layers.conf
file as root.
exec { "jboss::module::layer::${layer}":
command => "/bin/awk -F'=' 'BEGIN {ins = 0} /^layers=/ { ins = ins + 1; print \$1=${layer},\$2 } END {if(ins == 0) print \"layers=${layer},base\"}' > ${jboss::home}/modules/layers.conf",
unless => "/bin/egrep -e '^layers=.*${layer}.*' ${jboss::home}/modules/layers.conf",
require => Anchor['jboss::installed'],
notify => Service[$jboss::product],
}
On systems with umask other than default 0022, this file may become unreadable by jboss::jboss_user, thus preventing jboss service from starting.
This command should be executed as $jboss::jboss_user
Interface configuration atrributes any-ipv4-address
and any-ipv6-address
have been removed in Wildfly 9. The interface configuration in puppet-jboss
should be fixed to take that into account and retain backward compatibility.
The error message:
Warning: JBoss CLI command failed, try 1/3, last status: 1, message: {
"outcome" => "failed",
"result" => {},
"failure-description" => {"host-failure-descriptions" => {"wbcdev" => "WFLYCTL0201: Unknown attribute 'any-ipv4-address'"}},
"rolled-back" => true
}
Available interface configuration attributes:
{
"outcome" => "success",
"result" => {
"any" => undefined,
"any-address" => true,
"inet-address" => undefined,
"link-local-address" => undefined,
"loopback" => undefined,
"loopback-address" => undefined,
"multicast" => undefined,
"name" => "public",
"nic" => undefined,
"nic-match" => undefined,
"not" => undefined,
"point-to-point" => undefined,
"public-address" => undefined,
"site-local-address" => undefined,
"subnet-match" => undefined,
"up" => undefined,
"virtual" => undefined
}
}
Provider for jboss_deploy type should take into consideration the content hash and compare it to the calculated hash of target file to be deployed. If both hashes do not match, provider should redeploy the artifact with target one and change should be reported as different content, hash changed from '{md5}59381b178aeeb198ef8d69e85e41702aaec5d80' to '{md5}e6d07fd0403ea06c6531155d80e1614b'
Here are the example CLI command with output:
[domain@localhost:9999 /] /deployment=sample-app:read-resource()
{
"outcome" => "success",
"result" => {
"content" => [{"hash" => bytes {
0x59, 0x38, 0x1b, 0x17, 0x8a, 0xee, 0xb1, 0x98,
0xef, 0x8d, 0x69, 0xe8, 0x5e, 0x41, 0x70, 0x2a,
0x0a, 0xec, 0x5d, 0x80
}}],
"name" => "sample-app",
"runtime-name" => "sample-app"
}
}
Notice that you can read those byte in Ruby like that:
bytes = [0x59, 0x38, 0x1b, 0x17, 0x8a, 0xee, 0xb1, 0x98, 0xef, 0x8d, 0x69, 0xe8, 0x5e, 0x41, 0x70, 0x2a, 0x0a, 0xec, 0x5d, 0x80]
bytes.map {|b| b.to_s(16) }.join('')
=> "59381b178aeeb198ef8d69e85e41702aaec5d80"
The module should work with newest version of Ruby - 2.2
This is blocked at least with #25, maybe more...
Right now the codeflag
, code
and moduleoptions
are parameters. There is no way to change them after resource creation.
When first executed example will create resource Jboss::Securitydomain[db-auth-default]
:
include jboss
jboss::securitydomain { 'db-auth-default':
ensure => 'present',
code => 'Database',
codeflag => 'required',
moduleoptions => {
'dsJndiName' => 'java:jboss/datasources/default-db',
'principalsQuery' => 'select \'password\' from users u where u.login = ?',
'hashUserPassword' => false,
'hashStorePassword' => false,
'rolesQuery' => 'select r.name, \'Roles\' from users u
join user_roles ur on ur.user_id = u.id
join roles r on r.id = ur.role_id
where u.login = ?',
},
}
When executing next time with different parameters nothing will change but it should change:
include jboss
jboss::securitydomain { 'db-auth-default':
ensure => 'present',
code => 'Database',
codeflag => 'required',
moduleoptions => {
'dsJndiName' => 'java:jboss/datasources/default-db2',
'principalsQuery' => 'select paswd from users where login = ?',
'hashUserPassword' => true,
'hashStorePassword' => false,
},
}
We should change them to property so we can have better manage them.
Resources to cover (latest report):
https://travis-ci.org/coi-gov-pl/puppet-jboss/jobs/104078649#L512-L627
Actually:
Total resources: 129
Touched resources: 18
Resource coverage: 13.95%
There are idempotency errors on jboss::resourceadapter: undefined method
size' for true:TrueClass`
Beaker log fragment:
centos-6-x64 21:09:16$ puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.EwfDcn
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Notice: Compiled catalog for localhost.suszynski.org in environment production in 1.76 seconds
Info: Applying configuration version '1457381357'
Error: /Stage[main]/Main/Jboss::Resourceadapter[genericconnector.rar]/Jboss_resourceadapter[genericconnector.rar]: Could not evaluate: undefined method `size' for true:TrueClass
Notice: /Stage[main]/Jboss::Internal::Service/Service[wildfly]: Dependency Jboss_resourceadapter[genericconnector.rar] has failures: true
Warning: /Stage[main]/Jboss::Internal::Service/Service[wildfly]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::test-running]: Dependency Jboss_resourceadapter[genericconnector.rar] has failures: true
Warning: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::test-running]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::restart]: Dependency Jboss_resourceadapter[genericconnector.rar] has failures: true
Warning: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::restart]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss::Internal::Service/Anchor[jboss::service::end]: Dependency Jboss_resourceadapter[genericconnector.rar] has failures: true
Warning: /Stage[main]/Jboss::Internal::Service/Anchor[jboss::service::end]: Skipping because of failed dependencies
Notice: /Stage[main]/Main/Jboss::Deploy[genericconnector.rar]/Jboss_deploy[genericconnector.rar]: Dependency Jboss_resourceadapter[genericconnector.rar] has failures: true
Warning: /Stage[main]/Main/Jboss::Deploy[genericconnector.rar]/Jboss_deploy[genericconnector.rar]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss::Internal::Service/Anchor[jboss::service::started]: Dependency Jboss_resourceadapter[genericconnector.rar] has failures: true
Warning: /Stage[main]/Jboss::Internal::Service/Anchor[jboss::service::started]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss/Anchor[jboss::end]: Dependency Jboss_resourceadapter[genericconnector.rar] has failures: true
Warning: /Stage[main]/Jboss/Anchor[jboss::end]: Skipping because of failed dependencies
Notice: Finished catalog run in 5.53 seconds
centos-6-x64 executed in 9.14 seconds
Exited: 4
should work idempotently (FAILED - 1)
Steps to replicate:
puppet apply tests/resourceadapter.pp
twice (first is ok, second is failed)When trying to run jboss 6.4 after command to setup security domain
/profile=full-ha/subsystem=security/security-domain=db-auth-default/authentication=classic:add(login-modules=[{code=>"Database",flag=>"required",module-options=>[dsJndiName => "java:jboss/datasources/ds",hashStorePassword => "false",hashUserPassword => "false",principalsQuery => "select 'haslo' from uzytkownik u where u.login = upper(?)",rolesQuery => "select r.name, \'Roles\' from users u join user_roles ur on ur.user_id = u.id join roles r on r.id = ur.role_id
where u.login = ?"]}])
I got this error :
[Error message]: {
"outcome" => "failed",
"rolled-back" => true,
"result" => undefined,
"server-groups" => undefined
}
This error is caused by different handling of arguments in Jboss-eap 6.4
This feature request describes new define: jboss::cliexec
.
Description for Wiki (draft):
WIKI CUT HERE
jboss::cliexec
defined typeThis define is very versatile. It can be used to execute any JBoss CLI method for any CLI path. This define also supports parameters onlyif
and unless
. One of them must be present to prevent idempotent issues, they should work similar to ones defined in Puppet build-in resource exec
.
jboss::cliexec { '/subsystem=jgroups/stack=udp:add-protocol(type=PING)':
unless => '/subsystem=jgroups/stack=udp/protocol=PING:read-resource',
}
Parameters of jboss::cliexec
:
This type uses JBoss module standard metaparameters
unless
parameterThe unless
parameter can be used to check if resource should be executed. If passed command fails that means that it should be run. You must pass unless
if not passing onlyif
and only one of them can be set for given resource. Example:
jboss::cliexec { '/subsystem=jgroups/stack=udp:add-protocol(type=PING)':
unless => '/subsystem=jgroups/stack=udp/protocol=PING:read-resource',
}
onlyif
parameterThe onlyif
parameter can be used to check if resource should be executed. If passed command succeds that means that it should be run. You must pass onlyif
if not passing unless
and only one of them can be set for given resource Example:
jboss::cliexec { '/subsystem=jgroups/stack=udp:remove-protocol(type=PING)':
onlyif => '/subsystem=jgroups/stack=udp/protocol=PING:read-resource',
}
command
parameterThis is the namevar. Command to be executed as full CLI entry and method. The command must be passed without /profile=<profile-name>
in domain mode as well (for that profile
parameter must be used).
basepath
parameterThe base path can be used to shorten recurring paths in commands. Example:
jboss::cliexec { ':remove-protocol(type=PING)':
onlyif => '/protocol=PING:read-resource',
basepath => '/subsystem=jgroups/stack=udp',
}
WIKI CUT HERE
Scope of change for this feature:
jboss::cliexec
jboss::cliexec
jboss::cliexec
jboss::cliexec
jboss_cliexec
and default provider jboss_cliexec/jbosscli
for itjboss_cliexec
and provider jboss_cliexec/jbosscli
dorestart
parameter in jboss::clientry
, backing type and providers and change rspec testsrunning
and stopped
options for ensure
property in jboss::clientry
, backing type and providers and change rspec testsjboss::domain::server
is implemented. Use jboss::cliexec
instead of dorestart
. Also running
and stopped
options for ensure should be implemented with jboss::cliexec
.The host validation accepts any single character inside a string: https://github.com/coi-gov-pl/puppet-jboss/blob/develop/lib/puppet/type/jboss_datasource.rb#L101
The port validation accepts any single digit inside a string: https://github.com/coi-gov-pl/puppet-jboss/blob/develop/lib/puppet/type/jboss_datasource.rb#L111
Both accept spaces and invalid character. There should be something like ^[\w\.]*\w+$
for host and ^\d+$
for port
Hi
I'm having idempotency issues when attempting to add empty subsystem sections to a profile in JBoss domain mode. I reduced the manifest to the following minimal file, ran it and include the output of the first (and all subsequent) puppet agent -t runs.
Manifest weld.pp (there are hiera data objects not shown here; they are most likely not relevant):
$profile = 'ha-p2p-tst4-ext'
$subsystem = 'weld'
$ensure = 'present'
$controller = "localhost:9999"
include jboss::internal::prerequisites
include jboss::domain::controller
include jboss
jboss::clientry { "/profile=$profile/subsystem=$subsystem":
ensure => $ensure,
controller => $controller,
profile => $profile,
runasdomain => true,
}
Output of puppet agent -t:
[root@jbossdc manifests]# puppet apply weld.pp
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Notice: Compiled catalog for jbossdc.safeswisscloud.net in environment production in 0.93 seconds
Notice: /Stage[main]/Main/Jboss::Clientry[/profile=ha-p2p-tst4-ext/subsystem=weld]/Jboss_confignode[/profile=ha-p2p-tst4-ext/subsystem=weld]/ensure: ensure changed '' to 'present'
Notice: /Stage[main]/Jboss::Internal::Service/Service[jboss-eap]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::test-running]: Triggered 'refresh' from 1 events
Notice: Applied catalog in 11.52 seconds
As you see, even though I specified ensure => 'present'
, jboss_confignode somehow ignores it, gets an undef/nil
(or empty '') value and changes it to 'present', resulting in a trigger for the domain controller host controller service.
Furthermore, what is the cause of the warnings? Did I forget to include anything?
Thanks, and cheers,
Heinz
Resources to cover (latest report):
https://travis-ci.org/coi-gov-pl/puppet-jboss/jobs/104078649#L512-L627
Actually:
Total resources: 129
Touched resources: 18
Resource coverage: 13.95%
Travis CI is unable to run acceptance tests on docker because of low disk space.
Maybe on new Travis CI infrastructure this can be executed?
Failed builds:
Required fragment in .travis.yml
file:
- rvm: default
sudo: required
services: docker
env: RS_SET="centos-6-x86_64-pe288-docker"
script: bundle exec rake acceptance
- rvm: default
sudo: required
services: docker
env: RS_SET="centos-6-x86_64-pe382-docker"
script: bundle exec rake acceptance
@coi-gov-pl/jboss-puppet-team
After 1.1.0 version release of puppetlabs/puppetlabs_spec_helper there is need to change metadata0lint to metadata_lint
The idea is to use native Java gateway to JBoss CLI instead of spawning command line processes separately. In theory this should greatly increase the speed of evaluating the catalog.
Example of using command line API here: https://developer.jboss.org/wiki/JBossAS7Command-linePublicAPI
RJB Homepage: http://www.artonx.org/collabo/backyard/?RubyJavaBridge
Sample Ruby code (will be delivered):
require 'rjb'
Rjb::load(classpath = '/usr/lib/wildfly-8.2.0.Final/bin/client/jboss-cli-client.jar')
CommandContext = Rjb::import('CommandContext')
# [..]
Scope of change:
jboss::plugins::rjb
that will be included by default, and will install rjb
gem into system (should be compatibile w Puppet OSS and Enterprise)process
, rjb
and using rjb
if it is available and not specified explicitly by user.After dropping support for Puppet 2.x, provider code can use features
for providers
Right now function Puppet::Parser::Functions::jboss_hash_setvalue return only last key that is inserted into hash when it should return the whole hash.
download_url
parameter in main class jboss
has been moved to params file in commit 26c7345 (PR #26). This causes numerous issues when overriding $product
or $version
parameters using main class. Like this:
class { 'jboss':
product => 'wildfly',
version => '9.0.2.Final',
}
In this example $download_url
is being resolved in params.pp
file and default values of $product
and $version
are being used.
There are 2 propositions to fix this:
$download_url
to jboss::internal::runtime
classjboss
class to jboss::internal::runtime
classjboss::internal::runtime
class instead of params.pp
$jboss::internal::runtime::download_url
instead of $jboss::params::download_url
jboss
class to jboss::internal::runtime
classjboss::internal::runtime
class instead of params.pp
As it said. There are bugs in documentation and it is too long in one README.md file. We should split it. Leave basic examples at README.md and move details to GitHub Wiki
Correct the way that system checks if deployment is present in the system and the way the states of deployments are handled
present
, absent
, enabled
, assigned
, uploaded
present
=>
absent
, provider should deploy and enable artifactsenabled
, added
or uploaded
it should not modify stateabsent
=>
enabled
=>
assigned
=>
uploaded
=>
absent
should only upload deployment but should not be assigned and activated in any server groupsThis module should support running on modern version of Puppet 4.x
This also means dropping support for Ruby 1.8.x and probably Puppet 2.x
Option property for datasource type should not accept strings and symbols, even if they respond to :[]
method. Options should accept only Map like objects and not string and symbols with exception for :absent
, :undef
and nil
.
There should also be a correct message: 'options has been removed' if passing :absent
, :undef
or nil
as a parameter.
Puppetlabs's forge is issuing a warning with message "Dependencies contain unbounded ranges". It can be seen here: https://forge.puppetlabs.com/coi/jboss/scores.
This is because module's dependencies are specified without upper bound:
https://github.com/coi-gov-pl/puppet-jboss/blob/develop/metadata.json#L11-L13
To fix this issue, please specify an valid upper bound to module dependencies, using semver.org specification if possible.
Hello,
I didn't test yet but would this module be compatible with concat 2.1.0 ?
I have another module which installed concat 2.1.0, resulting in puppet-jboss failing the dependency check (and puppet tried to download puppet-jboss 1.0.2 instead).
puppet-jboss 1.0.3:
{ "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0 <2.0.0" }
puppet-jboss 1.0.2:
{"name":"puppetlabs/concat","version_requirement":">= 1.0.0"}
Travis has enabled container infrastructure that's runs faster and can enable bundler cache. Downside for this is you are not able to run sudo
command and therefore can't install anything as usual.
JBoss module uses a augeas
lenses that should be newer 1.0.0
in order to rspec tests work. This is normally handled for older systems with jbxml-shim that uses newer version of XML lens. This is not possible in noop mode and unit tests. So libaugeas-dev >= 1.0.0
needs to be installed as a system dependency.
Currently this is handled by Travis install script https://github.com/coi-gov-pl/puppet-jboss/blob/develop/.travis.yml#L7
- sudo add-apt-repository -y ppa:raphink/augeas
- sudo apt-get update
- sudo apt-get install -y libaugeas-dev libxml2-dev
In container based infrastructure this can be done with this fragment:
sudo: false
addons:
apt:
sources:
- ppa:raphink/augeas
packages:
- libaugeas-dev
- libxml2-dev
bundler_args: --without development --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
cache: bundler
Problem is that ppa:raphink/augeas
is not considered trusted, and Travis installs default packages insead of newer versions: https://travis-ci.org/coi-gov-pl/puppet-jboss/jobs/81567020
Notify: @coi-gov-pl/jboss-puppet-team
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.