Where can I get the ClusterControl Cookbook?
https://github.com/severalnines/S9s_cookbooks
This is a work in progress and it's only been tested on Ubuntu with Chef-solo v0.10.8 however it should work with the Chef client/server as well.
Data Bags
In order for the recipes work you need to edit two data bags initially to set up correct hosts.
databags/agent/hosts.json
----------------
{
"id": "config",
"hosts": [
"192.168.122.12",
"192.168.122.14",
"192.168.122.16"]
}
Used by the controller recipe to add agent hosts to its grant table.
databags/controller/config.json
----------------------
{
"id": "config",
"host_ipaddress": "192.168.122.84",
"cmon_package_x86_64": "cmon-1.1.25-64bit-glibc23-mc70",
"cmon_package_i686": "cmon-1.1.25-32bit-glibc23-mc70"
}
Used by both controller and agent recipes. host_ipaddress is the cmon controller host which is required for agents.
Default Attributes
- cmon['remote']['mysql_user'] - cmon controller MySQL user (cmon)
- cmon['remote']['mysql_hostname'] - cmon controller MySQL hostname (nnn)
- cmon['remote']['mysql_password'] - cmon controller MySQL user's password (cmon)
- cmon['remote']['mysql_port'] - cmon controller MySQL port (3306)
- cmon['cmon_password'] = cmon controller user's password (cmon)
- cmon['mode']['agent'] = run as agent
- cmon['mode']['controller'] = run as controller
- cmon['mode']['dual'] = run in dual mode, i.e., both as controller and agent
- cmon['local']['mysql_user'] - MySQ local user (root)
- cmon['local']['mysql_hostname'] - MySQL local hostname (nnn)
- cmon['local']['mysql_password'] - MySQL local user's password (cmom)
- cmon['local']['mysql_port'] - MySQL local port (3306)
and others please see attributes/default.rb
Recipes
On agent nodes,
include_recipe "cmon::agent_packages" (optional)
include_recipe "cmon::agent"
This will install the cmon agent and its requried packages on the node.
On controller only nodes,
include_recipe "cmon::controller_packages" (optional)
include_recipe "cmon::controller"
This will install the cmon controller and its requried packages on the node. A cmon user
and its grants will be automatically created using the generated
/usr/local/cmon/sql/cmon_controller_grants.sql file.
On the cmon web application node,
include_recipe "cmon::web_packages" (optional)
include_recipe "cmon::web"
include_recipe "cmon::controller_packages" (optional)
include_recipe "cmon::controller" (optional)
This will install the cmon web application and its requried packages on the node.
Running with Chef-Solo
$ chef-solo -c solo.rb -j solo.json
Comments
1 comment
Thanks for updating a valuable content like this. Keep update regularly.
Please sign in to leave a comment.