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

knotx (4) Versions 0.6.2

Installs/Configures knotx

Policyfile
Berkshelf
Knife
cookbook 'knotx', '= 0.6.2', :supermarket
cookbook 'knotx', '= 0.6.2'
knife supermarket install knotx
knife supermarket download knotx
README
Dependencies
Changelog
Quality 50%

knotx-cookbook

This cookbook installs knot.x

Table of contents

Supported platforms

Operating systems

  • CentOS/RHEL 6.x
  • CentOS/RHEL 7.x

Chef versions

  • Chef 13.x
  • Chef 14.x

knot.x versions


IMPORTANT

If you're using knot.x 1.1.x or 1.2.x please stick to 0.4.x version of this
cookbook!


  • knot.x 1.3.x
  • knot.x 1.4.x

Attributes

knotx.rb

  • ['knotx']['user'] - user that runs knot.x service
  • ['knotx']['group'] - group that owns knot.x service
  • ['knotx']['base_dir'] - top level installation directory for all knot.x instance
  • ['knotx']['log_dir'] - top level log directory for all knot.x instances
  • ['knotx']['open_file_limit']- number of maximum file descriptors service user can open
  • ['knotx']['log_level']['root'] - default log level for all knot.x modules
  • ['knotx']['log_level']['knotx'] - log level for io.knotx modules
  • ['knotx']['log_history']['knotx'] - maximum age (in days) for knot.x logs
  • ['knotx']['log_history']['access'] - maximum age (in days) for knot.x access log
  • ['knotx']['log_size']['knotx'] - maximum file size of knot.x log file
  • ['knotx']['log_size']['access'] - maximum file size of knot.x access log file
  • ['knotx']['release_url'] - base URL used to calculate download URL when only version was specified
  • ['knotx']['min_heap'] - -Xms JVM parameter (in MB)
  • ['knotx']['max_heap'] - -Xmx JVM parameter (in MB)
  • ['knotx']['extra_opts'] - custom JVM parameters you'd like to add upon service start
  • ['knotx']['gc_opts'] - Garbage Collector JVM options
  • ['knotx']['jmx_enabled'] - defines whether JMX should be enabled or not
  • ['knotx']['jmx_ip'] - IP on which JMX interface should listen on
  • ['knotx']['jmx_port'] - port of JMX interface
  • ['knotx']['debug_enabled'] - defines whether JVM debugging interface is enabled or not
  • ['knotx']['debug_port'] - port of JVM debug interface
  • ['knotx']['instance_opts'] - custom parameters you'd like to pass to knotx command
  • ['knotx']['source']['knotx_init_cookbook'] - cookbook where SysVinit script is located
  • ['knotx']['source']['knotx_init_path'] path under templates where SysVinit script is located
  • ['knotx']['source']['knotx_systemd_cookbook'] - cookbook where systemd unit file is located
  • ['knotx']['source']['knotx_systemd_path'] - path under templates where systemd unit file is located
  • ['knotx']['source']['knotx_ulimit_cookbook'] - cookbook where ulimit template file is located
  • ['knotx']['source']['knotx_ulimit_path'] - path under tamplates where ulimit file is placed
  • ['knotx']['source']['knotx_conf_cookbook'] - cookbook where knot.x JVM settings file is placed
  • ['knotx']['source']['knotx_conf_path'] - path to knot.x JVM template within a cookbook
  • ['knotx']['source']['logback_xml_cookbook'] - cookbook where logback.xml template is placed
  • ['knotx']['source']['logback_xml_path'] - path to logback.xml template within a cookbook

commons.rb

Attributes from java cookbook

Custom resources

knotx_instance

Properties

  • id - knot.x instance ID (derived from resource name by default)
  • version - knot.x version to deploy (uses ['knotx']['release_url'] to calculate download URL)
  • source - full URL to knot.x ZIP distribution package. Overwrites version
  • install_dir - where knot.x instance should be deployed. If not set, knot.x gets deployed to ['knotx']['base_dir']/id directory
  • log_dir - directory where all logs will be stored. If not set logs are written to ['knotx']['log_dir']/id directory
  • custom_logback - logback.xml used to be delivered with ZIP distribution package, however most of the time this is not what you want, as stdout is commonly used as an output there. This property accepts boolean values ( true by default) and generates logback.xml according to attributes

Customizations

It is possible to deploy more than 1 knot.x instance on a single server. To set
that up you must ensure that each instance has unique ID and there's no
conflicting port assignments.

Instance specific properties can be set using special attribute convention.
Attributes defined this way overwrite the ones without ID in the name. See
example below for more details:

# If none of below attributes is defined the following ones will be used:
# * default['knotx']['jmx_port']
# * default['knotx']['debug_port']
# * default['knotx']['port']
default['knotx']['main2']['jmx_port'] = '18093'
default['knotx']['main2']['debug_port'] = '28093'
default['knotx']['main2']['port'] = '8093'

The following attributes can be set this way:

  • node['knotx'][ID]['min_heap']
  • node['knotx'][ID]['max_heap']
  • node['knotx'][ID]['extra_opts']
  • node['knotx'][ID]['gc_opts']
  • node['knotx'][ID]['jmx_enabled']
  • node['knotx'][ID]['jmx_ip']
  • node['knotx'][ID]['jmx_port']
  • node['knotx'][ID]['debug_enabled']
  • node['knotx'][ID]['debug_port']
  • node['knotx'][ID]['instance_opts']

Usage scenarios

Simple installation

include_recipe 'knotx::commons'

knotx_instance 'Knotx Main: Install' do
  id 'main'
  version '1.0.0-RC2'
end

Multiple instances

include_recipe 'knotx::commons'

# Nearly all settings (except logging ones) are derived either from default
# attributes or configuration files shipped with knotx-stack distribution
knotx_instance 'Primary knot.x instance' do
  id 'primary'
  source node['knotx']['url']
end

# Use attributes to overwrite default parameters
node.default['knotx']['secondary']['extra_opts'] = '-Dknotx.port=8093'
node.default['knotx']['secondary']['jmx_port'] = '18093'
node.default['knotx']['secondary']['debug_enabled'] = true
node.default['knotx']['secondary']['debug_port'] = '28093'

knotx_instance 'Secondary knot.x instance' do
  id 'secondary'
  source node['knotx']['url']
end

Knot.x stack package

Cookbook installs Knot.x instance that base on knotx-stack
distribution. The structure of the package must keep following structure:

.
└── ** (any folder name, e.g. `my-stack` or `knotx`)
├── conf
└── lib

There should be only one top level folder (e.g. my-stack or knotx)

Dependent cookbooks

java >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

All notable changes to knotx-cookbook will be documented in this file.

Unreleased

List of changes that are finished but not yet released in any final version.

v0.5.0

Start of changelog.

v0.6.1

Knotx stack name discovery and README update

Collaborator Number Metric
            

0.6.2 failed this metric

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

Contributing File Metric
            

0.6.2 passed this metric

Foodcritic Metric
            

0.6.2 failed this metric

FC085: Resource using new_resource.updated_by_last_action to converge resource: knotx/libraries/provider_knotx_instance.rb:225
FC085: Resource using new_resource.updated_by_last_action to converge resource: knotx/libraries/provider_knotx_instance.rb:312
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.6.2 passed this metric

Testing File Metric
            

0.6.2 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
            

0.6.2 passed this metric