Skip to content
Browse files

Merge pull request #8 from khudgins/cf

We're going to bring this into the CF branch for review.  I'm doing an ISO build for testing that will be posted to http://crowbar.zehicle.com/cloudfoundry-110825.iso
  • Loading branch information...
2 parents 4621faf + 71b0cf0 commit eeeaf5185c9308c734d1da76a5ced88ae599ac6d @ravolt ravolt committed Aug 25, 2011
Showing with 2,999 additions and 336 deletions.
  1. +37 −2 build_crowbar.sh
  2. BIN change-image/dell/barclamps/.DS_Store
  3. +34 −0 change-image/dell/barclamps/cloudfoundry/README.txt
  4. +1 −0 change-image/dell/barclamps/cloudfoundry/app/controllers/cloudfoundry_controller.rb
  5. +8 −7 change-image/dell/barclamps/cloudfoundry/app/models/cloudfoundry_service.rb
  6. +0 −2 change-image/dell/barclamps/cloudfoundry/app/views/barclamp/_cloudfoundry_edit_attributes.html.haml
  7. +2 −0 change-image/dell/barclamps/cloudfoundry/app/views/barclamp/_cloudfoundry_edit_deployment.html.haml
  8. +5 −5 change-image/dell/barclamps/cloudfoundry/barclamp-cloudfoundry.spec
  9. +0 −1 change-image/dell/barclamps/cloudfoundry/build_deb.sh
  10. 0 change-image/dell/barclamps/cloudfoundry/build_rpm.sh
  11. BIN change-image/dell/barclamps/cloudfoundry/chef/.DS_Store
  12. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/README.rdoc
  13. +19 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/attributes/default.rb
  14. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/metadata.json
  15. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/metadata.rb
  16. +41 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/recipes/default.rb
  17. +101 −0 ...barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/cloud_controller.yml.erb
  18. +20 −0 ...mage/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/grails.yml.erb
  19. +18 −0 ...-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/lift.yml.erb
  20. +12 −0 ...-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/node.yml.erb
  21. +12 −0 ...e/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/otp_rebar.yml.erb
  22. +3 −0 ...ge/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/platform.yml.erb
  23. +33 −0 ...mage/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/rails3.yml.erb
  24. +35 −0 ...age/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/sinatra.yml.erb
  25. +20 −0 ...mage/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/spring.yml.erb
  26. +0 −28 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/README.me
  27. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/README.rdoc
  28. +9 −25 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/attributes/default.rb
  29. +0 −17 ...image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/definitions/cloudfoundry_service.rb
  30. +14 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/libraries/cloudfoundry.rb
  31. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/metadata.json
  32. +5 −7 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/metadata.rb
  33. +0 −12 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/api.rb
  34. +0 −131 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/common.rb
  35. +42 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/default.rb
  36. +0 −40 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/monitor.rb
  37. +0 −20 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/setup.rb
  38. +0 −10 ...e/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/templates/default/cloudfoundry.conf.erb
  39. +0 −9 ...ll/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/templates/default/cloudfoundry_nrpe.cfg.erb
  40. +84 −0 ...e-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/templates/default/deploy.json.erb
  41. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/README.rdoc
  42. +10 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/attributes/default.rb
  43. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/metadata.json
  44. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/metadata.rb
  45. +19 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/recipes/default.rb
  46. +50 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/templates/default/dea.yml.erb
  47. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/README.rdoc
  48. +9 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/attributes/default.rb
  49. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/metadata.json
  50. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/metadata.rb
  51. +39 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/recipes/default.rb
  52. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/README.rdoc
  53. +11 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/attributes/default.rb
  54. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/metadata.json
  55. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/metadata.rb
  56. +71 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/recipes/default.rb
  57. +27 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/templates/default/sudoers.erb
  58. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/README.rdoc
  59. +10 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/attributes/default.rb
  60. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/metadata.json
  61. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/metadata.rb
  62. +14 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/recipes/default.rb
  63. +33 −0 ...ell/barclamps/cloudfoundry/chef/cookbooks/health_manager/templates/default/health_manager.yml.erb
  64. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/README.rdoc
  65. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/metadata.json
  66. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/metadata.rb
  67. +30 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/recipes/default.rb
  68. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/README.rdoc
  69. +9 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/attributes/default.rb
  70. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/metadata.json
  71. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/metadata.rb
  72. +33 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/recipes/default.rb
  73. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mysql/README.rdoc
  74. +2 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mysql/attributes/default.rb
  75. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mysql/metadata.json
  76. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mysql/metadata.rb
  77. +14 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mysql/recipes/default.rb
  78. +33 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mysql/recipes/server.rb
  79. +131 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mysql/templates/default/ubuntu.cnf.erb
  80. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nats-server/README.rdoc
  81. +13 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nats-server/attributes/default.rb
  82. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nats-server/metadata.json
  83. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nats-server/metadata.rb
  84. +47 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nats-server/recipes/default.rb
  85. +126 −0 ...ge-image/dell/barclamps/cloudfoundry/chef/cookbooks/nats-server/templates/default/nats-server.erb
  86. +11 −0 ...mage/dell/barclamps/cloudfoundry/chef/cookbooks/nats-server/templates/default/nats-server.yml.erb
  87. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nginx/README.rdoc
  88. +9 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nginx/attributes/default.rb
  89. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nginx/metadata.json
  90. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nginx/metadata.rb
  91. +37 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nginx/recipes/default.rb
  92. BIN change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nginx/templates/default/.nginx.conf.erb.swo
  93. +65 −0 ...ge-image/dell/barclamps/cloudfoundry/chef/cookbooks/nginx/templates/default/ubuntu-nginx.conf.erb
  94. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nodejs/README.rdoc
  95. +9 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nodejs/attributes/default.rb
  96. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nodejs/metadata.json
  97. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nodejs/metadata.rb
  98. +43 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/nodejs/recipes/default.rb
  99. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/postgresql/README.rdoc
  100. +3 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/postgresql/attributes/default.rb
  101. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/postgresql/metadata.json
  102. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/postgresql/metadata.rb
  103. +18 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/postgresql/recipes/default.rb
  104. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/rabbitmq/README.rdoc
  105. +3 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/rabbitmq/attributes/default.rb
  106. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/rabbitmq/metadata.json
  107. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/rabbitmq/metadata.rb
  108. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/rabbitmq/recipes/default.rb
  109. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/redis/README.rdoc
  110. +11 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/redis/attributes/default.rb
  111. +32 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/redis/metadata.json
  112. +9 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/redis/metadata.rb
  113. +43 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/redis/recipes/default.rb
  114. +12 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/redis/templates/default/redis.conf.erb
  115. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/router/README.rdoc
  116. +7 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/router/attributes/default.rb
  117. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/router/metadata.json
  118. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/router/metadata.rb
  119. +14 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/router/recipes/default.rb
  120. +7 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/router/templates/default/router.yml.erb
  121. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/ruby/README.rdoc
  122. +12 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/ruby/attributes/default.rb
  123. +13 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/ruby/attributes/ruby18.rb
  124. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/ruby/metadata.json
  125. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/ruby/metadata.rb
  126. +78 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/ruby/recipes/default.rb
  127. +86 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/ruby/recipes/ruby18.rb
  128. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/README.rdoc
  129. +31 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/attributes/default.rb
  130. +4 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/attributes/tokens.rb
  131. +29 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/metadata.json
  132. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/metadata.rb
  133. +20 −0 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/recipes/default.rb
  134. +8 −0 ...mage/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/mongodb_backup.yml.erb
  135. +15 −0 ...age/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/mongodb_gateway.yml.erb
  136. +16 −0 ...-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/mongodb_node.yml.erb
  137. +13 −0 ...-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/mysql_backup.yml.erb
  138. +16 −0 ...image/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/mysql_gateway.yml.erb
  139. +22 −0 ...ge-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/mysql_node.yml.erb
  140. +6 −0 ...e/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/postgresql_backup.yml.erb
  141. +14 −0 .../dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/postgresql_gateway.yml.erb
  142. +19 −0 ...age/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/postgresql_node.yml.erb
  143. +5 −0 ...-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/redis_backup.yml.erb
  144. +15 −0 ...image/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/redis_gateway.yml.erb
  145. +17 −0 ...ge-image/dell/barclamps/cloudfoundry/chef/cookbooks/services/templates/default/redis_node.yml.erb
  146. BIN change-image/dell/barclamps/cloudfoundry/chef/data_bags/.DS_Store
  147. +4 −5 change-image/dell/barclamps/cloudfoundry/chef/data_bags/crowbar/bc-template-cloudfoundry.json
  148. +1 −1 change-image/dell/barclamps/cloudfoundry/chef/data_bags/crowbar/bc-template-cloudfoundry.schema
  149. BIN change-image/dell/barclamps/cloudfoundry/chef/roles/.DS_Store
  150. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/ccdb.rb
  151. +76 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/cfbase.rb
  152. +11 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/cloud_controller.rb
  153. +0 −10 change-image/dell/barclamps/cloudfoundry/chef/roles/cloudfoundry-server.rb
  154. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/cloudfoundry.rb
  155. +10 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/dea.rb
  156. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/health_manager.rb
  157. +7 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/mongodb.rb
  158. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/mysql.rb
  159. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/nats.rb
  160. +7 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/postgresql.rb
  161. +8 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/redis.rb
  162. +7 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/router.rb
  163. +6 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/ruby.rb
  164. +7 −0 change-image/dell/barclamps/cloudfoundry/chef/roles/services.rb
  165. 0 change-image/dell/barclamps/cloudfoundry/command_line/crowbar_cloudfoundry
  166. +21 −0 change-image/dell/barclamps/cloudfoundry/crowbar_cloudfoundry
  167. +1 −1 change-image/dell/barclamps/cloudfoundry/version.sh
  168. 0 change-image/dell/barclamps/{cloudfoundry → }/debian/changelog.tmpl
  169. 0 change-image/dell/barclamps/{cloudfoundry → }/debian/compat
  170. +1 −1 change-image/dell/barclamps/{cloudfoundry → }/debian/control
  171. +1 −1 change-image/dell/barclamps/{cloudfoundry → }/debian/copyright
  172. 0 change-image/dell/barclamps/{cloudfoundry → }/debian/postinst
  173. 0 change-image/dell/barclamps/{cloudfoundry → }/debian/rules
  174. 0 change-image/dell/barclamps/{cloudfoundry → }/debian/source/format
  175. +1 −1 change-image/dell/openstack_manager/Rakefile
  176. +3 −0 ubuntu-10.10-extra/packages/base.list
