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

imply-platform (4) Versions 4.0.0

Install and configure Imply/druid

Policyfile
Berkshelf
Knife
cookbook 'imply-platform', '~> 4.0.0', :supermarket
cookbook 'imply-platform', '~> 4.0.0'
knife supermarket install imply-platform
knife supermarket download imply-platform
README
Dependencies
Changelog
Quality 50%

Exploratory Analytics, Scalable to Petabytes

Description

Druid is an open source, high-performance, column-oriented,
distributed data store.

Imply is an open event analytics platform, powered by
Druid. Explore your events through interactive visualizations, SQL, or your own
custom applications.

This cookbook is designed to install and configure Druid using Imply
distribution.

Requirements

Cookbooks and gems

Declared in [metadata.rb](metadata.rb) and in [Gemfile](Gemfile).

Platforms

A systemd managed distribution:
- RHEL Family 7, tested on Centos

Usage

Druid need a lot of different nodes but Imply distribution sorts them in
three main roles:

  • Master, everything about coordination
  • Data, all about data
  • Query, responsible for user requests
  • Client (actually not an officiel Imply role) for clients like pivot

To setup an Imply cluster, you need to define which nodes you want to affect
to each role (a node may have multiple roles). This is done by the help of
[Cluster Search][cluster-search] cookbook.

The recommended way to use this cookbook is through the creation of four
Chef roles per Imply cluster, each mapping an Imply role.

This enables the search by role feature, allowing a simple service discovery.
The search should be parametrized in attributes:

  • node['imply-platform']['master']
  • node['imply-platform']['data']
  • node['imply-platform']['query']
  • node['imply-platform']['client']

In fact, for each there are two ways to configure the search:

  1. with a static configuration through a list of hostnames (attributes hosts that is node['imply-platform']['master']['hosts'] for the master role)
  2. with a real search, performed on a role (attributes role and size like in node['imply-platform']['master']['role']). The role should be in the run-list of all nodes of the cluster. The size is a safety and should be the number of nodes of this role.

If hosts is configured, role and size are ignored

See [.kitchen.yml](.kitchen.yml) and [roles](test/integration/roles) for some
examples and [Cluster Search][cluster-search] documentation for more
information.

Note that if you want a simple (and static, ie without search) configuration
of your Imply cluster, you can use only one role declaring all your nodes
with hosts attributes.

Zookeeper HA Cluster

To install properly a HA Imply cluster, you need a Zookeeper cluster.
This is not in the scope of this cookbook but if you need one, you should
consider using [Zookeeper Platform][zookeeper-platform].

The configuration of Zookeeper hosts use search and is done similarly as for
Imply hosts, ie with a static list of hostnames or by using a search on
a role. The attribute to configure is node['imply-platform']['zookeeper'].

Metadata HA Cluster

Similarly, you need also a SQL server (MariaDB or PostgreSQL) to hold Druid
metadata.

This is not in the scope of this cookbook but if you need one, you should
consider using [Galera Platform][galera-platform]. Galera is master-master
replication system which can be applied to both MariaDB or PostgreSQL. This
assures a truly fault-tolerant setting for Druid.

The configuration of database hosts use search and is done similarly as for
Imply hosts, ie with a static list of hostnames or by using a search on
a role. The attribute to configure is node['imply-platform']['database'].

Java

By default, this cookbook installs openjdk from the official repositories
(openjdk-headless 8 on centos 7) just before starting the service. You can
change this behavior by setting node['imply-platform']['java'] to "", or
choose your package by setting the package name in
node['imply-platform']['java'][node[:platform]].

Test

This cookbook is fully tested through the installation of the full platform
in docker hosts. This uses kitchen, docker and some monkey-patching.

If you run kitchen list, you will see many suites:

  • data-volume-imply-centos-7 (to have a shared /data)
  • zookeeper-imply-centos-7
  • galera-imply-centos-7
  • master-imply-1-centos-7
  • master-imply-2-centos-7
  • data-imply-1-centos-7
  • data-imply-2-centos-7
  • query-imply-1-centos-7
  • query-imply-2-centos-7
  • client-imply-1-centos-7

Each corresponds to a different node in the cluster. They are connected through
a bridge network named kitchen, which is created if necessary.

For more information, see [.kitchen.yml](.kitchen.yml) and [test](test)
directory.

Attributes

