--- /dev/null
+fixtures:
+ repositories:
+ stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
+ symlinks:
+ hadoop: "#{source_dir}"
--- /dev/null
+.*.sw?
+pkg
+spec/fixtures
+.rspec_system
+.vagrant
+.bundle
+vendor
--- /dev/null
+--format documentation
+--color
--- /dev/null
+---
+language: ruby
+bundler_args: --without development
+before_install: rm Gemfile.lock || true
+rvm:
+ - 1.8.7
+ - 1.9.3
+ - 2.0.0
+ - 2.1.0
+script: bundle exec rake test
+env:
+ - PUPPET_VERSION="~> 2.7.0"
+ - PUPPET_VERSION="~> 3.2.0" STRICT_VARIABLES=yes
+ - PUPPET_VERSION="~> 3.3.0" STRICT_VARIABLES=yes
+ - PUPPET_VERSION="~> 3.4.0" STRICT_VARIABLES=yes
+ - PUPPET_VERSION="~> 3.5.0" STRICT_VARIABLES=yes
+ - PUPPET_VERSION="~> 3.6.0" STRICT_VARIABLES=yes
+matrix:
+ exclude:
+ - rvm: 1.9.3
+ env: PUPPET_VERSION="~> 2.7.0"
+ - rvm: 2.0.0
+ env: PUPPET_VERSION="~> 2.7.0"
+ - rvm: 2.1.0
+ env: PUPPET_VERSION="~> 2.7.0"
+ - rvm: 2.1.0
+ env: PUPPET_VERSION="~> 3.2.0" STRICT_VARIABLES=yes
+ - rvm: 2.1.0
+ env: PUPPET_VERSION="~> 3.3.0" STRICT_VARIABLES=yes
+ - rvm: 2.1.0
+ env: PUPPET_VERSION="~> 3.4.0" STRICT_VARIABLES=yes
--- /dev/null
+source "https://rubygems.org"
+
+group :test do
+ gem "rake"
+ gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.7.0'
+ gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet.git'
+ gem "puppetlabs_spec_helper"
+end
+
+group :development do
+ gem "travis"
+ gem "travis-lint"
+ gem "beaker"
+ gem "beaker-rspec"
+ gem "vagrant-wrapper"
+ gem "puppet-blacksmith"
+ gem "guard-rake"
+end
--- /dev/null
+notification :off
+
+guard 'rake', :task => 'test' do
+ watch(%r{^manifests\/(.+)\.pp$})
+end
--- /dev/null
+name 'meta-size_hadoop'
+version '0.1.0'
+source 'mailto://valtri@civ.zcu.cz'
+author 'CESNET'
+license 'Public Domain'
+summary 'Hadoop Site-Specific Stuff'
+description 'Site-specific setup for Hadoop Cluster'
+project_page 'https://github.com/CESNET/'
+
+dependency 'puppetlabs/stdlib'
--- /dev/null
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+require 'puppet-syntax/tasks/puppet-syntax'
+
+# These two gems aren't always present, for instance
+# on Travis with --without development
+begin
+ require 'puppet_blacksmith/rake_tasks'
+rescue LoadError
+end
+
+PuppetLint.configuration.relative = true
+PuppetLint.configuration.send("disable_80chars")
+PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}"
+PuppetLint.configuration.fail_on_warnings = true
+
+# Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
+# http://puppet-lint.com/checks/class_parameter_defaults/
+PuppetLint.configuration.send('disable_class_parameter_defaults')
+# http://puppet-lint.com/checks/class_inherits_from_params_class/
+PuppetLint.configuration.send('disable_class_inherits_from_params_class')
+
+exclude_paths = [
+ "pkg/**/*",
+ "vendor/**/*",
+ "spec/**/*",
+]
+PuppetLint.configuration.ignore_paths = exclude_paths
+PuppetSyntax.exclude_paths = exclude_paths
+
+desc "Run acceptance tests"
+RSpec::Core::RakeTask.new(:acceptance) do |t|
+ t.pattern = 'spec/acceptance'
+end
+
+desc "Run syntax, lint, and spec tests."
+task :test => [
+ :syntax,
+ :lint,
+ :spec,
+]
--- /dev/null
+Put here service keytabs into HOSTNAME/ subdirectories.
--- /dev/null
+class site_hadoop::config {
+ if $site_hadoop::mc_setup {
+ file { '/etc/profile.d/mc.csh':
+ ensure => link,
+ target => "${site_hadoop::mc_setup}.csh",
+ }
+ file { '/etc/profile.d/mc.sh':
+ ensure => link,
+ target => "${site_hadoop::mc_setup}.sh",
+ }
+ }
+
+ if $::osfamily == 'Debian' {
+ exec { 'key-cloudera':
+ command => 'apt-key adv --fetch-key http://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/archive.key',
+ path => $site_hadoop::path,
+ creates => '/etc/apt/sources.list.d/cloudera.list',
+ }
+ ->
+ exec { 'wget-cloudera':
+ command => 'wget -P /etc/apt/sources.list.d/ http://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/cloudera.list',
+ path => $site_hadoop::path,
+ creates => '/etc/apt/sources.list.d/cloudera.list',
+ }
+ }
+}
--- /dev/null
+class site_hadoop inherits site_hadoop::params {
+ include 'site_hadoop::install'
+ include 'site_hadoop::config'
+
+ Class['site_hadoop::install'] ->
+ Class['site_hadoop::config'] ->
+ Class['site_hadoop']
+}
--- /dev/null
+class site_hadoop::install {
+ include stdlib
+
+ ensure_packages($site_hadoop::packages)
+
+ if $site_hadoop::java_packages {
+ ensure_packages($site_hadoop::java_packages)
+ }
+}
--- /dev/null
+class site_hadoop::params {
+ case $::osfamily {
+ 'Debian': {
+ case $::lsbdistcodename {
+ 'lenny', 'squeeze', 'lucid', 'natty': {
+ $java_packages = ['openjdk-6-jre-headless']
+ }
+ 'wheezy', 'jessie', 'precise','quantal','raring','saucy', 'trusty': {
+ $java_packages = ['openjdk-7-jre-headless']
+ }
+ }
+ }
+ }
+
+ $packages = $::osfamily ? {
+ debian => ['acpid', 'heimdal-clients', 'less', 'mc', 'puppet', 'vim', 'wget'],
+ redhat => ['acpid', 'krb5-workstation', 'less', 'mc', 'puppet', 'vim-enhanced', 'wget'],
+ }
+ $mc_setup = $::osfamily ? {
+ debian => '/usr/lib/mc/mc',
+ }
+
+ $path = '/sbin:/usr/sbin:/bin:/usr/bin'
+}
--- /dev/null
+{
+ "name": "meta-site_hadoop",
+ "version": "0.1.0",
+ "author": "CESNET",
+ "summary": "Hadoop Site-Specific Stuff",
+ "license": "Public Domain",
+ "source": "mailto://valtri@civ.zcu.cz",
+ "project_page": "https://github.com/CESNET/",
+ "issues_url": "mailto://valtri@civ.zcu.cz",
+ "dependencies": [
+ {
+ "name": "puppetlabs-stdlib",
+ "version_range": ">= 1.0.0"
+ }
+ ]
+}