View
39 build_crowbar.sh
@@ -63,8 +63,43 @@ VCS_CLEAN_CMD='git clean -f -x -d'
# Arrays holding the additional pkgs, gems, and AMI images we will populate
# Crowbar with.
-PKGS=()
-GEMS=()
+PKGS=("apt-utils",
+"wget",
+"curl",
+"libcurl3",
+"bison",
+"build-essential",
+"zlib1g-dev",
+"libssl-dev",
+"libreadline5-dev",
+"libxml2",
+"libxml2-dev",
+"libxslt1.1",
+"libxslt1-dev",
+"git-core",
+"sqlite3",
+"libsqlite3-ruby",
+"libsqlite3-dev",
+"unzip",
+"zip",
+"ruby-dev",
+"libmysql-ruby",
+"libmysqlclient-dev",
+"libcurl4-openssl-dev",
+"libpq-dev",
+"python-software-properties",
+"mysql-client",
+"mysql-server",
+"build-essential",
+"libssl-dev",
+"zlib1g-dev",
+"libreadline5-dev",
+"libxml2-dev",
+"libpq-dev",
+"postgresql",
+"erlang-nox",
+"libreadline5-dev")
+GEMS=("vmc", "nats", "bundler", "rake")
AMIS=("http://uec-images.ubuntu.com/releases/11.04/release/ubuntu-11.04-server-uec-amd64.tar.gz")
View
BIN change-image/dell/barclamps/.DS_Store
Binary file not shown.
View
34 change-image/dell/barclamps/cloudfoundry/README.txt
@@ -0,0 +1,34 @@
+8/24/2011 Keith Hudgins - keith@dtosolutions.com
+
+This barclamp is a translation of the Cloud Foundry chef-solo recipes provided by VMWare that are used by their development-environment installer. I've had to do quite a bit of work to get the cookbooks running both in a chef-client environment and to slide through the crowbar server as it's prepping transitions for your client nodes.
+
+What you get:
+
+Apply this barclamp to an empty node and you'll get a Cloud Foundry development box. Log in as the openstack user and you'll have the CF install in ~/.cloudfoundry.
+
+To start the environment, just do this:
+
+cd ./cloudfoundry/vcap/devbox/vcap/dev_setup/bin
+./vcap_dev start
+
+You may have to run this twice, the cloud_controller rails app doesn't always start the first time it's run.
+
+Once that's going, you can deploy your applications into the environment using vmc push. Just follow along with the VMWare documentation at http://cloudfoundry.org.
+
+Limitations and known issues:
+
+This is a development environment built against (at the time I'm writing this) 3-week old installer on a fast-moving product. Don't expect this (yet) to have the latest and greatest stuff from Cloud Foundry. If you need something added in here, dive in and contribute!
+
+* Currently, this isn't packaged up neatly for install directly inside a Crowbar iso. You'll have to install the barclamp manually inside the iso. The instructions to do so are here:
+http://kb.dtosolutions.com/wiki/Deploying_the_cloudfoundry_barclamp
+
+* The cookbooks take two passes to converge properly. You can wait until chef-client runs a second time or speed this up by logging into the instance once it's built, and running 'sudo chef-client' manually.
+
+* Node.js is installed in a strange place. Seems to work, though. (Please test!)
+
+* The barclamp isn't configurable. I'm using the example templates for the UI, which are an UGLY yellow and have a useless option. Please ignore.
+
+Questions should probably be directed to the crowbar listserv, which you can join at:
+https://lists.us.dell.com/mailman/listinfo/crowbar
+
+or email me at keith@dtosolutions.com
View
1 change-image/dell/barclamps/cloudfoundry/app/controllers/cloudfoundry_controller.rb
@@ -19,3 +19,4 @@ def initialize
end
end
+
View
15 change-image/dell/barclamps/cloudfoundry/app/models/cloudfoundry_service.rb
@@ -21,37 +21,38 @@ def initialize(thelogger)
end
def create_proposal
- @logger.debug("Cloud Foundry create_proposal: entering")
+ @logger.debug("CF create_proposal: entering")
base = super
nodes = NodeObject.all
nodes.delete_if { |n| n.nil? or n.admin? }
if nodes.size >= 1
base["deployment"]["cloudfoundry"]["elements"] = {
- "cloudfoundry-server" => [ nodes.first[:fqdn] ]
+ "cfbase" => [ nodes.first[:fqdn] ]
}
end
- @logger.debug("Cloud Foundry create_proposal: exiting")
+ @logger.debug("CF create_proposal: exiting")
base
end
def apply_role_pre_chef_call(old_role, role, all_nodes)
- @logger.debug("Cloud Foundry apply_role_pre_chef_call: entering #{all_nodes.inspect}")
+ @logger.debug("CF apply_role_pre_chef_call: entering #{all_nodes.inspect}")
return if all_nodes.empty?
# Make sure the bind hosts are in the admin network
all_nodes.each do |n|
node = NodeObject.find_node_by_name n
admin_address = node.get_network_by_type("admin")["address"]
- node.crowbar[:cloudfoundry] = {} if node.crowbar[:cloudfoundry].nil?
+ node.crowbar[:cloudfoundry] = {} if node.crowbar[:glance].nil?
node.crowbar[:cloudfoundry][:api_bind_host] = admin_address
+ node.crowbar[:cloudfoundry][:registry_bind_host] = admin_address
node.save
end
- @logger.debug("Cloud Foundry apply_role_pre_chef_call: leaving")
+ @logger.debug("CF apply_role_pre_chef_call: leaving")
end
-
end
+
View
2 ...ge/dell/barclamps/cloudfoundry/app/views/barclamp/_cloudfoundry_edit_attributes.html.haml
@@ -1,4 +1,3 @@
-
%input#proposal_attributes{:type => "hidden", :name => "proposal_attributes", :value => @proposal.raw_data['attributes'][@proposal.barclamp].to_json}
%p
%label{:for => "proposal_attributes"}= t('.attributes')
@@ -7,4 +6,3 @@
%p
%label{ :for => :backing_type }= t('.foo')
= select_tag :backing_type, options_for_select([['XKCD','xkcd'], ['Dilbert', 'dilbert']], @proposal.raw_data['attributes'][@proposal.barclamp]["foo"]), :onchange => "update_value('foo', 'foo', 'string')"
-
View
2 ...ge/dell/barclamps/cloudfoundry/app/views/barclamp/_cloudfoundry_edit_deployment.html.haml
@@ -8,3 +8,5 @@
node_selector($('#drag_drop'), constraints);
});
+
+
View
10 change-image/dell/barclamps/cloudfoundry/barclamp-cloudfoundry.spec
@@ -6,7 +6,7 @@
%define buildroot %{_topdir}/%{name}-%{version}-root
BuildRoot: %{buildroot}
-Summary: Cloud Foundry service (OpenPaaS) for the cloud
+Summary: CloudFoundry Dev Instance
License: Apache 2.0
Name: %{name}
BuildArch: noarch
@@ -17,7 +17,7 @@ Prefix: /
Group: Development/Tools
%description
-A Crowbar Barclamp that manages Cloud Foundry deployments within a Crowbar environment.
+A Crowbar Barclamp that installs a CloudFoundry development environment.
%prep
%setup -q
@@ -28,15 +28,15 @@ A Crowbar Barclamp that manages Cloud Foundry deployments within a Crowbar envir
make install DESTDIR=${RPM_BUILD_ROOT}
%post
-cd /usr/share/barclamp-cloudfoundry/chef/cookbooks
+cd /usr/share/cloudfoundry/chef/cookbooks
knife cookbook upload -o . -a -u chef-webui -k /etc/chef/webui.pem
-cd /usr/share/barclamp-cloudfoundry/chef/data_bags/crowbar
+cd /usr/share/cloudfoundry/chef/data_bags/crowbar
for i in *.json; do
knife data bag from file crowbar $i
done
-cd /usr/share/barclamp-cloudfoundry/chef/roles
+cd /usr/share/cloudfoundry/chef/roles
for i in *.rb; do
knife role from file $i
done
View
1 change-image/dell/barclamps/cloudfoundry/build_deb.sh 100644 → 100755
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
#
# Must have tools:
# apt-get install dpkg-dev debhelper devscripts fakeroot linda dh-make
View
0 change-image/dell/barclamps/cloudfoundry/build_rpm.sh 100644 → 100755
File mode changed.
View
BIN change-image/dell/barclamps/cloudfoundry/chef/.DS_Store
Binary file not shown.
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
19 ...e-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/attributes/default.rb
@@ -0,0 +1,19 @@
+default[:cloud_controller][:config_file] = "cloud_controller.yml"
+# Staging
+default[:cloud_controller][:staging][:grails] = "grails.yml"
+default[:cloud_controller][:staging][:lift] = "lift.yml"
+default[:cloud_controller][:staging][:node] = "node.yml"
+default[:cloud_controller][:staging][:otp_rebar] = "otp_rebar.yml"
+default[:cloud_controller][:staging][:platform] = "platform.yml"
+default[:cloud_controller][:staging][:rails3] = "rails3.yml"
+default[:cloud_controller][:staging][:sinatra] = "sinatra.yml"
+default[:cloud_controller][:staging][:spring] = "spring.yml"
+
+# Default builtin services
+default[:cloud_controller][:builtin_services] = ["redis", "mongodb", "mysql"]
+
+default[:deployment][:group] = "1000"
+default[:deployment][:name] = "devbox"
+default[:deployment][:config_path] = "/home/openstack/.cloudfoundry/devbox/config"
+default[:deployment][:user] = "openstack"
+default[:deployment][:home] = "/home/openstack/.cloudfoundry/devbox"
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures cloud_controller",
+ "version": "0.0.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMware",
+ "name": "cloud_controller",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
6 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "VMware"
+maintainer_email "support@vmware.com"
+license "Apache 2.0"
+description "Installs/Configures cloud_controller"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.0.1"
View
41 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/recipes/default.rb
@@ -0,0 +1,41 @@
+#
+# Cookbook Name:: cloud_controller
+# Recipe:: default
+#
+# Copyright 2011, VMware
+#
+#
+
+template node[:cloud_controller][:config_file] do
+ path File.join(node[:deployment][:config_path], node[:cloud_controller][:config_file])
+ source "cloud_controller.yml.erb"
+ owner node[:deployment][:user]
+ mode 0644
+
+ builtin_services = []
+ case node[:cloud_controller][:builtin_services]
+ when Array
+ builtin_services = node[:cloud_controller][:builtin_services]
+ when Hash
+ builtin_services = node[:cloud_controller][:builtin_services].keys
+ when String
+ builtin_services = node[:cloud_controller][:builtin_services].split(" ")
+ else
+ Chef::Log.info("Input error: Please specify cloud_controller builtin_services as a list, it has an unsupported type #{node[:cloud_controller][:builtin_services].class}")
+ exit 1
+ end
+ variables({
+ :builtin_services => builtin_services
+ })
+end
+cf_bundle_install(File.expand_path(File.join(node["cloudfoundry"]["path"], "cloud_controller")))
+
+staging_dir = File.join(node[:deployment][:config_path], "staging")
+node[:cloud_controller][:staging].each_pair do |framework, config|
+ template config do
+ path File.join(staging_dir, config)
+ source "#{config}.erb"
+ owner node[:deployment][:user]
+ mode 0644
+ end
+end
View
101 ...s/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/cloud_controller.yml.erb
@@ -0,0 +1,101 @@
+---
+external_uri: api.vcap.me
+description: "VMware's Cloud Application Platform"
+support_address: http://support.cloudfoundry.com
+local_route: 127.0.0.1
+local_register_only: false
+
+# Legacy (FIXME REMOVE)
+allow_external_app_uris: false
+
+# This dicatates what the uri namespace rules
+# are for apps. Admins can overide any of the
+# below accept taking a used uri.
+
+app_uris:
+ allow_external: false
+# reserved_file:
+# reserved_list: [www, test, dash, register, foo, bar]
+# reserved_length: 3
+
+external_port: 9022 #public CC port
+
+#nginx proxy provide multiple functions including
+#offloading of file uploads/downloads.
+nginx:
+ use_nginx: false #nginx proxy in front of CC?
+ #instance_socket: /tmp/cloud_controller.sock
+ insecure_instance_port: 9025 #debug only!!!! -- not for production use.
+
+# if log_file is set, it must be a fully-qualified path,
+# because the bin/vcap script reads it directly from the file.
+logging:
+ level: debug
+# file:
+
+# Settings for the rails logger
+rails_logging:
+ level: debug
+# file:
+
+directories:
+ droplets: /var/vcap/shared/droplets
+ resources: /var/vcap/shared/resources
+ # default values, relative to Rails.root. Leading slash for full path.
+ staging_manifests: <%= node[:deployment][:config_path] %>/staging
+
+ # set to true to prevent filesystem resource leaks
+ # nukes tmpdir on startup -- be careful!
+ nuke_tmp_on_startup: false
+
+ tmpdir: /var/vcap/data/cloud_controller/tmp
+
+mbus: nats://<%= node[:nats][:user] %>:<%= node[:nats][:password] %>@<%= node[:nats][:host] %>:<%= node[:nats][:port] %>/
+keys:
+ password: 'password key goes here'
+ token: 'token key goes here'
+pid: /var/vcap/sys/run/cloudcontroller.pid
+rails_environment: development
+database_environment: # replaces database.yml
+ production:
+ database: cloudcontroller
+ host: localhost
+ port: 5432
+ encoding: utf8
+ username: postgres
+ password: postgres
+ adapter: postgresql
+ timeout: 2000
+ template: template0 # Required for utf8 encoding
+ development:
+ adapter: sqlite3
+ database: db/cloudcontroller.sqlite3
+ encoding: utf8
+ test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ encoding: utf8
+
+staging:
+ max_concurrent_stagers: 10
+ max_staging_runtime: 120 # secs
+ secure: false
+
+# admin support
+admins: [derek@gmail.com, foobar@vmware.com]
+https_required: false
+https_required_for_admins: false
+
+# Normal user accounts
+default_account_capacity:
+ memory: 2048
+ app_uris: 4
+ services: 16
+ apps: 20
+
+# Services we provide, and their tokens. Avoids bootstrapping DB.
+builtin_services:
+ <% @builtin_services.each do |service_name| %>
+ <%= service_name %>:
+ token: <%= node[:service][service_name.to_sym][:token] %>
+ <% end %>
View
20 ...l/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/grails.yml.erb
@@ -0,0 +1,20 @@
+---
+name: "grails"
+runtimes:
+ - "java":
+ description: "Java 6"
+ version: "1.6"
+ executable: "java"
+ default: true
+app_servers:
+ - "tomcat":
+ description: "Tomcat"
+ executable: "false"
+ default: true
+detection:
+ - "*.war": true # TODO - this thinks everything with an XML file is Spring
+staged_services:
+ - "name": "mysql"
+ "version": "*"
+ - "name": "postgresql"
+ "version": "*"
View
18 ...ell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/lift.yml.erb
@@ -0,0 +1,18 @@
+---
+name: "lift"
+runtimes:
+ - "java":
+ description: "Java 6"
+ version: "1.6"
+ executable: "java"
+ default: true
+app_servers:
+ - "tomcat":
+ description: "Tomcat"
+ executable: "false"
+ default: true
+detection:
+ - "*.war": true
+staged_services:
+ - "name": "mysql"
+ "version": "*"
View
12 ...ell/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/node.yml.erb
@@ -0,0 +1,12 @@
+---
+name: "node"
+runtimes:
+ - node:
+ version: '0.4.5'
+ description: 'Node.js'
+ executable: <%= node[:nodejs][:path] %>/bin/node
+ default: true
+app_servers:
+detection:
+ - "*.js": '.'
+staged_services:
View
12 ...arclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/otp_rebar.yml.erb
@@ -0,0 +1,12 @@
+---
+name: "otp_rebar"
+runtimes:
+ - erlangR14B02:
+ version: 'R14B02'
+ description: 'Erlang R14B02'
+ executable: <%= node[:erlang][:path] %>/bin/erl
+ default: true
+app_servers:
+detection:
+ - "releases/*/*.rel": '.'
+staged_services:
View
3 ...barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/platform.yml.erb
@@ -0,0 +1,3 @@
+---
+cache: /var/vcap.local/staging
+runtime: # if nil, determined at load time by default 'ruby'
View
33 ...l/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/rails3.yml.erb
@@ -0,0 +1,33 @@
+---
+name: "rails3"
+runtimes:
+ - "ruby18":
+ version: "1.8.7" # FIXME change to 1.8.7-p334
+ description: "Ruby 1.8.7"
+ executable: "<%= node[:ruby18][:path] %>/bin/ruby"
+ default: true
+ environment:
+ rails_env: "production"
+ bundle_gemfile:
+ rack_env: "production"
+ - "ruby19":
+ version: "1.9.2p180"
+ description: "Ruby 1.9.2"
+ executable: "<%= node[:ruby][:path] %>/bin/ruby"
+ environment:
+ rails_env: "production"
+ bundle_gemfile:
+ rack_env: "production"
+app_servers:
+ - "thin":
+ description: "Thin"
+ executable: false
+ default: true
+detection:
+ - "config/application.rb": true
+ - "config/environment.rb": true
+staged_services:
+ - "name": "mysql"
+ "version": "*"
+ - "name": "postgresql"
+ "version": "*"
View
35 .../barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/sinatra.yml.erb
@@ -0,0 +1,35 @@
+---
+name: "sinatra"
+runtimes:
+ - "ruby18":
+ version: "1.8.7" # FIXME change to 1.8.7-p334
+ description: "Ruby 1.8.7"
+ executable: "<%= node[:ruby18][:path] %>/bin/ruby"
+ default: true
+ environment:
+ rails_env: "production"
+ bundle_gemfile:
+ rack_env: "production"
+ - "ruby19":
+ version: "1.9.2p180"
+ description: "Ruby 1.9.2"
+ executable: "<%= node[:ruby][:path] %>/bin/ruby"
+ environment:
+ rails_env: "production"
+ bundle_gemfile:
+ rack_env: "production"
+app_servers:
+ - "thin":
+ description: "Thin"
+ executable: false # determined during staging
+ default: true
+detection:
+ - "*.rb": "require 'sinatra'|require \"sinatra\"" # .rb files in the root dir containing a require?
+ - "config/environment.rb": false # and config/environment.rb must not exist
+staged_services:
+ - "name": "mysql"
+ "version": "*"
+ - "name": "postgresql"
+ "version": "*"
+ - "name": "redis"
+ "version": "2"
View
20 ...l/barclamps/cloudfoundry/chef/cookbooks/cloud_controller/templates/default/spring.yml.erb
@@ -0,0 +1,20 @@
+---
+name: "spring"
+runtimes:
+ - "java":
+ description: "Java 6"
+ version: "1.6"
+ executable: "java"
+ default: true
+app_servers:
+ - "tomcat":
+ description: "Tomcat"
+ executable: "false"
+ default: true
+detection:
+ - "*.war": true # TODO - this thinks everything with an XML file is Spring
+staged_services:
+ - "name": "mysql"
+ "version": "*"
+ - "name": "postgresql"
+ "version": "*"
View
28 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/README.me
@@ -1,28 +0,0 @@
-DESCRIPTION
-===========
-Chef Cookbook to install and configure Cloud Foundry
-
-REQUIREMENTS
-============
-TBD
-
-
-License
-=======
-Author:: Chris Richardson (crichardson@vmware.com)
-
-Author:: Rob Hirschfeld (rob_hirschfeld@dell.com)
-
-Copyright:: 2011 Dell, Inc & VMware, Inc
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
34 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/attributes/default.rb
@@ -1,27 +1,11 @@
-#
-# Cookbook Name:: glance
-# Attributes:: default
-#
-# Copyright 2011, Opscode, Inc.
-# Copyright 2011, Dell, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
+default[:cloudfoundry][:repo] = "https://github.com/cloudfoundry/vcap.git"
+default[:cloudfoundry][:path] = "/var/vcap/src/vcap"
-override[:cloudfoundry][:user]="cloudfoundry"
-
-# declare what needs to be monitored
-node[:cloudfoundry][:monitor]={}
-node[:cloudfoundry][:monitor][:svcs] = []
-node[:cloudfoundry][:monitor][:ports]={}
+default[:deployment][:group] = "1000"
+default[:deployment][:name] = "devbox"
+default[:deployment][:config_path] = "/home/openstack/.cloudfoundry/devbox/config"
+default[:deployment][:user] = "openstack"
+default[:deployment][:home] = "/home/openstack/.cloudfoundry/devbox"
+default[:ruby][:version] = "1.9.2-p180"
+default[:ruby][:path] = "/home/openstack/.cloudfoundry/devbox/deploy/rubies/ruby-1.9.2-p180"
View
17 ...ll/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/definitions/cloudfoundry_service.rb
@@ -1,17 +0,0 @@
-define :cloudfoundry_service do
-
- cloudfoundry_name="cloudfoundry-#{params[:name]}"
-
- service cloudfoundry_name do
- if (platform?("ubuntu") && node.platform_version.to_f >= 10.04)
- restart_command "restart #{cloudfoundry_name}"
- stop_command "stop #{cloudfoundry_name}"
- start_command "start #{cloudfoundry_name}"
- status_command "status #{cloudfoundry_name} | cut -d' ' -f2 | cut -d'/' -f1 | grep start"
- end
- supports :status => true, :restart => true
- action [:enable, :start]
- subscribes :restart, resources(:template => node[:cloudfoundry][:config_file])
- end
-
-end
View
14 ...e-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/libraries/cloudfoundry.rb
@@ -0,0 +1,14 @@
+module CloudFoundry
+ def cf_bundle_install(path)
+ bash "Bundle install for #{path}" do
+ cwd path
+ user node[:deployment][:user]
+ code "#{node[:ruby][:path]}/bin/bundle install"
+ only_if { ::File.exist?(File.join(path, 'Gemfile')) }
+ end
+ end
+end
+
+class Chef::Recipe
+ include CloudFoundry
+end
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures cloudfoundry",
+ "version": "0.2.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMWare",
+ "name": "cloudfoundry",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
12 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/metadata.rb
@@ -1,8 +1,6 @@
-maintainer "Chris Richardson"
-maintainer_email "crichardson@vmware.com"
+maintainer "VMWare"
+maintainer_email "support@vmware.com"
license "Apache 2.0"
-description "Installs/Configures Cloud Foundry"
-long_description IO.read(File.join(File.dirname(__FILE__), 'README.me'))
-version "0.2"
-
-depends "apt"
+description "Installs/Configures cloudfoundry"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.2.1"
View
12 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/api.rb
@@ -1,12 +0,0 @@
-#
-# Cookbook Name:: glance
-# Recipe:: api
-#
-#
-
-include_recipe "#{@cookbook_name}::common"
-
-cloudfoundry_service "api"
-
-node[:cloudfoundry][:monitor][:svcs] <<["cloudfoundry-api"]
-
View
131 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/common.rb
@@ -1,131 +0,0 @@
-#
-# Cookbook Name:: glance
-# Recipe:: common
-#
-# Copyright 2011 Opscode, Inc.
-# Copyright 2011 Rackspace, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#apt_repository "NovaCoreReleasePPA" do
-# uri "http://ppa.launchpad.net/nova-core/release/ubuntu"
-# distribution node["lsb"]["codename"]
-# components ["main"]
-# action :add
-#end
-
-package "glance" do
- options "--force-yes"
- action :install
-end
-
-template node[:glance][:config_file] do
- source "glance.conf.erb"
- owner node[:glance][:user]
- group "root"
- mode 0644
-end
-
-# (node[:nova][:images] or []).each do |image|
-# #get the filename of the image
-# filename = image.split('/').last
-# execute "uec-publish-tarball #{filename} nova_amis x86_64" do
-# cwd "#{node[:nova][:user_dir]}/images/"
-# #need EC2_URL, EC2_ACCESS_KEY, EC2_SECRET_KEY, EC2_CERT, EC2_PRIVATE_KEY, S3_URL, EUCALYPTUS_CERT for environment
-# environment ({
-# 'EC2_URL' => "http://#{node[:nova][:api]}:8773/services/Cloud",
-# 'EC2_ACCESS_KEY' => node[:nova][:access_key],
-# 'EC2_SECRET_KEY' => node[:nova][:secret_key],
-# 'EC2_CERT_' => "#{node[:nova][:user_dir]}/cert.pem",
-# 'EC2_PRIVATE_KEY_' => "#{node[:nova][:user_dir]}/pk.pem",
-# 'S3_URL' => "http://#{node[:nova][:api]}:3333", #TODO need to put S3 into attributes instead of assuming API
-# 'EUCALYPTUS_CERT' => "#{node[:nova][:user_dir]}/cacert.pem"
-# })
-# user node[:nova][:user]
-# action :nothing
-# end
-# remote_file image do
-# source image
-# path "#{node[:nova][:user_dir]}/images/#{filename}"
-# owner node[:nova][:user]
-# action :create_if_missing
-# notifies :run, resources(:execute => "uec-publish-tarball #{filename} nova_amis x86_64"), :immediately
-# end
-# end
-
-
-# bash "tty linux setup" do
-# cwd "/tmp"
-# user "root"
-# code <<-EOH
-# mkdir -p /var/lib/glance/
-# curl #{node[:glance][:tty_linux_image]} | tar xvz -C /tmp/
-# glance add name="ari-tty" type="ramdisk" disk_format="ari" container_format="ari" is_public=true < /tmp/tty_linux/ramdisk
-# glance add name="aki-tty" type="kernel" disk_format="aki" container_format="aki" is_public=true < /tmp/tty_linux/kernel
-# glance add name="ami-tty" type="kernel" disk_format="ami" container_format="ami" ramdisk_id="1" kernel_id="2" is_public=true < /tmp/tty_linux/image
-# touch /var/lib/glance/tty_setup
-# EOH
-# not_if do File.exists?("/var/lib/glance/tty_setup") end
-# end
-
-
-#download and install AMIs
-# (node[:nova][:images] or []).each do |image|
-# #get the filename of the image
-# filename = image.split('/').last
-# execute "uec-publish-tarball #{filename} nova_amis x86_64" do
-# cwd "#{node[:nova][:user_dir]}/images/"
-# #need EC2_URL, EC2_ACCESS_KEY, EC2_SECRET_KEY, EC2_CERT, EC2_PRIVATE_KEY, S3_URL, EUCALYPTUS_CERT for environment
-# environment ({
-# 'EC2_URL' => "http://#{node[:nova][:api]}:8773/services/Cloud",
-# 'EC2_ACCESS_KEY' => node[:nova][:access_key],
-# 'EC2_SECRET_KEY' => node[:nova][:secret_key],
-# 'EC2_CERT_' => "#{node[:nova][:user_dir]}/cert.pem",
-# 'EC2_PRIVATE_KEY_' => "#{node[:nova][:user_dir]}/pk.pem",
-# 'S3_URL' => "http://#{node[:nova][:api]}:3333", #TODO need to put S3 into attributes instead of assuming API
-# 'EUCALYPTUS_CERT' => "#{node[:nova][:user_dir]}/cacert.pem"
-# })
-# user node[:nova][:user]
-# action :nothing
-# end
-# remote_file image do
-# source image
-# path "#{node[:nova][:user_dir]}/images/#{filename}"
-# owner node[:nova][:user]
-# action :create_if_missing
-# notifies :run, resources(:execute => "uec-publish-tarball #{filename} nova_amis x86_64"), :immediately
-# end
-# end
-
-# #debug output
-# execute "euca-describe-images" do
-# user node[:nova][:user]
-# end
-
-#if not glance
-
-# in /images/
-
-# mkdir kernel image "mykernel_image"
-# json file from one with "aki"
-# make up id as "mykernel_id"
-
-# mkdir ami image "myami_image"
-# json file from one with "ami"
-# kernel_id "mykernel_id"
-# id "random"
-
-# execute "nova-manage image convert /var/lib/nova/images" do
-# user 'nova'
-# end
View
42 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/default.rb
@@ -0,0 +1,42 @@
+#
+# Cookbook Name:: cloudfoundry
+# Recipe:: default
+#
+# Copyright 2011, VMWare
+#
+#
+
+directory node[:cloudfoundry][:path] do
+ owner node[:deployment][:user]
+ group node[:deployment][:group]
+ mode "0755"
+ action :create
+ not_if { node[:cloudfoundry][:revision].nil? }
+end
+
+git node[:cloudfoundry][:path] do
+ repository node[:cloudfoundry][:repo]
+ revision node[:cloudfoundry][:revision]
+ user node[:deployment][:user]
+ enable_submodules true
+ action :sync
+ not_if { node[:cloudfoundry][:revision].nil? }
+end
+
+# Gem packages have transient failures, so try once while ignoring failures
+gem_package "vmc" do
+ ignore_failure true
+ gem_binary "#{node[:ruby][:path]}/bin/gem"
+end
+
+# Do not ignore failures
+gem_package "vmc" do
+ gem_binary "#{node[:ruby][:path]}/bin/gem"
+end
+
+template "#{node[:deployment][:config_path]}/deploy.json" do
+ source "deploy.json.erb"
+ owner node[:deployment][:user]
+ group node[:deployment][:user]
+ mode "0644"
+end
View
40 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/monitor.rb
@@ -1,40 +0,0 @@
-#
-# Copyright 2011, Dell
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Author: andi abes
-#
-
-####
-# if monitored by nagios, install the nrpe commands
-
-# Node addresses are dynamic and can't be set from attributes only.
-node[:cloudfoundry][:monitor][:ports]["cloudfoundry-api"] = [node[:cloudfoundry][:api_bind_host], node[:cloudfoundry][:api_bind_port]]
-
-svcs = node[:cloudfoundry][:monitor][:svcs]
-ports = node[:cloudfoundry][:monitor][:ports]
-log ("will monitor cloudfoundry svcs: #{svcs.join(',')} and ports #{ports.values.join(',')}")
-
-template "/etc/nagios/nrpe.d/cloudfoundry_nrpe.cfg" do
- source "cloudfoundry_nrpe.cfg.erb"
- mode "0644"
- group node[:nagios][:group]
- owner node[:nagios][:user]
- variables( {
- :svcs => svcs ,
- :ports => ports
- })
- notifies :restart, resources(:service => "nagios-nrpe-server")
-end if node["roles"].include?("nagios-client")
-
View
20 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/recipes/setup.rb
@@ -1,20 +0,0 @@
-#
-# Cookbook Name:: cloudfoundry
-# Recipe:: setup
-#
-
-include_recipe "#{@cookbook_name}::common"
-
-bash "tty linux setup" do
- cwd "/tmp"
- user "root"
- code <<-EOH
- mkdir -p /var/lib/cloudfoundry/
- curl #{node[:cloudfoundry][:tty_linux_image]} | tar xvz -C /tmp/
- cloudfoundry add name="ari-tty" type="ramdisk" disk_format="ari" container_format="ari" is_public=true < /tmp/tty_linux/ramdisk
- cloudfoundry add name="aki-tty" type="kernel" disk_format="aki" container_format="aki" is_public=true < /tmp/tty_linux/kernel
- cloudfoundry add name="ami-tty" type="kernel" disk_format="ami" container_format="ami" ramdisk_id="1" kernel_id="2" is_public=true < /tmp/tty_linux/image
- touch /var/lib/cloudfoundry/tty_setup
- EOH
- not_if do File.exists?("/var/lib/cloudfoundry/tty_setup") end
-end
View
10 ...arclamps/cloudfoundry/chef/cookbooks/cloudfoundry/templates/default/cloudfoundry.conf.erb
@@ -1,10 +0,0 @@
-[DEFAULT]
-# Show more verbose log output (sets INFO log level output)
-verbose = <%= node[:cloudfoundry][:verbose] %>
-
-# Show debugging output in logs (sets DEBUG log level output)
-debug = <%= node[:cloudfoundry][:debug] %>
-
-[app:cloudfoundry-api]
-paste.app_factory = cloudfoundry.server:app_factory
-
View
9 ...amps/cloudfoundry/chef/cookbooks/cloudfoundry/templates/default/cloudfoundry_nrpe.cfg.erb
@@ -1,9 +0,0 @@
-
-<% @svcs.each do |s| %>
-command[check_<%= s%>]=/usr/lib/nagios/plugins/check_procs -w 2:10 -c 1:100 -a "<%=s %>"
-<% end unless @svcs.nil? %>
-
-
-<% @ports.each do |name,dest| %>
-command[check_port_<%= name %>]=/usr/lib/nagios/plugins/check_tcp -H <%= dest[0] %> -p <%= dest[1] %>
-<% end unless @ports.nil? %>
View
84 ...dell/barclamps/cloudfoundry/chef/cookbooks/cloudfoundry/templates/default/deploy.json.erb
@@ -0,0 +1,84 @@
+{
+ "mongodb": {
+ "version": "<%= node[:mongodb][:version] %>",
+ "path": "<%= node[:mongodb][:path] %>"
+ },
+ "cloudfoundry": {
+ "path": "<%= node[:cloudfoundry][:path] %>",
+ "revision":"<%= node[:cloudfoundry][:revision] %>"
+ },
+ "jobs": {
+ "install": {
+ "all":null
+ },
+ "installed":
+ null
+ },
+ "mysql": {
+ "server_repl_password": "<%= node[:mysql][:server_repl_password] %>",
+ "bind_address": "<%= node[:mysql][:bind_address] %>",
+ "server_root_password": "<%= node[:mysql][:server_root_password] %>"
+ },
+ "nodejs": {
+ "version": "<%= node[:nodejs][:version] %>",
+ "path": "<%= node[:nodejs][:path] %>"
+ },
+ "nginx": {
+ "vcap_log": "<%= node[:nginx][:vcap_log] %>"
+ },
+ "ruby18": {
+ "version":"<%= node[:ruby18][:version] %>",
+ "path":"<%= node[:ruby18][:path] %>"
+ },
+ "run_list": [
+ "role[nats]",
+ "role[cloudfoundry]",
+ "role[router]",
+ "role[ccdb]",
+ "role[cloud_controller]",
+ "role[health_manager]",
+ "role[dea]",
+ "role[redis]",
+ "role[mysql]",
+ "role[mongodb]",
+ "role[postgresql]"
+ ],
+ "services": [
+ "redis",
+ "mysql",
+ "mongodb",
+ "postgresql"
+ ],
+ "rubygems": {
+ "rake": {
+ "version": "0.8.7"
+ },
+ "version": "1.5.2",
+ "bundler": {
+ "version": "1.0.10"
+ }
+ },
+ "ruby": {
+ "version" :"<%= node[:ruby][:version] %>",
+ "path": "<%= node[:ruby][:path] %>"
+ },
+ "deployment": {
+ "group": "<%= node[:deployment][:group] %>",
+ "name": "<%= node[:deployment][:name] %>",
+ "config_path": "<%= node[:deployment][:config_path] %>",
+ "user": "<%= node[:deployment][:user] %>",
+ "home": "<%= node[:deployment][:home] %>"
+ },
+ "erlang": {
+ "version": "<%= node[:erlang][:version] %>",
+ "path": "<%= node[:erlang][:path] %>"
+ },
+ "postgresql": {
+ "server_root_password": "<%= node[:postgresql][:server_root_password] %>"
+ },
+ "redis": {
+ "runner": "<%= node[:redis][:runner] %>",
+ "version": "<%= node[:redis][:version] %>",
+ "path": "<%= node[:redis][:path] %>"
+ }
+}
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
10 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/attributes/default.rb
@@ -0,0 +1,10 @@
+default[:dea][:config_file] = "dea.yml"
+
+default[:deployment][:group] = "1000"
+default[:deployment][:name] = "devbox"
+default[:deployment][:config_path] = "/home/openstack/.cloudfoundry/devbox/config"
+default[:deployment][:user] = "openstack"
+default[:deployment][:home] = "/home/openstack/.cloudfoundry/devbox"
+
+default[:cloudfoundry][:repo] = "https://github.com/cloudfoundry/vcap.git"
+default[:cloudfoundry][:path] = "/var/vcap/src/vcap"
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures dea",
+ "version": "0.0.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMWare",
+ "name": "dea",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
6 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "VMWare"
+maintainer_email "support@vmware.com"
+license "Apache 2.0"
+description "Installs/Configures dea"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.0.1"
View
19 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/recipes/default.rb
@@ -0,0 +1,19 @@
+#
+# Cookbook Name:: dea
+# Recipe:: default
+#
+# Copyright 2011, VMWARE
+#
+#
+%w{lsof psmisc librmagick-ruby}.each do |pkg|
+ package pkg
+end
+
+template node[:dea][:config_file] do
+ path File.join(node[:deployment][:config_path], node[:dea][:config_file])
+ source "dea.yml.erb"
+ owner node[:deployment][:user]
+ mode 0644
+end
+
+cf_bundle_install(File.expand_path(File.join(node["cloudfoundry"]["path"], "dea")))
View
50 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/dea/templates/default/dea.yml.erb
@@ -0,0 +1,50 @@
+---
+base_dir: /var/vcap.local/dea
+local_route: 127.0.0.1
+filer_port: 12345
+mbus: nats://<%= node[:nats][:user] %>:<%= node[:nats][:password] %>@<%= node[:nats][:host] %>:<%= node[:nats][:port] %>/
+intervals:
+ heartbeat: 10
+logging:
+ level: debug
+multi_tenant: true
+max_memory: 4096
+secure: false
+enforce_ulimit: false
+pid: /var/vcap/sys/run/dea.pid
+
+#Force droplets to be downloaded over http even when
+#there is a shared directory containing the droplet.
+force_http_sharing: true
+
+# This is where the execution agent determines its available runtimes.
+# version flags are assumed to be '-v' unless noted below.
+
+runtimes:
+ ruby18:
+ executable: <%= node[:ruby18][:path] %>/bin/ruby
+ version: 1.8.7
+ version_flag: "-e 'puts RUBY_VERSION'"
+ additional_checks: "-e 'puts RUBY_PATCHLEVEL >= 174'"
+ environment:
+ ruby19:
+ executable: <%= node[:ruby][:path] %>/bin/ruby
+ version: 1.9.2
+ version_flag: "-e 'puts RUBY_VERSION'"
+ additional_checks: "-e 'puts RUBY_PATCHLEVEL >= 180'"
+ environment:
+ node:
+ executable: <%= node[:nodejs][:path] %>/bin/node
+ version: 0.4.[2-9]
+ version_flag: '-v'
+ environment:
+ java:
+ executable: java
+ version: 1.6.0
+ version_flag: '-version'
+ environment:
+ erlangR14B02:
+ executable: <%= node[:erlang][:path] %>/bin/erl
+ version: ".* 5.8.3"
+ version_flag: '-version'
+ environment:
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
9 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/attributes/default.rb
@@ -0,0 +1,9 @@
+default[:erlang][:version] = "R14B02"
+default[:erlang][:source] = "http://erlang.org/download/otp_src_#{erlang[:version]}.tar.gz"
+default[:erlang][:path] = "/var/vcap/deploy/rubies/erlang"
+
+default[:deployment][:group] = "1000"
+default[:deployment][:name] = "devbox"
+default[:deployment][:config_path] = "/home/openstack/.cloudfoundry/devbox/config"
+default[:deployment][:user] = "openstack"
+default[:deployment][:home] = "/home/openstack/.cloudfoundry/devbox"
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures erlang",
+ "version": "0.0.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMware",
+ "name": "erlang",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
6 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "VMware"
+maintainer_email "support@vmware.com"
+license "Apache 2.0"
+description "Installs/Configures erlang"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.0.1"
View
39 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/erlang/recipes/default.rb
@@ -0,0 +1,39 @@
+#
+# Cookbook Name:: erlang
+# Recipe:: default
+#
+# Copyright 2011, VMware
+#
+#
+%w[ build-essential libncurses5-dev openssl libssl-dev ].each do |pkg|
+ package pkg
+end
+
+remote_file "/tmp/otp_src_#{node[:erlang][:version]}.tar.gz" do
+ owner node[:deployment][:user]
+ source node[:erlang][:source]
+ not_if { ::File.exists?("/tmp/otp_src_#{node[:erlang][:version]}.tar.gz") }
+end
+
+directory node[:erlang][:path] do
+ owner node[:deployment][:user]
+ group node[:deployment][:group]
+ mode "0755"
+ recursive true
+ action :create
+end
+
+bash "Install Erlang" do
+ cwd "/tmp"
+ user node[:deployment][:user]
+ code <<-EOH
+ tar xvzf otp_src_#{node[:erlang][:version]}.tar.gz
+ cd otp_src_#{node[:erlang][:version]}
+ ./configure --prefix=#{node[:erlang][:path]}
+ make
+ make install
+ EOH
+ not_if do
+ ::File.exists?("#{node[:erlang][:path]}/bin/erl")
+ end
+end
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
11 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/attributes/default.rb
@@ -0,0 +1,11 @@
+default[:ruby][:version] = "1.9.2-p180"
+default[:ruby][:source] = "http://ftp.ruby-lang.org//pub/ruby/1.9/ruby-#{ruby[:version]}.tar.gz"
+default[:ruby][:path] = "/cloudfoundry/deploy/rubies/ruby-#{ruby[:version]}"
+default[:rubygems][:version] = "1.5.2"
+default[:rubygems][:bundler][:version] = "1.0.10"
+
+default[:deployment][:group] = "1000"
+default[:deployment][:name] = "devbox"
+default[:deployment][:config_path] = "/home/openstack/.cloudfoundry/devbox/config"
+default[:deployment][:user] = "openstack"
+default[:deployment][:home] = "/home/openstack/.cloudfoundry/devbox"
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures essentials",
+ "version": "0.0.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMWare",
+ "name": "essentials",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
6 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "VMWare"
+maintainer_email "support@vmware.com"
+license "Apache 2.0"
+description "Installs/Configures essentials"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.0.1"
View
71 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/recipes/default.rb
@@ -0,0 +1,71 @@
+#
+# Cookbook Name:: essentials
+# Recipe:: default
+#
+# Copyright 2011, VMWARE
+#
+#
+
+# Add ubuntu apt repositories... some of the packages we need aren't in crowbar (yet)
+# Once they are, then we can omit this step.
+
+apt_repository "ubuntu" do
+ uri "http://us.archive.ubuntu.com/ubuntu/"
+ distribution node[:lsb][:codename]
+ components ["main", "restricted", "universe", "multiverse"]
+ action :add
+end
+apt_repository "ubuntu-updates" do
+ uri "http://us.archive.ubuntu.com/ubuntu/"
+ distribution "#{node[:lsb][:codename]}-updates"
+ components ["main", "restricted", "universe", "multiverse"]
+ action :add
+end
+apt_repository "ubuntu-security" do
+ uri "http://us.archive.ubuntu.com/ubuntu/"
+ distribution "#{node[:lsb][:codename]}-security"
+ components ["main", "restricted", "universe", "multiverse"]
+ action :add
+end
+
+
+%w{apt-utils wget curl libcurl3 bison build-essential zlib1g-dev libssl-dev
+ libreadline5-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev git-core sqlite3 libsqlite3-ruby
+ libsqlite3-dev unzip zip ruby-dev libmysql-ruby libmysqlclient-dev libcurl4-openssl-dev libpq-dev}.each do |p|
+ package p do
+ action [:install]
+ end
+end
+
+directory node[:deployment][:config_path] do
+ owner node[:deployment][:user]
+ group node[:deployment][:group]
+ mode "0755"
+ recursive true
+ action :create
+end
+
+directory File.join(node[:deployment][:config_path], "staging") do
+ owner node[:deployment][:user]
+ group node[:deployment][:group]
+ mode "0755"
+ recursive true
+ action :create
+end
+
+%w{/var/vcap /var/vcap/sys /var/vcap/db /var/vcap/sys/log /var/vcap/data/cloud_controller/tmp /var/vcap/data/db /var/vcap.local /var/vcap.local/staging}.each do |d|
+ directory d do
+ owner node[:deployment][:user]
+ group node[:deployment][:group]
+ mode "0755"
+ recursive true
+ action :create
+ end
+end
+
+template "/etc/sudoers" do
+ source "sudoers.erb"
+ owner "root"
+ group "root"
+ mode "0440"
+end
View
27 ...image/dell/barclamps/cloudfoundry/chef/cookbooks/essentials/templates/default/sudoers.erb
@@ -0,0 +1,27 @@
+# /etc/sudoers
+#
+# This file MUST be edited with the 'visudo' command as root.
+#
+# See the man page for details on how to write a sudoers file.
+#
+
+Defaults env_reset
+
+# Host alias specification
+
+# User alias specification
+
+# Cmnd alias specification
+
+# User privilege specification
+root ALL=(ALL) ALL
+
+# Allow members of group sudo to execute any command
+# (Note that later entries override this, so you might need to move
+# it further down)
+%sudo ALL=(ALL) ALL
+#
+#includedir /etc/sudoers.d
+
+# Members of the admin group may gain root privileges
+%admin ALL=(ALL) NOPASSWD:ALL
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
10 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/attributes/default.rb
@@ -0,0 +1,10 @@
+include_attribute "postgresql"
+default[:health_manager][:config_file] = "health_manager.yml"
+default[:health_manager][:database][:username] = node[:postgresql][:server_root_user]
+default[:health_manager][:database][:password] = node[:postgresql][:server_root_password]
+
+default[:deployment][:group] = "1000"
+default[:deployment][:name] = "devbox"
+default[:deployment][:config_path] = "/home/openstack/.cloudfoundry/devbox/config"
+default[:deployment][:user] = "openstack"
+default[:deployment][:home] = "/home/openstack/.cloudfoundry/devbox"
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures health_manager",
+ "version": "0.0.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMware",
+ "name": "health_manager",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
6 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "VMware"
+maintainer_email "support@vmware.com"
+license "Apache 2.0"
+description "Installs/Configures health_manager"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.0.1"
View
14 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/health_manager/recipes/default.rb
@@ -0,0 +1,14 @@
+#
+# Cookbook Name:: health_manager
+# Recipe:: default
+#
+# Copyright 2011, VMware
+#
+template node[:health_manager][:config_file] do
+ path File.join(node[:deployment][:config_path], node[:health_manager][:config_file])
+ source "health_manager.yml.erb"
+ owner node[:deployment][:user]
+ mode 0644
+end
+
+cf_bundle_install(File.expand_path(File.join(node["cloudfoundry"]["path"], "health_manager")))
View
33 ...lamps/cloudfoundry/chef/cookbooks/health_manager/templates/default/health_manager.yml.erb
@@ -0,0 +1,33 @@
+---
+local_route: 127.0.0.1
+mbus: nats://<%= node[:nats][:user] %>:<%= node[:nats][:password] %>@<%= node[:nats][:host] %>:<%= node[:nats][:port] %>/
+logging:
+ level: debug
+pid: /var/vcap/sys/run/healthmanager.pid
+database_environment: # replaces database.yml
+ production:
+ database: cloudcontroller
+ host: localhost
+ port: 5432
+ encoding: utf8
+ username: <%= node[:health_manager][:database][:username] %>
+ password: <%= node[:health_manager][:database][:password] %>
+ adapter: postgresql
+ timeout: 2000
+ template: template0 # Required for utf8 encoding
+ development:
+ adapter: sqlite3
+ database: db/cloudcontroller.sqlite3 # sqlite3 paths are relative to CC root.
+ encoding: utf8
+ test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ encoding: utf8
+intervals:
+ database_scan: 60
+ droplet_lost: 30
+ droplets_analysis: 10
+ flapping_death: 3
+ flapping_timeout: 180
+ restart_timeout: 20
+ stable_state: 60
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures java",
+ "version": "0.0.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMware",
+ "name": "java",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
6 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "VMware"
+maintainer_email "support@vmware.com"
+license "Apache 2.0"
+description "Installs/Configures java"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.0.1"
View
30 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/java/recipes/default.rb
@@ -0,0 +1,30 @@
+#
+# Cookbook Name:: java
+# Recipe:: default
+#
+# Copyright 2011, VMware
+#
+#
+package "python-software-properties"
+
+case node['platform']
+when "ubuntu"
+ bash "Setup java" do
+ code <<-EOH
+ add-apt-repository "deb http://archive.canonical.com/ lucid partner"
+ apt-get -qqy update
+ echo sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true | /usr/bin/debconf-set-selections
+ echo sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true | /usr/bin/debconf-set-selections
+ EOH
+ not_if do
+ ::File.exists?("/usr/bin/java")
+ end
+ end
+
+ %w[ curl sun-java6-bin sun-java6-jre sun-java6-jdk].each do |p|
+ package p
+ end
+
+else
+ Chef::Log.error("Installation of Sun Java packages not supported on this platform.")
+end
View
8 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/README.rdoc
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
View
9 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/attributes/default.rb
@@ -0,0 +1,9 @@
+default[:mongodb][:version] = "1.8.1"
+default[:mongodb][:source] = "http://fastdl.mongodb.org/linux/mongodb-linux-#{node[:kernel][:machine]}-#{mongodb[:version]}.tgz"
+default[:mongodb][:path] = "/var/vcap/deploy/mongodb"
+
+default[:deployment][:group] = "1000"
+default[:deployment][:name] = "devbox"
+default[:deployment][:config_path] = "/home/openstack/.cloudfoundry/devbox/config"
+default[:deployment][:user] = "openstack"
+default[:deployment][:home] = "/home/openstack/.cloudfoundry/devbox"
View
29 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/metadata.json
@@ -0,0 +1,29 @@
+{
+ "groupings": {
+ },
+ "platforms": {
+ },
+ "recommendations": {
+ },
+ "license": "Apache 2.0",
+ "suggestions": {
+ },
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "description": "Installs/Configures mongodb",
+ "version": "0.0.1",
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
+ "providing": {
+ },
+ "attributes": {
+ },
+ "maintainer": "VMware",
+ "name": "mongodb",
+ "replacing": {
+ },
+ "dependencies": {
+ },
+ "maintainer_email": "support@vmware.com"
+}
View
6 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "VMware"
+maintainer_email "support@vmware.com"
+license "Apache 2.0"
+description "Installs/Configures mongodb"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.0.1"
View
33 change-image/dell/barclamps/cloudfoundry/chef/cookbooks/mongodb/recipes/default.rb
@@ -0,0 +1,33 @@
+#
+# Cookbook Name:: mongodb
+# Recipe:: default
+#
+# Copyright 2011, VMware
+#
+#
+remote_file "/tmp/mongodb-linux-#{node[:kernel][:machine]}-#{node[:mongodb][:version]}.tgz" do
+ owner node[:deployment][:user]
+ source node[:mongodb][:source]
+ not_if { ::File.exists?("/tmp/mongodb-linux-#{node[:kernel][:machine]}-#{node[:mongodb][:version]}.tgz") }
+end
+
+directory "#{node[:mongodb][:path]}/bin" do
+ owner node[:deployment][:user]
+ group node[:deployment][:group]
+ mode "0755"
+ recursive true
+ action :create
+end
+
+bash "Install Mongodb" do
+ cwd "/tmp"
+ user node[:deployment][:user]
+ code <<-EOH
+ tar xvzf mongodb-linux-#{node[:kernel][:machine]}-#{node[:mongodb][:version]}.tgz
+ cd mongodb-linux-#{node[:kernel][:machine]}-#{node[:mongodb][:version]}
+ cp bin/* #{node[:mongodb][:path]}/bin
+ EOH
+ not_if do
+ ::File.exists?("#{node[:mongodb][:path]}/bin/mongo")
+ end
+end