cookbook 'cockroachdb-platform', '~> 1.5.1', :supermarket
cockroachdb-platform (10) Versions 1.5.1 Follow0
Cookbook used to install and configure cockroachdb
cookbook 'cockroachdb-platform', '~> 1.5.1'
knife supermarket install cockroachdb-platform
knife supermarket download cockroachdb-platform
CockroachDB is an open source, scalable, survivable, strongly consistent database.
This cookbook is designed to install and configure a CockroachDB cluster.
Cookbooks and gems
Declared in [metadata.rb](metadata.rb) and in [Gemfile](Gemfile).
A systemd managed distribution: - RHEL Family 7, tested on Centos
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:
- With a static configuration through a list of hostnames (attributes
node['cockroachdb-platform']['hosts']) for nodes belonging to CockroachDB cluster.
- With a real search, performed on a role (attributes
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,
size are ignored
See [roles](test/integration/roles) for some examples and [Cluster Search][cluster-search] documentation for more information.
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](.kitchen.yml) and [test](test) directory.
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.
Search all nodes for the join option.
Create user/group used by CockroachDB.
Install CockroachDB using ark.
Generate options for the CockroachDB node.
Global options for each CockroachDB node in the cluster are defined through
the following attribute:
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
Create systemd service file for CockroachDB.
Available in [CHANGELOG.md](CHANGELOG.md).
Please read carefully [CONTRIBUTING.md](CONTRIBUTING.md) before making a merge request.
License and Author
- Author:: Samuel Bernard (email@example.com)
- Author:: Florian Philippon (firstname.lastname@example.org)
- Author:: Vincent Baret (email@example.com)
Copyright (c) 2016 Sam4Mobile, 2017-2021 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.
|cluster-search >= 0.0.0|
|ark >= 0.0.0|
There are no cookbooks that are contingent upon this one.
- fix: set proper group to systemd unit
- feat: use 19.2.0 as default version
- CockroachDB systemd service should be executed from an local user writable directory in order to start properly and be able to store heap profiles.
- test: make kitchen.yml config file visible
- test: switch to chefplatform image
- fix: add rspec-core to Gemfile
- fix: accept chef license
- chore: set generic maintainer & helpdesk email
- chore: add supermarket category in .category
- chore: set 2021 in copyright notice
- style(rubocop): fix multiple offenses
- add empty line after guard clause
- use e instead of error
- add FrozenStringLiteralComment
- do not use send method mith mix-in
- use %w or %W for an array of words
- disable Style/IfUnlessModifier cop for false positive case
- feat: use 2.0.2 as default version
- Update the init script which may not work anymore for 1.1.x versions, you can just run it manually if you need to bootstrap a new 1.1.x cluster.
- test: replace deprecated require_chef_omnibus
- test: include .gitlab-ci.yml from test-cookbook
- doc: use doc in git message instead of docs
- chore: add 2018 to copyright notice
- fix: default config should use %% for %
- feat: use 1.1.0 as default version
- feat: set production settings as default config
- feat: use 1.1.0 init command, remove initiator
- DROP SUPPORT for 1.0.X
- fix: remove invalid working directory in unit
- feat: use 1.0.6 as default version
- fix(config): wrong guard in node certificates generation
- fix: move certs dir outside symlink dir
- feat: change default directories:
- store: /var/opt/cockroachdb/data (fix for more complicated store)
- certs: /var/opt/cockroachdb/certs (independant from store)
- feat: use journald for logging Set background to false, log-dir to '' and logtostderr to INFO to have journald receiving all the logs. Service is simple instead of fork.
- feat: join all nodes, not just initiator
- feat: create cluster if necessary then join mode
- feat: generate client.root certificate at install
- use .gitlab-ci.yml template 
- replace expired ca cert, rm useless one (node)
- docs: use karma for git format in contributing
- style: minor stylish corrections in attributes
- style(rubocop): fix heredoc delimiters
Fix issues url in metadata.
- 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
- Set always update & build pull for tests
- Use latest template for .gitlab-ci.yml 
- Fix destroy in kitchen tests
- Fix Gemfile for rubocop, add rubocop & foodcritic
- Fix rubocop offenses (%w and %i stuff)
- Initial version, with beta-20161103 support