cookbook 'galera-platform', '= 3.0.0'
galera-platform (5) Versions 3.0.0 Follow3
Install and configure a Galera Cluster
cookbook 'galera-platform', '= 3.0.0', :supermarket
knife supermarket install galera-platform
knife supermarket download galera-platform
Galera Platform
Description
Galera is a true multi-masters database based on synchronous replication. It is
now an official mode of MariaDB.
This cookbook is designed to install and configure a Galera Cluster using
MariaDB. It can also be used to install a standard MariaDB environment.
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
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](test/integration/roles) for some examples and
[Cluster Search][cluster-search] documentation for more information.
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 4 suites:
- 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](.kitchen.yml) and [test](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 \
'{{.NetworkSettings.Networks.kitchen.IPAddress}}' container_name
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 other recipes, that is:
- repository
- package
- config
- service
repository
Configure YUM repositories.
package
Install MariaDB and MariaDB-backup.
config
Configure MariaDB in Galera mode, searching for other cluster members if
available. By default, cluster bootstrap is done by mariabackup which is
provided by MariaDB.
service
Enable and start services.
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
- Author:: Samuel Bernard (samuel.bernard@gmail.com)
- Author:: Florian Philippon (florian.philippon@gmail.com)
Copyright (c) 2016 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
cluster-search >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Changelog
3.0.0
Main:
- feat: allow generic config, remove percona support
- allow other configuration sections than 'galera' to be configurable
- move 'datadir' in 'mysqld' to fix sync/startup in latest version
- replace xtrabackup by mariabackup (which is better supported by mariadb) and remove percona support
- chore: handover maintenance to make.org
- fix: do not set retries if package_retries is nil (Chef 13)
- refactor: remove templates
Tests:
- test: run tests on all nodes
- test: use kitchen_command.rb from test-cookbook
- test: include .gitlab-ci.yml from test-cookbook
- test: move driver config, set build_pull and replace require_chef_omnibus
Misc:
- chore: set new contributing guide with karma style
- chore: add foodcritic & rubocop in Gemfile
- style: use cookbook_name macro everywhere
- style(rubocop): fix heredoc & misc offenses
- doc: update README on new sync mode
2.0.0
Main:
- Support mariadb 10.2 and do not support older version
- Add auto-restart option: restart if config changes (false by default)
Test:
- Set docker seccomp policy to undefined
- Use template 20160914 of .gitlab-ci.yml
1.0.0
- Initial version for RHEL Family 7 (tested on Centos 7) supporting MariaDB by default (should be able to support MySQL too).
Collaborator Number Metric
3.0.0 passed this metric
Contributing File Metric
3.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
3.0.0 passed this metric
No Binaries Metric
3.0.0 passed this metric
Testing File Metric
3.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
3.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
3.0.0 passed this metric
3.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
3.0.0 passed this metric
No Binaries Metric
3.0.0 passed this metric
Testing File Metric
3.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
3.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
3.0.0 passed this metric
3.0.0 passed this metric
Testing File Metric
3.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
3.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
3.0.0 failed this metric
3.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