/chef-torquebox

Chef cookbook to install/configure Torquebox on a node.

Primary LanguageRubyApache License 2.0Apache-2.0

chef-torquebox

Chef cookbook to install / configure Torquebox on a node.

Supported Platforms

  • CentOS (tested on 6.5)
  • Ubuntu (tested on 14.04)

Dependencies

This cookbook depends on the following cookbooks:

  • java

Attributes

Key Type Description Default
node[:torquebox][:version] String Version of Torquebox to install (supports upgrading) 3.1.1
node[:torquebox][:dist_url] String Full URL of Torquebox distribution to install (zip file). If nil, the default URL is used. nil
node[:torquebox][:install_dir] String Torquebox installation directory /opt/torquebox
node[:torquebox][:jboss][:user] String User under which to run Torquebox (will be created if not present) torquebox
node[:torquebox][:jboss][:pid_file] String Path to Torquebox PID file /var/run/torquebox/torquebox.pid
node[:torquebox][:jboss][:console_log] String Path to the Torquebox log file /var/log/torquebox/console.log
node[:torquebox][:jboss][:config] String

JBoss configuration file to use. This should be located in #{node[:torquebox][:jboss][:home]}/standalone/configuration (see attributes/server.rb).

standalone.xml

Usage

torquebox::server

Include torquebox::server in your node's run_list:

{
  "run_list": [
    "recipe[torquebox::server]"
  ]
}

If you wish to use a different version of Torquebox from the default, or you wish to change the version of Torquebox already installed by this recipe, change the value of version accordingly:

{
  "default_attributes": {
    "torquebox": {
      "version": "3.0.0"
    }
  }
}

Note that while switching versions appears to work in my tests, you will need to redeploy all applications to the new version using the torquebox_application resource.

Resources/Providers

torquebox_application

Deploys a Torquebox application.

Actions

  • :deploy: deploy the application

Attributes

Attribute Description Example Default
name Name of the application being deployed. razor-server Current resource name
env Torquebox environment under which the application should be deployed. production, development, test, ... production
root (required)

A directory containing the application to be deployed, a -knob.yml file, a .knob archive, or any Java deployable artifact (.war, .ear, etc).

/opt/razor-server None
context_path The web context path for the application. /myapp nil

Example

torquebox_application 'razor-server' do
  env  'production'
  root '/opt/razor-server'
end

Testing

TODO!

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

Author:: Jeff Shantz (jeff@csd.uwo.ca)

Copyright:: 2014, Western University

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.