bebox 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (402) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +78 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +163 -0
  5. data/LICENSE +21 -0
  6. data/README.md +372 -0
  7. data/Rakefile +8 -0
  8. data/bebox.gemspec +40 -0
  9. data/bin/bebox +5 -0
  10. data/lib/bebox/cli.rb +42 -0
  11. data/lib/bebox/commands/commands_helper.rb +33 -0
  12. data/lib/bebox/commands/environment_commands.rb +46 -0
  13. data/lib/bebox/commands/general_commands.rb +24 -0
  14. data/lib/bebox/commands/node_commands.rb +68 -0
  15. data/lib/bebox/commands/prepare_commands.rb +59 -0
  16. data/lib/bebox/commands/project_commands.rb +44 -0
  17. data/lib/bebox/commands/provision_commands.rb +145 -0
  18. data/lib/bebox/environment.rb +114 -0
  19. data/lib/bebox/logger.rb +51 -0
  20. data/lib/bebox/node.rb +308 -0
  21. data/lib/bebox/profile.rb +102 -0
  22. data/lib/bebox/project.rb +259 -0
  23. data/lib/bebox/provision.rb +257 -0
  24. data/lib/bebox/role.rb +103 -0
  25. data/lib/bebox/version.rb +3 -0
  26. data/lib/bebox/wizards/environment_wizard.rb +45 -0
  27. data/lib/bebox/wizards/node_wizard.rb +163 -0
  28. data/lib/bebox/wizards/profile_wizard.rb +91 -0
  29. data/lib/bebox/wizards/project_wizard.rb +175 -0
  30. data/lib/bebox/wizards/provision_wizard.rb +80 -0
  31. data/lib/bebox/wizards/role_wizard.rb +97 -0
  32. data/lib/bebox.rb +2 -0
  33. data/lib/deb/puppet_3.6.0/augeas-lenses_0.10.0-0ubuntu4_all.deb +0 -0
  34. data/lib/deb/puppet_3.6.0/debconf-utils_1.5.42ubuntu1_all.deb +0 -0
  35. data/lib/deb/puppet_3.6.0/facter_2.0.1-1puppetlabs1_amd64.deb +0 -0
  36. data/lib/deb/puppet_3.6.0/hiera_1.3.2-1puppetlabs1_all.deb +0 -0
  37. data/lib/deb/puppet_3.6.0/libaugeas-ruby1.8_0.3.0-1.1ubuntu4_amd64.deb +0 -0
  38. data/lib/deb/puppet_3.6.0/libaugeas-ruby_0.3.0-1.1ubuntu4_all.deb +0 -0
  39. data/lib/deb/puppet_3.6.0/libaugeas0_0.10.0-0ubuntu4_amd64.deb +0 -0
  40. data/lib/deb/puppet_3.6.0/libjson-ruby_1.6.3-1_all.deb +0 -0
  41. data/lib/deb/puppet_3.6.0/libruby1.8_1.8.7.352-2ubuntu1.4_amd64.deb +0 -0
  42. data/lib/deb/puppet_3.6.0/libruby_4.8_all.deb +0 -0
  43. data/lib/deb/puppet_3.6.0/libshadow-ruby1.8_1.4.1-8build1_amd64.deb +0 -0
  44. data/lib/deb/puppet_3.6.0/puppet-common_3.6.0-1puppetlabs1_all.deb +0 -0
  45. data/lib/deb/puppet_3.6.0/puppet_3.6.0-1puppetlabs1_all.deb +0 -0
  46. data/lib/deb/puppet_3.6.0/ruby-json_1.6.3-1_amd64.deb +0 -0
  47. data/lib/deb/puppet_3.6.0/ruby-rgen_0.6.5-1puppetlabs1_all.deb +0 -0
  48. data/lib/deb/puppet_3.6.0/ruby1.8_1.8.7.352-2ubuntu1.4_amd64.deb +0 -0
  49. data/lib/deb/puppet_3.6.0/ruby_4.8_all.deb +0 -0
  50. data/lib/deb/puppet_3.6.0/virt-what_1.11-1_amd64.deb +0 -0
  51. data/lib/templates/node/Vagrantfile.erb +18 -0
  52. data/lib/templates/node/deploy_vagrant_node.erb +3 -0
  53. data/lib/templates/node/node.yml.erb +3 -0
  54. data/lib/templates/node/prepared_node.yml.erb +4 -0
  55. data/lib/templates/node/provisioned_node.yml.erb +4 -0
  56. data/lib/templates/project/Capfile.erb +2 -0
  57. data/lib/templates/project/Gemfile.erb +5 -0
  58. data/lib/templates/project/config/deploy/environment.erb +40 -0
  59. data/lib/templates/project/config/deploy/vagrant.erb +42 -0
  60. data/lib/templates/project/config/deploy.erb +120 -0
  61. data/lib/templates/project/dot_bebox.erb +4 -0
  62. data/lib/templates/project/gitignore.erb +7 -0
  63. data/lib/templates/project/ubuntu_dependencies +10 -0
  64. data/lib/templates/puppet/default_profiles/base/fundamental/ruby/Puppetfile +0 -0
  65. data/lib/templates/puppet/default_profiles/base/fundamental/ruby/manifests/init.pp +24 -0
  66. data/lib/templates/puppet/default_profiles/base/fundamental/sudo/Puppetfile +0 -0
  67. data/lib/templates/puppet/default_profiles/base/fundamental/sudo/manifests/init.pp +22 -0
  68. data/lib/templates/puppet/default_profiles/base/fundamental/users/Puppetfile +0 -0
  69. data/lib/templates/puppet/default_profiles/base/fundamental/users/manifests/init.pp +18 -0
  70. data/lib/templates/puppet/default_profiles/base/security/fail2ban/Puppetfile +2 -0
  71. data/lib/templates/puppet/default_profiles/base/security/fail2ban/manifests/init.pp +28 -0
  72. data/lib/templates/puppet/default_profiles/base/security/iptables/Puppetfile +2 -0
  73. data/lib/templates/puppet/default_profiles/base/security/iptables/manifests/init.pp +27 -0
  74. data/lib/templates/puppet/default_profiles/base/security/ssh/Puppetfile +2 -0
  75. data/lib/templates/puppet/default_profiles/base/security/ssh/manifests/init.pp +30 -0
  76. data/lib/templates/puppet/default_profiles/base/security/sysctl/Puppetfile +2 -0
  77. data/lib/templates/puppet/default_profiles/base/security/sysctl/manifests/init.pp +20 -0
  78. data/lib/templates/puppet/default_profiles/base/users/ssh/Puppetfile +2 -0
  79. data/lib/templates/puppet/default_profiles/base/users/ssh/manifests/init.pp +47 -0
  80. data/lib/templates/puppet/default_profiles/base/users/users/Puppetfile +0 -0
  81. data/lib/templates/puppet/default_profiles/base/users/users/manifests/init.pp +18 -0
  82. data/lib/templates/puppet/default_roles/fundamental/manifests/init.pp +16 -0
  83. data/lib/templates/puppet/default_roles/security/manifests/init.pp +17 -0
  84. data/lib/templates/puppet/default_roles/users/manifests/init.pp +15 -0
  85. data/lib/templates/puppet/profiles/Puppetfile.erb +24 -0
  86. data/lib/templates/puppet/profiles/manifests/init.pp.erb +17 -0
  87. data/lib/templates/puppet/roles/manifests/init.pp.erb +14 -0
  88. data/lib/templates/puppet/step-0/Puppetfile.erb +5 -0
  89. data/lib/templates/puppet/step-0/hiera/data/common.yaml.erb +26 -0
  90. data/lib/templates/puppet/step-0/hiera/data/environment.yaml.erb +26 -0
  91. data/lib/templates/puppet/step-0/hiera/data/node.yaml.erb +26 -0
  92. data/lib/templates/puppet/step-0/hiera/hiera.yaml.erb +11 -0
  93. data/lib/templates/puppet/step-0/manifests/node.erb +5 -0
  94. data/lib/templates/puppet/step-0/manifests/site.pp.erb +15 -0
  95. data/lib/templates/puppet/step-0/modules/rbenv/AUTHORS +11 -0
  96. data/lib/templates/puppet/step-0/modules/rbenv/CHANGELOG.md +70 -0
  97. data/lib/templates/puppet/step-0/modules/rbenv/Gemfile +8 -0
  98. data/lib/templates/puppet/step-0/modules/rbenv/Gemfile.lock +28 -0
  99. data/lib/templates/puppet/step-0/modules/rbenv/Modulefile +7 -0
  100. data/lib/templates/puppet/step-0/modules/rbenv/README.md +173 -0
  101. data/lib/templates/puppet/step-0/modules/rbenv/Rakefile +22 -0
  102. data/lib/templates/puppet/step-0/modules/rbenv/TODO +10 -0
  103. data/lib/templates/puppet/step-0/modules/rbenv/bin/autospec +16 -0
  104. data/lib/templates/puppet/step-0/modules/rbenv/bin/facter +16 -0
  105. data/lib/templates/puppet/step-0/modules/rbenv/bin/filebucket +16 -0
  106. data/lib/templates/puppet/step-0/modules/rbenv/bin/hiera +16 -0
  107. data/lib/templates/puppet/step-0/modules/rbenv/bin/htmldiff +16 -0
  108. data/lib/templates/puppet/step-0/modules/rbenv/bin/ldiff +16 -0
  109. data/lib/templates/puppet/step-0/modules/rbenv/bin/pi +16 -0
  110. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet +16 -0
  111. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet-lint +16 -0
  112. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet-module +16 -0
  113. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetca +16 -0
  114. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetd +16 -0
  115. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetdoc +16 -0
  116. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetmasterd +16 -0
  117. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetqd +16 -0
  118. data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetrun +16 -0
  119. data/lib/templates/puppet/step-0/modules/rbenv/bin/rake +16 -0
  120. data/lib/templates/puppet/step-0/modules/rbenv/bin/ralsh +16 -0
  121. data/lib/templates/puppet/step-0/modules/rbenv/bin/rspec +16 -0
  122. data/lib/templates/puppet/step-0/modules/rbenv/bin/rspec-puppet-init +16 -0
  123. data/lib/templates/puppet/step-0/modules/rbenv/lib/puppet/provider/rbenvgem/default.rb +50 -0
  124. data/lib/templates/puppet/step-0/modules/rbenv/lib/puppet/type/rbenvgem.rb +62 -0
  125. data/lib/templates/puppet/step-0/modules/rbenv/manifests/bundle.pp +36 -0
  126. data/lib/templates/puppet/step-0/modules/rbenv/manifests/client.pp +48 -0
  127. data/lib/templates/puppet/step-0/modules/rbenv/manifests/compile.pp +102 -0
  128. data/lib/templates/puppet/step-0/modules/rbenv/manifests/definition.pp +31 -0
  129. data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/centos.pp +25 -0
  130. data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/suse.pp +28 -0
  131. data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/ubuntu.pp +17 -0
  132. data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies.pp +8 -0
  133. data/lib/templates/puppet/step-0/modules/rbenv/manifests/gem.pp +29 -0
  134. data/lib/templates/puppet/step-0/modules/rbenv/manifests/install.pp +55 -0
  135. data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin/rbenvvars.pp +16 -0
  136. data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin/rubybuild.pp +16 -0
  137. data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin.pp +40 -0
  138. data/lib/templates/puppet/step-0/modules/rbenv/metadata.json +109 -0
  139. data/lib/templates/puppet/step-0/modules/rbenv/templates/Gemfile.erb +5 -0
  140. data/lib/templates/puppet/step-0/modules/rbenv/templates/dot.rbenvrc.erb +8 -0
  141. data/lib/templates/puppet/step-0/modules/stdlib/CHANGELOG.md +418 -0
  142. data/lib/templates/puppet/step-0/modules/stdlib/CONTRIBUTING.md +65 -0
  143. data/lib/templates/puppet/step-0/modules/stdlib/Gemfile +33 -0
  144. data/lib/templates/puppet/step-0/modules/stdlib/Gemfile.lock +166 -0
  145. data/lib/templates/puppet/step-0/modules/stdlib/LICENSE +19 -0
  146. data/lib/templates/puppet/step-0/modules/stdlib/Modulefile +11 -0
  147. data/lib/templates/puppet/step-0/modules/stdlib/README.markdown +1304 -0
  148. data/lib/templates/puppet/step-0/modules/stdlib/README_DEVELOPER.markdown +35 -0
  149. data/lib/templates/puppet/step-0/modules/stdlib/README_SPECS.markdown +7 -0
  150. data/lib/templates/puppet/step-0/modules/stdlib/RELEASE_PROCESS.markdown +24 -0
  151. data/lib/templates/puppet/step-0/modules/stdlib/Rakefile +18 -0
  152. data/lib/templates/puppet/step-0/modules/stdlib/checksums.json +349 -0
  153. data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/facter_dot_d.rb +202 -0
  154. data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/pe_version.rb +53 -0
  155. data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/puppet_vardir.rb +26 -0
  156. data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/root_home.rb +32 -0
  157. data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/util/puppet_settings.rb +21 -0
  158. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/abs.rb +36 -0
  159. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/any2array.rb +33 -0
  160. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/base64.rb +37 -0
  161. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/bool2num.rb +49 -0
  162. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/capitalize.rb +34 -0
  163. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/chomp.rb +35 -0
  164. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/chop.rb +37 -0
  165. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/concat.rb +41 -0
  166. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/count.rb +22 -0
  167. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb +44 -0
  168. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb +35 -0
  169. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete.rb +46 -0
  170. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_at.rb +49 -0
  171. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb +34 -0
  172. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_values.rb +26 -0
  173. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/difference.rb +36 -0
  174. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/dirname.rb +15 -0
  175. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/downcase.rb +33 -0
  176. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/empty.rb +28 -0
  177. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb +35 -0
  178. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb +45 -0
  179. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/flatten.rb +33 -0
  180. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/floor.rb +25 -0
  181. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb +46 -0
  182. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb +17 -0
  183. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/getparam.rb +35 -0
  184. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/getvar.rb +26 -0
  185. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/grep.rb +33 -0
  186. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb +52 -0
  187. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb +25 -0
  188. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb +25 -0
  189. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_key.rb +28 -0
  190. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/hash.rb +41 -0
  191. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/intersection.rb +34 -0
  192. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_array.rb +22 -0
  193. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_bool.rb +22 -0
  194. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb +50 -0
  195. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_float.rb +30 -0
  196. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb +26 -0
  197. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_hash.rb +22 -0
  198. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_integer.rb +45 -0
  199. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb +32 -0
  200. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb +27 -0
  201. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb +75 -0
  202. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_string.rb +26 -0
  203. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/join.rb +41 -0
  204. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb +47 -0
  205. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/keys.rb +26 -0
  206. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb +20 -0
  207. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/lstrip.rb +33 -0
  208. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/max.rb +21 -0
  209. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/member.rb +44 -0
  210. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/merge.rb +34 -0
  211. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/min.rb +21 -0
  212. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/num2bool.rb +43 -0
  213. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/parsejson.rb +24 -0
  214. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb +24 -0
  215. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/pick.rb +29 -0
  216. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/pick_default.rb +35 -0
  217. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/prefix.rb +45 -0
  218. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/range.rb +88 -0
  219. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/reject.rb +31 -0
  220. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/reverse.rb +28 -0
  221. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/rstrip.rb +32 -0
  222. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/shuffle.rb +46 -0
  223. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/size.rb +48 -0
  224. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/sort.rb +27 -0
  225. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/squeeze.rb +36 -0
  226. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/str2bool.rb +46 -0
  227. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb +32 -0
  228. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/strftime.rb +107 -0
  229. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/strip.rb +39 -0
  230. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/suffix.rb +45 -0
  231. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/swapcase.rb +39 -0
  232. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/time.rb +49 -0
  233. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb +28 -0
  234. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/type.rb +50 -0
  235. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/union.rb +34 -0
  236. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/unique.rb +51 -0
  237. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/upcase.rb +41 -0
  238. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/uriescape.rb +35 -0
  239. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb +56 -0
  240. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_array.rb +33 -0
  241. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb +81 -0
  242. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb +34 -0
  243. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb +48 -0
  244. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb +33 -0
  245. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb +48 -0
  246. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb +49 -0
  247. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_re.rb +40 -0
  248. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb +71 -0
  249. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_string.rb +33 -0
  250. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/values.rb +39 -0
  251. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/values_at.rb +98 -0
  252. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/zip.rb +65 -0
  253. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/provider/file_line/ruby.rb +83 -0
  254. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/type/anchor.rb +46 -0
  255. data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/type/file_line.rb +79 -0
  256. data/lib/templates/puppet/step-0/modules/stdlib/manifests/init.pp +20 -0
  257. data/lib/templates/puppet/step-0/modules/stdlib/manifests/stages.pp +43 -0
  258. data/lib/templates/puppet/step-0/modules/stdlib/metadata.json +111 -0
  259. data/lib/templates/puppet/step-0/modules/sudo/.fixtures.yml +5 -0
  260. data/lib/templates/puppet/step-0/modules/sudo/.gemfile +14 -0
  261. data/lib/templates/puppet/step-0/modules/sudo/.gemfile.lock +43 -0
  262. data/lib/templates/puppet/step-0/modules/sudo/.travis.yml +34 -0
  263. data/lib/templates/puppet/step-0/modules/sudo/LICENSE +13 -0
  264. data/lib/templates/puppet/step-0/modules/sudo/Modulefile +9 -0
  265. data/lib/templates/puppet/step-0/modules/sudo/README.md +171 -0
  266. data/lib/templates/puppet/step-0/modules/sudo/Rakefile +1 -0
  267. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.aix +90 -0
  268. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.archlinux +90 -0
  269. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.deb +90 -0
  270. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.freebsd +98 -0
  271. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.omnios +90 -0
  272. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.rhel5 +97 -0
  273. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.rhel6 +115 -0
  274. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.solaris +90 -0
  275. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.suse +81 -0
  276. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.ubuntu +30 -0
  277. data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.wheezy +17 -0
  278. data/lib/templates/puppet/step-0/modules/sudo/lib/augeas/lenses/fixedsudoers.aug +520 -0
  279. data/lib/templates/puppet/step-0/modules/sudo/manifests/allow.pp +76 -0
  280. data/lib/templates/puppet/step-0/modules/sudo/manifests/conf.pp +105 -0
  281. data/lib/templates/puppet/step-0/modules/sudo/manifests/configs.pp +24 -0
  282. data/lib/templates/puppet/step-0/modules/sudo/manifests/init.pp +151 -0
  283. data/lib/templates/puppet/step-0/modules/sudo/manifests/package/aix.pp +46 -0
  284. data/lib/templates/puppet/step-0/modules/sudo/manifests/package/solaris.pp +60 -0
  285. data/lib/templates/puppet/step-0/modules/sudo/manifests/package.pp +61 -0
  286. data/lib/templates/puppet/step-0/modules/sudo/manifests/params.pp +127 -0
  287. data/lib/templates/puppet/step-0/modules/sudo/metadata.json +59 -0
  288. data/lib/templates/puppet/step-0/modules/sudo/templates/users_groups.erb +9 -0
  289. data/lib/templates/puppet/step-0/modules/users/manifests/init.pp +15 -0
  290. data/lib/templates/puppet/step-0/modules/users/manifests/user.pp +50 -0
  291. data/lib/templates/puppet/step-1/Puppetfile.erb +5 -0
  292. data/lib/templates/puppet/step-1/hiera/data/common.yaml.erb +11 -0
  293. data/lib/templates/puppet/step-1/hiera/data/environment.yaml.erb +11 -0
  294. data/lib/templates/puppet/step-1/hiera/data/node.yaml.erb +11 -0
  295. data/lib/templates/puppet/step-1/hiera/hiera.yaml.erb +11 -0
  296. data/lib/templates/puppet/step-1/manifests/node.erb +5 -0
  297. data/lib/templates/puppet/step-1/manifests/site.pp.erb +15 -0
  298. data/lib/templates/puppet/step-1/modules/users/manifests/init.pp +15 -0
  299. data/lib/templates/puppet/step-1/modules/users/manifests/user.pp +49 -0
  300. data/lib/templates/puppet/step-2/Puppetfile.erb +5 -0
  301. data/lib/templates/puppet/step-2/hiera/data/common.yaml.erb +1 -0
  302. data/lib/templates/puppet/step-2/hiera/data/environment.yaml.erb +1 -0
  303. data/lib/templates/puppet/step-2/hiera/data/node.yaml.erb +1 -0
  304. data/lib/templates/puppet/step-2/hiera/hiera.yaml.erb +11 -0
  305. data/lib/templates/puppet/step-2/manifests/node.erb +3 -0
  306. data/lib/templates/puppet/step-2/manifests/site.pp.erb +10 -0
  307. data/lib/templates/puppet/step-3/Puppetfile.erb +5 -0
  308. data/lib/templates/puppet/step-3/hiera/data/common.yaml.erb +99 -0
  309. data/lib/templates/puppet/step-3/hiera/data/environment.yaml.erb +99 -0
  310. data/lib/templates/puppet/step-3/hiera/data/node.yaml.erb +99 -0
  311. data/lib/templates/puppet/step-3/hiera/hiera.yaml.erb +11 -0
  312. data/lib/templates/puppet/step-3/manifests/node.erb +5 -0
  313. data/lib/templates/puppet/step-3/manifests/site.pp.erb +15 -0
  314. data/spec/environment_spec.rb +82 -0
  315. data/spec/factories/environment.rb +20 -0
  316. data/spec/factories/node.rb +22 -0
  317. data/spec/factories/profile.rb +10 -0
  318. data/spec/factories/project.rb +17 -0
  319. data/spec/factories/provision.rb +13 -0
  320. data/spec/factories/role.rb +9 -0
  321. data/spec/fixtures/Capfile.test +2 -0
  322. data/spec/fixtures/Gemfile.test +5 -0
  323. data/spec/fixtures/config/deploy/environment.test +35 -0
  324. data/spec/fixtures/config/deploy/production.test +35 -0
  325. data/spec/fixtures/config/deploy/staging.test +35 -0
  326. data/spec/fixtures/config/deploy/vagrant.test +37 -0
  327. data/spec/fixtures/config/deploy.test +120 -0
  328. data/spec/fixtures/dot_bebox.test.erb +4 -0
  329. data/spec/fixtures/dot_gitignore.test +8 -0
  330. data/spec/fixtures/node/Vagrantfile.test.erb +18 -0
  331. data/spec/fixtures/node/node_0.test.erb +3 -0
  332. data/spec/fixtures/node/prepared_node_0.test.erb +4 -0
  333. data/spec/fixtures/node/provisioned_node_0.test.erb +4 -0
  334. data/spec/fixtures/node/vagrant_deploy.test +38 -0
  335. data/spec/fixtures/puppet/hiera/data/node0.server1.test.yaml.test +4 -0
  336. data/spec/fixtures/puppet/profiles/test/profile_0/Puppetfile.test +24 -0
  337. data/spec/fixtures/puppet/profiles/test/profile_0/Puppetfile_with_modules.test +20 -0
  338. data/spec/fixtures/puppet/profiles/test/profile_0/manifests/init.pp.test +17 -0
  339. data/spec/fixtures/puppet/profiles/test/profile_0/manifests/init_with_content.pp.test +22 -0
  340. data/spec/fixtures/puppet/roles/manifests/init.pp.test +14 -0
  341. data/spec/fixtures/puppet/steps/step-0/hiera/data/common.yaml.test +26 -0
  342. data/spec/fixtures/puppet/steps/step-0/hiera/data/node0.server1.test.yaml.test +0 -0
  343. data/spec/fixtures/puppet/steps/step-0/hiera/data/pname_env.yaml.test +26 -0
  344. data/spec/fixtures/puppet/steps/step-0/hiera/data/production.yaml.test +0 -0
  345. data/spec/fixtures/puppet/steps/step-0/hiera/data/staging.yaml.test +0 -0
  346. data/spec/fixtures/puppet/steps/step-0/hiera/data/vagrant.yaml.test +0 -0
  347. data/spec/fixtures/puppet/steps/step-0/hiera/hiera.yaml.test +11 -0
  348. data/spec/fixtures/puppet/steps/step-0/manifests/site.pp.test +10 -0
  349. data/spec/fixtures/puppet/steps/step-0/manifests/site_with_node.pp.test +15 -0
  350. data/spec/fixtures/puppet/steps/step-1/hiera/data/common.yaml.test +11 -0
  351. data/spec/fixtures/puppet/steps/step-1/hiera/data/node0.server1.test.yaml.test +0 -0
  352. data/spec/fixtures/puppet/steps/step-1/hiera/data/pname_env.yaml.test +11 -0
  353. data/spec/fixtures/puppet/steps/step-1/hiera/data/production.yaml.test +0 -0
  354. data/spec/fixtures/puppet/steps/step-1/hiera/data/staging.yaml.test +0 -0
  355. data/spec/fixtures/puppet/steps/step-1/hiera/data/vagrant.yaml.test +0 -0
  356. data/spec/fixtures/puppet/steps/step-1/hiera/hiera.yaml.test +11 -0
  357. data/spec/fixtures/puppet/steps/step-1/manifests/site.pp.test +10 -0
  358. data/spec/fixtures/puppet/steps/step-1/manifests/site_with_node.pp.test +15 -0
  359. data/spec/fixtures/puppet/steps/step-2/Puppetfile.test +6 -0
  360. data/spec/fixtures/puppet/steps/step-2/hiera/data/common.yaml.test +1 -0
  361. data/spec/fixtures/puppet/steps/step-2/hiera/data/node0.server1.test.yaml.test +1 -0
  362. data/spec/fixtures/puppet/steps/step-2/hiera/data/pname_env.yaml.test +1 -0
  363. data/spec/fixtures/puppet/steps/step-2/hiera/data/production.yaml.test +1 -0
  364. data/spec/fixtures/puppet/steps/step-2/hiera/data/staging.yaml.test +1 -0
  365. data/spec/fixtures/puppet/steps/step-2/hiera/data/vagrant.yaml.test +1 -0
  366. data/spec/fixtures/puppet/steps/step-2/hiera/hiera.yaml.test +11 -0
  367. data/spec/fixtures/puppet/steps/step-2/manifests/site.pp.test +10 -0
  368. data/spec/fixtures/puppet/steps/step-2/manifests/site_with_node.pp.test +13 -0
  369. data/spec/fixtures/puppet/steps/step-2/manifests/site_with_node_role_association.pp.test +16 -0
  370. data/spec/fixtures/puppet/steps/step-2/modules/profiles/manifests/test/profile_0.pp.test +17 -0
  371. data/spec/fixtures/puppet/steps/step-2/modules/roles/manifests/role_0.pp.test +16 -0
  372. data/spec/fixtures/puppet/steps/step-3/hiera/data/common.yaml.test +99 -0
  373. data/spec/fixtures/puppet/steps/step-3/hiera/data/node0.server1.test.yaml.test +1 -0
  374. data/spec/fixtures/puppet/steps/step-3/hiera/data/pname_env.yaml.test +99 -0
  375. data/spec/fixtures/puppet/steps/step-3/hiera/data/production.yaml.test +1 -0
  376. data/spec/fixtures/puppet/steps/step-3/hiera/data/staging.yaml.test +1 -0
  377. data/spec/fixtures/puppet/steps/step-3/hiera/data/vagrant.yaml.test +1 -0
  378. data/spec/fixtures/puppet/steps/step-3/hiera/hiera.yaml.test +11 -0
  379. data/spec/fixtures/puppet/steps/step-3/manifests/site.pp.test +10 -0
  380. data/spec/fixtures/puppet/steps/step-3/manifests/site_with_node.pp.test +15 -0
  381. data/spec/fixtures/puppet/ubuntu_dependencies.test +10 -0
  382. data/spec/node0.server1.test/prepare_phase_spec.rb +53 -0
  383. data/spec/node0.server1.test/provision_step_0_spec.rb +46 -0
  384. data/spec/node0.server1.test/provision_step_1_spec.rb +41 -0
  385. data/spec/node0.server1.test/provision_step_2_spec.rb +79 -0
  386. data/spec/node0.server1.test/provision_step_3_spec.rb +76 -0
  387. data/spec/node_role_spec.rb +20 -0
  388. data/spec/node_spec.rb +71 -0
  389. data/spec/node_wizard_spec.rb +22 -0
  390. data/spec/ordered_phases_spec.rb +55 -0
  391. data/spec/pre_prepare_spec.rb +78 -0
  392. data/spec/pre_provision_steps_spec.rb +40 -0
  393. data/spec/profile_spec.rb +70 -0
  394. data/spec/project_spec.rb +195 -0
  395. data/spec/project_wizard_spec.rb +51 -0
  396. data/spec/puppet_spec_helper.rb +15 -0
  397. data/spec/role_profiles_spec.rb +40 -0
  398. data/spec/role_spec.rb +56 -0
  399. data/spec/spec_helper.rb +37 -0
  400. data/spec/support/config_specs.yaml.example +2 -0
  401. data/spec/vagrant_spec_helper.rb +15 -0
  402. metadata +625 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b2686461b25f6cddf91684fc202769d79fc89863
