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

Select Status

RSS

yajsw (3) Versions 0.4.0

Installs/Configures yajsw

Policyfile
Berkshelf
Knife
cookbook 'yajsw', '= 0.4.0', :supermarket
cookbook 'yajsw', '= 0.4.0'
knife supermarket install yajsw
knife supermarket download yajsw
README
Dependencies
Changelog
Quality 14%

yajsw-cookbook

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.

Attributes

<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>http://softlayer-dal.dl.sourceforge.net/project/yajsw/yajsw/yajsw-stable-11.11/yajsw-stable-11.11.zip</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' => 'com.company.myapp',
'jar' => 'lib/com.company.myapp.jar',
'classpath' => [],
'additional' => ['-server', '-Dfile.encoding=UTF-8'],
'parameters' => ['-a', '-b', 'foobar', '-c'],
'logfile' => {
'maxfiles' => 10,
'maxsize' => '10m',
'loglevel' => 'INFO'
}
}]
</pre></td>
</tr>
</table>

Usage

yajsw::default

Include yajsw in your node's run_list:

{
  "run_list": [
    "recipe[yajsw::default]"
  ]
}

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

yajsw_install will install the specified version of yajsw

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

yajsw_app

yajsw_app will configure an instance of YAJSW

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

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

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.

Dependent cookbooks

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

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.1.0

  • Initial release of yajsw-cookbook

0.2.0

  • Add LWRP functionality

0.2.1

  • Add support for additional java options

0.2.2

  • Add support for additional command parameters

0.2.4

  • Add matcher and tests from LWRP

0.2.5

  • Update deprecated test platforms and calls

0.2.6

  • Update download mirror

0.3.0

  • Add support for CentOS 7 and Systemd

0.3.1

  • Upgrade libarchive cookbook

0.3.2

  • rubocop fixes
  • license updates

0.3.3

  • Update LICENSE file

0.4.0

  • Migrate to chef custom resources

Collaborator Number Metric
            

0.4.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.4.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 http://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.4.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
Run with Foodcritic Version 10.2.2 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.4.0 failed this metric

yajsw does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, MIT, mit, GPL-2.0, gplv2, GPL-3.0, gplv3.

No Binaries Metric
            

0.4.0 passed this metric

Testing File Metric
            

0.4.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 http://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.4.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 http://github.com/user/repo, and your repo must include a tag that matches this cookbook version number