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

RSS

cockroachdb-platform (7) Versions 1.1.0

Cookbook used to install and configure cockroachdb

Berkshelf/Librarian
Policyfile
Knife
cookbook 'cockroachdb-platform', '= 1.1.0'
cookbook 'cockroachdb-platform', '= 1.1.0', :supermarket
knife cookbook site install cockroachdb-platform
knife cookbook site download cockroachdb-platform
README
Dependencies
Changelog
Quality

CockroachDB Platform

Description

CockroachDB is an open source, scalable, survivable, strongly consistent database.

This cookbook is designed to install and configure a CockroachDB cluster.

Requirements

Cookbooks and gems

Declared in metadata.rb and in Gemfile.

Platforms

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

Usage

Easy Setup

Set node['cockroachdb-platform']['hosts'] to an array containing the hostnames of the nodes of the CockroachDB cluster.

The recommended way to use this cookbook is through the creation of a role per CockroachDB cluster. This enables the search by role feature, allowing a simple service discovery.

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

  1. With a static configuration through a list of hostnames (attributes hosts that is node['cockroachdb-platform']['hosts']) for nodes belonging to CockroachDB cluster.
  2. With a real search, performed on a role (attributes role and size like in node['cockroachdb-platform']['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 roles for some examples and [Cluster Search][cluster-search] documentation for more information.

Test

This cookbook is fully tested through the installation of a working 3-nodes cluster in docker hosts. This uses kitchen, docker and some monkey-patching.

For more information, see .kitchen.yml and test directory.

Attributes

Configuration is done by overriding default attributes. All configuration keys have a default defined in 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, config and systemd recipes.

Search the node (initiator) that will initialize first the CockroachDB cluster. Other nodes will join the CockroachDB cluster after the initiator.

user

Create user/group used by CockroachDB.

install

Install CockroachDB using ark.

config

Generate options for the CockroachDB node.

Global options for each CockroachDB node in the cluster are defined through the following attribute: node['cockroachdb-platform']['options'].

By default, the CockroachDB cluster will be created and started in secure mode. SSL certificates used for the secure mode have to be stored in an encrypted data bag (data bag 'secrets' with items 'ca' and 'node' by default). For an example, look at the test configuration, you can see also the format needed to have the client certificates well named and placed in the test-cockroachdb cookbook. (Note that in the current test configuration, data bag are in ruby format thanks to a monkey patch. With a production Chef, we have to define them in JSON.)

To enable the insecure mode, set an insecure attribute to empty string ('') node['cockroachdb-platform']['options']['insecure']. (like the background one in attributes/default.rb)

systemd

Create systemd service file for CockroachDB.

Changelog

Available in CHANGELOG.md.

Contributing

Please read carefully CONTRIBUTING.md before making a merge request.

License and Author

Copyright (c) 2016 Sam4Mobile, 2017 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

cluster-search >= 0.0.0
ark >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

1.1.0

Main:

  • Set CockroachDB default version to 1.0 :)
  • Set secure mode by default
  • Generate client certificate on each node
  • Change the way to set/unset an option
  • Handover maintenance to Make.org
  • Fix metadata, license and chef_version (12.9)
  • Increase max file to 15000 by default

Tests:

  • Set always update & build pull for tests
  • Use latest template for .gitlab-ci.yml [20170405]
  • Fix destroy in kitchen tests

Misc:

  • Fix Gemfile for rubocop, add rubocop & foodcritic
  • Fix rubocop offenses (%w and %i stuff)

1.0.0

  • Initial version, with beta-20161103 support

Collaborator Number Metric
            

1.1.0 failed this metric

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

Contributing File Metric
            

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

1.1.0 passed this metric

License Metric
            

1.1.0 passed this metric

No Binaries Metric
            

1.1.0 passed this metric

Publish Metric
            

1.1.0 passed this metric

Supported Platforms Metric
            

1.1.0 passed this metric

Testing File Metric
            

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

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