Skip to content
Browse files

el_ridiculoso working, working on cookbooks consistency

  • Loading branch information...
1 parent 33c3dbb commit 2bf85755728ed5bd0831608ec2566d0b0c68c5f3 Philip (flip) Kromer committed Feb 20, 2012
Showing with 130 additions and 88 deletions.
  1. +1 −0 .gitignore
  2. +4 −4 Guardfile
  3. +118 −77 clusters/el_ridiculoso.rb
  4. +2 −2 clusters/hadoop_demo.rb
  5. +2 −2 clusters/hbase_demo.rb
  6. +1 −1 notes
  7. 0 vagrants/.gitkeep
  8. +1 −1 vendor/ironfan-pantry
  9. +1 −1 vendor/opscode/cookbooks
View
1 .gitignore
@@ -64,3 +64,4 @@ knife/plugins
.chef
vendor/ironfan-enterprise
+vagrants/*
View
8 Guardfile
@@ -10,13 +10,13 @@
# run the right knife command on changes within the cookbooks, roles and data_bags directories
guard 'chef' do
file_chars = '[\w\-\:\.]+'
- path_chars = '[\w\-\:\.\/]+'
+
# watch files in vendor/foo-pantry/cookbooks/*; act on them if they are
# symlinked into action
- watch(%r{vendor/[^/]+/((?:cookbooks|roles|data_bags)/#{path_chars})}){|m| m[1] if File.exists?(m[1]) }
+ watch(%r{vendor/[^/]+/((?:cookbooks|roles|data_bags)/#{file_chars})}){|m| m[1] if File.exists?(m[1]) }
#
- watch(%r{^[^/]*cookbooks/(#{path_chars})/})
- watch(%r{^data_bags/(#{path_chars})/})
+ watch(%r{^[^/]*cookbooks/(#{file_chars})/})
+ watch(%r{^data_bags/(#{file_chars})/})
watch(%r{^roles/(#{file_chars})\.(rb|json)\z})
watch(%r{^environments/(#{file_chars}\.(rb|json))\z})
end
View
195 clusters/el_ridiculoso.rb
@@ -25,7 +25,7 @@
role :nfs_client
role :volumes
- role :package_set, :last
+ role :package_set
role :minidash, :last
role :org_base
@@ -34,75 +34,104 @@
role :hadoop
role :hadoop_s3_keys
- recipe 'hadoop_cluster::cluster_conf', :last
+ recipe 'hadoop_cluster::config_files', :last
role :tuning, :last
+ recipe 'cloud_utils::pickle_node'
- facet :grande do
+ module ElRidiculoso
+ module_function
+ def master_processes
+ role :cassandra_server
+ # role :elasticsearch_data_esnode
+ # role :elasticsearch_http_esnode
+ role :zookeeper_server
+ role :flume_master
+ role :ganglia_master
+ role :hadoop_namenode
+ role :hadoop_jobtracker
+ role :hadoop_secondarynn
+ role :hbase_master
+ role :redis_server
+ # role :statsd_server
+ # role :mongodb_server
+ # role :mysql_server
+ # role :graphite_server
+ # role :resque_server
+ # These run stuff even though they shouldn't
+ recipe 'apache2'
+ recipe 'nginx'
+ end
+
+ def worker_processes
+ role :hadoop_datanode
+ role :hadoop_tasktracker
+ role :flume_agent
+ role :ganglia_agent
+ role :hbase_regionserver
+ role :hbase_stargate
+ end
+
+ def client_processes
+ role :mysql_client
+ role :redis_client
+ role :cassandra_client
+ role :elasticsearch_client
+ role :nfs_client
+ end
+
+ def simple_installs
+ role :jruby
+ role :pig
+ recipe 'ant'
+ recipe 'bluepill'
+ recipe 'boost'
+ recipe 'build-essential'
+ recipe 'cron'
+ recipe 'git'
+ recipe 'hive'
+ recipe 'java::sun'
+ recipe 'jpackage'
+ recipe 'jruby'
+ recipe 'nodejs'
+ recipe 'ntp'
+ recipe 'openssh'
+ recipe 'openssl'
+ recipe 'rstats'
+ recipe 'runit'
+ recipe 'thrift'
+ recipe 'xfs'
+ recipe 'xml'
+ recipe 'zabbix'
+ recipe 'zlib'
+ end
+ end
+
+ facet :gordo do
+ extend ElRidiculoso
instances 1
- role :cassandra_server
- role :elasticsearch_data_esnode
- role :elasticsearch_http_esnode
- role :zookeeper_server
- role :flume_master
- role :flume_agent
- role :ganglia_master
- role :ganglia_agent
- role :hadoop_namenode
- role :hadoop_datanode
- role :hadoop_jobtracker
- role :hadoop_secondarynn
- role :hadoop_tasktracker
- role :hbase_master
- role :hbase_regionserver
- role :hbase_stargate
- role :redis_server
-
- role :mysql_client
- role :redis_client
- role :cassandra_client
- role :elasticsearch_client
- role :nfs_client
- role :jruby
- role :pig
-
- #
- # more shit to install
- #
- recipe 'ant'
- recipe 'bluepill'
- recipe 'boost'
- recipe 'build-essential'
- recipe 'cron'
- recipe 'git'
- recipe 'hive'
- recipe 'java::sun'
- recipe 'jpackage'
- recipe 'jruby'
- recipe 'nodejs'
- recipe 'ntp'
- recipe 'openssh'
- recipe 'openssl'
- recipe 'rstats'
- recipe 'runit'
- recipe 'thrift'
- recipe 'xfs'
- recipe 'xml'
- recipe 'zabbix'
- recipe 'zlib'
-
- #
- # These run stuff
- #
- recipe 'apache2'
- recipe 'nginx'
-
- # role :statsd_server
- # role :mongodb_server
- # role :mysql_server
- # role :graphite_server
- # role :resque_server
+ # master_processes
+ # worker_processes
+ # client_processes
+ # simple_installs
+ end
+
+ facet :jefe do
+ extend ElRidiculoso
+ instances 1
+
+ master_processes
+ simple_installs
+ end
+
+ # Runs worker processes and client packages
+ facet :bobo do
+ extend ElRidiculoso
+ instances 1
+ worker_processes
+ client_processes
+ simple_installs
end
cluster_role.override_attributes({
@@ -111,19 +140,20 @@
},
})
- facet(:grande).facet_role.override_attributes({
- :cassandra => {
+ cluster_role.override_attributes({
+ :apache => {
:server => { :run_state => :stop }, },
- :minidash => {
- :dashboard => { :run_state => :stop }, },
- :elasticsearch => {
+ :cassandra => { :run_state => :stop },
+ :chef => {
+ :client => { :run_state => :stop },
:server => { :run_state => :stop }, },
+ :elasticsearch => { :run_state => :stop },
:flume => {
:master => { :run_state => :stop },
:node => { :run_state => :stop }, },
:ganglia => {
- :server => { :run_state => :stop },
- :monitor => { :run_state => :stop }, },
+ :agent => { :run_state => :stop },
+ :server => { :run_state => :stop }, },
:graphite => {
:carbon => { :run_state => :stop },
:whisper => { :run_state => :stop },
@@ -133,23 +163,34 @@
:secondarynn => { :run_state => :stop },
:jobtracker => { :run_state => :stop },
:datanode => { :run_state => :stop },
- :tasktracker => { :run_state => :stop }, },
+ :tasktracker => { :run_state => :stop },
+ :hdfs_fuse => { :run_state => :stop }, },
:hbase => {
:master => { :run_state => :stop },
:regionserver => { :run_state => :stop },
+ :thrift => { :run_state => :stop },
:stargate => { :run_state => :stop }, },
+ :jenkins => {
+ :server => { :run_state => :stop },
+ :worker => { :run_state => :stop }, },
+ :minidash => { :run_state => :stop },
:mongodb => {
:server => { :run_state => :stop }, },
:mysql => {
:server => { :run_state => :stop }, },
+ :nginx => {
+ :server => { :run_state => :stop }, },
:redis => {
:server => { :run_state => :stop }, },
:resque => {
- :server => { :run_state => :stop }, },
- :statsd => {
- :server => { :run_state => :stop }, },
+ :redis => { :run_state => :stop },
+ :dashboard => { :run_state => :stop }, },
+ :statsd => { :run_state => :stop },
+ :zabbix => {
+ :agent => { :run_state => :stop },
+ :master => { :run_state => :stop }, },
:zookeeper => {
:server => { :run_state => :stop }, },
- })
+ })
end
View
4 clusters/hadoop_demo.rb
@@ -39,7 +39,7 @@
role :tuning
role :jruby
role :pig
- recipe 'hadoop_cluster::cluster_conf', :last
+ recipe 'hadoop_cluster::config_files', :last
facet :master do
instances 1
@@ -75,7 +75,7 @@
# Launch the cluster with all of the below set to 'stop'.
#
# After initial bootstrap,
- # * set the run_state to 'start' in the lines below
+ # * set the run_state to :start in the lines below
# * run `knife cluster sync hadoop_demo-master` to push those values up to chef
# * run `knife cluster kick hadoop_demo-master` to re-converge
#
View
4 clusters/hbase_demo.rb
@@ -4,7 +4,7 @@
# run `/etc/hadoop/boostrap_hadoop_namenode.sh`.
#
# After initial bootstrap,
-# * set the run_state to 'start' in the lines below
+# * set the run_state to :start in the lines below
# * run `knife cluster sync bonobo-master` to push those values up to chef
# * run `knife cluster kick bonobo-master` to re-converge
#
@@ -73,7 +73,7 @@ def hbase_facet(*components, &block)
role :tuning
role :jruby
role :pig
- recipe 'hadoop_cluster::cluster_conf', :last
+ recipe 'hadoop_cluster::config_files', :last
recipe 'hbase::config', :last
[:nn, :jt, :nn2, :tt, :dn, :hm, :hm2, :rs, :hbth, :hbsg, :zk ]
2 notes
@@ -1 +1 @@
-Subproject commit 7838faf8afbb9ee6b6314ecc3366ba6eb27aeeac
+Subproject commit edcd87de2d987ab66743174f18ab2eaa3bab55b0
View
0 vagrants/.gitkeep
No changes.
2 vendor/ironfan-pantry
@@ -1 +1 @@
-Subproject commit b9fc496f3043c30313115dcd7d14af4156adff68
+Subproject commit aa7ef2b3305741d75a438ea6f231019365c3b3c2
2 vendor/opscode/cookbooks
@@ -1 +1 @@
-Subproject commit 434267cc113bbc18a3d5603bb9cbd3e73749185c
+Subproject commit 5bde75c0dffa99d3566ba0bf36fc8863230eb35f

0 comments on commit 2bf8575

Please sign in to comment.
Something went wrong with that request. Please try again.