Home

Awesome

knotx-cookbook

This cookbook installs knot.x

Table of contents

Supported platforms

Operating systems

Chef versions

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!


Attributes

knotx.rb

commons.rb

Attributes from java cookbook

Custom resources

knotx_instance

Properties

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:

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)