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


galera-platform (2) Versions 2.0.0

Install and configure a Galera Cluster

cookbook 'galera-platform', '~> 2.0.0'
cookbook 'galera-platform', '~> 2.0.0', :supermarket
knife cookbook site install galera-platform
knife cookbook site download galera-platform
Quality 44%

Galera Platform


Galera Cluster is a true Multimaster Cluster based on synchronous replication.

This cookbook is designed to install and configure a Galera Cluster using MariaDB (by default) as DB backend.


Cookbooks and gems

Declared in metadata.rb and in Gemfile.


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


First Setup

The recommended way to use this cookbook is through the creation of a role per galera 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 ['galera-platform']['hosts']) 2. with a real search, performed on a role (attributes role and size like in ['galera-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 in the cluster.

If hosts is configured, role and size are ignored

See roles for some examples and [Cluster Search][cluster-search] documentation for more information.


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 4 suites:

  • zookeeper-centos-7
  • galera-platform-1-centos-7
  • galera-platform-2-centos-7
  • galera-platform-3-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 and test directory.

Local cluster

The cluster installed with kitchen converge is fully working and can thus be used as a local cluster for developments tests.

You can access it by using internal DNS of the docker network named kitchen or by declaring each node in your hosts file. You can get each IP by running:

docker inspect --format \
  '{{}}' container_name


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.



Include other recipes, that is:

  1. repository
  2. package
  3. config
  4. percona (if sst method is set to xtrabackup)
  5. service


Configure YUM repositories.


Install galera and MariaDB.


Configure galera and MariaDB, searching for other cluster members if available.


Install Percona xtrabackup if sst method is set to xtrabackup


Enable and start services.




Available in


Please read carefully before making a merge request.

License and Author

Copyright (c) 2016 Sam4Mobile

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

yum >= 0.0.0
cluster-search >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.




  • Support mariadb 10.2 and do not support older version
  • Add auto-restart option: restart if config changes (false by default)


  • Set docker seccomp policy to undefined
  • Use template 20160914 of .gitlab-ci.yml


  • Initial version for RHEL Family 7 (tested on Centos 7) supporting MariaDB by default (should be able to support MySQL too).

Collaborator Number Metric

2.0.0 failed this metric

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

Contributing File Metric

2.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, and your repo must contain a file

Foodcritic Metric

2.0.0 failed this metric

FC066: Ensure chef_version is set in metadata: galera-platform/metadata.rb:1
FC069: Ensure standardized license defined in metadata: galera-platform/metadata.rb:1
Run with Foodcritic Version 12.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric

2.0.0 passed this metric

No Binaries Metric

2.0.0 passed this metric

Publish Metric

2.0.0 passed this metric

Supported Platforms Metric

2.0.0 passed this metric

Testing File Metric

2.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, and your repo must contain a file

Version Tag Metric

2.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, and your repo must include a tag that matches this cookbook version number