-
Notifications
You must be signed in to change notification settings - Fork 4
/
metadata.json
247 lines (217 loc) · 13.3 KB
/
metadata.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
{
"dependencies": {
"apt": ">= 0.0.0"
},
"name": "cassandra",
"maintainer_email": "[email protected]",
"attributes": {
"cassandra/commitlog_dir": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "/var/lib",
"type": "string",
"recipes": [
],
"display_name": "Cassandra Commit Log Directory",
"description": "The location for the commit log (preferably on it's own drive or RAID0 device)"
},
"cassandra/token_position": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "false",
"type": "string",
"recipes": [
],
"display_name": "Cassandra Initial Token Position",
"description": "For use when adding a node that may have previously failed or been destroyed"
},
"cassandra/data_dir": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "/var/lib",
"type": "string",
"recipes": [
],
"display_name": "Cassandra Data Directory",
"description": "The location for the data directory (preferably on it's own drive or RAID0 device)"
},
"cassandra/initial_token": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "false",
"type": "string",
"recipes": [
],
"display_name": "Cassandra Initial Token",
"description": "The standard initial token"
},
"cassandra/cluster_name": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "Cassandra Cluster",
"type": "string",
"recipes": [
],
"display_name": "Cassandra Cluster Name",
"description": "Keeps clusters together, not allowing servers from other clusters to talk"
},
"setup/current_role": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "cassandra",
"type": "string",
"recipes": [
],
"display_name": "Current Role Being Assigned",
"description": "The role that the cluster is being assigned"
},
"setup/deployment": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "08x",
"type": "string",
"recipes": [
],
"display_name": "Deployment Version",
"description": "The deployment version for Cassandra. Choices are '07x', or '08x'"
},
"cassandra/seed": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "false",
"type": "string",
"recipes": [
],
"display_name": "Cassandra Seed Server",
"description": "The comma seperated list of seeds (Make sure to include one seed from each datacenter minimum)"
},
"setup/cluster_size": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "4",
"type": "string",
"recipes": [
],
"display_name": "Cluster Size",
"description": "Total number of nodes in the cluster"
},
"cassandra/confPath": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "/etc/cassandra/",
"type": "string",
"recipes": [
],
"display_name": "Cassandra Settings Path",
"description": "The path for cassandra.yaml and cassandra-env.sh"
},
"internal/prime": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "true",
"type": "string",
"recipes": [
],
"display_name": "Internal Hash Primer",
"description": "Primes a datastore for internal use only"
},
"setup": {
"required": "optional",
"calculated": false,
"choice": [
],
"type": "hash",
"recipes": [
],
"display_name": "Setup Configurations",
"description": "Hash of Setup Configurations"
},
"internal": {
"required": "optional",
"calculated": false,
"choice": [
],
"type": "hash",
"recipes": [
],
"display_name": "Internal Hash",
"description": "Hash of Internal attributes"
},
"cassandra/rpc_address": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "false",
"type": "string",
"recipes": [
],
"display_name": "Cassandra RPC Address",
"description": "The address to bind the Thrift RPC service to (False sets RPC Address to the private IP)"
},
"cassandra": {
"required": "optional",
"calculated": false,
"choice": [
],
"type": "hash",
"recipes": [
],
"display_name": "Cassandra",
"description": "Hash of Cassandra attributes"
}
},
"license": "Apache License",
"suggestions": {
},
"platforms": {
},
"maintainer": "DataStax",
"long_description": "= DESCRIPTION:\n\nThis script launches a Apache Cassandra cluster of a predetermined size.\n\nThis has been tested in Ubuntu 10.10 and CentOS 5.5, but should support your version of Ubuntu, CentOS, and RedHat.\n\nThis script will be developed and housed at: https://github.com/riptano/chef.\n\n= REQUIREMENTS:\n\nFollow the instructions as listed here: http://wiki.opscode.com/display/chef/Quick+Start.\n\n== Configure cloud access\n\nProceed to configure your cloud access by adding these following lines to your ~/.chef/knife.rb file.\n\n # Information can be found at: https://manage.rackspacecloud.com/APIAccess.do\n knife[:rackspace_api_username] = \"USER\"\n knife[:rackspace_api_key] = \"KEY\"\n\n # Information can be found at: https://aws-portal.amazon.com/gp/aws/developer/account?ie=UTF8&action=access-key\n knife[:aws_access_key_id] = \"ID\"\n knife[:aws_secret_access_key] = \"KEY\"\n\nPlace this directory into your cookbooks folder.\n\nDownload and place the apt cookbook in your cookbooks folder. \nThe apt cookbook can be found here: http://community.opscode.com/cookbooks/apt.\n\nThen run:\n\n knife cookbook upload -a -o cookbooks/\n\nYou should see something similar to:\n\n Uploading apt [1.1.2]\n Uploading cassandra [0.1.4]\n Uploading chef-client [0.99.5]\n upload complete\n\n= ATTRIBUTES:\n\nThe main attributes to look can be found at $CHEF_HOME/cookbooks/cassandra/attributes/default.rb and are:\n\n # Needed for the Chef script to function properly\n default[:setup][:deployment] = \"08x\" # Choices are \"07x\", or \"08x\"\n default[:setup][:cluster_size] = 4\n default[:setup][:current_role] = \"cassandra\"\n\n # A unique name is preferred to stop the risk of different clusters joining each other\n default[:cassandra][:cluster_name] = \"Cassandra Cluster\"\n\n # It is best to have the commit log and the data\n # directory on two seperate drives\n default[:cassandra][:commitlog_dir] = \"/var/lib\"\n default[:cassandra][:data_dir] = \"/var/lib\"\n\nFor more information, look over $CHEF_HOME/cookbooks/cassandra/metadata.rb.\n\nTo obtain a free OpsCenter license, please visit: http://www.datastax.com/opscenter.\n\nAfter properly configuring the attributes, upload the cookbook files again by running:\n\n knife cookbook upload -a -o cookbooks/\n\n= USAGE:\n\n== Configure roles\n\nRun this line from your default chef folder:\n\n knife role create cassandra\n\nwhere \"cassandra\" is the value declared as default[:setup][:current_role]. Edit the file to look very similar to this:\n\n {\n \"name\": \"cassandra\",\n \"default_attributes\": {\n },\n \"json_class\": \"Chef::Role\",\n \"env_run_lists\": {\n },\n \"run_list\": [\n \"recipe[cassandra]\" # This is the line of importance\n ],\n \"description\": \"\",\n \"chef_type\": \"role\",\n \"override_attributes\": {\n }\n }\n\nThis means that the role, that you can assign to many machines, will run this recipe upon assignment and will be bound within a group for easy clustering.\n\n== Ports Needed\n\nThe list of the ports required to be open are as follows:\n\n Public Facing:\n Cassandra:\n 9160: Cassandra client port\n 7199: Cassandra JMX port, (8080 in 07x)\n Internal:\n Cassandra:\n 7000: Cassandra intra-node port\n\n== Starting up a cluster\n\nAn Ubuntu 10.10 cloud in Rackspace (login as root):\n\n knife rackspace server create -r \"role[cassandra]\" -I 69 -f 6 -S Server01 -N Server01\n knife rackspace server create -r \"role[cassandra]\" -I 69 -f 6 -S Server02 -N Server02\n knife rackspace server create -r \"role[cassandra]\" -I 69 -f 6 -S Server03 -N Server03\n knife rackspace server create -r \"role[cassandra]\" -I 69 -f 6 -S Server04 -N Server04\n\nAn Ubuntu 10.10 cloud in EC2 (login as ubuntu):\n\n pemname=<pemFileName> # do not include \".pem\"\n group=<securityGroupName>\n knife ec2 server create -r \"role[cassandra]\" -I ami-08f40561 --flavor m1.large -S $pemname -G $group -x ubuntu -N Server01\n knife ec2 server create -r \"role[cassandra]\" -I ami-08f40561 --flavor m1.large -S $pemname -G $group -x ubuntu -N Server02\n knife ec2 server create -r \"role[cassandra]\" -I ami-08f40561 --flavor m1.large -S $pemname -G $group -x ubuntu -N Server03\n knife ec2 server create -r \"role[cassandra]\" -I ami-08f40561 --flavor m1.large -S $pemname -G $group -x ubuntu -N Server04\n\nNOTE: These AMIs only work in the US-East region. For all other regions, see http://cloud.ubuntu.com/ami/.\n\nA Debian 6.0 (Squeeze) cloud in Rackspace (login as root):\n\n knife rackspace server create -r \"role[cassandra]\" -I 75 -f 6 -S Server01 -N Server01\n knife rackspace server create -r \"role[cassandra]\" -I 75 -f 6 -S Server02 -N Server02\n knife rackspace server create -r \"role[cassandra]\" -I 75 -f 6 -S Server03 -N Server03\n knife rackspace server create -r \"role[cassandra]\" -I 75 -f 6 -S Server04 -N Server04\n\nA CentOS 5.5 cloud in Rackspace (login as root):\n\n knife rackspace server create -r \"role[cassandra]\" -I 51 -f 6 -d centos5-gems -S Server01 -N Server01\n knife rackspace server create -r \"role[cassandra]\" -I 51 -f 6 -d centos5-gems -S Server02 -N Server02\n knife rackspace server create -r \"role[cassandra]\" -I 51 -f 6 -d centos5-gems -S Server03 -N Server03\n knife rackspace server create -r \"role[cassandra]\" -I 51 -f 6 -d centos5-gems -S Server04 -N Server04\n\nNOTE: You can run these lines more times as long as the attributes are set properly. Also, these lines should be run consecutively and never in parallel.\n\nKeep in mind that these commands start up ONE cluster. By running these same four commands repeatedly, you will keep manipulating the same logical cluster of nodes which may serve unintended results. To create different clusters, either create new roles or remove the previous nodes from OpsCodes's Managment Console (https://manage.opscode.com/nodes). This is due to the fact that these scripts need to know the end size that Cassandra will grow to become to evenly parse the ring.\n\nIf you wish to add more nodes to the same cluster, however, then simply change ([:cassandra][:token_position] or [:cassandra][:initial_token]) and [:setup][:cluster_size].\n\n== Bootstrapping Commands\n\nIn order to run bootstrapping commands, you must be able to complete a passwordless SSH login. Typically, by copying your ~/.ssh/id_rsa.pub key into the target machine's ~/.ssh/authorized_keys file, passwordless SSH should work. Search google for more information.\n\nFor an Ubuntu/Debian Machine:\n\n knife bootstrap -r recipe['cassandra'] --sudo -x root <publicDNS>\n\nFor an Ubuntu Machine on EC2:\n\n knife bootstrap -r recipe['cassandra'] --sudo -x ubuntu <publicDNS>\n\nFor a CentOS 5 Machine:\n\n knife bootstrap -r \"recipe['cassandra']\" --sudo -x root -d centos5-gems <publicDNS>\n\nFor a RedHat 5 Machine (Untested):\n\n wget http://goo.gl/0k8mV -O- > ~/.chef/bootstrap/rhel5-rbel.erb\n knife bootstrap --sudo -x root -d rhel5-rbel <publicDNS>\n knife bootstrap -r recipe['cassandra'] --sudo -x root -d rhel5-rbel <publicDNS>\n\n\n== Other Useful Debugging Commands\n\n knife node show Server01 --format json\n knife cookbook metadata cassandra -o cookbooks\n \n",
"version": "0.1.4",
"recommendations": {
},
"recipes": {
"cassandra::restart_service": "Restarts the Cassandra service.",
"cassandra::setup_repos": "Sets up the Apache Cassandra and DataStax Repos.",
"cassandra::default": "Runs the full list of scripts needed.",
"cassandra::optional_packages": "Installs extra tools for Cassandra maintenance.",
"cassandra::token_generation": "Generates the token positions for the cluster.",
"cassandra::additional_settings": "Additional settings for optimal performance for the cluster.",
"cassandra::install": "Installs the actual Cassandra package.",
"cassandra::write_configs": "Writes the configurations for Cassandra.",
"cassandra::required_packages": "Installs required packages, primarily sun-java-sdk.",
"cassandra::create_seed_list": "Generates the seed lists for the cluster."
},
"groupings": {
},
"conflicting": {
},
"replacing": {
},
"description": "Install and configure Cassandra in a multi-node environment",
"providing": {
}
}