Skip to content

Commit

Permalink
Merge branch 'release/v1.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Suszyński Krzysztof committed Jan 29, 2016
2 parents 0dc0aed + 8981063 commit 50e2199
Show file tree
Hide file tree
Showing 81 changed files with 3,570 additions and 1,588 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
@@ -0,0 +1,11 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file, indent by 2 spaces
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
29 changes: 16 additions & 13 deletions .travis.yml
@@ -1,12 +1,15 @@
---
language: ruby
# TODO: GH Issue #4 - Try to execute standard Ruby builds on Travis CI on container infrastructure
sudo: required
install:
- sudo add-apt-repository -y ppa:raphink/augeas
- sudo apt-get update
- sudo apt-get install -y libaugeas-dev libxml2-dev
- bundle install --without development --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
sudo: false
addons:
apt:
sources:
- augeas
packages:
- libaugeas-dev
- libxml2-dev
bundler_args: --without development --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
cache: bundler
script: bundle exec rake test
before_install: rm -f Gemfile.lock
matrix:
Expand All @@ -24,20 +27,20 @@ matrix:
env: PUPPET_VERSION="~> 3.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES=yes
- rvm: default
- rvm: '2.1'
sudo: required
services: docker
env: PUPPET_VERSION="3.8.3" RS_SET="centos-6-x86_64-docker"
env: PUPPET_VERSION="3.8.4" RS_SET="centos-6-x86_64-docker"
script: bundle exec rake acceptance
- rvm: default
- rvm: '2.1'
sudo: required
services: docker
env: PUPPET_VERSION="3.8.3" RS_SET="debian-7-x86_64-docker"
env: PUPPET_VERSION="3.8.4" RS_SET="debian-7-x86_64-docker"
script: bundle exec rake acceptance
- rvm: default
- rvm: '2.1'
sudo: required
services: docker
env: PUPPET_VERSION="3.8.3" RS_SET="ubuntu-14.04-x86_64-docker"
env: PUPPET_VERSION="3.8.4" RS_SET="ubuntu-14.04-x86_64-docker"
script: bundle exec rake acceptance
# FIXME: GH Issue #3 - Activate acceptance tests on Travis CI for Puppet Enterprise, at least 2.8.8 and 3.8.2
notifications:
Expand Down
50 changes: 50 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,50 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at opensource@coi.gov.pl. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.


This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -79,10 +79,12 @@ with:

bundle exec rake acceptance

This will run the tests on an Ubuntu 14.04 virtual machine. You can also
run the integration tests against Centos 6.5 with.
This will run the tests on an Centos 6.5 docker container. You can also
run the integration tests against any other configuration specified in directory `spec/acceptance/nodesets`. For example for Ubuntu 14.04 running on virtualbox via Vagrant you should run:

RS_SET=centos-65-x64-docker bundle exec rake acceptance
RS_SET=ubuntu-14.04-x86_64-vagrant bundle exec rake acceptance

**Caution!** To run Vagrant boxes when you have installed Vagrant in version 1.5 or above, you need to have `bundler` in version range: >= 1.5.2 <= 1.10.5. This is due to fact of invalid version in vagrant-wrapper gem package.

If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
Expand Down
51 changes: 32 additions & 19 deletions README.md
@@ -1,4 +1,4 @@
# Puppet Module for JBoss EAP and Wildfly application servers
# Puppet Module for JBoss EAP and Wildfly application servers

### ...with configuration management of resources and deployment in domain and stand-alone modes

