cookbook 'jboss-eap', '~> 2.1.1'
jboss-eap (4) Versions 2.1.1 Follow10
Installs/Configures jboss-eap
cookbook 'jboss-eap', '~> 2.1.1', :supermarket
knife supermarket install jboss-eap
knife supermarket download jboss-eap
jboss-eap Cookbook
This cookbook installs JBoss EAP 6 from a tar.gz and would probably work with JBoss AS 7 as well. This has only been tested on RHEL 6. This is a basic cookbook intended as a starting point for your environment. By default this cookbook will install JBoss into /opt/jboss and setup the init script and log directoy. See the usage section for more details.
Special attention should be paid to the permissions set on the jboss files as this cookbook sets them all to be writable by the jboss user and should not be considered a secure setup.
Requirements
-
opscode ark cookbook
- https://github.com/opscode-cookbooks/ark -
java
- Not managed by this cookbook -
JBoss EAP 6
Download the zip package "Red Hat JBoss Enterprise Application Platform 6.2.0" from RHN and host on your own server
Attributes
-
node['jboss-eap']['version']
- used for versioned directory name (Default: 6.2.0) -
node['jboss-eap']['install_path']
- Base directory that will hold the versioned jboss directory and symlink (Default: /opt) -
node['jboss-eap']['symlink']
- Name of the symlink that points to the current versioned jboss directory (Default: jboss) -
node['jboss-eap']['config_dir']
- Directory that holds the jboss-as.conf file (Default: /etc/jboss-as) -
node['jboss-eap']['package_url']
- Url to obtain JBoss package -
node['jboss-eap']['checksum']
- sha256sum of package_url file -
node['jboss-eap']['log_dir']
- Directory to hold JBoss logs (Default: /var/log/jboss) -
node['jboss-eap']['jboss_user']
- User to run JBoss as (Default: jboss) -
node['jboss-eap']['jboss_group']
- Group owner of JBoss (Default: jboss) -
node['jboss-eap']['admin_user']
- Management console username (Does nothing if not set) -
node['jboss-eap']['admin_passwd']
- Management console user passwd (Does nothing if not set) # Note the password has to be >= 8 characters, one numeric, one special -
node['jboss-eap']['start_on_boot']
- enables services (Default: false)
Usage
jboss-eap::default
The default recipe downloads the EAP package and unpacks it to the versioned directory (/opt/jboss-6.2.0). A jboss symlink is created that points to the versioned directory. (/opt/jboss points to /opt/jboss-6.2.0). The EAP supplied init script is copied to /etc/init.d/jboss and the configuration file is setup at /etc/jboss-as/jboss-as.conf. jboss/standalone/logs is then symlinked to the supplied log directory.
Specifying an admin_user and admin_password will add the user to the JBoss management console. Only one user is supported at this time. Note the password complexity requirements. The add-user.sh script exits with status code 0 even if you fail to meet the password requirements so Chef will not throw an error.
TODO: Convert this to an array of users
Example wrapper cookbook / recipe
node.override['jboss-eap']['version'] = "6.2.0" node.override['jboss-eap']['install_path'] = '/opt' node.override['jboss-eap']['package_url'] = 'http://example.com/jboss-eap-6.2.0.zip' node.override['jboss-eap']['checksum'] = '627773f1798623eb599bbf7d39567f60941a706dc971c17f5232ffad028bc6f4' node.override['jboss-eap']['log_dir'] = '/var/log/jboss' node.override['jboss-eap']['jboss_user'] = 'jboss' node.override['jboss-eap']['jboss_group'] = 'jboss' node.override['jboss-eap']['admin_user'] = "youradmin" node.override['jboss-eap']['admin_passwd'] = "ZYxalFHy-7A" # Note the password has to be >= 8 characters, one numeric, one special node.override['jboss-eap']['start_on_boot'] = true include_recipe "jboss-eap"
Example role:
name "jboss-eap-6" description "JBoss 6 EAP install" run_list [ "recipe[jboss-eap]", ] default_attributes( "jboss-eap" => { "install_path" => "/opt", "package_url" => "http://example.com/jboss-eap-6.2.0.zip", "checksum" => "0ef5d62a660fea46e0c204a9f9f35ad4", "version" => "6.2.0", "admin_user" => "youradmin", "admin_passwd" => "ZYxalFHy-7A", "start_on_boot" => true } )
jboss_java_option defintion
Use this to add JAVA_OPTS options to standalone.conf
jboss_java_option "logging fix" do
option "-Dorg.jboss.as.logging.per-deployment=false"
end
License and Authors
Authors: https://github.com/andrewfraley
jboss-eap CHANGELOG
This file is used to list changes made in each version of the jboss-eap cookbook.
2.1.1
- Adjusted log directory permissions to be 2775
2.1.0
- Added definition to add java options to standalone.conf
2.0.0
- Switched to ark cookbook to handle installation
- Refactored admin account creation and log directory management
1.0.0
- [Andy Fraley] - Initial release of jboss-eap
Check the Markdown Syntax Guide for help with Markdown.
The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.
Collaborator Number Metric
2.1.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
2.1.1 failed this metric
Chef/Modernize/Definitions: Legacy Chef Infra definitions should be rewritten as custom resources to take full advantage of the Chef Infra feature set. (https://docs.chef.io/workstation/cookstyle/chef_modernize_definitions): jboss-eap/definitions/java-opts.rb: 2
Chef/RedundantCode/LongDescriptionMetadata: The long_description metadata.rb method is not used and is unnecessary in cookbooks. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_longdescriptionmetadata): jboss-eap/metadata.rb: 6
Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations
No Binaries Metric
2.1.1 passed this metric
Testing File Metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.1.1 failed this metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
2.1.1 failed this metric
Chef/Modernize/Definitions: Legacy Chef Infra definitions should be rewritten as custom resources to take full advantage of the Chef Infra feature set. (https://docs.chef.io/workstation/cookstyle/chef_modernize_definitions): jboss-eap/definitions/java-opts.rb: 2
Chef/RedundantCode/LongDescriptionMetadata: The long_description metadata.rb method is not used and is unnecessary in cookbooks. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_longdescriptionmetadata): jboss-eap/metadata.rb: 6
Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations
No Binaries Metric
2.1.1 passed this metric
Testing File Metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.1.1 failed this metric
Chef/RedundantCode/LongDescriptionMetadata: The long_description metadata.rb method is not used and is unnecessary in cookbooks. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_longdescriptionmetadata): jboss-eap/metadata.rb: 6
Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations
2.1.1 passed this metric
Testing File Metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.1.1 failed this metric
2.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number