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.5.0

Installs/Configures yajsw

cookbook 'yajsw', '~> 0.5.0'
cookbook 'yajsw', '~> 0.5.0', :supermarket
knife supermarket install yajsw
knife supermarket download yajsw
Quality 38%


Installs and manages 'Yet Another Java Service Wrapper'.

Read more about YAJSW

Supported Platforms

  • Ubuntu 14.x, 15.x
  • Centos 6.x, 7.x
  • Chef 12.5.x or higher. Chef 11 is NOT SUPPORTED.


<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']['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']['apps_home']</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.

Custom Resources

If you prefer, you can use the YAJSW recipes individually, or configure your application with the included Custom Resources.


yajsw_install will install the specified version of yajsw

    yajsw_install 'default' do
      marker 'stable'
      version '11.11'
      checksum 'aeb845a7d77184b8a1cbd68ae26c7f07a74952f6e79fb31d3f8f41ba52c4c872'
      user yajsw
      action :create


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.7
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


  • Update LICENSE file


  • Migrate to chef custom resources


  • Bump libarchive to version 0.7

Collaborator Number Metric

0.5.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

0.5.0 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, and your repo must contain a file

Foodcritic Metric

0.5.0 failed this metric

FC066: Ensure chef_version is set in metadata: yajsw/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: yajsw/metadata.rb:1
FC069: Ensure standardized license defined in metadata: yajsw/metadata.rb:1
FC108: Resource should not define a property named 'name': yajsw/resources/app.rb:21
FC108: Resource should not define a property named 'name': yajsw/resources/install.rb:20
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric

0.5.0 passed this metric

Publish Metric

0.5.0 passed this metric

Supported Platforms Metric

0.5.0 failed this metric

yajsw should declare what platform(s) it supports.

Testing File Metric

0.5.0 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, and your repo must contain a file

Version Tag Metric

0.5.0 passed this metric