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
3 comments
Thanks for updating a valuable content like this. Keep update regularly.
To get started, you'll need to configure two data bags:
databags/agent/hosts.json
(which lists the hosts for the agents) anddatabags/controller/config.json
(which holds the configuration for the controller).The cookbook also includes default attributes for the MySQL configuration of both the controller and agent, and various recipes for installing and configuring the required components on the nodes (such as
cmon::agent
,cmon::controller
, andcmon::web
).Make sure to adjust these data bags and attributes to suit your specific environment and requirements.
I think you need to configure you'll need to configure two data bags:
databags/agent/hosts.json
i also faced the same issue while coding for an app called. after reading the discussion comments i got it resolved. More
Please sign in to leave a comment.