cookbook 'ndb', '= 0.2.0'
ndb (3) Versions 0.2.0 Follow1
Installs/Configures NDB (MySQL Cluster)
cookbook 'ndb', '= 0.2.0', :supermarket
knife supermarket install ndb
knife supermarket download ndb
Description
Installs and configures a MySQL Cluster, including the management server(s), data nodes, and MySQL Server(s).
Requirements
Chef 0.11+.
Platform
- Ubuntu, centos
Tested on:
* Ubuntu 12.04-14.04
* centos 7.0+
Usage
install gems needed to test chef recipes
bundle installTest recipe syntax and code-style
bundle exec foodcritic .run kitchen to test recipes
kitchen test
Chef-solo usage
On a node that provides both a Management Server and a MySQL Server, use both the mgmd and mysqld recipes:
{ "run_list": ["recipe[ndb::install]", "recipe[ndb::mgmd]", "recipe[ndb::mysqld]" }
This will install and start both a ndb_mgmd and a mysqld daemon on both nodes.
On a node that will provide a data node, run:
{ "run_list": ["recipe[ndb::install]", "recipe[ndb::ndbd]" }
This will install a data node on the host, that is, an ndbd process.
You can override attributes in your node or role.
For example, on an Ubuntu system:
{
"mysql": {
"password": "secret"
}
}
Karamel usage
This cookbook is karamelized (www.karamel.io).
You can launch a MySQL Cluster using the following yml file. It will create 5 VMs on EC2, and install ndb datanodes on 4 VMs, and a management server, a MySQL Server, and a Memcached server on 1 VM.
name: MySqlCluster
cookbooks:
ndb:
github: "hopshadoop/ndb-chef"
version: "v0.1"
groups:
datanodes:
size: 4
recipes:
- ndb::ndbd
server:
size: 1
recipes:
- ndb::mysqld
- ndb::memcached
- ndb::mgmd
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Foodcritic Metric
0.2.0 failed this metric
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/install.rb:24
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/install.rb:164
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mgmd.rb:48
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mgmd.rb:130
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mgmd.rb:136
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:117
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:63
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:200
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:201
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:202
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/memcached.erb:53
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/ndb_mgmd.service.erb:7
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/ndbmtd.service.erb:7
FC005: Avoid repetition of resource declarations: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/purge.rb:16
FC009: Resource attribute not recognised: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:168
FC017: LWRP does not notify when updated: /tmp/cook/11f24252a9560cc6d9730eed/ndb/providers/start.rb:1
FC017: LWRP does not notify when updated: /tmp/cook/11f24252a9560cc6d9730eed/ndb/providers/start.rb:17
FC017: LWRP does not notify when updated: /tmp/cook/11f24252a9560cc6d9730eed/ndb/providers/start.rb:33
FC019: Access node attributes in a consistent manner: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/install.rb:165
FC019: Access node attributes in a consistent manner: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:142
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/memcached.rb:101
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:14
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:46
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:198
FC034: Unused template variables: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/config.ini.erb:1
0.2.0 failed this metric
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/install.rb:164
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mgmd.rb:48
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mgmd.rb:130
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mgmd.rb:136
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:117
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:63
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:200
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:201
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:202
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/memcached.erb:53
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/ndb_mgmd.service.erb:7
FC002: Avoid string interpolation where not required: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/ndbmtd.service.erb:7
FC005: Avoid repetition of resource declarations: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/purge.rb:16
FC009: Resource attribute not recognised: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:168
FC017: LWRP does not notify when updated: /tmp/cook/11f24252a9560cc6d9730eed/ndb/providers/start.rb:1
FC017: LWRP does not notify when updated: /tmp/cook/11f24252a9560cc6d9730eed/ndb/providers/start.rb:17
FC017: LWRP does not notify when updated: /tmp/cook/11f24252a9560cc6d9730eed/ndb/providers/start.rb:33
FC019: Access node attributes in a consistent manner: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/install.rb:165
FC019: Access node attributes in a consistent manner: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/ndbd.rb:142
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/memcached.rb:101
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:14
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:46
FC023: Prefer conditional attributes: /tmp/cook/11f24252a9560cc6d9730eed/ndb/recipes/mysqld.rb:198
FC034: Unused template variables: /tmp/cook/11f24252a9560cc6d9730eed/ndb/templates/default/config.ini.erb:1