bebox 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +78 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +163 -0
- data/LICENSE +21 -0
- data/README.md +372 -0
- data/Rakefile +8 -0
- data/bebox.gemspec +40 -0
- data/bin/bebox +5 -0
- data/lib/bebox/cli.rb +42 -0
- data/lib/bebox/commands/commands_helper.rb +33 -0
- data/lib/bebox/commands/environment_commands.rb +46 -0
- data/lib/bebox/commands/general_commands.rb +24 -0
- data/lib/bebox/commands/node_commands.rb +68 -0
- data/lib/bebox/commands/prepare_commands.rb +59 -0
- data/lib/bebox/commands/project_commands.rb +44 -0
- data/lib/bebox/commands/provision_commands.rb +145 -0
- data/lib/bebox/environment.rb +114 -0
- data/lib/bebox/logger.rb +51 -0
- data/lib/bebox/node.rb +308 -0
- data/lib/bebox/profile.rb +102 -0
- data/lib/bebox/project.rb +259 -0
- data/lib/bebox/provision.rb +257 -0
- data/lib/bebox/role.rb +103 -0
- data/lib/bebox/version.rb +3 -0
- data/lib/bebox/wizards/environment_wizard.rb +45 -0
- data/lib/bebox/wizards/node_wizard.rb +163 -0
- data/lib/bebox/wizards/profile_wizard.rb +91 -0
- data/lib/bebox/wizards/project_wizard.rb +175 -0
- data/lib/bebox/wizards/provision_wizard.rb +80 -0
- data/lib/bebox/wizards/role_wizard.rb +97 -0
- data/lib/bebox.rb +2 -0
- data/lib/deb/puppet_3.6.0/augeas-lenses_0.10.0-0ubuntu4_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/debconf-utils_1.5.42ubuntu1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/facter_2.0.1-1puppetlabs1_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/hiera_1.3.2-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libaugeas-ruby1.8_0.3.0-1.1ubuntu4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/libaugeas-ruby_0.3.0-1.1ubuntu4_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libaugeas0_0.10.0-0ubuntu4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/libjson-ruby_1.6.3-1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libruby1.8_1.8.7.352-2ubuntu1.4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/libruby_4.8_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libshadow-ruby1.8_1.4.1-8build1_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/puppet-common_3.6.0-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/puppet_3.6.0-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby-json_1.6.3-1_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby-rgen_0.6.5-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby1.8_1.8.7.352-2ubuntu1.4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby_4.8_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/virt-what_1.11-1_amd64.deb +0 -0
- data/lib/templates/node/Vagrantfile.erb +18 -0
- data/lib/templates/node/deploy_vagrant_node.erb +3 -0
- data/lib/templates/node/node.yml.erb +3 -0
- data/lib/templates/node/prepared_node.yml.erb +4 -0
- data/lib/templates/node/provisioned_node.yml.erb +4 -0
- data/lib/templates/project/Capfile.erb +2 -0
- data/lib/templates/project/Gemfile.erb +5 -0
- data/lib/templates/project/config/deploy/environment.erb +40 -0
- data/lib/templates/project/config/deploy/vagrant.erb +42 -0
- data/lib/templates/project/config/deploy.erb +120 -0
- data/lib/templates/project/dot_bebox.erb +4 -0
- data/lib/templates/project/gitignore.erb +7 -0
- data/lib/templates/project/ubuntu_dependencies +10 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/ruby/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/ruby/manifests/init.pp +24 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/sudo/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/sudo/manifests/init.pp +22 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/users/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/users/manifests/init.pp +18 -0
- data/lib/templates/puppet/default_profiles/base/security/fail2ban/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/fail2ban/manifests/init.pp +28 -0
- data/lib/templates/puppet/default_profiles/base/security/iptables/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/iptables/manifests/init.pp +27 -0
- data/lib/templates/puppet/default_profiles/base/security/ssh/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/ssh/manifests/init.pp +30 -0
- data/lib/templates/puppet/default_profiles/base/security/sysctl/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/sysctl/manifests/init.pp +20 -0
- data/lib/templates/puppet/default_profiles/base/users/ssh/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/users/ssh/manifests/init.pp +47 -0
- data/lib/templates/puppet/default_profiles/base/users/users/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/users/users/manifests/init.pp +18 -0
- data/lib/templates/puppet/default_roles/fundamental/manifests/init.pp +16 -0
- data/lib/templates/puppet/default_roles/security/manifests/init.pp +17 -0
- data/lib/templates/puppet/default_roles/users/manifests/init.pp +15 -0
- data/lib/templates/puppet/profiles/Puppetfile.erb +24 -0
- data/lib/templates/puppet/profiles/manifests/init.pp.erb +17 -0
- data/lib/templates/puppet/roles/manifests/init.pp.erb +14 -0
- data/lib/templates/puppet/step-0/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-0/hiera/data/common.yaml.erb +26 -0
- data/lib/templates/puppet/step-0/hiera/data/environment.yaml.erb +26 -0
- data/lib/templates/puppet/step-0/hiera/data/node.yaml.erb +26 -0
- data/lib/templates/puppet/step-0/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-0/manifests/node.erb +5 -0
- data/lib/templates/puppet/step-0/manifests/site.pp.erb +15 -0
- data/lib/templates/puppet/step-0/modules/rbenv/AUTHORS +11 -0
- data/lib/templates/puppet/step-0/modules/rbenv/CHANGELOG.md +70 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Gemfile +8 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Gemfile.lock +28 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Modulefile +7 -0
- data/lib/templates/puppet/step-0/modules/rbenv/README.md +173 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Rakefile +22 -0
- data/lib/templates/puppet/step-0/modules/rbenv/TODO +10 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/autospec +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/facter +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/filebucket +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/hiera +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/htmldiff +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/ldiff +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/pi +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet-lint +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet-module +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetca +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetd +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetdoc +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetmasterd +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetqd +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetrun +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/rake +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/ralsh +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/rspec +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/rspec-puppet-init +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/lib/puppet/provider/rbenvgem/default.rb +50 -0
- data/lib/templates/puppet/step-0/modules/rbenv/lib/puppet/type/rbenvgem.rb +62 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/bundle.pp +36 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/client.pp +48 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/compile.pp +102 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/definition.pp +31 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/centos.pp +25 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/suse.pp +28 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/ubuntu.pp +17 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies.pp +8 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/gem.pp +29 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/install.pp +55 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin/rbenvvars.pp +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin/rubybuild.pp +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin.pp +40 -0
- data/lib/templates/puppet/step-0/modules/rbenv/metadata.json +109 -0
- data/lib/templates/puppet/step-0/modules/rbenv/templates/Gemfile.erb +5 -0
- data/lib/templates/puppet/step-0/modules/rbenv/templates/dot.rbenvrc.erb +8 -0
- data/lib/templates/puppet/step-0/modules/stdlib/CHANGELOG.md +418 -0
- data/lib/templates/puppet/step-0/modules/stdlib/CONTRIBUTING.md +65 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Gemfile +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Gemfile.lock +166 -0
- data/lib/templates/puppet/step-0/modules/stdlib/LICENSE +19 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Modulefile +11 -0
- data/lib/templates/puppet/step-0/modules/stdlib/README.markdown +1304 -0
- data/lib/templates/puppet/step-0/modules/stdlib/README_DEVELOPER.markdown +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/README_SPECS.markdown +7 -0
- data/lib/templates/puppet/step-0/modules/stdlib/RELEASE_PROCESS.markdown +24 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Rakefile +18 -0
- data/lib/templates/puppet/step-0/modules/stdlib/checksums.json +349 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/facter_dot_d.rb +202 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/pe_version.rb +53 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/puppet_vardir.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/root_home.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/util/puppet_settings.rb +21 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/abs.rb +36 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/any2array.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/base64.rb +37 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/bool2num.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/capitalize.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/chomp.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/chop.rb +37 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/concat.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/count.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb +44 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_at.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_values.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/difference.rb +36 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/dirname.rb +15 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/downcase.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/empty.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/flatten.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/floor.rb +25 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb +17 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/getparam.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/getvar.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/grep.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb +52 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb +25 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb +25 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_key.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/hash.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/intersection.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_array.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_bool.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb +50 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_float.rb +30 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_hash.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_integer.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb +27 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb +75 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_string.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/join.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb +47 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/keys.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb +20 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/lstrip.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/max.rb +21 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/member.rb +44 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/merge.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/min.rb +21 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/num2bool.rb +43 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/parsejson.rb +24 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb +24 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/pick.rb +29 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/pick_default.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/prefix.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/range.rb +88 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/reject.rb +31 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/reverse.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/rstrip.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/shuffle.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/size.rb +48 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/sort.rb +27 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/squeeze.rb +36 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/str2bool.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/strftime.rb +107 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/strip.rb +39 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/suffix.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/swapcase.rb +39 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/time.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/type.rb +50 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/union.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/unique.rb +51 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/upcase.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/uriescape.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb +56 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_array.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb +81 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb +48 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb +48 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_re.rb +40 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb +71 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_string.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/values.rb +39 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/values_at.rb +98 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/zip.rb +65 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/provider/file_line/ruby.rb +83 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/type/anchor.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/type/file_line.rb +79 -0
- data/lib/templates/puppet/step-0/modules/stdlib/manifests/init.pp +20 -0
- data/lib/templates/puppet/step-0/modules/stdlib/manifests/stages.pp +43 -0
- data/lib/templates/puppet/step-0/modules/stdlib/metadata.json +111 -0
- data/lib/templates/puppet/step-0/modules/sudo/.fixtures.yml +5 -0
- data/lib/templates/puppet/step-0/modules/sudo/.gemfile +14 -0
- data/lib/templates/puppet/step-0/modules/sudo/.gemfile.lock +43 -0
- data/lib/templates/puppet/step-0/modules/sudo/.travis.yml +34 -0
- data/lib/templates/puppet/step-0/modules/sudo/LICENSE +13 -0
- data/lib/templates/puppet/step-0/modules/sudo/Modulefile +9 -0
- data/lib/templates/puppet/step-0/modules/sudo/README.md +171 -0
- data/lib/templates/puppet/step-0/modules/sudo/Rakefile +1 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.aix +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.archlinux +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.deb +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.freebsd +98 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.omnios +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.rhel5 +97 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.rhel6 +115 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.solaris +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.suse +81 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.ubuntu +30 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.wheezy +17 -0
- data/lib/templates/puppet/step-0/modules/sudo/lib/augeas/lenses/fixedsudoers.aug +520 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/allow.pp +76 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/conf.pp +105 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/configs.pp +24 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/init.pp +151 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/package/aix.pp +46 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/package/solaris.pp +60 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/package.pp +61 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/params.pp +127 -0
- data/lib/templates/puppet/step-0/modules/sudo/metadata.json +59 -0
- data/lib/templates/puppet/step-0/modules/sudo/templates/users_groups.erb +9 -0
- data/lib/templates/puppet/step-0/modules/users/manifests/init.pp +15 -0
- data/lib/templates/puppet/step-0/modules/users/manifests/user.pp +50 -0
- data/lib/templates/puppet/step-1/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-1/hiera/data/common.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/hiera/data/environment.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/hiera/data/node.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/manifests/node.erb +5 -0
- data/lib/templates/puppet/step-1/manifests/site.pp.erb +15 -0
- data/lib/templates/puppet/step-1/modules/users/manifests/init.pp +15 -0
- data/lib/templates/puppet/step-1/modules/users/manifests/user.pp +49 -0
- data/lib/templates/puppet/step-2/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-2/hiera/data/common.yaml.erb +1 -0
- data/lib/templates/puppet/step-2/hiera/data/environment.yaml.erb +1 -0
- data/lib/templates/puppet/step-2/hiera/data/node.yaml.erb +1 -0
- data/lib/templates/puppet/step-2/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-2/manifests/node.erb +3 -0
- data/lib/templates/puppet/step-2/manifests/site.pp.erb +10 -0
- data/lib/templates/puppet/step-3/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-3/hiera/data/common.yaml.erb +99 -0
- data/lib/templates/puppet/step-3/hiera/data/environment.yaml.erb +99 -0
- data/lib/templates/puppet/step-3/hiera/data/node.yaml.erb +99 -0
- data/lib/templates/puppet/step-3/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-3/manifests/node.erb +5 -0
- data/lib/templates/puppet/step-3/manifests/site.pp.erb +15 -0
- data/spec/environment_spec.rb +82 -0
- data/spec/factories/environment.rb +20 -0
- data/spec/factories/node.rb +22 -0
- data/spec/factories/profile.rb +10 -0
- data/spec/factories/project.rb +17 -0
- data/spec/factories/provision.rb +13 -0
- data/spec/factories/role.rb +9 -0
- data/spec/fixtures/Capfile.test +2 -0
- data/spec/fixtures/Gemfile.test +5 -0
- data/spec/fixtures/config/deploy/environment.test +35 -0
- data/spec/fixtures/config/deploy/production.test +35 -0
- data/spec/fixtures/config/deploy/staging.test +35 -0
- data/spec/fixtures/config/deploy/vagrant.test +37 -0
- data/spec/fixtures/config/deploy.test +120 -0
- data/spec/fixtures/dot_bebox.test.erb +4 -0
- data/spec/fixtures/dot_gitignore.test +8 -0
- data/spec/fixtures/node/Vagrantfile.test.erb +18 -0
- data/spec/fixtures/node/node_0.test.erb +3 -0
- data/spec/fixtures/node/prepared_node_0.test.erb +4 -0
- data/spec/fixtures/node/provisioned_node_0.test.erb +4 -0
- data/spec/fixtures/node/vagrant_deploy.test +38 -0
- data/spec/fixtures/puppet/hiera/data/node0.server1.test.yaml.test +4 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/Puppetfile.test +24 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/Puppetfile_with_modules.test +20 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/manifests/init.pp.test +17 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/manifests/init_with_content.pp.test +22 -0
- data/spec/fixtures/puppet/roles/manifests/init.pp.test +14 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/common.yaml.test +26 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/node0.server1.test.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/pname_env.yaml.test +26 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/production.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/staging.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/vagrant.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-0/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-0/manifests/site_with_node.pp.test +15 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/common.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/node0.server1.test.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/pname_env.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/production.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/staging.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/vagrant.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-1/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-1/manifests/site_with_node.pp.test +15 -0
- data/spec/fixtures/puppet/steps/step-2/Puppetfile.test +6 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/common.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/node0.server1.test.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/pname_env.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/production.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/staging.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/vagrant.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-2/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-2/manifests/site_with_node.pp.test +13 -0
- data/spec/fixtures/puppet/steps/step-2/manifests/site_with_node_role_association.pp.test +16 -0
- data/spec/fixtures/puppet/steps/step-2/modules/profiles/manifests/test/profile_0.pp.test +17 -0
- data/spec/fixtures/puppet/steps/step-2/modules/roles/manifests/role_0.pp.test +16 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/common.yaml.test +99 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/node0.server1.test.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/pname_env.yaml.test +99 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/production.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/staging.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/vagrant.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-3/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-3/manifests/site_with_node.pp.test +15 -0
- data/spec/fixtures/puppet/ubuntu_dependencies.test +10 -0
- data/spec/node0.server1.test/prepare_phase_spec.rb +53 -0
- data/spec/node0.server1.test/provision_step_0_spec.rb +46 -0
- data/spec/node0.server1.test/provision_step_1_spec.rb +41 -0
- data/spec/node0.server1.test/provision_step_2_spec.rb +79 -0
- data/spec/node0.server1.test/provision_step_3_spec.rb +76 -0
- data/spec/node_role_spec.rb +20 -0
- data/spec/node_spec.rb +71 -0
- data/spec/node_wizard_spec.rb +22 -0
- data/spec/ordered_phases_spec.rb +55 -0
- data/spec/pre_prepare_spec.rb +78 -0
- data/spec/pre_provision_steps_spec.rb +40 -0
- data/spec/profile_spec.rb +70 -0
- data/spec/project_spec.rb +195 -0
- data/spec/project_wizard_spec.rb +51 -0
- data/spec/puppet_spec_helper.rb +15 -0
- data/spec/role_profiles_spec.rb +40 -0
- data/spec/role_spec.rb +56 -0
- data/spec/spec_helper.rb +37 -0
- data/spec/support/config_specs.yaml.example +2 -0
- data/spec/vagrant_spec_helper.rb +15 -0
- metadata +625 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
set :ssh_key, 'config/keys/environments/pname_env/id_rsa'
|
|
2
|
+
set(:deploy_via, :copy_subdir)
|
|
3
|
+
set(:deploy_subdir, 'puppet')
|
|
4
|
+
# Select options accord to the phase parameter
|
|
5
|
+
if phase == 'node_prepare'
|
|
6
|
+
set :user, "root"
|
|
7
|
+
set :copy_exclude, ['/profiles', '/roles', '/steps']
|
|
8
|
+
set(:deploy_to) { "/root/code" }
|
|
9
|
+
elsif phase == 'step-0'
|
|
10
|
+
set :user, "root"
|
|
11
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
12
|
+
set(:deploy_to) { "/root/code" }
|
|
13
|
+
else
|
|
14
|
+
set :user, "puppet"
|
|
15
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
16
|
+
set(:deploy_to) { "/home/puppet/code" }
|
|
17
|
+
end
|
|
18
|
+
# set :deploy_via, :copy
|
|
19
|
+
set :scm, :none
|
|
20
|
+
set :repository, "."
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
set :ssh_options, {
|
|
24
|
+
:keys => ssh_key,
|
|
25
|
+
:port => '22',
|
|
26
|
+
:forward_agent => 'true'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Start nodes definitions
|
|
30
|
+
# End nodes definitions
|
|
31
|
+
|
|
32
|
+
desc 'Test the vagrant connection by doing issuing a simple echo command'
|
|
33
|
+
task :probe, roles: [:web, :app, :db] do
|
|
34
|
+
run 'echo $PATH'
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
set :ssh_key, 'config/keys/environments/production/id_rsa'
|
|
2
|
+
set(:deploy_via, :copy_subdir)
|
|
3
|
+
set(:deploy_subdir, 'puppet')
|
|
4
|
+
# Select options accord to the phase parameter
|
|
5
|
+
if phase == 'node_prepare'
|
|
6
|
+
set :user, "root"
|
|
7
|
+
set :copy_exclude, ['/profiles', '/roles', '/steps']
|
|
8
|
+
set(:deploy_to) { "/root/code" }
|
|
9
|
+
elsif phase == 'step-0'
|
|
10
|
+
set :user, "root"
|
|
11
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
12
|
+
set(:deploy_to) { "/root/code" }
|
|
13
|
+
else
|
|
14
|
+
set :user, "puppet"
|
|
15
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
16
|
+
set(:deploy_to) { "/home/puppet/code" }
|
|
17
|
+
end
|
|
18
|
+
# set :deploy_via, :copy
|
|
19
|
+
set :scm, :none
|
|
20
|
+
set :repository, "."
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
set :ssh_options, {
|
|
24
|
+
:keys => ssh_key,
|
|
25
|
+
:port => '22',
|
|
26
|
+
:forward_agent => 'true'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Start nodes definitions
|
|
30
|
+
# End nodes definitions
|
|
31
|
+
|
|
32
|
+
desc 'Test the vagrant connection by doing issuing a simple echo command'
|
|
33
|
+
task :probe, roles: [:web, :app, :db] do
|
|
34
|
+
run 'echo $PATH'
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
set :ssh_key, 'config/keys/environments/staging/id_rsa'
|
|
2
|
+
set(:deploy_via, :copy_subdir)
|
|
3
|
+
set(:deploy_subdir, 'puppet')
|
|
4
|
+
# Select options accord to the phase parameter
|
|
5
|
+
if phase == 'node_prepare'
|
|
6
|
+
set :user, "root"
|
|
7
|
+
set :copy_exclude, ['/profiles', '/roles', '/steps']
|
|
8
|
+
set(:deploy_to) { "/root/code" }
|
|
9
|
+
elsif phase == 'step-0'
|
|
10
|
+
set :user, "root"
|
|
11
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
12
|
+
set(:deploy_to) { "/root/code" }
|
|
13
|
+
else
|
|
14
|
+
set :user, "puppet"
|
|
15
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
16
|
+
set(:deploy_to) { "/home/puppet/code" }
|
|
17
|
+
end
|
|
18
|
+
# set :deploy_via, :copy
|
|
19
|
+
set :scm, :none
|
|
20
|
+
set :repository, "."
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
set :ssh_options, {
|
|
24
|
+
:keys => ssh_key,
|
|
25
|
+
:port => '22',
|
|
26
|
+
:forward_agent => 'true'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Start nodes definitions
|
|
30
|
+
# End nodes definitions
|
|
31
|
+
|
|
32
|
+
desc 'Test the vagrant connection by doing issuing a simple echo command'
|
|
33
|
+
task :probe, roles: [:web, :app, :db] do
|
|
34
|
+
run 'echo $PATH'
|
|
35
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
set(:deploy_via, :copy_subdir)
|
|
2
|
+
set(:deploy_subdir, 'puppet')
|
|
3
|
+
# Select options accord to the phase parameter
|
|
4
|
+
if phase == 'node_prepare'
|
|
5
|
+
set :user, "vagrant"
|
|
6
|
+
set :ssh_key, '~/.vagrant.d/insecure_private_key'
|
|
7
|
+
set :copy_exclude, ['/profiles', '/roles', '/steps']
|
|
8
|
+
set(:deploy_to) { "/home/vagrant/code" }
|
|
9
|
+
elsif phase == 'step-0'
|
|
10
|
+
set :user, "vagrant"
|
|
11
|
+
set :ssh_key, '~/.vagrant.d/insecure_private_key'
|
|
12
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
13
|
+
set(:deploy_to) { "/home/vagrant/code" }
|
|
14
|
+
else
|
|
15
|
+
set :user, "puppet"
|
|
16
|
+
set :ssh_key, 'config/keys/environments/vagrant/id_rsa'
|
|
17
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
18
|
+
set(:deploy_to) { "/home/puppet/code" }
|
|
19
|
+
end
|
|
20
|
+
# set :deploy_via, :copy
|
|
21
|
+
set :scm, :none
|
|
22
|
+
set :repository, "."
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
set :ssh_options, {
|
|
26
|
+
:keys => ssh_key,
|
|
27
|
+
:port => '22',
|
|
28
|
+
:forward_agent => 'true'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
# Start nodes definitions
|
|
32
|
+
# End nodes definitions
|
|
33
|
+
|
|
34
|
+
desc 'Test the vagrant connection by doing issuing a simple echo command'
|
|
35
|
+
task :probe, roles: [:web, :app, :db] do
|
|
36
|
+
run 'echo $PATH'
|
|
37
|
+
end
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
require 'capistrano/ext/multistage'
|
|
2
|
+
|
|
3
|
+
set :application, "pname"
|
|
4
|
+
set :stages, Dir[".checkpoints/*/*"].map{|f| File.basename(f)}
|
|
5
|
+
set :default_stage, 'vagrant'
|
|
6
|
+
set :use_sudo, false
|
|
7
|
+
set :keep_releases, 3
|
|
8
|
+
set :deploy_via, :remote_cache
|
|
9
|
+
default_run_options[:pty] = true
|
|
10
|
+
default_run_options[:shell] = '/bin/bash --login'
|
|
11
|
+
set :normalize_asset_timestamps, false
|
|
12
|
+
set(:facter_variables) { {deploy_environment: stage, deploy_user: user, deploy_to: deploy_to} }
|
|
13
|
+
|
|
14
|
+
before 'puppet:apply', 'puppet:config_hiera'
|
|
15
|
+
|
|
16
|
+
# evaluate if a file exists in a remote server
|
|
17
|
+
def remote_file_exists?(full_path)
|
|
18
|
+
'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# When using puppet apply for example, pass additional facts to Facter
|
|
22
|
+
# @returns an environment variable string like FACTER_custom
|
|
23
|
+
def custom_facter_variables
|
|
24
|
+
facter_variables.map{|facter_key, facter_value| "FACTER_#{facter_key}=#{facter_value}"}.join(' ')
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
namespace :deploy do
|
|
28
|
+
|
|
29
|
+
desc 'Installs tools and required dependencies in the remote machine'
|
|
30
|
+
namespace :prepare_installation do
|
|
31
|
+
|
|
32
|
+
desc 'Install dependencies and command line tools to operate correctly'
|
|
33
|
+
task :common do
|
|
34
|
+
ubuntu.setup
|
|
35
|
+
dependencies
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
desc 'Install puppet on the remote machine (free-standalone) [including dependencies]'
|
|
39
|
+
task :puppet do
|
|
40
|
+
run "#{sudo} apt-get --yes --fix-broken install"
|
|
41
|
+
run "cd #{current_path}/lib/deb/puppet_3.6.0 && #{sudo} dpkg -i *.deb"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
desc 'Install libraries'
|
|
45
|
+
task :dependencies do
|
|
46
|
+
run "#{sudo} aptitude update"
|
|
47
|
+
run "cd #{current_path}/prepare/dependencies/ubuntu && cat packages|xargs #{sudo} aptitude -y install"
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
namespace :ubuntu do
|
|
51
|
+
desc 'Install dependencies and command line tools to opperate correctly'
|
|
52
|
+
task :setup do
|
|
53
|
+
install_aptitude
|
|
54
|
+
set_fqdn
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
desc 'Install aptitude'
|
|
58
|
+
task :install_aptitude do
|
|
59
|
+
run "#{sudo} apt-get update"
|
|
60
|
+
run "#{sudo} apt-get -y install aptitude"
|
|
61
|
+
# run "#{sudo} aptitude -y full-upgrade"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
desc "Sets the boxes' fully qualified domain name (fqdn), through the 'hostname' command"
|
|
65
|
+
task :set_fqdn do
|
|
66
|
+
run('hostname') do |ch, stream, out|
|
|
67
|
+
if ch[:server].host.strip == out.strip
|
|
68
|
+
puts "The #{ch[:server]} server hostname is configured properly"
|
|
69
|
+
else
|
|
70
|
+
run "#{sudo} hostname #{ch[:server].host}", hosts: ch[:server]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
namespace :puppet do
|
|
78
|
+
|
|
79
|
+
desc 'Bundle modules listed in the Puppetfile through librarian-puppet'
|
|
80
|
+
task :bundle_modules do
|
|
81
|
+
librarian_path = "#{shared_path}/librarian-puppet/#{step_dir}"
|
|
82
|
+
step_path = "#{current_path}/steps/#{step_dir}"
|
|
83
|
+
# Create shared directories for librarian-puppet
|
|
84
|
+
run "mkdir -p #{librarian_path}/{modules,.tmp}"
|
|
85
|
+
# Check if Puppetfile.lock and .tmp are created for librarian-puppet
|
|
86
|
+
puppetfile_lock = remote_file_exists?("#{librarian_path}/Puppetfile.lock")
|
|
87
|
+
librarian_tmp = remote_file_exists?("#{step_path}/.tmp")
|
|
88
|
+
# Link the modules directory from shared to the step directory
|
|
89
|
+
run "cp -Rf #{step_path}/modules/* #{librarian_path}/modules/"
|
|
90
|
+
run "rm -rf #{step_path}/modules"
|
|
91
|
+
run "ln -fs #{librarian_path}/modules #{step_path}/modules"
|
|
92
|
+
if remote_file_exists?("#{step_path}/Puppetfile")
|
|
93
|
+
# Move the Puppetfile.lock create the first time
|
|
94
|
+
run "ln -fs #{librarian_path}/Puppetfile.lock #{step_path}/Puppetfile.lock" if puppetfile_lock
|
|
95
|
+
# Link the .tmp directory from shared to the step directory
|
|
96
|
+
run "cp -Rf #{step_path}/.tmp/* #{librarian_path}/.tmp/" if librarian_tmp
|
|
97
|
+
run "rm -rf #{step_path}/.tmp"
|
|
98
|
+
run "ln -fs #{librarian_path}/.tmp #{step_path}/.tmp"
|
|
99
|
+
# Execute librarian-puppet module installation
|
|
100
|
+
run "cd #{step_path} && librarian-puppet install"
|
|
101
|
+
# Move the Puppetfile.lock create the first time
|
|
102
|
+
run "mv -f #{step_path}/Puppetfile.lock #{librarian_path}/" unless puppetfile_lock
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
desc 'Applies puppet using the current path puppet repo uploaded through capistrano itself'
|
|
107
|
+
task :apply do
|
|
108
|
+
run 'touch puppet.log'
|
|
109
|
+
run "echo 'Running puppet at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}...' >> puppet.log"
|
|
110
|
+
run "#{sudo} #{custom_facter_variables} puppet apply --debug --verbose --modulepath=#{current_path}/steps/#{step_dir}/modules --parser future --pluginsync #{current_path}/steps/#{step_dir}/manifests/site.pp"
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
desc 'Make a symlink to configure the hiera settings from hiera project directory'
|
|
114
|
+
task :config_hiera do
|
|
115
|
+
remote_hiera_path = "/etc/puppet/hiera.yaml"
|
|
116
|
+
local_hiera_path = "#{current_path}/steps/#{step_dir}/hiera/hiera.yaml"
|
|
117
|
+
puts 'Creating the symlink to hiera.yaml!'
|
|
118
|
+
run "#{sudo} ln -fs #{local_hiera_path} #{remote_hiera_path}"
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# -*- mode: ruby -*-
|
|
2
|
+
# vi: set ft=ruby :
|
|
3
|
+
|
|
4
|
+
Vagrant.configure("2") do |config|
|
|
5
|
+
|
|
6
|
+
config.vm.define :'node0.server1.test' do |node|
|
|
7
|
+
node.vm.box = "bebox-pname-node0.server1.test"
|
|
8
|
+
node.vm.hostname = "node0.server1.test"
|
|
9
|
+
node.vm.network :public_network, :bridge => 'en0: Ethernet', :auto_config => false
|
|
10
|
+
node.vm.provision :shell, :inline => "sudo ifconfig eth1 <%=ip_address%> netmask 255.255.255.0 up"
|
|
11
|
+
end
|
|
12
|
+
config.vm.provider "virtualbox" do |v|
|
|
13
|
+
v.memory = 512
|
|
14
|
+
v.cpus = 1
|
|
15
|
+
v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
set(:deploy_via, :copy_subdir)
|
|
2
|
+
set(:deploy_subdir, 'puppet')
|
|
3
|
+
# Select options accord to the phase parameter
|
|
4
|
+
if phase == 'node_prepare'
|
|
5
|
+
set :user, "vagrant"
|
|
6
|
+
set :ssh_key, '~/.vagrant.d/insecure_private_key'
|
|
7
|
+
set :copy_exclude, ['/profiles', '/roles', '/steps']
|
|
8
|
+
set(:deploy_to) { "/home/vagrant/code" }
|
|
9
|
+
elsif phase == 'step-0'
|
|
10
|
+
set :user, "vagrant"
|
|
11
|
+
set :ssh_key, '~/.vagrant.d/insecure_private_key'
|
|
12
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
13
|
+
set(:deploy_to) { "/home/vagrant/code" }
|
|
14
|
+
else
|
|
15
|
+
set :user, "puppet"
|
|
16
|
+
set :ssh_key, 'config/keys/environments/vagrant/id_rsa'
|
|
17
|
+
set :copy_exclude, ['/lib', '/prepare', '/profiles', '/roles']
|
|
18
|
+
set(:deploy_to) { "/home/puppet/code" }
|
|
19
|
+
end
|
|
20
|
+
# set :deploy_via, :copy
|
|
21
|
+
set :scm, :none
|
|
22
|
+
set :repository, "."
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
set :ssh_options, {
|
|
26
|
+
:keys => ssh_key,
|
|
27
|
+
:port => '22',
|
|
28
|
+
:forward_agent => 'true'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
# Start nodes definitions
|
|
32
|
+
server "node0.server1.test", :web, :app, :db
|
|
33
|
+
# End nodes definitions
|
|
34
|
+
|
|
35
|
+
desc 'Test the vagrant connection by doing issuing a simple echo command'
|
|
36
|
+
task :probe, roles: [:web, :app, :db] do
|
|
37
|
+
run 'echo $PATH'
|
|
38
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Bebox template for the profiles.
|
|
2
|
+
|
|
3
|
+
# For modules loaded from forge puppetlabs
|
|
4
|
+
# mod 'organization/module_name', 'version'
|
|
5
|
+
# example: mod "puppetlabs/nginx", '1.0.0'
|
|
6
|
+
|
|
7
|
+
# For modules loaded from github releases tarball
|
|
8
|
+
# mod "organization/module_name", :git => "git_url", :ref => 'v1.0.0'
|
|
9
|
+
# mod "organization/module_name", :git => "git_url", :ref => 'branch_name'
|
|
10
|
+
# example: mod "jfryman/nginx", :git => "git://github.com/jfryman/puppet-nginx.git", :ref => 'v0.0.9'
|
|
11
|
+
# example: mod "jfryman/nginx", :git => "git://github.com/jfryman/puppet-nginx.git", :ref => 'master'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# This are some common modules we have used and works well.
|
|
15
|
+
# You can uncomment for use it or can add new ones.
|
|
16
|
+
|
|
17
|
+
# mod "alup/rbenv", '1.2.0'
|
|
18
|
+
# mod "jfryman/nginx", '0.0.9'
|
|
19
|
+
# mod "dwerder/redis", '1.1.0'
|
|
20
|
+
# mod "puppetlabs/mysql", '2.2.3'
|
|
21
|
+
# mod "akumria/postgresql", '1.2.0'
|
|
22
|
+
# mod "dwerder/mongodb", '3.3.1'
|
|
23
|
+
# mod "mwillbanks/newrelic", '0.1.0'
|
|
24
|
+
# mod "dhoppe/postfix", :git => "git://github.com/dhoppe/puppet-postfix.git", :ref => '3.0.x'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Bebox template for the profiles.
|
|
2
|
+
|
|
3
|
+
# For modules loaded from forge puppetlabs
|
|
4
|
+
# mod 'organization/module_name', 'version'
|
|
5
|
+
# example: mod "puppetlabs/nginx", '1.0.0'
|
|
6
|
+
|
|
7
|
+
# For modules loaded from github releases tarball
|
|
8
|
+
# mod "organization/module_name", :git => "git_url", :ref => 'v1.0.0'
|
|
9
|
+
# mod "organization/module_name", :git => "git_url", :ref => 'branch_name'
|
|
10
|
+
# example: mod "jfryman/nginx", :git => "git://github.com/jfryman/puppet-nginx.git", :ref => 'v0.0.9'
|
|
11
|
+
# example: mod "jfryman/nginx", :git => "git://github.com/jfryman/puppet-nginx.git", :ref => 'master'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# This are some common modules we have used and works well.
|
|
15
|
+
# You can uncomment for use it or can add new ones.
|
|
16
|
+
|
|
17
|
+
mod "alup/rbenv", '1.2.0'
|
|
18
|
+
mod "jfryman/nginx", '0.0.9'
|
|
19
|
+
mod "dwerder/redis", '1.1.0'
|
|
20
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# The profile class include the classes instantiation or
|
|
2
|
+
# puppet/modules type resource definitions.
|
|
3
|
+
# It can include hiera calls for the parametter setting.
|
|
4
|
+
# Example:
|
|
5
|
+
# class profiles::category::technology {
|
|
6
|
+
# $technology_parameters = hiera("technology")
|
|
7
|
+
# $parameter1 = technology_parameters[parameter1]
|
|
8
|
+
# ...
|
|
9
|
+
# class { "technology_resource":
|
|
10
|
+
# parameter1 => $parameter1
|
|
11
|
+
# ...
|
|
12
|
+
# }
|
|
13
|
+
# }
|
|
14
|
+
|
|
15
|
+
class profiles::test::profile_0 {
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# The profile class include the classes instantiation or
|
|
2
|
+
# puppet/modules type resource definitions.
|
|
3
|
+
# It can include hiera calls for the parametter setting.
|
|
4
|
+
# Example:
|
|
5
|
+
# class profiles::category::technology {
|
|
6
|
+
# $technology_parameters = hiera("technology")
|
|
7
|
+
# $parameter1 = technology_parameters[parameter1]
|
|
8
|
+
# ...
|
|
9
|
+
# class { "technology_resource":
|
|
10
|
+
# parameter1 => $parameter1
|
|
11
|
+
# ...
|
|
12
|
+
# }
|
|
13
|
+
# }
|
|
14
|
+
|
|
15
|
+
class profiles::test::profile_0 {
|
|
16
|
+
$packages = hiera("packages")
|
|
17
|
+
each($packages) |$package| {
|
|
18
|
+
package { $package:
|
|
19
|
+
ensure => present
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# The role class can include many profiles
|
|
2
|
+
# Example:
|
|
3
|
+
# class roles::example_role {
|
|
4
|
+
# include profiles::category::example_profile_1
|
|
5
|
+
# include profiles::category::example_profile_2
|
|
6
|
+
# ...
|
|
7
|
+
# include profiles::category::example_profile_N
|
|
8
|
+
# }
|
|
9
|
+
# The profiles can be added/removed to the role manually or through the
|
|
10
|
+
# 'bebox role add_profile' and 'bebox role remove_profile' commands.
|
|
11
|
+
|
|
12
|
+
class roles::role_0 {
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
user_accounts:
|
|
2
|
+
- name: 'puppet'
|
|
3
|
+
email: ''
|
|
4
|
+
key: ''
|
|
5
|
+
uid: 7000
|
|
6
|
+
sudo::configs:
|
|
7
|
+
'puppet':
|
|
8
|
+
ensure: 'present'
|
|
9
|
+
content: '%puppet ALL=(ALL) NOPASSWD: ALL'
|
|
10
|
+
priority: 10
|
|
11
|
+
rbenv::install:
|
|
12
|
+
user: 'puppet'
|
|
13
|
+
group: 'puppet'
|
|
14
|
+
home: '/home/puppet'
|
|
15
|
+
rbenv::compile:
|
|
16
|
+
"1.9.3-p327":
|
|
17
|
+
user: "puppet"
|
|
18
|
+
home: "/home/puppet"
|
|
19
|
+
global: true
|
|
20
|
+
rbenv::gem:
|
|
21
|
+
'puppet':
|
|
22
|
+
user: 'puppet'
|
|
23
|
+
ruby: '1.9.3-p327'
|
|
24
|
+
'librarian-puppet':
|
|
25
|
+
user: 'puppet'
|
|
26
|
+
ruby: '1.9.3-p327'
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
user_accounts:
|
|
2
|
+
- name: 'puppet'
|
|
3
|
+
email: ''
|
|
4
|
+
key: ''
|
|
5
|
+
uid: 7000
|
|
6
|
+
sudo::configs:
|
|
7
|
+
'puppet':
|
|
8
|
+
ensure: 'present'
|
|
9
|
+
content: '%puppet ALL=(ALL) NOPASSWD: ALL'
|
|
10
|
+
priority: 10
|
|
11
|
+
rbenv::install:
|
|
12
|
+
user: 'puppet'
|
|
13
|
+
group: 'puppet'
|
|
14
|
+
home: '/home/puppet'
|
|
15
|
+
rbenv::compile:
|
|
16
|
+
"1.9.3-p327":
|
|
17
|
+
user: "puppet"
|
|
18
|
+
home: "/home/puppet"
|
|
19
|
+
global: true
|
|
20
|
+
rbenv::gem:
|
|
21
|
+
'puppet':
|
|
22
|
+
user: 'puppet'
|
|
23
|
+
ruby: '1.9.3-p327'
|
|
24
|
+
'librarian-puppet':
|
|
25
|
+
user: 'puppet'
|
|
26
|
+
ruby: '1.9.3-p327'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Important note: This file is empty.
|
|
2
|
+
# /etc/puppet/hiera.yml is used by default.
|
|
3
|
+
# deploy_user and deploy_environment is set in the puppet apply command executed by capistrano
|
|
4
|
+
:backends: yaml
|
|
5
|
+
:yaml:
|
|
6
|
+
:datadir: %{::deploy_to}/current/steps/0-fundamental/hiera/data
|
|
7
|
+
:hierarchy:
|
|
8
|
+
- %{::fqdn}
|
|
9
|
+
- %{::deploy_environment}
|
|
10
|
+
- common
|
|
11
|
+
:logger: console
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file associates nodes with roles
|
|
2
|
+
# Example:
|
|
3
|
+
# node node0.server1.test {
|
|
4
|
+
# include roles::role_1
|
|
5
|
+
# }
|
|
6
|
+
# The roles and profiles pattern recommends to associate one node with
|
|
7
|
+
# one and only one role.
|
|
8
|
+
# The role can be set to the node manually or through the
|
|
9
|
+
# 'bebox node set_role' command.
|
|
10
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file associates nodes with roles
|
|
2
|
+
# Example:
|
|
3
|
+
# node node0.server1.test {
|
|
4
|
+
# include roles::role_1
|
|
5
|
+
# }
|
|
6
|
+
# The roles and profiles pattern recommends to associate one node with
|
|
7
|
+
# one and only one role.
|
|
8
|
+
# The role can be set to the node manually or through the
|
|
9
|
+
# 'bebox node set_role' command.
|
|
10
|
+
|
|
11
|
+
node node0.server1.test {
|
|
12
|
+
|
|
13
|
+
include roles::fundamental
|
|
14
|
+
|
|
15
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Important note: This file is empty.
|
|
2
|
+
# /etc/puppet/hiera.yml is used by default.
|
|
3
|
+
# deploy_user and deploy_environment is set in the puppet apply command executed by capistrano
|
|
4
|
+
:backends: yaml
|
|
5
|
+
:yaml:
|
|
6
|
+
:datadir: %{::deploy_to}/current/steps/1-users/hiera/data
|
|
7
|
+
:hierarchy:
|
|
8
|
+
- %{::fqdn}
|
|
9
|
+
- %{::deploy_environment}
|
|
10
|
+
- common
|
|
11
|
+
:logger: console
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file associates nodes with roles
|
|
2
|
+
# Example:
|
|
3
|
+
# node node0.server1.test {
|
|
4
|
+
# include roles::role_1
|
|
5
|
+
# }
|
|
6
|
+
# The roles and profiles pattern recommends to associate one node with
|
|
7
|
+
# one and only one role.
|
|
8
|
+
# The role can be set to the node manually or through the
|
|
9
|
+
# 'bebox node set_role' command.
|
|
10
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file associates nodes with roles
|
|
2
|
+
# Example:
|
|
3
|
+
# node node0.server1.test {
|
|
4
|
+
# include roles::role_1
|
|
5
|
+
# }
|
|
6
|
+
# The roles and profiles pattern recommends to associate one node with
|
|
7
|
+
# one and only one role.
|
|
8
|
+
# The role can be set to the node manually or through the
|
|
9
|
+
# 'bebox node set_role' command.
|
|
10
|
+
|
|
11
|
+
node node0.server1.test {
|
|
12
|
+
|
|
13
|
+
include roles::users
|
|
14
|
+
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Here you can set the hiera data to be used for your profiles
|