4
+ data.tar.gz: fac186b3c4af1096e307c23fa5c26a2752763d22
5
+ SHA512:
6
+ metadata.gz: afbfa11267c24b44bd88cdbc14a5d83f9c36e8db23d72a9109ea483a0442a39829a1f5b0b7f92cdb270c2ce9719a50a2ad1c66e7344e1a61774fd4c2e19c13e3
7
+ data.tar.gz: 73eb634c5c82c13a392d2c5d45cbc6615204eb6aca6feaa6710849ce5c9cf22947d17991d34cac8602946101069dea94998f831d1c9f0644d55ad54c7853cba4
data/.gitignore ADDED
@@ -0,0 +1,78 @@
1
+ # Compiled source #
2
+ ###################
3
+ *.com
4
+ *.class
5
+ *.dll
6
+ *.exe
7
+ *.o
8
+ *.so
9
+
10
+ # Packages #
11
+ ############
12
+ # it's better to unpack these files and commit the raw source
13
+ # git has its own built in compression methods
14
+ *.7z
15
+ *.dmg
16
+ *.gz
17
+ *.iso
18
+ *.jar
19
+ *.rar
20
+ *.tar
21
+ *.zip
22
+ *.box
23
+ # OS generated files #
24
+ ######################
25
+ .DS_Store
26
+ .DS_Store?
27
+ ._*
28
+ .Spotlight-V100
29
+ .Trashes
30
+ Icon?
31
+ ehthumbs.db
32
+ Thumbs.db
33
+
34
+ #Rails specific stuff
35
+ .DS_Store
36
+ config/database.yml
37
+ *.log
38
+ tmp/
39
+ *.sql
40
+ *.sqlite
41
+ *.sqlite3
42
+ .rvmrc
43
+ public/system
44
+ public/spree
45
+ /public/system*
46
+ .idea/
47
+ public/uploads
48
+ .sass-cache/
49
+ .bundle/
50
+ .jhw-cache/
51
+ boxes/
52
+
53
+ ## UNIX TEMP FILES
54
+ *~
55
+
56
+ # Vagrant
57
+ .vagrant
58
+ Vagrantfile
59
+ boxes_recreate.sh
60
+
61
+ # Hiera Development Environment
62
+ puppet/hiera/data/server1.development.test.yaml
63
+ puppet/hiera/data/server2.development.test.yaml
64
+ puppet/hiera/data/server3.development.test.yaml
65
+ puppet/hiera/data/vagrant.yaml
66
+ puppet/hiera/data/development.yaml
67
+ puppet/hiera/data/new_production.yaml
68
+
69
+ # Gem generation
70
+ pkg/
71
+
72
+ # Spec tests
73
+ spec/support/config_specs.yaml
74
+
75
+ # Local
76
+ TODO
77
+ .project
78
+ .timetracker-project
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,163 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bebox (0.0.1)
5
+ active_attr (= 0.8.3)
6
+ colorize (= 0.6.0)
7
+ gli (= 2.10.0)
8
+ highline (= 1.6.21)
9
+ progressbar (= 0.21.0)
10
+ tilt (= 2.0.1)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ actionpack (4.1.0)
16
+ actionview (= 4.1.0)
17
+ activesupport (= 4.1.0)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ actionview (4.1.0)
21
+ activesupport (= 4.1.0)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ active_attr (0.8.3)
25
+ activemodel (>= 3.0.2, < 4.2)
26
+ activesupport (>= 3.0.2, < 4.2)
27
+ activemodel (4.1.0)
28
+ activesupport (= 4.1.0)
29
+ builder (~> 3.1)
30
+ activesupport (4.1.0)
31
+ i18n (~> 0.6, >= 0.6.9)
32
+ json (~> 1.7, >= 1.7.7)
33
+ minitest (~> 5.1)
34
+ thread_safe (~> 0.1)
35
+ tzinfo (~> 1.1)
36
+ aruba (0.5.4)
37
+ childprocess (>= 0.3.6)
38
+ cucumber (>= 1.1.1)
39
+ rspec-expectations (>= 2.7.0)
40
+ awesome_print (1.2.0)
41
+ binding_of_caller (0.7.2)
42
+ debug_inspector (>= 0.0.1)
43
+ builder (3.2.2)
44
+ childprocess (0.5.3)
45
+ ffi (~> 1.0, >= 1.0.11)
46
+ coderay (1.1.0)
47
+ colorize (0.6.0)
48
+ columnize (0.8.9)
49
+ coolline (0.4.3)
50
+ cucumber (1.3.14)
51
+ builder (>= 2.1.2)
52
+ diff-lcs (>= 1.1.3)
53
+ gherkin (~> 2.12)
54
+ multi_json (>= 1.7.5, < 2.0)
55
+ multi_test (>= 0.1.1)
56
+ debug_inspector (0.0.2)
57
+ debugger (1.6.6)
58
+ columnize (>= 0.3.1)
59
+ debugger-linecache (~> 1.2.0)
60
+ debugger-ruby_core_source (~> 1.3.2)
61
+ debugger-linecache (1.2.0)
62
+ debugger-ruby_core_source (1.3.2)
63
+ diff-lcs (1.2.5)
64
+ diffy (3.0.4)
65
+ erubis (2.7.0)
66
+ factory_girl (4.3.0)
67
+ activesupport (>= 3.0.0)
68
+ ffi (1.9.3)
69
+ gherkin (2.12.2)
70
+ multi_json (~> 1.3)
71
+ gli (2.10.0)
72
+ grit (2.5.0)
73
+ diff-lcs (~> 1.1)
74
+ mime-types (~> 1.15)
75
+ posix-spawn (~> 0.3.6)
76
+ highline (1.6.21)
77
+ hirb (0.7.1)
78
+ i18n (0.6.9)
79
+ jazz_hands (0.5.2)
80
+ awesome_print (~> 1.2)
81
+ coolline (>= 0.4.2)
82
+ hirb (~> 0.7.1)
83
+ pry (~> 0.9.12)
84
+ pry-debugger (~> 0.2.2)
85
+ pry-doc (~> 0.4.6)
86
+ pry-git (~> 0.2.3)
87
+ pry-rails (~> 0.3.2)
88
+ pry-remote (>= 0.1.7)
89
+ pry-stack_explorer (~> 0.4.9)
90
+ railties (>= 3.0, < 5.0)
91
+ json (1.8.1)
92
+ method_source (0.8.2)
93
+ mime-types (1.25.1)
94
+ minitest (5.3.3)
95
+ multi_json (1.9.2)
96
+ multi_test (0.1.1)
97
+ net-ssh (2.9.1)
98
+ posix-spawn (0.3.8)
99
+ progressbar (0.21.0)
100
+ pry (0.9.12.6)
101
+ coderay (~> 1.0)
102
+ method_source (~> 0.8)
103
+ slop (~> 3.4)
104
+ pry-debugger (0.2.2)
105
+ debugger (~> 1.3)
106
+ pry (~> 0.9.10)
107
+ pry-doc (0.4.6)
108
+ pry (>= 0.9)
109
+ yard (>= 0.8)
110
+ pry-git (0.2.3)
111
+ diffy
112
+ grit
113
+ pry (>= 0.9.8)
114
+ pry-rails (0.3.2)
115
+ pry (>= 0.9.10)
116
+ pry-remote (0.1.8)
117
+ pry (~> 0.9)
118
+ slop (~> 3.0)
119
+ pry-stack_explorer (0.4.9.1)
120
+ binding_of_caller (>= 0.7)
121
+ pry (>= 0.9.11)
122
+ rack (1.5.2)
123
+ rack-test (0.6.2)
124
+ rack (>= 1.0)
125
+ railties (4.1.0)
126
+ actionpack (= 4.1.0)
127
+ activesupport (= 4.1.0)
128
+ rake (>= 0.8.7)
129
+ thor (>= 0.18.1, < 2.0)
130
+ rake (10.3.1)
131
+ rspec (2.14.1)
132
+ rspec-core (~> 2.14.0)
133
+ rspec-expectations (~> 2.14.0)
134
+ rspec-mocks (~> 2.14.0)
135
+ rspec-core (2.14.8)
136
+ rspec-expectations (2.14.5)
137
+ diff-lcs (>= 1.1.3, < 2.0)
138
+ rspec-mocks (2.14.6)
139
+ serverspec (1.6.0)
140
+ highline
141
+ net-ssh
142
+ rspec (~> 2.13)
143
+ specinfra (~> 1.11)
144
+ slop (3.5.0)
145
+ specinfra (1.12.0)
146
+ thor (0.19.1)
147
+ thread_safe (0.3.3)
148
+ tilt (2.0.1)
149
+ tzinfo (1.1.0)
150
+ thread_safe (~> 0.1)
151
+ yard (0.8.7.4)
152
+
153
+ PLATFORMS
154
+ ruby
155
+
156
+ DEPENDENCIES
157
+ aruba (= 0.5.4)
158
+ bebox!
159
+ factory_girl (= 4.3.0)
160
+ jazz_hands (= 0.5.2)
161
+ rake (= 10.3.1)
162
+ rspec (= 2.14.1)
163
+ serverspec (= 1.6.0)
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) <year> <copyright holders>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,372 @@
1
+
2
+ Bebox
3
+ =====
4
+
5
+ Introduction
6
+ ------------
7
+
8
+ Bebox is designed to meet provisioning goals for small to medium environments (maybe even big ones) while using [Puppet (opensource)](http://puppetlabs.com/puppet/puppet-open-source), and without the need for a Puppet Master. This project is intended for teams that tipically use two repositories for each project: the "app" repo and the "provisioning" repo. This project centers its efforts in trying to organize how these "provisioning" repos are constructed.
9
+
10
+ Bebox was originally born from the necessity of automating the provisioning of environments in which [Rails](https://github.com/rails/rails) web applications could run, with the least amount of steps, and be able to reproduce the production setup every time. Please note that, even while this is the genesis for Bebox, it does not imply that it is specifically tailored for provisiong web applications, and we think it can ultimately be used pretty much in any scenario where Puppet is used without overwhealming complexity.
11
+
12
+ Bebox's main concern is __organization__. It is generally a good idea to have conventions about how different source code files are placed and named and be able to use this to reduce the details required to understand a project while also providing automation in key places. These conventions may include things like from how to write modules, integrate them into the projects, a directory structure for the projects to follow, how to have a replicated “development/test” environment into virtual machines, etc.
13
+
14
+ NOTE: For the moment, Bebox assumes that the remote machines' OS is Debian based.
15
+
16
+ Bebox development is based on awesome tools on their own, and essentially based on the following:
17
+
18
+ * Written in Ruby and distributed as a gem
19
+ * It has a very nice CLI based on a commandline tool framework called [GLI](https://github.com/davetron5000/gli)
20
+ * Uses [Puppet (opensource)](http://puppetlabs.com/puppet/puppet-open-source) for provisioning machines, and its the main component that the Bebox workflow aims to organize.
21
+ * Uses [vagrant](http://www.vagrantup.com/) for setting up a similar development/test environment in accordance to the remote machines real setup.
22
+ * Uses [Capistrano](http://capistranorb.com/) for automating the tasks to be executed on remote/vagrant machines.
23
+
24
+ Workflow
25
+ --------
26
+
27
+ Bebox’s workflow is comprised of the five (5) phases explained below:
28
+
29
+ ###Project creation phase
30
+
31
+ In this phase, the project skeleton is created, just like when a rails app is created. Keep in mind we are generating a "provisioning" repo skeleton and much of the logic behind bebox is put directly into the generated code so it can be tuned.
32
+
33
+ ###Environment definition phase
34
+
35
+ Any number of environments are defined. By default, the 'vagrant', 'staging', and 'production' environments are present. You an create any number of environments you need. The 'vagrant' environment is special as it is designed to run in virtual machines hosted in the local machine.
36
+
37
+ ###Node allocation phase
38
+
39
+ For each environment, there can be any number of nodes. The nodes for every environment are configured. A node represents a machine or server, a node's critical attributes are only it's hostname and ip address.
40
+
41
+ ###Prepare phase
42
+
43
+ In this phase, all nodes are equipped with a set of base packages and tools via Capistrano which sole purpose is to help install Puppet. Also, very importantly, each node gets a Puppet opensource standalone installation. In order for Capistrano to be able to connect and install this in each node, a set of keys must already be present as authorized_keys in the remote servers, Bebox reminds of this step, and will possibly help do this semi-automatically in the future (requires user input because of boostraping from a root password). You will notice that Puppet installer files are bundled with Bebox, to use a fixed Puppet opensource version. This was necessary to ensure a particular Puppet version to avoid breaking things.
44
+
45
+ ###Provisioning phase
46
+
47
+ Once Puppet is installed, we can use it to provision anything we want. The provisioning phase is the last phase of the project and consists (currently) of four steps. This steps has a clear separation of concerns which we have chosen based on practical experience, however this is the default and you can add or remove any number of steps, but we recommend at least to stick with the first two.
48
+
49
+ Steps were created to run sequential puppet runs and apply multiple manifests in order. Although this may seem strange, Puppet's non-deterministic manner is something that is not suitable every time and having only one manifest to pack everything into can create some trouble with dependant modules.
50
+
51
+ Also, the idea of steps helps in visualizing/imagining layers of configuration.
52
+
53
+ Coming back to the steps, the four default steps that have been put into Bebox's projects by default are:
54
+
55
+ ####Fundamental step (0-fundamental)
56
+ This step only provides a 'puppet' user, which the following steps use to install everything else (instead of using root). This is done to have all environments as similar as possible. In the 'vagrant' environment, the main user is 'vagrant', but this could also be 'root' or something else, so this ensures that a single user (other than root) for making changes via Puppet is created.
57
+
58
+ ####The user layer step (1-users)
59
+ Based on practical experience, this next step should be the one responsible for setting system users, so that they exist prior to any service level provisioning.
60
+
61
+ ####The service layer step (2-services)
62
+ This step is what you would have in your regular puppet provisioning repo (except for the users of course). We follow the roles and profiles scheme (links to read about [here](http://www.craigdunn.org/2012/05/239/) and [here](http://garylarizza.com/blog/2014/02/17/puppet-workflow-part-2/)) and install the majority of the functional services, web, database, etc.
63
+
64
+ ####The security layer step (3-security)
65
+ This step configure some packages to provide a minimal security in the system (fail2ban, ssh access, iptables).
66
+
67
+
68
+ NOTE: Probably many people would think this is not advisable, so there is always the possibility of having only one step, one run, one manifest for Puppet to run in this phase.
69
+
70
+ How to Use
71
+ ----------
72
+ ###Installation
73
+
74
+ Pre-requisites
75
+
76
+ * rbenv
77
+ * ruby version >= 1.9.2 (ruby 2.1.0 recommended)
78
+ * vagrant (tested using vagrant 1.6.3)
79
+
80
+ ####Build bebox gem
81
+ This commands clone the project and generate the bebox gem file:
82
+ ```
83
+ git clone https://github.com/jairodiaz/bebox
84
+ cd bebox
85
+ gem build bebox.gemspec
86
+ ```
87
+ This creates a *bebox-0.0.1.gem* file.
88
+
89
+
90
+ ####Install bebox:
91
+
92
+ In the directory where you want to install bebox do:
93
+
94
+ gem install BEBOX_GEM_PATH
95
+
96
+ Where BEBOX_GEM_PATH is the route to the *bebox-0.0.1.gem* file created previously.
97
+
98
+ ###Bebox project creation (Project creation phase).
99
+
100
+ To create a new bebox project do:
101
+
102
+ bebox new PROJECT_NAME
103
+
104
+ In console appears a simple wizard to configure a vagrant box for the project. The vagrant box can be downloaded automatically with the wizard or linked with an existent local *.box file.
105
+
106
+ This creates a subdirectory named *bebox-[PROJECT_NAME]* with the initial skeleton of application. To access new bebox commands (much like Rails does) cd into the newly created bebox project:
107
+
108
+ cd bebox-[PROJECT_NAME]
109
+
110
+ ###Manage Environments (Environment definition phase).
111
+ Then you can add/remove/list environments. By default: the production, staging and vagrant environments are already created.
112
+
113
+ To add an environment:
114
+
115
+ bebox environment new ENVIRONMENT
116
+
117
+ To remove an environment:
118
+
119
+ bebox environment remove ENVIRONMENT
120
+
121
+ To list environments:
122
+
123
+ bebox environment list
124
+
125
+ ###Manage Nodes (Node allocation phase).
126
+ If you have at least one environment you can add/remove/list nodes.
127
+
128
+ To add a node:
129
+
130
+ bebox node new
131
+
132
+ Then in the console a simple wizard appear asking the node parameters.
133
+
134
+ To remove a node:
135
+
136
+ bebox node remove
137
+
138
+ Then in the console a simple wizard appear for selecting the node to remove from the available nodes.
139
+
140
+ To list nodes:
141
+
142
+ bebox node list [--environment ENVIRONMENT] [--all]
143
+
144
+ Without options it list nodes for the default *ENVIRONMENT* that is **vagrant**. If you provide the *ENVIRONMENT* flag it list nodes for that environment or if the *--all* switch is set list all nodes for all environments.
145
+
146
+
147
+ ###Prepare Nodes (Prepare phase).
148
+ If you have nodes configured then you can prepare them.
149
+
150
+ To prepare them:
151
+
152
+ bebox prepare [--environment ENVIRONMENT]
153
+
154
+ It will prepare all nodes that are not prepared. If you have nodes already prepared (For example you add a new node after prepare previous nodes), a wizard appear to ask if you want to re-prepare them. It will not prepare nodes that you don't want to re-prepare.
155
+
156
+ By default if an *ENVIRONMENT* is not specified the default will be **vagrant**.
157
+
158
+ Also if the nodes are in the vagrant environment you can up/halt the vagrant machines:
159
+
160
+ **Take in account that this phase would take some time while it download and configure the base packages in all the nodes to be prepared.**
161
+
162
+ For vagrant nodes already prepared you can stop/start the vagrant machines with:
163
+
164
+ bebox vagrant_halt
165
+
166
+ bebox vagrant_up
167
+
168
+ ###Puppet (Provisioning phase)
169
+
170
+ If you have nodes prepared you can provision them step-by-step. All steps can be applied without restrictions. If you want to configure the provisioning we encourage to use the roles and profiles pattern thath we implement through a special set of commands (See parts below).
171
+
172
+ At project creation a set of default roles, profiles and hiera data are configured for the nodes in the steps (0, 1 and 3), but you could re-configuring in any moment. The step-2 need to be configured completely.
173
+
174
+
175
+ To provision the nodes:
176
+
177
+ bebox apply [STEP] [--environment ENVIRONMENT] [--all]
178
+
179
+
180
+ The STEP option must be one of: *step-0*, *step-1*, *step-2*, *step-3*
181
+ By default if an *ENVIRONMENT* is not specified the default will be **vagrant**.
182
+ The *--all* switch allows to run all steps in order without specify the STEP option.
183
+
184
+ **We recommend to configure the roles, profiles and hiera data previously to apply any step.**
185
+
186
+ ####Manage roles
187
+
188
+ To add a role:
189
+
190
+ bebox role new ROLE
191
+
192
+ To remove a role:
193
+
194
+ bebox role remove ROLE
195
+
196
+
197
+ Then in the console a simple wizard appear for selecting the role to remove from the available roles.
198
+
199
+ To list roles:
200
+
201
+ bebox role list
202
+
203
+ **We recommend to use our default roles (fundamental, users, security) for steps (0, 1, 3), but you can edit or delete them under your own risk**
204
+
205
+ ####Manage profiles
206
+
207
+ To add a profile:
208
+
209
+ bebox profile new PROFILE [-p PATH]
210
+
211
+ This command creates a file structure for the profile with templates that you need to edit for the profile do something.
212
+ The structure is like:
213
+
214
+ ── profiles/
215
+ └── <category1>/
216
+ └── <category2>/
217
+ ...
218
+ └── <categoryN>/
219
+ └── <profile-name>/
220
+ ├── manifests/
221
+ │ └── init.pp
222
+ └── Puppetfile
223
+
224
+ The *categories (category1, category2, ... categoryN)* are set if the argument *-p PATH* is passed; and are useful better organization of profiles.
225
+
226
+ For example:
227
+ ```
228
+ bebox profile new iptables -p basic/security
229
+ ```
230
+ would create the profiles directories structure:
231
+ ```
232
+ ── profiles/
233
+ └── basic/
234
+ └── security/
235
+ └── iptables/
236
+ ├── manifests/
237
+ │ └── init.pp
238
+ └── Puppetfile
239
+
240
+ You need to modify the init.pp file adding usual puppet calls to classes, resources, modules, hiera.
241
+ You need to modify the Puppetfile to set the modules that the manifest file will use.
242
+ Also you need to modify the hiera data that the manifest will use (See Hiera part below).
243
+
244
+ To remove a profile:
245
+
246
+
247
+ bebox profile remove
248
+
249
+
250
+ Then in the console a simple wizard appear for selecting the profile to remove from the available profiles.
251
+
252
+ To list profiles:
253
+
254
+
255
+ bebox profile list
256
+
257
+ **We recommend to use our default profiles (fundamental, users, security) for steps (0, 1, 3), but you can edit or delete them under your own risk**
258
+
259
+ **Important: Remember that you need to write/edit the puppet code for the profiles to work (specially step-2 that has no defaults); also you have to write/edit the Puppetfile template created to add modules that your profile use; additionally if you call hiera data from a profile you need to add them in the hiera/data/<data>.yaml file in the structure created (see Hiera part below)**
260
+
261
+
262
+ ####Associate roles and profiles
263
+
264
+ This add/remove a profile to a role.
265
+
266
+ To add a profile to a role:
267
+
268
+ bebox role add_profile
269
+
270
+ Then in the console a simple wizard appear for selecting the role and profile to add.
271
+
272
+ To remove a profile from a role:
273
+
274
+ bebox role remove_profile
275
+
276
+ Then in the console a simple wizard appear for selecting the role and profile to remove.
277
+
278
+ To list profiles configured in a role:
279
+
280
+ bebox role list_profiles ROLE
281
+
282
+ ####Associate nodes and roles
283
+
284
+ This change the role associated with a specific node.
285
+
286
+ To set the role for a specific node:
287
+
288
+
289
+ bebox node set_role [--environment ENVIRONMENT]
290
+
291
+ Then in the console a simple wizard appear for selecting the node and role to set.
292
+ By default if an *ENVIRONMENT* is not specified the default will be **vagrant**.
293
+
294
+
295
+ ###Hiera
296
+
297
+ If you use hiera data from your profiles, you can add them to the appropiate file in the file structure shown below:
298
+
299
+ ── puppet/
300
+ └── steps/
301
+ ├── 0-fundamental/
302
+ ├── 1-users/
303
+ ├── 2-services/
304
+ ├── 3-security/
305
+ ├── hiera/
306
+ │ └── data/
307
+ │ │ └── [node].yaml
308
+ │ │ └── [environment].yaml
309
+ │ │ └── common.yaml
310
+ │ └── hiera.yaml
311
+ ├── manifests/
312
+ │ └── site.pp
313
+ ├── modules/
314
+ └── Puppetfile (Automatically generated by Bebox in every 'apply')
315
+
316
+ Each of he <number>-<step-name> corresponds provisioning steps phase. For example **0-fundamental** correspond to **step-0** option.
317
+
318
+ To add hiera data you need to edit any of the **[node].yaml**, **[environment].yaml**, **common.yaml**.
319
+ [node]: correspond to the hiera file for the node hostname (Ex. node0.server1.com.yaml).
320
+ [environment]: correspond to the hiera file for the node hostname (Ex. vagrant.yaml, production.yaml).
321
+
322
+
323
+ Development
324
+ -----------
325
+
326
+ To use the project in development mode, you need to do this:
327
+
328
+ * Clone bebox from the repository.
329
+
330
+ git clone ssh://git@codescrum.repositoryhosting.com/codescrum/bebox.git
331
+
332
+ * Run bundle to install
333
+
334
+ bundle install
335
+
336
+ * Generate the gem package
337
+
338
+ rake package
339
+
340
+ * Make a tmp directory inside bebox folder
341
+
342
+ mkdir tmp
343
+ cd tmp
344
+
345
+ * Execute the project creation command preceded by **bundle exec**
346
+
347
+ bundle exec bebox new PROJECT
348
+
349
+ * Enter to the project created
350
+
351
+ cd PROJECT
352
+
353
+ * Add to the **Gemfile** the line
354
+
355
+ gem 'bebox', :path => "BEBOX_PATH_IN_YOUR_PC/pkg"
356
+
357
+ * Execute any project commands preceded by **bundle exec**
358
+
359
+ bundle exec bebox environment
360
+
361
+ Tests
362
+ -----
363
+
364
+ Before running any tests you need to configure the IP address for the vagrant machine. To do this create the file *spec/support/config_specs.yaml* from the *spec/support/config_specs.yaml.example* and configure a local newtwork IP free address to use.
365
+
366
+ By project's nature the specs must be run in order. To do this all specs has a 'Test XX:' naming convention. If you want to run all tests in order we have a ordered_phases_spec.rb file than you can run with.
367
+
368
+ rspec spec/ordered_phases_spec.rb
369
+
370
+ Maybe it would take a large time because it creates a vagrant machine and do a basic provision downloading packages and installing them in the machine.
371
+
372
+ **Important: You need to have the [ubuntu-server-12042-x64-vbox4210-nocm.box](http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box) in the bebox root folder to run the tests**
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require 'rake/clean'
2
+ require 'rubygems'
3
+ require 'rubygems/package_task'
4
+
5
+ spec = eval(File.read('bebox.gemspec'))
6
+
7
+ Gem::PackageTask.new(spec) do |pkg|
8
+ end
data/bebox.gemspec ADDED
@@ -0,0 +1,40 @@
1
+ # Ensure we require the local version and not one we might have installed already
2
+ require File.join([File.dirname(__FILE__),'lib','bebox','version.rb'])
3
+ spec = Gem::Specification.new do |s|
4
+ s.name = 'bebox'
5
+ s.version = Bebox::VERSION
6
+ s.author = 'Codescrum'
7
+ s.email = 'team@codescrum.com'
8
+ s.homepage = 'http://www.codescrum.com'
9
+ s.licenses = ['MIT']
10
+ s.platform = Gem::Platform::RUBY
11
+ s.summary = 'Create basic provisioning of remote servers.'
12
+ s.description = <<-EOF
13
+ Bebox is a project born from the necessity of organizing a way to deal with the provisioning of remote servers.
14
+ Bebox is based on puppet and much like another quite known project Boxen,
15
+ the idea is to have a good agreement on how to manage a puppet repo for a remote environment.
16
+ It is also a good idea to have a standard approach on dealing with the provisioning problem,
17
+ including how to write modules, integrate them into the projects,
18
+ a directory structure for the projects to follow,
19
+ how to have a replicated 'development/test' environment into virtual machines, etc.
20
+ EOF
21
+ s.files = `git ls-files`.split("\n") - ['.ruby-version']
22
+ s.require_paths << 'lib'
23
+ s.has_rdoc = false
24
+ s.rdoc_options << '--title' << 'bebox' << '--main' << 'README.rdoc' << '-ri'
25
+ s.bindir = 'bin'
26
+ s.executables << 'bebox'
27
+ s.required_ruby_version = '>= 1.9.2'
28
+ s.add_development_dependency('rake', '10.3.1')
29
+ s.add_development_dependency('aruba', '0.5.4')
30
+ s.add_development_dependency('rspec', '2.14.1')
31
+ s.add_development_dependency('jazz_hands', '0.5.2')
32
+ s.add_development_dependency('serverspec', '1.6.0')
33
+ s.add_development_dependency('factory_girl', '4.3.0')
34
+ s.add_runtime_dependency('gli','2.10.0')
35
+ s.add_runtime_dependency('active_attr', '0.8.3')
36
+ s.add_runtime_dependency('tilt', '2.0.1')
37
+ s.add_runtime_dependency('highline', '1.6.21')
38
+ s.add_runtime_dependency('progressbar', '0.21.0')
39
+ s.add_runtime_dependency('colorize', '0.6.0')
40
+ end