Expand All @@ -9,8 +9,8 @@
1. [Overview](#overview)
1. [Module Description - What the module does and why it is useful](#module-description)
1. [Setup - The basics of getting started with JBoss](#setup)
3.1. [What JBoss module affects](#what-jboss-module-affects)
3.1. [Beginning with JBoss module](#beginning-with-jboss-module)
1. [What JBoss module affects](#what-jboss-module-affects)
1. [Beginning with JBoss module](#beginning-with-jboss-module)
1. [Install classes reference](#install-classes-reference)
1. [Configuration classes reference](#configuration-classes-reference)
1. [Application defined types reference](#application-defined-types-reference)
Expand All @@ -29,7 +29,7 @@ This module can install JBoss Enterprise Application Platform and WildFly applic
The Center for Information Technology in Poland manage the JBoss application server farm. We were looking for a simple tool to support and automate the management of these servers in the spirit of DevOps methodology. The tool should also be powerful enough to satisfy all, even future requirements. Nothing was able to meet our requirements, so we have designed and wrote the corresponding Puppet module.

The module allows user to perform all necessary operations for JBoss servers. Here are couple of features:

* Installation and upgrading of application servers in domain and standalone modes,
* support for JBoss AS, EAP, and WildFly,
* support for the Red Hat and Debian operating systems families,
Expand All @@ -39,9 +39,9 @@ The module allows user to perform all necessary operations for JBoss servers. He
* management of JBoss network interfaces,
* JPA datasource management, security domains, JMS queues, resource adapters and system logging
* deployment and removing of artifacts

In addition to the above list, you can also configure any JBoss CLI reachable configuration, with the entire set of parameters. This allows you to configure any parameter supported by JBoss.

Take a look. We will be happy to receive your feedback.

## Setup
Expand Down Expand Up @@ -121,7 +121,7 @@ class { 'jboss':

### The `jboss::domain::node` configure class

This class will setup JBoss server to run as node of the domain.
This class will setup JBoss server to run as node of the domain.

It takes two parameters: `ctrluser` and `ctrlpassword`. User name and password must be setup to JBoss controller. Easiest way to add jboss management user with `jboss::user` type.

Expand Down Expand Up @@ -152,7 +152,7 @@ Application defined types are here to be directly expected by applications runni

### The `jboss::datasource` defined type

This defined type can be used to add and remove JBoss data sources. It support both XA and Non-XA data sources. It can setup data sources and manage required drivers.
This defined type can be used to add and remove JBoss data sources. It support both XA and Non-XA data sources. It can setup data sources and manage required drivers.

```puppet
# Non-XA data source
Expand Down Expand Up @@ -206,9 +206,9 @@ More on parameters for [`jboss::jmsqueue` defined type](https://github.com/coi-g

### The `jboss::resourceadapter` defined type

This defined type can be used to add and remove JBoss resource adapters. A resource adapter
This defined type can be used to add and remove JBoss resource adapters. A resource adapter
is a deployable Java EE component that provides communication between a Java EE application
and an Enterprise Information System (EIS) using the Java Connector Architecture (JCA)
and an Enterprise Information System (EIS) using the Java Connector Architecture (JCA)
specification

See more info here: https://docs.oracle.com/javaee/6/tutorial/doc/bncjh.html
Expand All @@ -231,8 +231,8 @@ More on parameters for [`jboss::resourceadapter` defined type](https://github.co

### The `jboss::securitydomain` defined type

This defined type can be used to add and remove JBoss security domains. A security domain
consists of configurations for authentication, authorization, security mapping, and auditing.
This defined type can be used to add and remove JBoss security domains. A security domain
consists of configurations for authentication, authorization, security mapping, and auditing.
It implements Java Authentication and Authorization Service (JAAS) declarative security.

See here: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Security_Guide/sect-Security_Domains.html
Expand All @@ -259,8 +259,8 @@ More on parameters for [`jboss::securitydomain` defined type](https://github.com

### The `jboss::module` defined type

This defined type can add and remove JBoss static modules. Static modules are predefined in
the `JBOSS_HOME/modules/` directory of the application server. Each sub-directory represents
This defined type can add and remove JBoss static modules. Static modules are predefined in
the `JBOSS_HOME/modules/` directory of the application server. Each sub-directory represents
one module and contains one or more JAR files and a configuration file - `module.xml`.

More info on modules here: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Development_Guide/chap-Class_Loading_and_Modules.html
Expand Down Expand Up @@ -442,8 +442,21 @@ To contribute to this module please read carefully the [CONTRIBUTING.md](https:/

## Release Notes

* `1.0.0`
* First publicly available version
* Support for JBoss EAP, JBoss AS and Wildfly
* Support for JPA datasource management, Security Domain JBoss, JMS queues, resource adapters and messages logging
* Support for deploying artifacts
* `1.0.3` - RubyCake
* Bug: #9 Correct a way that options are validated and displyed for datasource type
* Bug: #8 Correct a way that port and host are validated for datasource type
* Bug: #21 Fix hiera key in params.pp for java_autoinstall parameter
* Bug: #17 Fix to be able to supply install zip as off-line file
* Quality: #22 Fix Puppet Forge warning: "Dependencies contain unbounded ranges."
* Quality: #41 Adding code of conduct file
* Tests: #10 Write spec test to cover not covered Ruby files (up 80%)
* CI: #34 Running acceptance tests on rvm 2.1 instead of default
* CI: #4 Try to execute standard Ruby builds on Travis CI on container infrastructure
* `1.0.2` - MintyFrost
* Enhancement: move documentation to the Wiki and document all public manifests
* Bug: make acceptance tests work on Travis
* `1.0.0` - First public release
* First publicly available version
* Support for JBoss EAP, JBoss AS and Wildfly
* Support for JPA datasource management, Security Domain JBoss, JMS queues, resource adapters and messages logging
* Support for deploying artifacts
4 changes: 2 additions & 2 deletions lib/facter/jboss_configfile.rb
@@ -1,5 +1,5 @@
require File.expand_path(File.join(File.dirname(__FILE__), '../puppet_x/coi/jboss/configuration'))
require File.expand_path(File.join(File.dirname(__FILE__), '../puppet_x/coi/jboss'))

Facter.add(:jboss_configfile) do
setcode { Puppet_X::Coi::Jboss::Configuration::configfile }
end
end
22 changes: 2 additions & 20 deletions lib/facter/jboss_fullconfig.rb
@@ -1,21 +1,3 @@
require File.expand_path(File.join(File.dirname(__FILE__), '../puppet_x/coi/jboss/configuration'))
require File.expand_path(File.join(File.dirname(__FILE__), '../puppet_x/coi/jboss'))

config = Puppet_X::Coi::Jboss::Configuration::read
unless config.nil?
config.each do |key, value|
fact_symbol = "jboss_#{key}".to_sym
Facter.add(fact_symbol) do
setcode { value }
end
end
Facter.add(:jboss_fullconfig) do
setcode do
if RUBY_VERSION < '1.9.0'
class << config
define_method(:to_s, proc { self.inspect })
end
end
config
end
end
end
Puppet_X::Coi::Jboss::Facts.define_fullconfig_fact
10 changes: 4 additions & 6 deletions lib/puppet/parser/functions/jboss_basename.rb
@@ -1,3 +1,5 @@
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss')

# Jboss AS private basename function
#
# jboss_basename(string) : string
Expand All @@ -8,10 +10,6 @@
# local file system.
module Puppet::Parser::Functions
newfunction(:jboss_basename, :type => :rvalue) do |args|
if args[0].is_a?(Array)
args.collect do |a| File.basename(a) end
else
File.basename(args[0])
end
Puppet_X::Coi::Jboss::Functions.jboss_basename args
end
end
end
10 changes: 4 additions & 6 deletions lib/puppet/parser/functions/jboss_dirname.rb
@@ -1,3 +1,5 @@
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss')

# Jboss AS private dirname function
#
# jboss_dirname(string) : string
Expand All @@ -8,10 +10,6 @@
# local file system.
module Puppet::Parser::Functions
newfunction(:jboss_dirname, :type => :rvalue) do |args|
if args[0].is_a?(Array)
args.collect do |a| File.dirname(a) end
else
File.dirname(args[0])
end
Puppet_X::Coi::Jboss::Functions.jboss_dirname args
end
end
end
3 changes: 2 additions & 1 deletion lib/puppet/parser/functions/jboss_hash_setvalue.rb
Expand Up @@ -5,7 +5,8 @@
# Sets value to Puppet hash
module Puppet::Parser::Functions
newfunction(:jboss_hash_setvalue) do |args|
raise(Puppet::ParseError, "jboss_hash_setvalue(): wrong lenght of input given (#{args.size} for 3)") if args.size != 3
hash, key, value = args
hash[key] = value
end
end
end
9 changes: 4 additions & 5 deletions lib/puppet/parser/functions/jboss_short_version.rb
@@ -1,3 +1,5 @@
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss')

# Jboss AS private short version function
#
# jboss_short_version(string) : string
Expand All @@ -6,9 +8,6 @@
# 'eap-6.2.0.GA' -> '6.2'
module Puppet::Parser::Functions
newfunction(:jboss_short_version, :type => :rvalue) do |args|
version = args[0]
re = /^(?:[a-z]+-)?(\d+\.\d+)\.\d+(?:\.[A-Za-z]+)?$/
m = re.match(version)
if m then m[1] else nil end
Puppet_X::Coi::Jboss::Functions.jboss_short_version args
end
end
end
4 changes: 2 additions & 2 deletions lib/puppet/parser/functions/jboss_to_bool.rb
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss/functions/jboss_to_bool')
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss')

# Jboss AS private to_bool function
#
Expand All @@ -9,4 +9,4 @@ module Puppet::Parser::Functions
newfunction(:jboss_to_bool, :type => :rvalue) do |args|
Puppet_X::Coi::Jboss::Functions.jboss_to_bool args
end
end
end
4 changes: 2 additions & 2 deletions lib/puppet/parser/functions/jboss_to_i.rb
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss/functions/jboss_to_i')
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss')

# Jboss AS private to_i function
#
Expand All @@ -9,4 +9,4 @@ module Puppet::Parser::Functions
newfunction(:jboss_to_i, :type => :rvalue) do |args|
Puppet_X::Coi::Jboss::Functions.jboss_to_i args
end
end
end
4 changes: 2 additions & 2 deletions lib/puppet/parser/functions/jboss_to_s.rb
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss/functions/jboss_to_s')
require File.join(File.dirname(__FILE__), '../../../puppet_x/coi/jboss')

# Jboss AS private to_s function
#
Expand All @@ -9,4 +9,4 @@ module Puppet::Parser::Functions
newfunction(:jboss_to_s, :type => :rvalue) do |args|
Puppet_X::Coi::Jboss::Functions.jboss_to_s args
end
end
end

0 comments on commit 50e2199

Please sign in to comment.