Configuration is done by overriding default attributes. All configuration keys
have a default defined in [attributes/default.rb](attributes/default.rb).
Please read it to have a comprehensive view of what and how you can configure
this cookbook behavior.

Recipes

default

Include search, user, install, nodejs (only for client nodes), database (except
for client only nodes), config, systemd and service recipes (in that order).

Performs all the required searches and store the results in
node.run_state['imply-platform']. For instance, it defines a boolean for each
Imply role so they can be used by other recipes.

user

Create necessary user and group which will run Imply services.

nodejs

Install nodejs through NodeJS official repository.

install

Install Imply distribution from official tar.gz archive.

database

Configure the database needed by the metadata service.

config

Configure all Imply services.

systemd

Install and configure Systemd services.

service

Configure services (enable, start and restart).

Resources/Providers

None.

Changelog

Available in [CHANGELOG.md](CHANGELOG.md).

Contributing

Please read carefully [CONTRIBUTING.md](CONTRIBUTING.md) before making a merge
request.

License and Author

Copyright (c) 2016-2017 Sam4Mobile, 2018 Make.org

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

ark >= 0.0.0
cluster-search >= 0.0.0
database >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

4.0.0

Main:

  • chore: handover maintenance to make.org
  • feat: update imply default version to 2.5.11
    • set default config from imply 2.5
    • enable sql in common config by default
    • adapt pivot config and fix tests
    • reduce memory used by each component
    • update to latest package
  • feat: set default search sizes to 0
  • feat: can set owner/group/mode for storage dirs
  • feat: allow appending users to imply group
  • feat: save default configs before modifying them
  • fix: do not set retries if package_retries is nil
  • fix: better regexp in jvm config to allow more opt
  • fix: java installation was difficult to deactivate

Tests:

  • test: move driver config, set latest options
  • test: require foodcritic & rubocop in Gemfile
  • test: include .gitlab-ci.yml from test-cookbook
  • test: merge each node into a full-stack one, at the end
  • test: merge zk & galera and limit ram to 384mo
  • test: reduce memory used with agressive settings
  • test: increase database retries & give it more mem
  • test: set indexing timeout to 600s
  • test: add helper in "helper"-suite names
  • test: set client suite aside to deactivate java
  • test: add a retry opt on yum repository
  • test: increase timeout for services
  • test: retry indexing task multiple times

Misc:

  • style(rubocop): fix %w-literals delimiters
  • style(rubocop): fix heredoc & token offenses
  • style(foodcritic): fix license & chef_version
  • style: use cookbook_name macro everywhere
  • docs: use karma for git format in contributing

3.0.0

Main:

  • Support imply 2.0.0+, break compatibility with previous versions

Tests:

  • Use latest gitlab-ci template (20170117)
  • Fix destroy after a fail occurs (mostly for CI)

2.0.0

Main:

  • Remove pivot from query, Stop using supervise
    • Remove pivot from query role (you probably want to install it elsewhere)
    • Stop using supervise script, use a systemd service for each component
  • Create a new role 'client' to install pivot
    • Remove pivot recipe as it is no longer in use
    • Pivot config file can be configured with attributes
    • Tests for pivot, use journalctl instead of log file
    • Install nodejs for client
    • Do not connect to database if node is only a client
    • Small refacto in search recipe, factorize role searches
    • Simplify search attribute comments
  • Log management
    • Configure log4j2 with log rotation
    • Move default log location to /var/opt/imply/log
  • Add the possibility to add JVM options for all components
  • Set root as owner of imply installation directory (except some config files)
  • Deactivate emitter, and set it as debug by default
  • Rationalize druid config, use global var/tmp dirs
  • Improve auto-restart by correcly listing config templates
  • Add database port (default: 3306)
  • Remove dependency on yum (no need on recent chef)

Tests:

  • Fix memory config for test cluster
  • Use a docker volume to share /data between nodes
  • Stop executing converge at verify phase in kitchen
  • Wait for service in tests
  • Use latest gitlab-ci template (20160914)
  • Remove old disabled kitchen pivot suite

1.0.0

  • Initial version, supports centos 7

Collaborator Number Metric
            

4.0.0 passed this metric

Contributing File Metric
            

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

Foodcritic Metric
            

4.0.0 passed this metric

No Binaries Metric
            

4.0.0 passed this metric

Testing File Metric
            

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

Version Tag Metric
            

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