Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


yajsw (3) Versions 0.3.2

Installs/Configures yajsw

cookbook 'yajsw', '= 0.3.2'
cookbook 'yajsw', '= 0.3.2', :supermarket
knife supermarket install yajsw
knife supermarket download yajsw
Quality 100%


Installs and manages 'Yet Another Java Service Wrapper'.

Read more about YAJSW

Supported Platforms

  • Ubuntu 14.x
  • Centos 6.x, 7.x
  • Chef 12.x


<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>node['yajsw']['url']</tt></td> <td>String</td> <td>Where to download YAJSW</td> <td><tt></tt></td> </tr> <tr> <td><tt>node['yajsw']['file']</tt></td> <td>String</td> <td>The name of the downloaded archive.</td> <td><tt></tt></td> </tr> <tr> <td><tt>node['yajsw']['checksum']</tt></td> <td>String</td> <td>MD5 checksum of the downloaded archive.</td> <td><tt>3b4fff8475e48cb001c38a42c27c953b</tt></td> </tr> <tr> <td><tt>node['yajsw']['dirname']</tt></td> <td>String</td> <td>Name of the extracted directory.</td> <td><tt>yajsw-stable-11.11</tt></td> </tr> <tr> <td><tt>node['yajsw']['basedir']</tt></td> <td>String</td> <td>The base directory to use for the YAJSW installation.</td> <td><tt>/usr/local</tt></td> </tr> <tr> <td><tt>node['yajsw']['appsdir']</tt></td> <td>String</td> <td>The directory to use for YAJSW managed application.</td> <td><tt>/usr/local/yajsw_apps</tt></td> </tr> <tr> <td><tt>node['yajsw']['piddir']</tt></td> <td>String</td> <td>The directory to use for YAJSW application pids.</td> <td><tt>/var/run</tt></td> </tr> <tr> <td><tt>node['yajsw']['user']</tt></td> <td>String</td> <td>The owner of the YAJSW installation.</td> <td><tt>root</tt></td> </tr> <tr> <td><tt>node['yajsw']['use_data_bag']</tt></td> <td>Boolean</td> <td>Collect application info from a data bag instead of node attributes.</td> <td><tt>false</tt></td> </tr> <tr> <td><tt>node['yajsw']['data_bag_name']</tt></td> <td>String</td> <td>Name of the data bag to collect application information.</td> <td><tt>yajsw</tt></td> </tr> <tr> <td><tt>node['yajsw']['use_env_data_bags']</tt></td> <td>Boolean</td> <td>Appends the environment to the end of the data bag name. (ie. 'yajsw' becomes 'yajsw_prod')</td> <td><tt>true</tt></td> </tr> <tr> <td><tt>node['yajsw']['apps']</tt></td> <td>Array</td> <td>The array of application configurations (if not using data bags).</td> <td><pre> [{ 'name' => 'myapp', 'user' => 'yajsw', 'initmemory' => 64, 'maxmemory' => 256, 'mainclass' => '', 'jar' => 'lib/', 'classpath' => [], 'additional' => ['-server', '-Dfile.encoding=UTF-8'], 'parameters' => ['-a', '-b', 'foobar', '-c'], 'logfile' => { 'maxfiles' => 10, 'maxsize' => '10m', 'loglevel' => 'INFO' } }] </pre></td> </tr> </table>



Include yajsw in your node's run_list:

  "run_list": [

The default implementation will install yajsw in /usr/local/ and create an application dir in /usr/local/yajsw_apps.


If you prefer, you can use the YAJSW recipes individually, and configure your application with the included LWRP.

Note: The LWRP will not install yajsw, use recipe[yajsw::package] for that.


yajsw_app will configure an instance of YAJSW

  logfile = { 'maxfiles' => 10, 'maxsize' => '10m', 'loglevel' => 'INFO' }
  yajsw_app 'myapp' do
    user 'yajsw'
    mainclass ''
    jar 'lib/'
    classpath []
    additional ['-server', '-Dfile.encoding=UTF-8']
    parameters ['-a', '-b', 'foobar', '-c']
    initmemory 16
    maxmemory 256
    logfile logfile
    create_user true
    action [:create, :update]

Data Bags

TODO: implement this functionality

If node['yajsw']['use_data_bag'] is true, yajsw will require a data bag in the following format:

License and Authors

Copyright (C) 2015-2016 NorthPage

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

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.

Dependent cookbooks

java ~> 1.0
libarchive ~> 0.6.0
git >= 0.0.0
maven >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.


  • Initial release of yajsw-cookbook


  • Add LWRP functionality


  • Add support for additional java options


  • Add support for additional command parameters


  • Add matcher and tests from LWRP


  • Update deprecated test platforms and calls


  • Update download mirror


  • Add support for CentOS 7 and Systemd


  • Upgrade libarchive cookbook


  • rubocop fixes
  • license updates

Foodcritic Metric

0.3.2 passed this metric