├── .fixtures.yml
├── .gitignore
├── .project
├── .puppet-lint.rc
├── .sync.yml
├── .travis.yml
├── CONTRIBUTING.md
├── Gemfile
├── LICENSE
├── README.markdown
├── Rakefile
├── TODO.md
├── files
├── README_JCE.md
├── _mklinks.sh
└── java.sh
├── logo_Cloudera_Certified.jpg
├── manifests
├── cdh.pp
├── cdh
│ ├── bigtop.pp
│ ├── flume.pp
│ ├── hadoop.pp
│ ├── hadoop
│ │ ├── client.pp
│ │ └── fuse.pp
│ ├── hbase.pp
│ ├── hcatalog.pp
│ ├── hive.pp
│ ├── hive
│ │ ├── metastore.pp
│ │ ├── mysql.pp
│ │ ├── server.pp
│ │ └── server2.pp
│ ├── hue.pp
│ ├── hue
│ │ └── plugins.pp
│ ├── mahout.pp
│ ├── oozie.pp
│ ├── oozie
│ │ ├── client.pp
│ │ ├── ext.pp
│ │ └── mysql.pp
│ ├── pig.pp
│ ├── repo.pp
│ ├── sentry.pp
│ ├── sqoop.pp
│ ├── sqoop
│ │ ├── client.pp
│ │ └── metastore.pp
│ ├── sqoop2.pp
│ ├── whirr.pp
│ └── zookeeper.pp
├── cdh5.pp
├── cdh5
│ ├── avro.pp
│ ├── bigtop.pp
│ ├── crunch.pp
│ ├── flume.pp
│ ├── hadoop.pp
│ ├── hadoop
│ │ ├── client.pp
│ │ └── fuse.pp
│ ├── hbase.pp
│ ├── hcatalog.pp
│ ├── hive.pp
│ ├── hive
│ │ ├── hbase.pp
│ │ ├── metastore.pp
│ │ ├── mysql.pp
│ │ ├── server.pp
│ │ └── server2.pp
│ ├── hue.pp
│ ├── hue
│ │ └── plugins.pp
│ ├── impala.pp
│ ├── kite.pp
│ ├── llama.pp
│ ├── mahout.pp
│ ├── oozie.pp
│ ├── oozie
│ │ ├── client.pp
│ │ ├── ext.pp
│ │ └── mysql.pp
│ ├── pig.pp
│ ├── repo.pp
│ ├── search.pp
│ ├── search
│ │ ├── lilyhbase.pp
│ │ └── mapreduce.pp
│ ├── sentry.pp
│ ├── spark.pp
│ ├── sqoop.pp
│ ├── sqoop
│ │ ├── client.pp
│ │ └── metastore.pp
│ ├── sqoop2.pp
│ ├── whirr.pp
│ └── zookeeper.pp
├── cm.pp
├── cm
│ ├── repo.pp
│ └── server.pp
├── cm5.pp
├── cm5
│ ├── repo.pp
│ └── server.pp
├── gplextras.pp
├── gplextras
│ └── repo.pp
├── gplextras5.pp
├── gplextras5
│ └── repo.pp
├── impala.pp
├── impala
│ └── repo.pp
├── init.pp
├── java.pp
├── java
│ └── jce.pp
├── java5.pp
├── java5
│ └── jce.pp
├── lzo.pp
├── params.pp
├── search.pp
└── search
│ ├── lilyhbase.pp
│ ├── mapreduce.pp
│ └── repo.pp
├── metadata.json
├── spec
├── classes
│ ├── cloudera_cdh5_avro_spec.rb
│ ├── cloudera_cdh5_bigtop_spec.rb
│ ├── cloudera_cdh5_crunch_spec.rb
│ ├── cloudera_cdh5_flume_spec.rb
│ ├── cloudera_cdh5_hadoop_client_spec.rb
│ ├── cloudera_cdh5_hadoop_fuse_spec.rb
│ ├── cloudera_cdh5_hadoop_spec.rb
│ ├── cloudera_cdh5_hbase_spec.rb
│ ├── cloudera_cdh5_hcatalog_spec.rb
│ ├── cloudera_cdh5_hive_hbase_spec.rb
│ ├── cloudera_cdh5_hive_metastore_spec.rb
│ ├── cloudera_cdh5_hive_mysql_spec.rb
│ ├── cloudera_cdh5_hive_server2_spec.rb
│ ├── cloudera_cdh5_hive_server_spec.rb
│ ├── cloudera_cdh5_hive_spec.rb
│ ├── cloudera_cdh5_hue_plugins_spec.rb
│ ├── cloudera_cdh5_hue_spec.rb
│ ├── cloudera_cdh5_impala_spec.rb
│ ├── cloudera_cdh5_kite_spec.rb
│ ├── cloudera_cdh5_llama_spec.rb
│ ├── cloudera_cdh5_mahout_spec.rb
│ ├── cloudera_cdh5_oozie_client_spec.rb
│ ├── cloudera_cdh5_oozie_ext_spec.rb
│ ├── cloudera_cdh5_oozie_mysql_spec.rb
│ ├── cloudera_cdh5_oozie_spec.rb
│ ├── cloudera_cdh5_pig_spec.rb
│ ├── cloudera_cdh5_repo_spec.rb
│ ├── cloudera_cdh5_search_lilyhbase_spec.rb
│ ├── cloudera_cdh5_search_mapreduce_spec.rb
│ ├── cloudera_cdh5_search_spec.rb
│ ├── cloudera_cdh5_sentry_spec.rb
│ ├── cloudera_cdh5_spark_spec.rb
│ ├── cloudera_cdh5_spec.rb
│ ├── cloudera_cdh5_sqoop2_spec.rb
│ ├── cloudera_cdh5_sqoop_client_spec.rb
│ ├── cloudera_cdh5_sqoop_metastore_spec.rb
│ ├── cloudera_cdh5_sqoop_spec.rb
│ ├── cloudera_cdh5_whirr_spec.rb
│ ├── cloudera_cdh5_zookeeper_spec.rb
│ ├── cloudera_cdh_bigtop_spec.rb
│ ├── cloudera_cdh_flume_spec.rb
│ ├── cloudera_cdh_hadoop_client_spec.rb
│ ├── cloudera_cdh_hadoop_fuse_spec.rb
│ ├── cloudera_cdh_hadoop_spec.rb
│ ├── cloudera_cdh_hbase_spec.rb
│ ├── cloudera_cdh_hcatalog_spec.rb
│ ├── cloudera_cdh_hive_metastore_spec.rb
│ ├── cloudera_cdh_hive_mysql_spec.rb
│ ├── cloudera_cdh_hive_server2_spec.rb
│ ├── cloudera_cdh_hive_server_spec.rb
│ ├── cloudera_cdh_hive_spec.rb
│ ├── cloudera_cdh_hue_plugins_spec.rb
│ ├── cloudera_cdh_hue_spec.rb
│ ├── cloudera_cdh_mahout_spec.rb
│ ├── cloudera_cdh_oozie_client_spec.rb
│ ├── cloudera_cdh_oozie_ext_spec.rb
│ ├── cloudera_cdh_oozie_mysql_spec.rb
│ ├── cloudera_cdh_oozie_spec.rb
│ ├── cloudera_cdh_pig_spec.rb
│ ├── cloudera_cdh_repo_spec.rb
│ ├── cloudera_cdh_sentry_spec.rb
│ ├── cloudera_cdh_spec.rb
│ ├── cloudera_cdh_sqoop2_spec.rb
│ ├── cloudera_cdh_sqoop_client_spec.rb
│ ├── cloudera_cdh_sqoop_metastore_spec.rb
│ ├── cloudera_cdh_sqoop_spec.rb
│ ├── cloudera_cdh_whirr_spec.rb
│ ├── cloudera_cdh_zookeeper_spec.rb
│ ├── cloudera_cm5_repo_spec.rb
│ ├── cloudera_cm5_server_spec.rb
│ ├── cloudera_cm5_spec.rb
│ ├── cloudera_cm_repo_spec.rb
│ ├── cloudera_cm_server_spec.rb
│ ├── cloudera_cm_spec.rb
│ ├── cloudera_gplextras5_repo_spec.rb
│ ├── cloudera_gplextras5_spec.rb
│ ├── cloudera_gplextras_repo_spec.rb
│ ├── cloudera_gplextras_spec.rb
│ ├── cloudera_impala_repo_spec.rb
│ ├── cloudera_impala_spec.rb
│ ├── cloudera_init_spec.rb
│ ├── cloudera_java5_jce_spec.rb
│ ├── cloudera_java5_spec.rb
│ ├── cloudera_java_jce_spec.rb
│ ├── cloudera_java_spec.rb
│ ├── cloudera_lzo_spec.rb
│ ├── cloudera_search_lilyhbase_spec.rb
│ ├── cloudera_search_mapreduce_spec.rb
│ ├── cloudera_search_repo_spec.rb
│ └── cloudera_search_spec.rb
├── spec.opts
└── spec_helper.rb
├── templates
├── db.properties.erb
└── scm-config.ini.erb
└── tests
├── cm
├── server+agent.pp
├── server-mysql.pp
├── server-postgresql.pp
└── server.pp
├── cm5
├── server+agent.pp
├── server-mysql.pp
├── server-postgresql.pp
└── server.pp
├── gateway.pp
├── gplextras.pp
├── gplextras5.pp
├── impala.pp
├── init.pp
├── init_noparcels.pp
├── init_noparcels_4.pp
├── init_noparcels_gplextras.pp
├── init_noparcels_gplextras_4.pp
├── install_lzo.pp
├── java.pp
├── java
└── jce.pp
├── search.pp
├── tls_client.pp
└── tls_server.pp
/.fixtures.yml:
--------------------------------------------------------------------------------
1 | fixtures:
2 | repositories:
3 | stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
4 | mysql:
5 | repo: "https://github.com/puppetlabs/puppetlabs-mysql.git"
6 | ref: "3.11.0"
7 | postgresql:
8 | repo: "https://github.com/puppetlabs/puppet-postgresql.git"
9 | ref: "4.9.0"
10 | concat:
11 | repo: "https://github.com/puppetlabs/puppetlabs-concat.git"
12 | ref: "1.2.1"
13 | staging: "https://github.com/nanliu/puppet-staging.git"
14 | epel:
15 | repo: "https://github.com/stahnma/puppet-module-epel.git"
16 | ref: "1.2.2"
17 | java_ks: "https://github.com/puppetlabs/puppetlabs-java_ks.git"
18 | zypprepo:
19 | repo: "https://github.com/deadpoint/puppet-zypprepo.git"
20 | ref: "v1.0.2"
21 | apt:
22 | repo: "https://github.com/puppetlabs/puppetlabs-apt.git"
23 | ref: "1.8.0"
24 | augeasproviders_core: "https://github.com/hercules-team/augeasproviders_core.git"
25 | augeasproviders_sysctl: "https://github.com/hercules-team/augeasproviders_sysctl.git"
26 | symlinks:
27 | cloudera: "#{source_dir}"
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | pkg/
2 | Gemfile.lock
3 | vendor/
4 | spec/fixtures/
5 | .vagrant/
6 | .bundle/
7 | coverage/
8 | *.swp
9 | .vendor/
10 | .vendor
11 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | cloudera
4 |
5 |
6 | apt
7 | augeasproviders_core
8 | augeasproviders_sysctl
9 | concat
10 | epel
11 | java_ks
12 | mysql
13 | postgresql
14 | staging
15 | stdlib
16 | zypprepo
17 |
18 |
19 |
20 | com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder
21 |
22 |
23 |
24 |
25 | org.eclipse.xtext.ui.shared.xtextBuilder
26 |
27 |
28 |
29 |
30 |
31 | com.puppetlabs.geppetto.pp.dsl.ui.puppetNature
32 | org.eclipse.xtext.ui.shared.xtextNature
33 |
34 |
35 |
36 | 1377732208775
37 |
38 | 10
39 |
40 | org.eclipse.ui.ide.multiFilter
41 | 1.0-name-matches-false-false-pkg
42 |
43 |
44 |
45 | 1378879474985
46 |
47 | 26
48 |
49 | org.eclipse.ui.ide.multiFilter
50 | 1.0-projectRelativePath-matches-false-false-spec/fixtures/modules
51 |
52 |
53 |
54 | 1428386119416
55 |
56 | 10
57 |
58 | org.eclipse.ui.ide.multiFilter
59 | 1.0-projectRelativePath-matches-false-false-.vendor
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/.puppet-lint.rc:
--------------------------------------------------------------------------------
1 | --fail-on-warnings
2 | --relative
3 | --no-140chars-check
4 | --no-class_inherits_from_params_class-check
5 | --no-documentation-check
6 | --no-single_quote_string_with_variables-check
7 |
--------------------------------------------------------------------------------
/.sync.yml:
--------------------------------------------------------------------------------
1 | ---
2 | .travis.yml:
3 | extras:
4 | - rvm: 1.8.7
5 | env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
6 | - rvm: 1.8.7
7 | env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | ---
2 | language: ruby
3 | cache:
4 | directories:
5 | - vendor/bundle
6 | # - spec/fixtures/modules
7 | sudo: false
8 | branches:
9 | only:
10 | - master
11 | - develop
12 | bundler_args: --without system_tests
13 | script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
14 | matrix:
15 | fast_finish: true
16 | include:
17 | - rvm: 1.8.7
18 | env: PUPPET_GEM_VERSION="~> 3.0"
19 | - rvm: 1.9.3
20 | env: PUPPET_GEM_VERSION="~> 3.0"
21 | - rvm: 2.0.0
22 | env: PUPPET_GEM_VERSION="~> 3.0"
23 | - rvm: 2.0.0
24 | env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
25 | - rvm: 2.1.9
26 | env: PUPPET_GEM_VERSION="~> 4.0"
27 | - rvm: 2.4.1
28 | env: PUPPET_GEM_VERSION="~> 5.0"
29 | - rvm: 1.8.7
30 | env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
31 | - rvm: 1.8.7
32 | env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
33 | allow_failures:
34 | - rvm: 2.4.1
35 | env: PUPPET_GEM_VERSION="~> 5.0"
36 | notifications:
37 | email:
38 | - github@razorsedge.org
39 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source ENV['GEM_SOURCE'] || "https://rubygems.org"
2 |
3 | group :development, :unit_tests do
4 | gem 'rake', '10.5.0', :require => false
5 | gem 'rspec', '~> 2.0', :require => false
6 | gem 'rspec-puppet', '>= 2.1.0', :require => false
7 | gem 'puppetlabs_spec_helper', '~> 1.2', :require => false
8 | gem 'puppet-lint', '~> 2.0', :require => false
9 | gem 'json', '~> 1.8', :require => false if RUBY_VERSION =~ /^1\./
10 | gem 'json', :require => false if RUBY_VERSION =~ /^2\./
11 | gem 'json_pure', '~> 1.8', :require => false if RUBY_VERSION =~ /^1\.8/
12 | gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION =~ /^1\.9/
13 | gem 'json_pure', :require => false if RUBY_VERSION =~ /^2\./
14 | gem 'metadata-json-lint', '< 1.2.0', :require => false if RUBY_VERSION =~ /^1\./
15 | gem 'metadata-json-lint', :require => false if RUBY_VERSION =~ /^2\./
16 | gem 'semantic_puppet', '0.1.3', :require => false if RUBY_VERSION =~ /^1\./
17 | gem 'semantic_puppet', :require => false if RUBY_VERSION =~ /^2\./
18 | gem 'puppet-lint-unquoted_string-check', :require => false
19 | gem 'puppet-lint-empty_string-check', :require => false
20 | gem 'puppet-lint-leading_zero-check', :require => false
21 | end
22 |
23 | gem 'puppet', ENV['PUPPET_GEM_VERSION'], :require => false
24 | gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false
25 |
26 | # vim:ft=ruby
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2013 Mike Arnold
2 | Copyright (c) 2011 Cloudera Inc.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | require 'puppetlabs_spec_helper/rake_tasks'
2 | require 'puppet-lint/tasks/puppet-lint'
3 | require 'metadata-json-lint/rake_task'
4 |
5 | Rake::Task[:lint].clear
6 | PuppetLint::RakeTask.new :lint do |config|
7 | config.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*.pp"]
8 | end
9 |
10 | PuppetSyntax.exclude_paths = ["spec/**/*", "pkg/**/*", "vender/**/*"]
11 | PuppetSyntax.hieradata_paths = ["**/data/**/*.yaml", "hieradata/**/*.yaml", "hiera*.yaml"]
12 |
--------------------------------------------------------------------------------
/TODO.md:
--------------------------------------------------------------------------------
1 | # TODO
2 | ## For 1.0.0 release:
3 |
4 | * default parcels
5 | * update dependencies (mysql/postgresql)
6 | * separate install impala (manifests/impala/bla.pp)
7 | * separate install search (manifests/search/bla.pp)
8 | * support SLES/Debian/Ubuntu
9 | * clean out commented code
10 |
11 | ## For 2.0.0 release:
12 |
13 | * support CM5 / CDH5 / Oracle JDK 7
14 | * integrate cloudera::cm::server into init.pp
15 | * Set [kernel vm.swappiness](http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/cdh5ig_topic_11_6.html) to 0.
16 | * Do parcels still require LZO OS libraries?
17 |
18 | ## Other:
19 |
20 | * refactor ::repo to autoinclude in cdh/impala/search
21 | * Support TLS level 3.
22 | * PostgreSQL must be configured to accept connections with md5 password authentication. To do so, edit /var/lib/pgsql/data/pg_hba.conf (or similar) to include `host all all 127.0.0.1/32 md5` *above* a similar line that allows `ident` authentication.
23 | * cm_api support.
24 | * Add HDFS FUSE mounting support.
25 | * Support pig-udf installation.
26 | * Document hive-server installation.
27 | * Document hive-metastore installation.
28 | * Document sqoop-metastore installation.
29 | * Document whirr installation.
30 | * Sqoop: [Installing the JDBC Drivers](http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/cdh5ig_topic_13_7.html)
31 | * Hue: [EL5 requires python26 from EPEL](http://www.cloudera.com/content/cloudera-content/cloudera-docs/CM5/latest/Cloudera-Manager-Installation-Guide/cm5ig_install_path_A.html)
32 |
33 | ## Links
34 |
35 | http://www.cloudera.com/content/cloudera-content/cloudera-docs/CM5/latest/Cloudera-Manager-Version-and-Download-Information/Cloudera-Manager-Version-and-Download-Information.html
36 | http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5/
37 |
38 | http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH-Version-and-Packaging-Information/cdhvd_topic_2.html
39 | http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/
40 |
41 | http://www.cloudera.com/content/cloudera-content/cloudera-docs/Search/latest/Cloudera-Search-Version-and-Download-Information/Cloudera-Search-Version-and-Download-Information.html
42 | http://archive.cloudera.com/search/redhat/6/x86_64/search/
43 |
44 | http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/Cloudera-Impala-Version-and-Download-Information/Cloudera-Impala-Version-and-Download-Information.html
45 | http://archive.cloudera.com/impala/redhat/6/x86_64/impala/
46 |
47 | http://www.cloudera.com/content/cloudera-content/cloudera-docs/CM4Ent/latest/Cloudera-Manager-Installation-Guide/cmig_install_LZO_Compression.html
48 | http://archive.cloudera.com/gplextras5/redhat/6/x86_64/gplextras/
49 | http://archive.cloudera.com/gplextras/redhat/6/x86_64/gplextras/
50 |
51 |
--------------------------------------------------------------------------------
/files/README_JCE.md:
--------------------------------------------------------------------------------
1 | # Java Cryptography Extension
2 | Go to Oracle's [Java download page](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and download the Java Cryptography Extension (JCE) unlimited strength jurisdiction policy files zipfile to this directory.
3 |
4 | ## JCE 6
5 |
6 | cd /etc/puppet/modules/cloudera/files
7 | wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" \
8 | http://download.oracle.com/otn-pub/java/jce_policy/6/jce_policy-6.zip -O jce_policy-6.zip
9 | unzip jce_policy-6.zip
10 |
11 | You should have the following structure:
12 |
13 | $ tree files/
14 | files/
15 | |-- java.sh
16 | |-- jce
17 | | |-- COPYRIGHT.html
18 | | |-- local_policy.jar
19 | | |-- README.txt
20 | | `-- US_export_policy.jar
21 | |-- jce_policy-6.zip
22 | `-- README_JCE.md
23 |
24 | 1 directory, 7 files
25 |
26 |
27 | ## JCE 7
28 |
29 | cd /etc/puppet/modules/cloudera/files
30 | wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" \
31 | http://download.oracle.com/otn-pub/java/jce/7/UnlimitedJCEPolicyJDK7.zip -O jce_policy-7.zip
32 | unzip jce_policy-7.zip
33 |
34 | You should have the following structure:
35 |
36 | $ tree files/
37 | files/
38 | |-- java.sh
39 | |-- jce_policy-7.zip
40 | |-- README_JCE.md
41 | `-- UnlimitedJCEPolicy
42 | |-- local_policy.jar
43 | |-- README.txt
44 | `-- US_export_policy.jar
45 |
46 | 1 directory, 6 files
47 |
48 |
--------------------------------------------------------------------------------
/files/java.sh:
--------------------------------------------------------------------------------
1 | ###
2 | ### File managed by Puppet
3 | ###
4 | if [ -d /usr/java/default ]; then
5 | export JAVA_HOME=/usr/java/default
6 | elif [ -d /usr/lib/jvm/j2sdk1.6-oracle ]; then
7 | export JAVA_HOME=/usr/lib/jvm/j2sdk1.6-oracle
8 | export PATH=${PATH}:${JAVA_HOME}/bin
9 | elif [ -d /usr/lib/jvm/java-7-oracle-cloudera ]; then
10 | export JAVA_HOME=/usr/lib/jvm/java-7-oracle-cloudera
11 | export PATH=${PATH}:${JAVA_HOME}/bin
12 | fi
13 |
--------------------------------------------------------------------------------
/logo_Cloudera_Certified.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/razorsedge/puppet-cloudera/6e32d71110744a6875942605cf502b2de5ebda5b/logo_Cloudera_Certified.jpg
--------------------------------------------------------------------------------
/manifests/cdh.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh
2 | #
3 | # This class handles installing the Cloudera Distribution, including Apache
4 | # Hadoop.
5 | #
6 | # === Parameters:
7 | #
8 | # [*ensure*]
9 | # Ensure if present or absent.
10 | # Default: present
11 | #
12 | # [*autoupgrade*]
13 | # Upgrade package automatically, if there is a newer version.
14 | # Default: false
15 | #
16 | # [*service_ensure*]
17 | # Ensure if service is running or stopped.
18 | # Default: running
19 | #
20 | # === Actions:
21 | #
22 | # Installs Bigtop, Hadoop, Hue-plugins, HBase, Hive, Oozie, Pig, ZooKeeper,
23 | # and Flume-NG.
24 | #
25 | # === Requires:
26 | #
27 | # Nothing.
28 | #
29 | # === Sample Usage:
30 | #
31 | # class { 'cloudera::cdh': }
32 | #
33 | # === Authors:
34 | #
35 | # Mike Arnold
36 | #
37 | # === Copyright:
38 | #
39 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
40 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
41 | #
42 | # Cloudera, Inc. licenses this file to you under the Apache License,
43 | # Version 2.0 (the "License"). You may not use this file except in
44 | # compliance with the License. You may obtain a copy of the License at
45 | #
46 | # http://www.apache.org/licenses/LICENSE-2.0
47 | #
48 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
49 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
50 | # the specific language governing permissions and limitations under the
51 | # License.
52 | #
53 | class cloudera::cdh (
54 | $ensure = $cloudera::params::ensure,
55 | $autoupgrade = $cloudera::params::safe_autoupgrade,
56 | $service_ensure = $cloudera::params::service_ensure
57 | ) inherits cloudera::params {
58 | # Validate our booleans
59 | validate_bool($autoupgrade)
60 |
61 | anchor { 'cloudera::cdh::begin': }
62 | anchor { 'cloudera::cdh::end': }
63 |
64 | class { 'cloudera::cdh::bigtop':
65 | # ensure => $ensure,
66 | # autoupgrade => $autoupgrade,
67 | require => Anchor['cloudera::cdh::begin'],
68 | before => Anchor['cloudera::cdh::end'],
69 | }
70 | class { 'cloudera::cdh::hadoop':
71 | # ensure => $ensure,
72 | # autoupgrade => $autoupgrade,
73 | require => Anchor['cloudera::cdh::begin'],
74 | before => Anchor['cloudera::cdh::end'],
75 | }
76 | # class { 'cloudera::cdh::hue':
77 | ## ensure => $ensure,
78 | ## autoupgrade => $autoupgrade,
79 | # require => Anchor['cloudera::cdh::begin'],
80 | # before => Anchor['cloudera::cdh::end'],
81 | # }
82 | class { 'cloudera::cdh::hue::plugins':
83 | # ensure => $ensure,
84 | # autoupgrade => $autoupgrade,
85 | require => Anchor['cloudera::cdh::begin'],
86 | before => Anchor['cloudera::cdh::end'],
87 | }
88 | class { 'cloudera::cdh::hbase':
89 | # ensure => $ensure,
90 | # autoupgrade => $autoupgrade,
91 | require => Anchor['cloudera::cdh::begin'],
92 | before => Anchor['cloudera::cdh::end'],
93 | }
94 | class { 'cloudera::cdh::hive':
95 | # ensure => $ensure,
96 | # autoupgrade => $autoupgrade,
97 | require => Anchor['cloudera::cdh::begin'],
98 | before => Anchor['cloudera::cdh::end'],
99 | }
100 | class { 'cloudera::cdh::oozie':
101 | # ensure => $ensure,
102 | # autoupgrade => $autoupgrade,
103 | # service_ensure => $service_ensure,
104 | require => Anchor['cloudera::cdh::begin'],
105 | before => Anchor['cloudera::cdh::end'],
106 | }
107 | class { 'cloudera::cdh::pig':
108 | # ensure => $ensure,
109 | # autoupgrade => $autoupgrade,
110 | require => Anchor['cloudera::cdh::begin'],
111 | before => Anchor['cloudera::cdh::end'],
112 | }
113 | class { 'cloudera::cdh::zookeeper':
114 | # ensure => $ensure,
115 | # autoupgrade => $autoupgrade,
116 | require => Anchor['cloudera::cdh::begin'],
117 | before => Anchor['cloudera::cdh::end'],
118 | }
119 | class { 'cloudera::cdh::flume':
120 | # ensure => $ensure,
121 | # autoupgrade => $autoupgrade,
122 | require => Anchor['cloudera::cdh::begin'],
123 | before => Anchor['cloudera::cdh::end'],
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/manifests/cdh/bigtop.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::bigtop
2 | #
3 | # This class installs the BigTop packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::bigtop': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::bigtop {
24 | package { 'bigtop-jsvc':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 |
29 | package { 'bigtop-tomcat':
30 | ensure => 'present',
31 | tag => 'cloudera-cdh4',
32 | }
33 |
34 | package { 'bigtop-utils':
35 | ensure => 'present',
36 | tag => 'cloudera-cdh4',
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/manifests/cdh/flume.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::flume
2 | #
3 | # This class installs the Flume NG packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::flume': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::flume {
24 | package { 'flume-ng':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 |
29 | case $::operatingsystem {
30 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux', 'SLES', 'Debian': {
31 | service { 'flume-ng':
32 | # ensure => 'running',
33 | enable => false,
34 | hasstatus => false,
35 | hasrestart => true,
36 | require => Package['flume-ng'],
37 | }
38 | }
39 | default: { }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/manifests/cdh/hadoop.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::hadoop {
17 | anchor { 'cloudera::cdh::hadoop::begin': }
18 | anchor { 'cloudera::cdh::hadoop::end': }
19 |
20 | class { 'cloudera::cdh::hadoop::client':
21 | # ensure => $ensure,
22 | # autoupgrade => $autoupgrade,
23 | require => Anchor['cloudera::cdh::hadoop::begin'],
24 | before => Anchor['cloudera::cdh::hadoop::end'],
25 | }
26 |
27 | package { 'hadoop':
28 | ensure => 'present',
29 | tag => 'cloudera-cdh4',
30 | }
31 |
32 | package { 'hadoop-hdfs':
33 | ensure => 'present',
34 | tag => 'cloudera-cdh4',
35 | }
36 |
37 | package { 'hadoop-httpfs':
38 | ensure => 'present',
39 | tag => 'cloudera-cdh4',
40 | notify => Exec['service hadoop-httpfs stop'],
41 | }
42 |
43 | package { 'hadoop-mapreduce':
44 | ensure => 'present',
45 | tag => 'cloudera-cdh4',
46 | }
47 |
48 | package { 'hadoop-yarn':
49 | ensure => 'present',
50 | tag => 'cloudera-cdh4',
51 | }
52 |
53 | package { 'hadoop-0.20-mapreduce':
54 | ensure => 'present',
55 | tag => 'cloudera-cdh4',
56 | }
57 |
58 | exec { 'service hadoop-httpfs stop':
59 | path => '/bin:/usr/bin:/sbin:/usr/sbin',
60 | refreshonly => true,
61 | }
62 |
63 | service { 'hadoop-httpfs':
64 | # ensure => 'stopped',
65 | enable => false,
66 | hasstatus => true,
67 | require => Package['hadoop-httpfs'],
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/manifests/cdh/hadoop/client.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hadoop::client
2 | #
3 | # This class handles installing the Hadoop client packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hadoop::client': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hadoop::client {
24 | package { 'hadoop-client':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh/hadoop/fuse.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hadoop::fuse
2 | #
3 | # This class handles installing the Hadoop HDFS FUSE packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hadoop::fuse': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hadoop::fuse {
24 | package { 'hadoop-hdfs-fuse':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh/hbase.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::hbase {
17 | package { 'hbase':
18 | ensure => 'present',
19 | tag => 'cloudera-cdh4',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh/hcatalog.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hcatalog
2 | #
3 | # This class installes HCatalog.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hcatalog': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hcatalog {
24 | package { 'hcatalog':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 |
29 | package { 'webhcat':
30 | ensure => 'present',
31 | tag => 'cloudera-cdh4',
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/manifests/cdh/hive.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | # (c) Copyright 2011 Cloudera, Inc.
17 | # All rights reserved.
18 |
19 | class cloudera::cdh::hive {
20 | package { 'hive':
21 | ensure => 'present',
22 | tag => 'cloudera-cdh4',
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/manifests/cdh/hive/metastore.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hive::metastore
2 | #
3 | # This class handles installing the Hive Metastore service.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hive::metastore': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hive::metastore {
24 | package { 'hive-metastore':
25 | ensure => present,
26 | tag => 'cloudera-cdh4',
27 | }
28 |
29 | service { 'hive-metastore':
30 | ensure => running,
31 | enable => true,
32 | hasstatus => true,
33 | hasrestart => true,
34 | require => [ Package['hive-metastore'], File['/usr/lib/hive/lib/mysql-connector-java.jar'], ],
35 | }
36 |
37 | include '::mysql::bindings'
38 | include '::mysql::bindings::java'
39 |
40 | file { '/usr/lib/hive/lib/mysql-connector-java.jar':
41 | ensure => link,
42 | target => '/usr/share/java/mysql-connector-java.jar',
43 | require => Class['::mysql::bindings::java'],
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/manifests/cdh/hive/mysql.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hive::mysql
2 | #
3 | # This class handles creating the Hive Metastore database.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hive::mysql': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hive::mysql (
24 | $password,
25 | $database_name = 'metastore_db',
26 | $username = 'hive',
27 | $hive_version = '0.9.0'
28 | ) inherits cloudera::params {
29 | include '::mysql::bindings'
30 | include '::mysql::bindings::java'
31 |
32 | file { '/usr/lib/hive/lib/mysql-connector-java.jar':
33 | ensure => link,
34 | target => '/usr/share/java/mysql-connector-java.jar',
35 | }
36 |
37 | mysql::db { $database_name:
38 | user => $username,
39 | password => $password,
40 | host => '%',
41 | grant => [ 'select_priv', 'insert_priv', 'update_priv', 'delete_priv', ],
42 | sql => "/usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-${hive_version}.mysql.sql",
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/manifests/cdh/hive/server.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hive::server
2 | #
3 | # This class handles installing the Hive Metastore service.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hive::server': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hive::server {
24 | package { 'hive-server':
25 | ensure => present,
26 | tag => 'cloudera-cdh4',
27 | }
28 |
29 | service { 'hive-server':
30 | ensure => running,
31 | enable => true,
32 | hasstatus => true,
33 | hasrestart => true,
34 | require => Package['hive-server'],
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/manifests/cdh/hive/server2.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hive::server2
2 | #
3 | # This class handles installing the Hive Metastore service.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hive::server2': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hive::server2 {
24 | package { 'hive-server2':
25 | ensure => present,
26 | tag => 'cloudera-cdh4',
27 | }
28 |
29 | service { 'hive-server2':
30 | ensure => running,
31 | enable => true,
32 | hasstatus => true,
33 | hasrestart => true,
34 | require => Package['hive-server2'],
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/manifests/cdh/hue.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | # (c) Copyright 2010 Cloudera, Inc.
17 | # All rights reserved.
18 |
19 | class cloudera::cdh::hue {
20 | package { 'hue':
21 | ensure => 'present',
22 | tag => 'cloudera-cdh4',
23 | }
24 |
25 | case $::operatingsystem {
26 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux', 'SLES', 'Debian': {
27 | service { 'hue':
28 | # ensure => 'stopped',
29 | enable => false,
30 | hasstatus => true,
31 | require => Package['hue'],
32 | }
33 | }
34 | default: { }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/manifests/cdh/hue/plugins.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::hue::plugins
2 | #
3 | # This class installes the HUE plugins.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::hue::plugins': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::hue::plugins {
24 | package { 'hue-plugins':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 |
29 | # CDH 4.1.1 had the required file in hue-plugins. In CDH 4.1.2 said file
30 | # becomes a symlink to a file in hue-common.
31 | package { 'hue-common':
32 | ensure => 'present',
33 | tag => 'cloudera-cdh4',
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/manifests/cdh/mahout.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::mahout {
17 | package { 'mahout':
18 | ensure => present,
19 | tag => 'cloudera-cdh4',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh/oozie.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::oozie {
17 | anchor { 'cloudera::cdh::oozie::begin': }
18 | anchor { 'cloudera::cdh::oozie::end': }
19 |
20 | class { 'cloudera::cdh::oozie::client':
21 | # ensure => $ensure,
22 | # autoupgrade => $autoupgrade,
23 | require => Anchor['cloudera::cdh::oozie::begin'],
24 | before => Anchor['cloudera::cdh::oozie::end'],
25 | }
26 |
27 | package { 'oozie':
28 | ensure => 'present',
29 | tag => 'cloudera-cdh4',
30 | }
31 |
32 | service { 'oozie':
33 | # ensure => 'stopped',
34 | enable => false,
35 | require => Package['oozie'],
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/manifests/cdh/oozie/client.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::oozie::client {
17 | package { 'oozie-client':
18 | ensure => 'present',
19 | tag => 'cloudera-cdh4',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh/oozie/ext.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::oozie::ext
2 | #
3 | # This class handles installing the Oozie Web Console.
4 | #
5 | # === Parameters:
6 | #
7 | # [*oozie_ext*]
8 | # URI of the ext-2.2.zip file required by Oozie in order to enable the WebUI.
9 | # Default: http://archive.cloudera.com/gplextras/misc/ext-2.2.zip
10 | #
11 | # === Actions:
12 | #
13 | # Downloads and unzips ext-2.2.zip.
14 | #
15 | # === Requires:
16 | #
17 | # Define['staging::deploy']
18 | #
19 | # === Sample Usage:
20 | #
21 | # class { 'cloudera::cdh::oozie::ext': }
22 | #
23 | # === Authors:
24 | #
25 | # Mike Arnold
26 | #
27 | # === Copyright:
28 | #
29 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
30 | #
31 | class cloudera::cdh::oozie::ext (
32 | $source = $cloudera::params::oozie_ext
33 | ) inherits cloudera::params {
34 | staging::deploy { 'ext-2.2.zip':
35 | source => $source,
36 | target => '/usr/lib/oozie/libext',
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/manifests/cdh/oozie/mysql.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::oozie::mysql
2 | #
3 | # This class handles using an external MySQL database for Oozie.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::oozie::mysql': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::oozie::mysql {
24 | include '::mysql::bindings'
25 | include '::mysql::bindings::java'
26 |
27 | file { '/usr/lib/oozie/libext/mysql-connector-java.jar':
28 | ensure => link,
29 | target => '/usr/share/java/mysql-connector-java.jar',
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/manifests/cdh/pig.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::pig {
17 | package { 'pig':
18 | ensure => 'present',
19 | tag => 'cloudera-cdh4',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh/repo.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::repo
2 | #
3 | # This class handles installing the Cloudera CDH software repositories.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*reposerver*]
12 | # URI of the YUM server.
13 | # Default: http://archive.cloudera.com
14 | #
15 | # [*repopath*]
16 | # The path to add to the $reposerver URI.
17 | # Only set this if your platform is not supported or you know what you are
18 | # doing.
19 | # Default: auto-set, platform specific
20 | #
21 | # [*version*]
22 | # The version of Cloudera's Distribution, including Apache Hadoop to install.
23 | # Default: 4
24 | #
25 | # [*proxy*]
26 | # The URL to the proxy server for the YUM repositories.
27 | # Default: absent
28 | #
29 | # [*proxy_username*]
30 | # The username for the YUM proxy.
31 | # Default: absent
32 | #
33 | # [*proxy_password*]
34 | # The password for the YUM proxy.
35 | # Default: absent
36 | #
37 | # === Actions:
38 | #
39 | # Installs YUM repository configuration files.
40 | #
41 | # === Requires:
42 | #
43 | # Nothing.
44 | #
45 | # === Sample Usage:
46 | #
47 | # class { 'cloudera::cdh::repo':
48 | # version => '4.1',
49 | # }
50 | #
51 | # === Authors:
52 | #
53 | # Mike Arnold
54 | #
55 | # === Copyright:
56 | #
57 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
58 | #
59 | class cloudera::cdh::repo (
60 | $ensure = $cloudera::params::ensure,
61 | $reposerver = $cloudera::params::cdh_reposerver,
62 | $repopath = $cloudera::params::cdh_repopath,
63 | $version = $cloudera::params::cdh_version,
64 | $aptkey = $cloudera::params::cdh_aptkey,
65 | $proxy = $cloudera::params::proxy,
66 | $proxy_username = $cloudera::params::proxy_username,
67 | $proxy_password = $cloudera::params::proxy_password
68 | ) inherits cloudera::params {
69 | case $ensure {
70 | /(present)/: {
71 | $enabled = '1'
72 | }
73 | /(absent)/: {
74 | $enabled = '0'
75 | }
76 | default: {
77 | fail('ensure parameter must be present or absent')
78 | }
79 | }
80 |
81 | case $::operatingsystem {
82 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux': {
83 | yumrepo { 'cloudera-cdh4':
84 | descr => 'Cloudera\'s Distribution for Hadoop, Version 4',
85 | enabled => $enabled,
86 | gpgcheck => 1,
87 | gpgkey => "${reposerver}${repopath}RPM-GPG-KEY-cloudera",
88 | baseurl => "${reposerver}${repopath}${version}/",
89 | priority => $cloudera::params::yum_priority,
90 | protect => $cloudera::params::yum_protect,
91 | proxy => $proxy,
92 | proxy_username => $proxy_username,
93 | proxy_password => $proxy_password,
94 | }
95 |
96 | file { '/etc/yum.repos.d/cloudera-cdh4.repo':
97 | ensure => 'file',
98 | owner => 'root',
99 | group => 'root',
100 | mode => '0644',
101 | }
102 |
103 | Yumrepo['cloudera-cdh4'] -> Package<|tag == 'cloudera-cdh4'|>
104 | }
105 | 'SLES': {
106 | zypprepo { 'cloudera-cdh4':
107 | descr => 'Cloudera\'s Distribution for Hadoop, Version 4',
108 | enabled => $enabled,
109 | gpgcheck => 1,
110 | gpgkey => "${reposerver}${repopath}RPM-GPG-KEY-cloudera",
111 | baseurl => "${reposerver}${repopath}${version}/",
112 | autorefresh => 1,
113 | priority => $cloudera::params::yum_priority,
114 | }
115 |
116 | file { '/etc/zypp/repos.d/cloudera-cdh4.repo':
117 | ensure => 'file',
118 | owner => 'root',
119 | group => 'root',
120 | mode => '0644',
121 | }
122 |
123 | Zypprepo['cloudera-cdh4'] -> Package<|tag == 'cloudera-cdh4'|>
124 | }
125 | 'Debian', 'Ubuntu': {
126 | include '::apt'
127 |
128 | apt::source { 'cloudera-cdh4':
129 | location => "${reposerver}${repopath}",
130 | release => "${::lsbdistcodename}-cdh${version}",
131 | repos => 'contrib',
132 | key => $aptkey,
133 | key_source => "${reposerver}${repopath}archive.key",
134 | architecture => $cloudera::params::architecture,
135 | }
136 |
137 | Apt::Source['cloudera-cdh4'] -> Package<|tag == 'cloudera-cdh4'|>
138 | }
139 | default: { }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/manifests/cdh/sentry.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::sentry
2 | #
3 | # This class installes Sqoop2.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::sentry': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::sentry {
24 | package { 'sentry':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh/sqoop.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::sqoop {
17 | include '::cloudera::cdh::sqoop::client'
18 | }
19 |
--------------------------------------------------------------------------------
/manifests/cdh/sqoop/client.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::sqoop::client {
17 | package { 'sqoop':
18 | ensure => present,
19 | tag => 'cloudera-cdh4',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh/sqoop/metastore.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::sqoop::metastore {
17 | package { 'sqoop-metastore':
18 | ensure => present,
19 | tag => 'cloudera-cdh4',
20 | }
21 |
22 | case $::operatingsystem {
23 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux', 'SLES', 'Debian': {
24 | service { 'sqoop-metastore':
25 | ensure => running,
26 | enable => true,
27 | hasstatus => true,
28 | hasrestart => true,
29 | require => Package['sqoop-metastore'],
30 | }
31 | }
32 | default: { }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/manifests/cdh/sqoop2.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh::sqoop2
2 | #
3 | # This class installes Sqoop2.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh::sqoop2': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh::sqoop2 {
24 | package { 'sqoop2':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh4',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh/whirr.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh::whirr {
17 | package { 'whirr':
18 | ensure => present,
19 | tag => 'cloudera-cdh4',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh/zookeeper.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | # (c) Copyright 2011 Cloudera, Inc.
17 | # All rights reserved.
18 |
19 | class cloudera::cdh::zookeeper {
20 | package { 'zookeeper':
21 | ensure => 'present',
22 | tag => 'cloudera-cdh4',
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/manifests/cdh5/avro.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::avro
2 | #
3 | # This class installes Avro Tools.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::avro': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::avro {
24 | package { 'avro-tools':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/bigtop.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::bigtop
2 | #
3 | # This class installs the BigTop packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::bigtop': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::bigtop {
24 | package { 'bigtop-jsvc':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | package { 'bigtop-tomcat':
30 | ensure => 'present',
31 | tag => 'cloudera-cdh5',
32 | }
33 |
34 | package { 'bigtop-utils':
35 | ensure => 'present',
36 | tag => 'cloudera-cdh5',
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/manifests/cdh5/crunch.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::crunch
2 | #
3 | # This class installes Apache Crunch.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::crunch': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::crunch {
24 | package { 'crunch':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/flume.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::flume
2 | #
3 | # This class installs the Flume NG packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::flume': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::flume {
24 | package { 'flume-ng':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | case $::operatingsystem {
30 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux', 'SLES', 'Debian': {
31 | service { 'flume-ng':
32 | # ensure => 'running',
33 | enable => false,
34 | hasstatus => false,
35 | hasrestart => true,
36 | require => Package['flume-ng'],
37 | }
38 | }
39 | default: { }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/manifests/cdh5/hadoop.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::hadoop {
17 | anchor { 'cloudera::cdh5::hadoop::begin': }
18 | anchor { 'cloudera::cdh5::hadoop::end': }
19 |
20 | class { 'cloudera::cdh5::hadoop::client':
21 | # ensure => $ensure,
22 | # autoupgrade => $autoupgrade,
23 | require => Anchor['cloudera::cdh5::hadoop::begin'],
24 | before => Anchor['cloudera::cdh5::hadoop::end'],
25 | }
26 |
27 | package { 'hadoop':
28 | ensure => 'present',
29 | tag => 'cloudera-cdh5',
30 | }
31 |
32 | package { 'hadoop-hdfs':
33 | ensure => 'present',
34 | tag => 'cloudera-cdh5',
35 | }
36 |
37 | package { 'hadoop-httpfs':
38 | ensure => 'present',
39 | tag => 'cloudera-cdh5',
40 | notify => Exec['service hadoop-httpfs stop'],
41 | }
42 |
43 | package { 'hadoop-mapreduce':
44 | ensure => 'present',
45 | tag => 'cloudera-cdh5',
46 | }
47 |
48 | package { 'hadoop-yarn':
49 | ensure => 'present',
50 | tag => 'cloudera-cdh5',
51 | }
52 |
53 | package { 'hadoop-0.20-mapreduce':
54 | ensure => 'present',
55 | tag => 'cloudera-cdh5',
56 | }
57 |
58 | exec { 'service hadoop-httpfs stop':
59 | path => '/bin:/usr/bin:/sbin:/usr/sbin',
60 | refreshonly => true,
61 | }
62 |
63 | service { 'hadoop-httpfs':
64 | # ensure => 'stopped',
65 | enable => false,
66 | hasstatus => true,
67 | require => Package['hadoop-httpfs'],
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/manifests/cdh5/hadoop/client.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hadoop::client
2 | #
3 | # This class handles installing the Hadoop client packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hadoop::client': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hadoop::client {
24 | package { 'hadoop-client':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/hadoop/fuse.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hadoop::fuse
2 | #
3 | # This class handles installing the Hadoop HDFS FUSE packages.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hadoop::fuse': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hadoop::fuse {
24 | package { 'hadoop-hdfs-fuse':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/hbase.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::hbase {
17 | package { 'hbase':
18 | ensure => 'present',
19 | tag => 'cloudera-cdh5',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh5/hcatalog.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hcatalog
2 | #
3 | # This class installes HCatalog.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hcatalog': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hcatalog {
24 | package { 'hcatalog':
25 | ensure => 'absent',
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | package { 'webhcat':
30 | ensure => 'absent',
31 | tag => 'cloudera-cdh5',
32 | }
33 | package { 'hive-hcatalog':
34 | ensure => 'present',
35 | tag => 'cloudera-cdh5',
36 | }
37 |
38 | package { 'hive-webhcat':
39 | ensure => 'present',
40 | tag => 'cloudera-cdh5',
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/manifests/cdh5/hive.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | # (c) Copyright 2011 Cloudera, Inc.
17 | # All rights reserved.
18 |
19 | class cloudera::cdh5::hive {
20 | package { 'hive':
21 | ensure => 'present',
22 | tag => 'cloudera-cdh5',
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/manifests/cdh5/hive/hbase.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hive::hbase
2 | #
3 | # This class handles installing the Hive HBase integration.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hive::hbase': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hive::hbase {
24 | package { 'hive-hbase':
25 | ensure => present,
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/hive/metastore.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hive::metastore
2 | #
3 | # This class handles installing the Hive Metastore service.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hive::metastore': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hive::metastore {
24 | package { 'hive-metastore':
25 | ensure => present,
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | service { 'hive-metastore':
30 | ensure => running,
31 | enable => true,
32 | hasstatus => true,
33 | hasrestart => true,
34 | require => [ Package['hive-metastore'], File['/usr/lib/hive/lib/mysql-connector-java.jar'], ],
35 | }
36 |
37 | include '::mysql::bindings'
38 | include '::mysql::bindings::java'
39 |
40 | file { '/usr/lib/hive/lib/mysql-connector-java.jar':
41 | ensure => link,
42 | target => '/usr/share/java/mysql-connector-java.jar',
43 | require => Class['::mysql::bindings::java'],
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/manifests/cdh5/hive/mysql.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hive::mysql
2 | #
3 | # This class handles creating the Hive Metastore database.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hive::mysql': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hive::mysql (
24 | $password,
25 | $database_name = 'metastore_db',
26 | $username = 'hive',
27 | $hive_version = '0.9.0'
28 | ) inherits cloudera::params {
29 | include '::mysql::bindings'
30 | include '::mysql::bindings::java'
31 |
32 | file { '/usr/lib/hive/lib/mysql-connector-java.jar':
33 | ensure => link,
34 | target => '/usr/share/java/mysql-connector-java.jar',
35 | }
36 |
37 | mysql::db { $database_name:
38 | user => $username,
39 | password => $password,
40 | host => '%',
41 | grant => [ 'select_priv', 'insert_priv', 'update_priv', 'delete_priv', ],
42 | sql => "/usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-${hive_version}.mysql.sql",
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/manifests/cdh5/hive/server.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hive::server
2 | #
3 | # This class handles installing the Hive Metastore service.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hive::server': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hive::server {
24 | package { 'hive-server':
25 | ensure => present,
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | service { 'hive-server':
30 | ensure => running,
31 | enable => true,
32 | hasstatus => true,
33 | hasrestart => true,
34 | require => Package['hive-server'],
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/manifests/cdh5/hive/server2.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hive::server2
2 | #
3 | # This class handles installing the Hive Metastore service.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hive::server2': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hive::server2 {
24 | package { 'hive-server2':
25 | ensure => present,
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | service { 'hive-server2':
30 | ensure => running,
31 | enable => true,
32 | hasstatus => true,
33 | hasrestart => true,
34 | require => Package['hive-server2'],
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/manifests/cdh5/hue.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | # (c) Copyright 2010 Cloudera, Inc.
17 | # All rights reserved.
18 |
19 | class cloudera::cdh5::hue {
20 | package { 'hue':
21 | ensure => 'present',
22 | tag => 'cloudera-cdh5',
23 | }
24 |
25 | case $::operatingsystem {
26 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux', 'SLES', 'Debian': {
27 | service { 'hue':
28 | # ensure => 'stopped',
29 | enable => false,
30 | hasstatus => true,
31 | require => Package['hue'],
32 | }
33 | }
34 | default: { }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/manifests/cdh5/hue/plugins.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::hue::plugins
2 | #
3 | # This class installes the HUE plugins.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::hue::plugins': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::hue::plugins {
24 | package { 'hue-plugins':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | # CDH 4.1.1 had the required file in hue-plugins. In CDH 4.1.2 said file
30 | # becomes a symlink to a file in hue-common.
31 | package { 'hue-common':
32 | ensure => 'present',
33 | tag => 'cloudera-cdh5',
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/manifests/cdh5/impala.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::impala
2 | #
3 | # This class handles installing the Cloudera Impala.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # [*service_ensure*]
16 | # Ensure if service is running or stopped.
17 | # Default: running
18 | #
19 | # === Actions:
20 | #
21 | # Installs Impala.
22 | #
23 | # === Requires:
24 | #
25 | # Nothing.
26 | #
27 | # === Sample Usage:
28 | #
29 | # class { 'cloudera::cdh5::impala': }
30 | #
31 | # === Authors:
32 | #
33 | # Mike Arnold
34 | #
35 | # === Copyright:
36 | #
37 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
38 | #
39 | class cloudera::cdh5::impala (
40 | $ensure = $cloudera::params::ensure,
41 | $autoupgrade = $cloudera::params::safe_autoupgrade,
42 | $service_ensure = $cloudera::params::service_ensure
43 | ) inherits cloudera::params {
44 | # Validate our booleans
45 | validate_bool($autoupgrade)
46 |
47 | package { 'impala':
48 | ensure => 'present',
49 | tag => 'cloudera-cdh5',
50 | }
51 |
52 | package { 'impala-shell':
53 | ensure => 'present',
54 | tag => 'cloudera-cdh5',
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/manifests/cdh5/kite.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::kite
2 | #
3 | # This class handles installing the Kite Software Development Kit.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::kite': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::kite {
24 | package { 'kite':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/llama.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::llama
2 | #
3 | # This class installes Llama.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::llama': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::llama {
24 | package { 'llama':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/mahout.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::mahout {
17 | package { 'mahout':
18 | ensure => present,
19 | tag => 'cloudera-cdh5',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh5/oozie.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::oozie {
17 | anchor { 'cloudera::cdh5::oozie::begin': }
18 | anchor { 'cloudera::cdh5::oozie::end': }
19 |
20 | class { 'cloudera::cdh5::oozie::client':
21 | # ensure => $ensure,
22 | # autoupgrade => $autoupgrade,
23 | require => Anchor['cloudera::cdh5::oozie::begin'],
24 | before => Anchor['cloudera::cdh5::oozie::end'],
25 | }
26 |
27 | package { 'oozie':
28 | ensure => 'present',
29 | tag => 'cloudera-cdh5',
30 | }
31 |
32 | service { 'oozie':
33 | # ensure => 'stopped',
34 | enable => false,
35 | require => Package['oozie'],
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/manifests/cdh5/oozie/client.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::oozie::client {
17 | package { 'oozie-client':
18 | ensure => 'present',
19 | tag => 'cloudera-cdh5',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh5/oozie/ext.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::oozie::ext
2 | #
3 | # This class handles installing the Oozie Web Console.
4 | #
5 | # === Parameters:
6 | #
7 | # [*oozie_ext*]
8 | # URI of the ext-2.2.zip file required by Oozie in order to enable the WebUI.
9 | # Default: http://archive.cloudera.com/gplextras/misc/ext-2.2.zip
10 | #
11 | # === Actions:
12 | #
13 | # Downloads and unzips ext-2.2.zip.
14 | #
15 | # === Requires:
16 | #
17 | # Define['staging::deploy']
18 | #
19 | # === Sample Usage:
20 | #
21 | # class { 'cloudera::cdh5::oozie::ext': }
22 | #
23 | # === Authors:
24 | #
25 | # Mike Arnold
26 | #
27 | # === Copyright:
28 | #
29 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
30 | #
31 | class cloudera::cdh5::oozie::ext (
32 | $source = $cloudera::params::oozie_ext
33 | ) inherits cloudera::params {
34 | staging::deploy { 'ext-2.2.zip':
35 | source => $source,
36 | target => '/usr/lib/oozie/libext',
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/manifests/cdh5/oozie/mysql.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::oozie::mysql
2 | #
3 | # This class handles using an external MySQL database for Oozie.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::oozie::mysql': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::oozie::mysql {
24 | include '::mysql::bindings'
25 | include '::mysql::bindings::java'
26 |
27 | file { '/usr/lib/oozie/libext/mysql-connector-java.jar':
28 | ensure => link,
29 | target => '/usr/share/java/mysql-connector-java.jar',
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/manifests/cdh5/pig.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::pig {
17 | package { 'pig':
18 | ensure => 'present',
19 | tag => 'cloudera-cdh5',
20 | }
21 |
22 | package { 'pig-udf-datafu':
23 | ensure => 'present',
24 | tag => 'cloudera-cdh5',
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/manifests/cdh5/search.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::search
2 | #
3 | # This class handles installing the Cloudera Search.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # [*service_ensure*]
16 | # Ensure if service is running or stopped.
17 | # Default: running
18 | #
19 | # === Actions:
20 | #
21 | # Installs Search.
22 | #
23 | # === Requires:
24 | #
25 | # Nothing.
26 | #
27 | # === Sample Usage:
28 | #
29 | # class { 'cloudera::cdh5::search': }
30 | #
31 | # === Authors:
32 | #
33 | # Mike Arnold
34 | #
35 | # === Copyright:
36 | #
37 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
38 | #
39 | class cloudera::cdh5::search (
40 | $ensure = $cloudera::params::ensure,
41 | $autoupgrade = $cloudera::params::safe_autoupgrade,
42 | $service_ensure = $cloudera::params::service_ensure
43 | ) inherits cloudera::params {
44 | # Validate our booleans
45 | validate_bool($autoupgrade)
46 |
47 | package { 'solr-server':
48 | ensure => 'present',
49 | tag => 'cloudera-cdh5',
50 | }
51 |
52 | service { 'solr-server':
53 | # ensure => 'stopped',
54 | enable => false,
55 | hasstatus => true,
56 | require => Package['solr-server'],
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/manifests/cdh5/search/lilyhbase.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::search::lilyhbase
2 | #
3 | # This class handles installing the Cloudera Search Lily HBase Indexer.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::search::lilyhbase': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::search::lilyhbase {
24 | package { 'hbase-solr':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | # package { 'hbase-solr-doc':
30 | # ensure => 'present',
31 | # tag => 'cloudera-cdh5',
32 | # }
33 | }
34 |
--------------------------------------------------------------------------------
/manifests/cdh5/search/mapreduce.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::search::mapreduce
2 | #
3 | # This class handles installing the Cloudera Search SolrCloud.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::search::mapreduce': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::search::mapreduce {
24 | package { 'solr-mapreduce':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/sentry.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::sentry
2 | #
3 | # This class installes Sqoop2.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::sentry': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::sentry {
24 | package { 'sentry':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/spark.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::spark
2 | #
3 | # This class handles installing the Apache Spark.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::spark': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::spark {
24 | package { 'spark-core':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 |
29 | package { 'spark-python':
30 | ensure => 'present',
31 | tag => 'cloudera-cdh5',
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/manifests/cdh5/sqoop.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::sqoop {
17 | include '::cloudera::cdh5::sqoop::client'
18 | }
19 |
--------------------------------------------------------------------------------
/manifests/cdh5/sqoop/client.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::sqoop::client {
17 | package { 'sqoop':
18 | ensure => present,
19 | tag => 'cloudera-cdh5',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh5/sqoop/metastore.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::sqoop::metastore {
17 | package { 'sqoop-metastore':
18 | ensure => present,
19 | tag => 'cloudera-cdh5',
20 | }
21 |
22 | case $::operatingsystem {
23 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux', 'SLES', 'Debian': {
24 | service { 'sqoop-metastore':
25 | ensure => running,
26 | enable => true,
27 | hasstatus => true,
28 | hasrestart => true,
29 | require => Package['sqoop-metastore'],
30 | }
31 | }
32 | default: { }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/manifests/cdh5/sqoop2.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cdh5::sqoop2
2 | #
3 | # This class installes Sqoop2.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::cdh5::sqoop2': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::cdh5::sqoop2 {
24 | package { 'sqoop2':
25 | ensure => 'present',
26 | tag => 'cloudera-cdh5',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/manifests/cdh5/whirr.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | class cloudera::cdh5::whirr {
17 | package { 'whirr':
18 | ensure => present,
19 | tag => 'cloudera-cdh5',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/manifests/cdh5/zookeeper.pp:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
3 | #
4 | # Cloudera, Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"). You may not use this file except in
6 | # compliance with the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11 | # CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | # the specific language governing permissions and limitations under the
13 | # License.
14 | #
15 |
16 | # (c) Copyright 2011 Cloudera, Inc.
17 | # All rights reserved.
18 |
19 | class cloudera::cdh5::zookeeper {
20 | package { 'zookeeper':
21 | ensure => 'present',
22 | tag => 'cloudera-cdh5',
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/manifests/cm.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cm
2 | #
3 | # This class handles installing and configuring the Cloudera Manager Agent.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # [*service_ensure*]
16 | # Ensure if service is running or stopped.
17 | # Default: running
18 | #
19 | # [*server_host*]
20 | # Hostname of the Cloudera Manager server.
21 | # Default: localhost
22 | #
23 | # [*server_port*]
24 | # Port to which the Cloudera Manager server is listening.
25 | # Default: 7182
26 | #
27 | # [*use_tls*]
28 | # Whether to enable TLS on the Cloudera Manager agent. TLS needs to be enabled
29 | # on the server prior to setting this to true.
30 | # Default: false
31 | #
32 | # [*verify_cert_file*]
33 | # The file holding the public key of the Cloudera Manager server as well as
34 | # the chain of signing certificate authorities. PEM format.
35 | # Default: /etc/pki/tls/certs/cloudera_manager.crt or
36 | # /etc/ssl/certs/cloudera_manager.crt
37 | #
38 | # [*parcel_dir*]
39 | # The directory where parcels are downloaded and distributed.
40 | # Default: /opt/cloudera/parcels
41 | #
42 | # === Actions:
43 | #
44 | # Installs the packages.
45 | # Configures the server connection.
46 | # Starts the service.
47 | #
48 | # === Requires:
49 | #
50 | # Package['jdk']
51 | #
52 | # === Sample Usage:
53 | #
54 | # class { 'cloudera::cm':
55 | # server_host => 'smhost.example.com',
56 | # }
57 | #
58 | # === Authors:
59 | #
60 | # Mike Arnold
61 | #
62 | # === Copyright:
63 | #
64 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
65 | #
66 | class cloudera::cm (
67 | $ensure = $cloudera::params::ensure,
68 | $autoupgrade = $cloudera::params::safe_autoupgrade,
69 | $service_ensure = $cloudera::params::service_ensure,
70 | $server_host = $cloudera::params::cm_server_host,
71 | $server_port = $cloudera::params::cm_server_port,
72 | $use_tls = $cloudera::params::safe_cm_use_tls,
73 | $verify_cert_file = $cloudera::params::verify_cert_file,
74 | $parcel_dir = $cloudera::params::parcel_dir
75 | ) inherits cloudera::params {
76 | # Validate our booleans
77 | validate_bool($autoupgrade)
78 | validate_bool($use_tls)
79 |
80 | case $ensure {
81 | /(present)/: {
82 | if $autoupgrade == true {
83 | $package_ensure = 'latest'
84 | } else {
85 | $package_ensure = 'present'
86 | }
87 |
88 | if $service_ensure in [ running, stopped ] {
89 | $service_ensure_real = $service_ensure
90 | $service_enable = true
91 | } else {
92 | fail('service_ensure parameter must be running or stopped')
93 | }
94 | $file_ensure = 'present'
95 | }
96 | /(absent)/: {
97 | $package_ensure = 'absent'
98 | $service_ensure_real = 'stopped'
99 | $service_enable = false
100 | $file_ensure = 'absent'
101 | }
102 | default: {
103 | fail('ensure parameter must be present or absent')
104 | }
105 | }
106 |
107 | package { 'cloudera-manager-agent':
108 | ensure => $package_ensure,
109 | tag => 'cloudera-manager',
110 | }
111 |
112 | package { 'cloudera-manager-daemons':
113 | ensure => $package_ensure,
114 | tag => 'cloudera-manager',
115 | }
116 |
117 | file { 'scm-config.ini':
118 | ensure => $file_ensure,
119 | path => '/etc/cloudera-scm-agent/config.ini',
120 | content => template("${module_name}/scm-config.ini.erb"),
121 | require => Package['cloudera-manager-agent'],
122 | notify => Service['cloudera-scm-agent'],
123 | }
124 |
125 | service { 'cloudera-scm-agent':
126 | ensure => $service_ensure_real,
127 | enable => $service_enable,
128 | hasrestart => true,
129 | hasstatus => true,
130 | require => [ Package['cloudera-manager-agent'], Package['cloudera-manager-daemons'], ],
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/manifests/cm5.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::cm5
2 | #
3 | # This class handles installing and configuring the Cloudera Manager Agent.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # [*service_ensure*]
16 | # Ensure if service is running or stopped.
17 | # Default: running
18 | #
19 | # [*server_host*]
20 | # Hostname of the Cloudera Manager server.
21 | # Default: localhost
22 | #
23 | # [*server_port*]
24 | # Port to which the Cloudera Manager server is listening.
25 | # Default: 7182
26 | #
27 | # [*use_tls*]
28 | # Whether to enable TLS on the Cloudera Manager agent. TLS needs to be enabled
29 | # on the server prior to setting this to true.
30 | # Default: false
31 | #
32 | # [*verify_cert_file*]
33 | # The file holding the public key of the Cloudera Manager server as well as
34 | # the chain of signing certificate authorities. PEM format.
35 | # Default: /etc/pki/tls/certs/cloudera_manager.crt or
36 | # /etc/ssl/certs/cloudera_manager.crt
37 | #
38 | # [*parcel_dir*]
39 | # The directory where parcels are downloaded and distributed.
40 | # Default: /opt/cloudera/parcels
41 | #
42 | # === Actions:
43 | #
44 | # Installs the packages.
45 | # Configures the server connection.
46 | # Starts the service.
47 | #
48 | # === Requires:
49 | #
50 | # Package['jdk']
51 | #
52 | # === Sample Usage:
53 | #
54 | # class { 'cloudera::cm5':
55 | # server_host => 'smhost.example.com',
56 | # }
57 | #
58 | # === Authors:
59 | #
60 | # Mike Arnold
61 | #
62 | # === Copyright:
63 | #
64 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
65 | #
66 | class cloudera::cm5 (
67 | $ensure = $cloudera::params::ensure,
68 | $autoupgrade = $cloudera::params::safe_autoupgrade,
69 | $service_ensure = $cloudera::params::service_ensure,
70 | $server_host = $cloudera::params::cm_server_host,
71 | $server_port = $cloudera::params::cm_server_port,
72 | $use_tls = $cloudera::params::safe_cm_use_tls,
73 | $verify_cert_file = $cloudera::params::verify_cert_file,
74 | $parcel_dir = $cloudera::params::parcel_dir
75 | ) inherits cloudera::params {
76 | # Validate our booleans
77 | validate_bool($autoupgrade)
78 | validate_bool($use_tls)
79 |
80 | case $ensure {
81 | /(present)/: {
82 | if $autoupgrade == true {
83 | $package_ensure = 'latest'
84 | } else {
85 | $package_ensure = 'present'
86 | }
87 |
88 | if $service_ensure in [ running, stopped ] {
89 | $service_ensure_real = $service_ensure
90 | $service_enable = true
91 | } else {
92 | fail('service_ensure parameter must be running or stopped')
93 | }
94 | $file_ensure = 'present'
95 | }
96 | /(absent)/: {
97 | $package_ensure = 'absent'
98 | $service_ensure_real = 'stopped'
99 | $service_enable = false
100 | $file_ensure = 'absent'
101 | }
102 | default: {
103 | fail('ensure parameter must be present or absent')
104 | }
105 | }
106 |
107 | package { 'cloudera-manager-agent':
108 | ensure => $package_ensure,
109 | tag => 'cloudera-manager',
110 | }
111 |
112 | if ! defined(Package['cloudera-manager-daemons']) {
113 | package { 'cloudera-manager-daemons':
114 | ensure => $package_ensure,
115 | tag => 'cloudera-manager',
116 | }
117 | }
118 |
119 | file { 'scm-config.ini':
120 | ensure => $file_ensure,
121 | path => '/etc/cloudera-scm-agent/config.ini',
122 | content => template("${module_name}/scm-config.ini.erb"),
123 | require => Package['cloudera-manager-agent'],
124 | notify => Service['cloudera-scm-agent'],
125 | }
126 |
127 | service { 'cloudera-scm-agent':
128 | ensure => $service_ensure_real,
129 | enable => $service_enable,
130 | hasrestart => true,
131 | hasstatus => true,
132 | require => [ Package['cloudera-manager-agent'], Package['cloudera-manager-daemons'], ],
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/manifests/gplextras.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::gplextras
2 | #
3 | # This class handles installing the Cloudera GPL Extras.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # [*service_ensure*]
16 | # Ensure if service is running or stopped.
17 | # Default: running
18 | #
19 | # === Actions:
20 | #
21 | # Installs GPL Extras.
22 | #
23 | # === Requires:
24 | #
25 | # Nothing.
26 | #
27 | # === Sample Usage:
28 | #
29 | # class { 'cloudera::gplextras': }
30 | #
31 | # === Authors:
32 | #
33 | # Mike Arnold
34 | #
35 | # === Copyright:
36 | #
37 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
38 | #
39 | class cloudera::gplextras (
40 | $ensure = $cloudera::params::ensure,
41 | $autoupgrade = $cloudera::params::safe_autoupgrade
42 | ) inherits cloudera::params {
43 | # Validate our booleans
44 | validate_bool($autoupgrade)
45 |
46 | if ($::operatingsystem in [ 'CentOS', 'RedHat', 'OEL', 'OracleLinux' ]) and ($cloudera::params::majdistrelease == 5) {
47 | require '::epel'
48 | }
49 |
50 | package { 'hadoop-lzo-cdh4':
51 | ensure => 'present',
52 | tag => 'cloudera-gplextras',
53 | }
54 |
55 | package { 'hadoop-lzo-cdh4-mr1':
56 | ensure => 'present',
57 | tag => 'cloudera-gplextras',
58 | }
59 |
60 | package { 'impala-lzo':
61 | ensure => 'present',
62 | tag => 'cloudera-gplextras',
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/manifests/gplextras5.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::gplextras5
2 | #
3 | # This class handles installing the Cloudera GPL Extras.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # === Actions:
16 | #
17 | # Installs GPL Extras.
18 | #
19 | # === Requires:
20 | #
21 | # Nothing.
22 | #
23 | # === Sample Usage:
24 | #
25 | # class { 'cloudera::gplextras5': }
26 | #
27 | # === Authors:
28 | #
29 | # Mike Arnold
30 | #
31 | # === Copyright:
32 | #
33 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
34 | #
35 | class cloudera::gplextras5 (
36 | $ensure = $cloudera::params::ensure,
37 | $autoupgrade = $cloudera::params::safe_autoupgrade
38 | ) inherits cloudera::params {
39 | # Validate our booleans
40 | validate_bool($autoupgrade)
41 |
42 | if ($::operatingsystem in [ 'CentOS', 'RedHat', 'OEL', 'OracleLinux' ]) and ($cloudera::params::majdistrelease == 5) {
43 | require '::epel'
44 | }
45 |
46 | package { 'hadoop-lzo':
47 | ensure => 'present',
48 | tag => 'cloudera-gplextras5',
49 | }
50 |
51 | package { 'hadoop-lzo-mr1':
52 | ensure => 'present',
53 | tag => 'cloudera-gplextras5',
54 | }
55 |
56 | package { 'impala-lzo':
57 | ensure => 'present',
58 | tag => 'cloudera-gplextras5',
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/manifests/impala.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::impala
2 | #
3 | # This class handles installing the Cloudera Impala.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # [*service_ensure*]
16 | # Ensure if service is running or stopped.
17 | # Default: running
18 | #
19 | # === Actions:
20 | #
21 | # Installs Impala.
22 | #
23 | # === Requires:
24 | #
25 | # Nothing.
26 | #
27 | # === Sample Usage:
28 | #
29 | # class { 'cloudera::impala': }
30 | #
31 | # === Authors:
32 | #
33 | # Mike Arnold
34 | #
35 | # === Copyright:
36 | #
37 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
38 | #
39 | class cloudera::impala (
40 | $ensure = $cloudera::params::ensure,
41 | $autoupgrade = $cloudera::params::safe_autoupgrade,
42 | $service_ensure = $cloudera::params::service_ensure
43 | ) inherits cloudera::params {
44 | # Validate our booleans
45 | validate_bool($autoupgrade)
46 |
47 | package { 'impala':
48 | ensure => 'present',
49 | tag => 'cloudera-impala',
50 | }
51 |
52 | package { 'impala-shell':
53 | ensure => 'present',
54 | tag => 'cloudera-impala',
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/manifests/impala/repo.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::impala::repo
2 | #
3 | # This class handles installing the Cloudera Impala software repositories.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*reposerver*]
12 | # URI of the YUM server.
13 | # Default: http://archive.cloudera.com
14 | #
15 | # [*repopath*]
16 | # The path to add to the $reposerver URI.
17 | # Only set this if your platform is not supported or you know what you are
18 | # doing.
19 | # Default: auto-set, platform specific
20 | #
21 | # [*version*]
22 | # The version of Cloudera Impala to install.
23 | # Default: 1
24 | #
25 | # [*proxy*]
26 | # The URL to the proxy server for the YUM repositories.
27 | # Default: absent
28 | #
29 | # [*proxy_username*]
30 | # The username for the YUM proxy.
31 | # Default: absent
32 | #
33 | # [*proxy_password*]
34 | # The password for the YUM proxy.
35 | # Default: absent
36 | #
37 | # === Actions:
38 | #
39 | # Installs YUM repository configuration files.
40 | #
41 | # === Requires:
42 | #
43 | # Nothing.
44 | #
45 | # === Sample Usage:
46 | #
47 | # class { 'cloudera::impala::repo':
48 | # version => '4.1',
49 | # }
50 | #
51 | # === Authors:
52 | #
53 | # Mike Arnold
54 | #
55 | # === Copyright:
56 | #
57 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
58 | #
59 | class cloudera::impala::repo (
60 | $ensure = $cloudera::params::ensure,
61 | $reposerver = $cloudera::params::ci_reposerver,
62 | $repopath = $cloudera::params::ci_repopath,
63 | $version = $cloudera::params::ci_version,
64 | $aptkey = $cloudera::params::ci_aptkey,
65 | $proxy = $cloudera::params::proxy,
66 | $proxy_username = $cloudera::params::proxy_username,
67 | $proxy_password = $cloudera::params::proxy_password
68 | ) inherits cloudera::params {
69 | case $ensure {
70 | /(present)/: {
71 | $enabled = '1'
72 | }
73 | /(absent)/: {
74 | $enabled = '0'
75 | }
76 | default: {
77 | fail('ensure parameter must be present or absent')
78 | }
79 | }
80 |
81 | case $::operatingsystem {
82 | 'CentOS', 'RedHat', 'OEL', 'OracleLinux': {
83 | yumrepo { 'cloudera-impala':
84 | descr => 'Impala',
85 | enabled => $enabled,
86 | gpgcheck => 1,
87 | gpgkey => "${reposerver}${repopath}RPM-GPG-KEY-cloudera",
88 | baseurl => "${reposerver}${repopath}${version}/",
89 | priority => $cloudera::params::yum_priority,
90 | protect => $cloudera::params::yum_protect,
91 | proxy => $proxy,
92 | proxy_username => $proxy_username,
93 | proxy_password => $proxy_password,
94 | }
95 |
96 | file { '/etc/yum.repos.d/cloudera-impala.repo':
97 | ensure => 'file',
98 | owner => 'root',
99 | group => 'root',
100 | mode => '0644',
101 | }
102 |
103 | Yumrepo['cloudera-impala'] -> Package<|tag == 'cloudera-impala'|>
104 | }
105 | 'SLES': {
106 | zypprepo { 'cloudera-impala':
107 | descr => 'Impala',
108 | enabled => $enabled,
109 | gpgcheck => 1,
110 | gpgkey => "${reposerver}${repopath}RPM-GPG-KEY-cloudera",
111 | baseurl => "${reposerver}${repopath}${version}/",
112 | autorefresh => 1,
113 | priority => $cloudera::params::yum_priority,
114 | }
115 |
116 | file { '/etc/zypp/repos.d/cloudera-impala.repo':
117 | ensure => 'file',
118 | owner => 'root',
119 | group => 'root',
120 | mode => '0644',
121 | }
122 |
123 | Zypprepo['cloudera-impala'] -> Package<|tag == 'cloudera-impala'|>
124 | }
125 | 'Debian', 'Ubuntu': {
126 | include '::apt'
127 |
128 | apt::source { 'cloudera-impala':
129 | location => "${reposerver}${repopath}",
130 | release => "${::lsbdistcodename}-impala${version}",
131 | repos => 'contrib',
132 | key => $aptkey,
133 | key_source => "${reposerver}${repopath}archive.key",
134 | architecture => $cloudera::params::architecture,
135 | }
136 |
137 | Apt::Source['cloudera-impala'] -> Package<|tag == 'cloudera-impala'|>
138 | }
139 | default: { }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/manifests/java/jce.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::java::jce
2 | #
3 | # This class handles installing Oracle Java Cryptography Extension (JCE)
4 | # unlimited strength jurisdiction policy files.
5 | #
6 | # === Parameters:
7 | #
8 | # [*ensure*]
9 | # Ensure if present or absent.
10 | # Default: present
11 | #
12 | # === Actions:
13 | #
14 | # Installs the Oracle Java Cryptography Extension (JCE) unlimited strength
15 | # jurisdiction policy files.
16 | #
17 | # === Requires:
18 | #
19 | # Class['cloudera::java']
20 | #
21 | # === Sample Usage:
22 | #
23 | # class { 'cloudera::java::jce': }
24 | #
25 | # === Authors:
26 | #
27 | # Mike Arnold
28 | #
29 | # === Copyright:
30 | #
31 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
32 | #
33 | class cloudera::java::jce (
34 | $ensure = $cloudera::params::ensure
35 | ) inherits cloudera::params {
36 | case $ensure {
37 | /(present)/: {
38 | $file_ensure = 'present'
39 | }
40 | /(absent)/: {
41 | $file_ensure = 'absent'
42 | }
43 | default: {
44 | fail('ensure parameter must be present or absent')
45 | }
46 | }
47 |
48 | File {
49 | require => Class['cloudera::java'],
50 | }
51 |
52 | file { '/usr/java/default/jre/lib/security/README.txt':
53 | ensure => $file_ensure,
54 | source => "puppet:///modules/${module_name}/jce/README.txt",
55 | mode => '0644',
56 | owner => 'root',
57 | group => 'root',
58 | }
59 |
60 | file { '/usr/java/default/jre/lib/security/local_policy.jar':
61 | ensure => $file_ensure,
62 | source => "puppet:///modules/${module_name}/jce/local_policy.jar",
63 | mode => '0644',
64 | owner => 'root',
65 | group => 'root',
66 | }
67 |
68 | file { '/usr/java/default/jre/lib/security/US_export_policy.jar':
69 | ensure => $file_ensure,
70 | source => "puppet:///modules/${module_name}/jce/US_export_policy.jar",
71 | mode => '0644',
72 | owner => 'root',
73 | group => 'root',
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/manifests/java5/jce.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::java5::jce
2 | #
3 | # This class handles installing Oracle Java Cryptography Extension (JCE)
4 | # unlimited strength jurisdiction policy files.
5 | #
6 | # === Parameters:
7 | #
8 | # [*ensure*]
9 | # Ensure if present or absent.
10 | # Default: present
11 | #
12 | # === Actions:
13 | #
14 | # Installs the Oracle Java Cryptography Extension (JCE) unlimited strength
15 | # jurisdiction policy files.
16 | #
17 | # === Requires:
18 | #
19 | # Class['cloudera::java5']
20 | #
21 | # === Sample Usage:
22 | #
23 | # class { 'cloudera::java5::jce': }
24 | #
25 | # === Authors:
26 | #
27 | # Mike Arnold
28 | #
29 | # === Copyright:
30 | #
31 | # Copyright (C) 2013 Mike Arnold, unless otherwise noted.
32 | #
33 | class cloudera::java5::jce (
34 | $ensure = $cloudera::params::ensure
35 | ) inherits cloudera::params {
36 | case $ensure {
37 | /(present)/: {
38 | $file_ensure = 'present'
39 | }
40 | /(absent)/: {
41 | $file_ensure = 'absent'
42 | }
43 | default: {
44 | fail('ensure parameter must be present or absent')
45 | }
46 | }
47 |
48 | File {
49 | require => Class['cloudera::java5'],
50 | }
51 |
52 | file { '/usr/java/default/jre/lib/security/README.txt':
53 | ensure => $file_ensure,
54 | source => "puppet:///modules/${module_name}/UnlimitedJCEPolicy/README.txt",
55 | mode => '0644',
56 | owner => 'root',
57 | group => 'root',
58 | }
59 |
60 | file { '/usr/java/default/jre/lib/security/local_policy.jar':
61 | ensure => $file_ensure,
62 | source => "puppet:///modules/${module_name}/UnlimitedJCEPolicy/local_policy.jar",
63 | mode => '0644',
64 | owner => 'root',
65 | group => 'root',
66 | }
67 |
68 | file { '/usr/java/default/jre/lib/security/US_export_policy.jar':
69 | ensure => $file_ensure,
70 | source => "puppet:///modules/${module_name}/UnlimitedJCEPolicy/US_export_policy.jar",
71 | mode => '0644',
72 | owner => 'root',
73 | group => 'root',
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/manifests/lzo.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::lzo
2 | #
3 | # This class handles installing the native LZO libraries to support Hadoop LZO
4 | # compression.
5 | #
6 | # === Parameters:
7 | #
8 | # [*autoupgrade*]
9 | # Upgrade package automatically, if there is a newer version.
10 | # Default: false
11 | #
12 | # === Actions:
13 | #
14 | # Installs native LZO libraries.
15 | #
16 | # === Requires:
17 | #
18 | # EPEL for EL5.
19 | #
20 | # === Sample Usage:
21 | #
22 | # class { 'cloudera::lzo': }
23 | #
24 | # === Authors:
25 | #
26 | # Mike Arnold
27 | #
28 | # === Copyright:
29 | #
30 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
31 | #
32 | class cloudera::lzo (
33 | $autoupgrade = $cloudera::params::safe_autoupgrade
34 | ) inherits cloudera::params {
35 | # Validate our booleans
36 | validate_bool($autoupgrade)
37 |
38 | if ($::operatingsystem in [ 'CentOS', 'RedHat', 'OEL', 'OracleLinux' ]) and ($cloudera::params::majdistrelease == 5) {
39 | require '::epel'
40 | }
41 |
42 | package { 'lzo':
43 | ensure => 'present',
44 | name => $cloudera::params::lzo_package_name,
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/manifests/search.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::search
2 | #
3 | # This class handles installing the Cloudera Search.
4 | #
5 | # === Parameters:
6 | #
7 | # [*ensure*]
8 | # Ensure if present or absent.
9 | # Default: present
10 | #
11 | # [*autoupgrade*]
12 | # Upgrade package automatically, if there is a newer version.
13 | # Default: false
14 | #
15 | # [*service_ensure*]
16 | # Ensure if service is running or stopped.
17 | # Default: running
18 | #
19 | # === Actions:
20 | #
21 | # Installs Search.
22 | #
23 | # === Requires:
24 | #
25 | # Nothing.
26 | #
27 | # === Sample Usage:
28 | #
29 | # class { 'cloudera::search': }
30 | #
31 | # === Authors:
32 | #
33 | # Mike Arnold
34 | #
35 | # === Copyright:
36 | #
37 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
38 | #
39 | class cloudera::search (
40 | $ensure = $cloudera::params::ensure,
41 | $autoupgrade = $cloudera::params::safe_autoupgrade,
42 | $service_ensure = $cloudera::params::service_ensure
43 | ) inherits cloudera::params {
44 | # Validate our booleans
45 | validate_bool($autoupgrade)
46 |
47 | package { 'solr-server':
48 | ensure => 'present',
49 | tag => 'cloudera-search',
50 | }
51 |
52 | service { 'solr-server':
53 | # ensure => 'stopped',
54 | enable => false,
55 | hasstatus => true,
56 | require => Package['solr-server'],
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/manifests/search/lilyhbase.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::search::lilyhbase
2 | #
3 | # This class handles installing the Cloudera Search Lily HBase Indexer.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::search::lilyhbase': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::search::lilyhbase {
24 | package { 'hbase-solr':
25 | ensure => 'present',
26 | tag => 'cloudera-search',
27 | }
28 |
29 | package { 'hbase-solr-doc':
30 | ensure => 'present',
31 | tag => 'cloudera-search',
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/manifests/search/mapreduce.pp:
--------------------------------------------------------------------------------
1 | # == Class: cloudera::search::mapreduce
2 | #
3 | # This class handles installing the Cloudera Search SolrCloud.
4 | #
5 | # === Parameters:
6 | #
7 | # === Actions:
8 | #
9 | # === Requires:
10 | #
11 | # === Sample Usage:
12 | #
13 | # class { 'cloudera::search::mapreduce': }
14 | #
15 | # === Authors:
16 | #
17 | # Mike Arnold
18 | #
19 | # === Copyright:
20 | #
21 | # Copyright (C) 2014 Mike Arnold, unless otherwise noted.
22 | #
23 | class cloudera::search::mapreduce {
24 | package { 'solr-mapreduce':
25 | ensure => 'present',
26 | tag => 'cloudera-search',
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "razorsedge-cloudera",
3 | "version": "3.1.0",
4 | "author": "razorsedge",
5 | "summary": "Deploy Cloudera Manager and Cloudera's Distribution, including Apache Hadoop (CDH).",
6 | "license": "Apache-2.0",
7 | "project_page": "https://github.com/razorsedge/puppet-cloudera",
8 | "issues_url": "https://github.com/razorsedge/puppet-cloudera/issues",
9 | "source": "https://github.com/razorsedge/puppet-cloudera.git",
10 | "tags": [ "cloudera", "cdh", "flume", "hadoop", "hbase", "hive", "hue", "impala", "mahout", "manager", "oozie", "pig", "sqoop", "whirr", "zookeeper" ],
11 | "dependencies": [
12 | {
13 | "version_requirement": ">=2.3.0 <5.0.0",
14 | "name": "puppetlabs/stdlib"
15 | },
16 | {
17 | "version_requirement": ">=2.0.0 <4.0.0",
18 | "name": "puppetlabs/mysql"
19 | },
20 | {
21 | "version_requirement": ">=3.0.0 <5.0.0",
22 | "name": "puppetlabs/postgresql"
23 | },
24 | {
25 | "version_requirement": "1.x",
26 | "name": "nanliu/staging"
27 | },
28 | {
29 | "version_requirement": "1.x",
30 | "name": "stahnma/epel"
31 | },
32 | {
33 | "version_requirement": "1.x",
34 | "name": "puppetlabs/java_ks"
35 | },
36 | {
37 | "version_requirement": "1.x",
38 | "name": "darin/zypprepo"
39 | },
40 | {
41 | "version_requirement": ">=1.4.2 <2.0.0",
42 | "name": "puppetlabs/apt"
43 | },
44 | {
45 | "version_requirement": "2.x",
46 | "name": "herculesteam/augeasproviders_sysctl"
47 | }
48 | ],
49 | "operatingsystem_support": [
50 | {
51 | "operatingsystem": "RedHat",
52 | "operatingsystemrelease": [ "5", "6" ]
53 | },
54 | {
55 | "operatingsystem": "CentOS",
56 | "operatingsystemrelease": [ "5", "6" ]
57 | },
58 | {
59 | "operatingsystem": "OracleLinux",
60 | "operatingsystemrelease": [ "5", "6" ]
61 | },
62 | {
63 | "operatingsystem": "SLES",
64 | "operatingsystemrelease": [ "11 SP3" ]
65 | },
66 | {
67 | "operatingsystem": "Debian",
68 | "operatingsystemrelease": [ "6", "7" ]
69 | },
70 | {
71 | "operatingsystem": "Ubuntu",
72 | "operatingsystemrelease": [ "10.04", "12.04", "14.04" ]
73 | }
74 | ],
75 | "requirements": [
76 | {
77 | "name": "puppet",
78 | "version_requirement": ">=2.7.20 <5.0.0"
79 | }
80 | ]
81 | }
82 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_avro_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::avro', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('avro-tools').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_bigtop_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::bigtop', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('bigtop-jsvc').with_ensure('present') }
28 | it { should contain_package('bigtop-tomcat').with_ensure('present') }
29 | it { should contain_package('bigtop-utils').with_ensure('present') }
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_crunch_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::crunch', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('crunch').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_flume_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::flume', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS' do
22 | # let(:params) {{}}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.0',
27 | :operatingsystemmajrelease => '6'
28 | }
29 | end
30 | it { should contain_package('flume-ng').with_ensure('present') }
31 | it { should contain_service('flume-ng').with_enable('false') }
32 | end
33 |
34 | context 'Ubuntu' do
35 | let :facts do {
36 | :osfamily => 'Debian',
37 | :operatingsystem => 'Ubuntu',
38 | :lsbdistcodename => 'trusty',
39 | # :architecture => 'amd64',
40 | :operatingsystemrelease => '14.04',
41 | :lsbmajdistrelease => '14'
42 | }
43 | end
44 | it { should_not contain_service('flume-ng') }
45 | end
46 | end
47 | end
48 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hadoop_client_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hadoop::client', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hadoop-client').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hadoop_fuse_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hadoop::fuse', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hadoop-hdfs-fuse').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hadoop_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hadoop', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_class('cloudera::cdh5::hadoop::client') }
28 | it { should contain_package('hadoop').with_ensure('present') }
29 | it { should contain_package('hadoop-hdfs').with_ensure('present') }
30 | it { should contain_package('hadoop-httpfs').with_ensure('present').with_notify('Exec[service hadoop-httpfs stop]') }
31 | it { should contain_package('hadoop-mapreduce').with_ensure('present') }
32 | it { should contain_package('hadoop-yarn').with_ensure('present') }
33 | it { should contain_package('hadoop-0.20-mapreduce').with_ensure('present') }
34 | it { should contain_service('hadoop-httpfs').with_enable('false') }
35 | it { should contain_exec('service hadoop-httpfs stop').with_refreshonly('true') }
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hbase_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hbase', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hbase').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hcatalog_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hcatalog', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hcatalog').with_ensure('absent') }
28 | it { should contain_package('webhcat').with_ensure('absent') }
29 | it { should contain_package('hive-hcatalog').with_ensure('present') }
30 | it { should contain_package('hive-webhcat').with_ensure('present') }
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hive_hbase_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hive::hbase', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hive-hbase').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hive_metastore_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hive::metastore', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6'
27 | }
28 | end
29 | it { should contain_package('hive-metastore').with_ensure('present') }
30 | it { should contain_service('hive-metastore').with(
31 | :ensure => 'running',
32 | :enable => true,
33 | :hasrestart => true,
34 | :hasstatus => true,
35 | :require => [ 'Package[hive-metastore]', 'File[/usr/lib/hive/lib/mysql-connector-java.jar]' ]
36 | )}
37 | it { should contain_class('mysql::bindings') }
38 | it { should contain_class('mysql::bindings::java') }
39 | it { should contain_file('/usr/lib/hive/lib/mysql-connector-java.jar').with(
40 | :ensure => 'link',
41 | :target => '/usr/share/java/mysql-connector-java.jar',
42 | :require => 'Class[Mysql::Bindings::Java]'
43 | )}
44 | end
45 | end
46 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hive_mysql_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hive::mysql', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:pre_condition) { 'class {"mysql::server":}' }
22 | let(:params) {{ :password => 'myPass' }}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.0',
27 | :operatingsystemmajrelease => '6',
28 | :architecture => 'x86_64',
29 | :root_home => '/root'
30 | }
31 | end
32 | it { should contain_class('mysql::bindings') }
33 | it { should contain_class('mysql::bindings::java') }
34 | it { should contain_file('/usr/lib/hive/lib/mysql-connector-java.jar').with(
35 | :ensure => 'link',
36 | :target => '/usr/share/java/mysql-connector-java.jar'
37 | )}
38 | it { should contain_mysql__db('metastore_db').with(
39 | :user => 'hive',
40 | :password => 'myPass',
41 | :host => '%',
42 | :grant => [ 'select_priv', 'insert_priv', 'update_priv', 'delete_priv' ],
43 | :sql => '/usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-0.9.0.mysql.sql'
44 | )}
45 | end
46 | end
47 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hive_server2_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hive::server2', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hive-server2').with_ensure('present') }
28 | it { should contain_service('hive-server2').with(
29 | :ensure => 'running',
30 | :enable => true,
31 | :hasrestart => true,
32 | :hasstatus => true
33 | )}
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hive_server_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hive::server', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hive-server').with_ensure('present') }
28 | it { should contain_service('hive-server').with(
29 | :ensure => 'running',
30 | :enable => true,
31 | :hasrestart => true,
32 | :hasstatus => true
33 | )}
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hive_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hive', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hive').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hue_plugins_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hue::plugins', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hue-plugins').with_ensure('present') }
28 | it { should contain_package('hue-common').with_ensure('present') }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_hue_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::hue', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS' do
22 | # let(:params) {{}}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.0',
27 | :operatingsystemmajrelease => '6',
28 | :architecture => 'x86_64'
29 | }
30 | end
31 | it { should contain_package('hue').with_ensure('present') }
32 | it { should contain_service('hue').with_enable('false') }
33 | end
34 |
35 | context 'Ubuntu' do
36 | let :facts do {
37 | :osfamily => 'Debian',
38 | :operatingsystem => 'Ubuntu',
39 | :operatingsystemrelease => '14.04',
40 | :architecture => 'amd64',
41 | :lsbdistcodename => 'trusty',
42 | :lsbdistid => 'Ubuntu',
43 | :lsbmajdistrelease => '14'
44 | }
45 | end
46 | it { should_not contain_service('hue') }
47 | end
48 | end
49 | end
50 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_impala_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::impala', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_package('impala').with_ensure('present') }
31 | it { should contain_package('impala-shell').with_ensure('present') }
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_kite_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::kite', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('kite').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_llama_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::llama', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('llama').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_mahout_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::mahout', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('mahout').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_oozie_client_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::oozie::client', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('oozie-client').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_oozie_ext_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::oozie::ext', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64',
28 | :staging_http_get => 'curl',
29 | :path => '/bin:/usr/bin'
30 | }
31 | end
32 | it { should contain_staging__deploy('ext-2.2.zip').with(
33 | :source => 'http://archive.cloudera.com/gplextras/misc/ext-2.2.zip',
34 | :target => '/usr/lib/oozie/libext'
35 | )}
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_oozie_mysql_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::oozie::mysql', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{ }}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6'
27 | }
28 | end
29 | it { should contain_class('mysql::bindings') }
30 | it { should contain_class('mysql::bindings::java') }
31 | it { should contain_file('/usr/lib/oozie/libext/mysql-connector-java.jar').with(
32 | :ensure => 'link',
33 | :target => '/usr/share/java/mysql-connector-java.jar'
34 | )}
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_oozie_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::oozie', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_class('cloudera::cdh5::oozie::client') }
28 | it { should contain_package('oozie').with_ensure('present') }
29 | it { should contain_service('oozie').with_enable('false') }
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_pig_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::pig', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('pig').with_ensure('present') }
28 | it { should contain_package('pig-udf-datafu').with_ensure('present') }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_search_lilyhbase_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::search::lilyhbase', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hbase-solr').with_ensure('present') }
28 | # it { should contain_package('hbase-solr-doc').with_ensure('present') }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_search_mapreduce_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::search::mapreduce', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('solr-mapreduce').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_search_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::search', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_package('solr-server').with_ensure('present') }
31 | it { should contain_service('solr-server').with_enable('false') }
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_sentry_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::sentry', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('sentry').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_spark_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::spark', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('spark-core').with_ensure('present') }
28 | it { should contain_package('spark-python').with_ensure('present') }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_class('cloudera::cdh5::bigtop') }
31 | it { should contain_class('cloudera::cdh5::hadoop') }
32 | it { should contain_class('cloudera::cdh5::hue') }
33 | it { should contain_class('cloudera::cdh5::hue::plugins') }
34 | it { should contain_class('cloudera::cdh5::hbase') }
35 | it { should contain_class('cloudera::cdh5::hive') }
36 | it { should contain_class('cloudera::cdh5::oozie') }
37 | it { should contain_class('cloudera::cdh5::pig') }
38 | it { should contain_class('cloudera::cdh5::zookeeper') }
39 | it { should contain_class('cloudera::cdh5::flume') }
40 | it { should contain_class('cloudera::cdh5::impala') }
41 | it { should contain_class('cloudera::cdh5::search') }
42 | it { should contain_class('cloudera::cdh5::search::lilyhbase') }
43 | it { should contain_class('cloudera::cdh5::crunch') }
44 | it { should contain_class('cloudera::cdh5::hcatalog') }
45 | it { should contain_class('cloudera::cdh5::llama') }
46 | it { should contain_class('cloudera::cdh5::sqoop') }
47 | it { should contain_class('cloudera::cdh5::sqoop2') }
48 | end
49 |
50 | end
51 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_sqoop2_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::sqoop2', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('sqoop2').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_sqoop_client_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::sqoop::client', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('sqoop').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_sqoop_metastore_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::sqoop::metastore', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS' do
22 | # let(:params) {{}}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.3',
27 | :operatingsystemmajrelease => '6',
28 | :architecture => 'x86_64'
29 | }
30 | end
31 | it { should contain_package('sqoop-metastore').with_ensure('present') }
32 | it { should contain_service('sqoop-metastore').with(
33 | :ensure => 'running',
34 | :enable => true,
35 | :hasrestart => true,
36 | :hasstatus => true
37 | )}
38 | end
39 |
40 | context 'Ubuntu' do
41 | let :facts do {
42 | :osfamily => 'Debian',
43 | :operatingsystem => 'Ubuntu',
44 | :operatingsystemrelease => '12.04',
45 | :architecture => 'amd64',
46 | :lsbdistcodename => 'precise',
47 | :lsbdistid => 'Ubuntu',
48 | :lsbmajdistrelease => '12'
49 | }
50 | end
51 | it { should_not contain_service('sqoop-metastore') }
52 | end
53 | end
54 | end
55 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_sqoop_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::sqoop', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_class('cloudera::cdh5::sqoop::client') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_whirr_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::whirr', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('whirr').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh5_zookeeper_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh5::zookeeper', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('zookeeper').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_bigtop_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::bigtop', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('bigtop-jsvc').with_ensure('present') }
28 | it { should contain_package('bigtop-tomcat').with_ensure('present') }
29 | it { should contain_package('bigtop-utils').with_ensure('present') }
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_flume_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::flume', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS' do
22 | # let(:params) {{}}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.3',
27 | :operatingsystemmajrelease => '6',
28 | :architecture => 'x86_64'
29 | }
30 | end
31 | it { should contain_package('flume-ng').with_ensure('present') }
32 | it { should contain_service('flume-ng').with_enable('false') }
33 | end
34 |
35 | context 'Ubuntu' do
36 | let :facts do {
37 | :osfamily => 'Debian',
38 | :operatingsystem => 'Ubuntu',
39 | :operatingsystemrelease => '12.04',
40 | :architecture => 'amd64',
41 | :lsbdistcodename => 'precise',
42 | :lsbdistid => 'Ubuntu',
43 | :lsbmajdistrelease => '12'
44 | }
45 | end
46 | it { should_not contain_service('flume-ng') }
47 | end
48 | end
49 | end
50 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hadoop_client_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hadoop::client', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hadoop-client').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hadoop_fuse_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hadoop::fuse', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hadoop-hdfs-fuse').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hadoop_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hadoop', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_class('cloudera::cdh::hadoop::client') }
28 | it { should contain_package('hadoop').with_ensure('present') }
29 | it { should contain_package('hadoop-hdfs').with_ensure('present') }
30 | it { should contain_package('hadoop-httpfs').with_ensure('present').with_notify('Exec[service hadoop-httpfs stop]') }
31 | it { should contain_package('hadoop-mapreduce').with_ensure('present') }
32 | it { should contain_package('hadoop-yarn').with_ensure('present') }
33 | it { should contain_package('hadoop-0.20-mapreduce').with_ensure('present') }
34 | it { should contain_service('hadoop-httpfs').with_enable('false') }
35 | it { should contain_exec('service hadoop-httpfs stop').with_refreshonly('true') }
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hbase_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hbase', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hbase').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hcatalog_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hcatalog', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hcatalog').with_ensure('present') }
28 | it { should contain_package('webhcat').with_ensure('present') }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hive_metastore_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hive::metastore', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.3',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_package('hive-metastore').with_ensure('present') }
31 | it { should contain_service('hive-metastore').with(
32 | :ensure => 'running',
33 | :enable => true,
34 | :hasrestart => true,
35 | :hasstatus => true,
36 | :require => [ 'Package[hive-metastore]', 'File[/usr/lib/hive/lib/mysql-connector-java.jar]' ]
37 | )}
38 | it { should contain_class('mysql::bindings') }
39 | it { should contain_class('mysql::bindings::java') }
40 | it { should contain_file('/usr/lib/hive/lib/mysql-connector-java.jar').with(
41 | :ensure => 'link',
42 | :target => '/usr/share/java/mysql-connector-java.jar',
43 | :require => 'Class[Mysql::Bindings::Java]'
44 | )}
45 | end
46 | end
47 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hive_mysql_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hive::mysql', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:pre_condition) { 'class {"mysql::server":}' }
22 | let(:params) {{ :password => 'myPass' }}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.0',
27 | :operatingsystemmajrelease => '6',
28 | :architecture => 'x86_64',
29 | :root_home => '/root'
30 | }
31 | end
32 | it { should contain_class('mysql::bindings') }
33 | it { should contain_class('mysql::bindings::java') }
34 | it { should contain_file('/usr/lib/hive/lib/mysql-connector-java.jar').with(
35 | :ensure => 'link',
36 | :target => '/usr/share/java/mysql-connector-java.jar'
37 | )}
38 | it { should contain_mysql__db('metastore_db').with(
39 | :user => 'hive',
40 | :password => 'myPass',
41 | :host => '%',
42 | :grant => [ 'select_priv', 'insert_priv', 'update_priv', 'delete_priv' ],
43 | :sql => '/usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-0.9.0.mysql.sql'
44 | )}
45 | end
46 | end
47 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hive_server2_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hive::server2', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hive-server2').with_ensure('present') }
28 | it { should contain_service('hive-server2').with(
29 | :ensure => 'running',
30 | :enable => true,
31 | :hasrestart => true,
32 | :hasstatus => true
33 | )}
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hive_server_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hive::server', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hive-server').with_ensure('present') }
28 | it { should contain_service('hive-server').with(
29 | :ensure => 'running',
30 | :enable => true,
31 | :hasrestart => true,
32 | :hasstatus => true
33 | )}
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hive_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hive', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hive').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hue_plugins_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hue::plugins', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hue-plugins').with_ensure('present') }
28 | it { should contain_package('hue-common').with_ensure('present') }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_hue_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::hue', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS' do
22 | # let(:params) {{}}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.3',
27 | :operatingsystemmajrelease => '6',
28 | :architecture => 'x86_64'
29 | }
30 | end
31 | it { should contain_package('hue').with_ensure('present') }
32 | it { should contain_service('hue').with_enable('false') }
33 | end
34 |
35 | context 'Ubuntu' do
36 | let :facts do {
37 | :osfamily => 'Debian',
38 | :operatingsystem => 'Ubuntu',
39 | :operatingsystemrelease => '12.04',
40 | :architecture => 'amd64',
41 | :lsbdistcodename => 'precise',
42 | :lsbdistid => 'Ubuntu',
43 | :lsbmajdistrelease => '12'
44 | }
45 | end
46 | it { should_not contain_service('hue') }
47 | end
48 | end
49 | end
50 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_mahout_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::mahout', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('mahout').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_oozie_client_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::oozie::client', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('oozie-client').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_oozie_ext_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::oozie::ext', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64',
28 | :staging_http_get => 'curl',
29 | :path => '/bin:/usr/bin'
30 | }
31 | end
32 | it { should contain_staging__deploy('ext-2.2.zip').with(
33 | :source => 'http://archive.cloudera.com/gplextras/misc/ext-2.2.zip',
34 | :target => '/usr/lib/oozie/libext'
35 | )}
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_oozie_mysql_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::oozie::mysql', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{ }}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.3',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_class('mysql::bindings') }
31 | it { should contain_class('mysql::bindings::java') }
32 | it { should contain_file('/usr/lib/oozie/libext/mysql-connector-java.jar').with(
33 | :ensure => 'link',
34 | :target => '/usr/share/java/mysql-connector-java.jar'
35 | )}
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_oozie_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::oozie', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_class('cloudera::cdh::oozie::client') }
28 | it { should contain_package('oozie').with_ensure('present') }
29 | it { should contain_service('oozie').with_enable('false') }
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_pig_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::pig', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('pig').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_sentry_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::sentry', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('sentry').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_class('cloudera::cdh::bigtop') }
31 | it { should contain_class('cloudera::cdh::hadoop') }
32 | # it { should contain_class('cloudera::cdh::hue') }
33 | it { should contain_class('cloudera::cdh::hue::plugins') }
34 | it { should contain_class('cloudera::cdh::hbase') }
35 | it { should contain_class('cloudera::cdh::hive') }
36 | it { should contain_class('cloudera::cdh::oozie') }
37 | it { should contain_class('cloudera::cdh::pig') }
38 | it { should contain_class('cloudera::cdh::zookeeper') }
39 | it { should contain_class('cloudera::cdh::flume') }
40 | it { should_not contain_class('cloudera::impala') }
41 | end
42 |
43 | end
44 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_sqoop2_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::sqoop2', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('sqoop2').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_sqoop_client_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::sqoop::client', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('sqoop').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_sqoop_metastore_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::sqoop::metastore', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS' do
22 | # let(:params) {{}}
23 | let :facts do {
24 | :osfamily => 'RedHat',
25 | :operatingsystem => 'CentOS',
26 | :operatingsystemrelease => '6.3',
27 | :operatingsystemmajrelease => '6',
28 | :architecture => 'x86_64'
29 | }
30 | end
31 | it { should contain_package('sqoop-metastore').with_ensure('present') }
32 | it { should contain_service('sqoop-metastore').with(
33 | :ensure => 'running',
34 | :enable => true,
35 | :hasrestart => true,
36 | :hasstatus => true
37 | )}
38 | end
39 |
40 | context 'Ubuntu' do
41 | let :facts do {
42 | :osfamily => 'Debian',
43 | :operatingsystem => 'Ubuntu',
44 | :operatingsystemrelease => '12.04',
45 | :architecture => 'amd64',
46 | :lsbdistcodename => 'precise',
47 | :lsbdistid => 'Ubuntu',
48 | :lsbmajdistrelease => '12'
49 | }
50 | end
51 | it { should_not contain_service('sqoop-metastore') }
52 | end
53 | end
54 | end
55 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_sqoop_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::sqoop', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_class('cloudera::cdh::sqoop::client') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_whirr_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::whirr', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('whirr').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_cdh_zookeeper_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::cdh::zookeeper', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('zookeeper').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_gplextras5_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::gplextras5', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS 5.10' do
22 | let(:pre_condition) { 'class {"epel":}' }
23 | let(:params) {{}}
24 | let :facts do {
25 | :osfamily => 'RedHat',
26 | :operatingsystem => 'CentOS',
27 | :operatingsystemrelease => '5.10',
28 | :operatingsystemmajrelease => '5',
29 | :architecture => 'x86_64'
30 | }
31 | end
32 | it { should contain_class('epel') }
33 | it { should contain_package('hadoop-lzo').with_ensure('present') }
34 | it { should contain_package('hadoop-lzo-mr1').with_ensure('present') }
35 | it { should contain_package('impala-lzo').with_ensure('present') }
36 | end
37 |
38 | context 'OracleLinux 6.5' do
39 | let(:params) {{}}
40 | let :facts do {
41 | :osfamily => 'RedHat',
42 | :operatingsystem => 'OracleLinux',
43 | :operatingsystemrelease => '6.5',
44 | :operatingsystemmajrelease => '6',
45 | :architecture => 'x86_64'
46 | }
47 | end
48 | it { should_not contain_class('epel') }
49 | it { should contain_package('hadoop-lzo').with_ensure('present') }
50 | it { should contain_package('hadoop-lzo-mr1').with_ensure('present') }
51 | it { should contain_package('impala-lzo').with_ensure('present') }
52 | end
53 |
54 | context 'Ubuntu 10.04.4' do
55 | let(:params) {{}}
56 | let :facts do {
57 | :osfamily => 'Debian',
58 | :operatingsystem => 'Ubuntu',
59 | :operatingsystemrelease => '10.04.4',
60 | :architecture => 'amd64',
61 | :lsbdistcodename => 'lucid',
62 | :lsbdistid => 'Ubuntu',
63 | :lsbmajdistrelease => '10'
64 | }
65 | end
66 | it { should_not contain_class('epel') }
67 | it { should contain_package('hadoop-lzo').with_ensure('present') }
68 | it { should contain_package('hadoop-lzo-mr1').with_ensure('present') }
69 | it { should contain_package('impala-lzo').with_ensure('present') }
70 | end
71 |
72 | end
73 | end
74 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_gplextras_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::gplextras', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS 5.10' do
22 | let(:pre_condition) { 'class {"epel":}' }
23 | let(:params) {{}}
24 | let :facts do {
25 | :osfamily => 'RedHat',
26 | :operatingsystem => 'CentOS',
27 | :operatingsystemrelease => '5.10',
28 | :operatingsystemmajrelease => '5',
29 | :architecture => 'x86_64'
30 | }
31 | end
32 | it { should contain_class('epel') }
33 | it { should contain_package('hadoop-lzo-cdh4').with_ensure('present') }
34 | it { should contain_package('hadoop-lzo-cdh4-mr1').with_ensure('present') }
35 | it { should contain_package('impala-lzo').with_ensure('present') }
36 | end
37 |
38 | context 'OracleLinux 6.5' do
39 | let(:params) {{}}
40 | let :facts do {
41 | :osfamily => 'RedHat',
42 | :operatingsystem => 'OracleLinux',
43 | :operatingsystemrelease => '6.5',
44 | :operatingsystemmajrelease => '6',
45 | :architecture => 'x86_64'
46 | }
47 | end
48 | it { should_not contain_class('epel') }
49 | it { should contain_package('hadoop-lzo-cdh4').with_ensure('present') }
50 | it { should contain_package('hadoop-lzo-cdh4-mr1').with_ensure('present') }
51 | it { should contain_package('impala-lzo').with_ensure('present') }
52 | end
53 |
54 | context 'Ubuntu 10.04.4' do
55 | let(:params) {{}}
56 | let :facts do {
57 | :osfamily => 'Debian',
58 | :operatingsystem => 'Ubuntu',
59 | :operatingsystemrelease => '10.04.4',
60 | :architecture => 'amd64',
61 | :lsbdistcodename => 'lucid',
62 | :lsbdistid => 'Ubuntu',
63 | :lsbmajdistrelease => '10'
64 | }
65 | end
66 | it { should_not contain_class('epel') }
67 | it { should contain_package('hadoop-lzo-cdh4').with_ensure('present') }
68 | it { should contain_package('hadoop-lzo-cdh4-mr1').with_ensure('present') }
69 | it { should contain_package('impala-lzo').with_ensure('present') }
70 | end
71 |
72 | end
73 | end
74 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_impala_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::impala', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_package('impala').with_ensure('present') }
31 | it { should contain_package('impala-shell').with_ensure('present') }
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_java5_jce_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::java5::jce', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:pre_condition) { 'class {"cloudera::java5":}' }
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should compile.with_all_deps }
31 | it { should contain_file('/usr/java/default/jre/lib/security/README.txt').with(
32 | :ensure => 'present',
33 | :source => 'puppet:///modules/cloudera/UnlimitedJCEPolicy/README.txt',
34 | :mode => '0644',
35 | :owner => 'root',
36 | :group => 'root',
37 | :require => 'Class[Cloudera::Java5]'
38 | )}
39 | it { should contain_file('/usr/java/default/jre/lib/security/local_policy.jar').with(
40 | :ensure => 'present',
41 | :source => 'puppet:///modules/cloudera/UnlimitedJCEPolicy/local_policy.jar',
42 | :mode => '0644',
43 | :owner => 'root',
44 | :group => 'root',
45 | :require => 'Class[Cloudera::Java5]'
46 | )}
47 | it { should contain_file('/usr/java/default/jre/lib/security/US_export_policy.jar').with(
48 | :ensure => 'present',
49 | :source => 'puppet:///modules/cloudera/UnlimitedJCEPolicy/US_export_policy.jar',
50 | :mode => '0644',
51 | :owner => 'root',
52 | :group => 'root',
53 | :require => 'Class[Cloudera::Java5]'
54 | )}
55 | end
56 |
57 | context 'on a supported operatingsystem, custom parameters' do
58 | let :facts do {
59 | :osfamily => 'RedHat',
60 | :operatingsystem => 'OracleLinux',
61 | :operatingsystemrelease => '6.0',
62 | :operatingsystemmajrelease => '6',
63 | :architecture => 'x86_64'
64 | }
65 | end
66 |
67 | describe 'ensure => absent' do
68 | let :params do {
69 | :ensure => 'absent'
70 | }
71 | end
72 | it { should contain_file('/usr/java/default/jre/lib/security/README.txt').with_ensure('absent') }
73 | it { should contain_file('/usr/java/default/jre/lib/security/local_policy.jar').with_ensure('absent') }
74 | it { should contain_file('/usr/java/default/jre/lib/security/US_export_policy.jar').with_ensure('absent') }
75 | end
76 |
77 | describe 'ensure => badvalue' do
78 | let :params do {
79 | :ensure => 'badvalue'
80 | }
81 | end
82 | it 'should fail' do
83 | expect {
84 | should raise_error(Puppet::Error, /ensure parameter must be present or absent/)
85 | }
86 | end
87 | end
88 |
89 | end
90 | end
91 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_java_jce_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::java::jce', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:pre_condition) { 'class {"cloudera::java":}' }
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should compile.with_all_deps }
31 | it { should contain_file('/usr/java/default/jre/lib/security/README.txt').with(
32 | :ensure => 'present',
33 | :source => 'puppet:///modules/cloudera/jce/README.txt',
34 | :mode => '0644',
35 | :owner => 'root',
36 | :group => 'root',
37 | :require => 'Class[Cloudera::Java]'
38 | )}
39 | it { should contain_file('/usr/java/default/jre/lib/security/local_policy.jar').with(
40 | :ensure => 'present',
41 | :source => 'puppet:///modules/cloudera/jce/local_policy.jar',
42 | :mode => '0644',
43 | :owner => 'root',
44 | :group => 'root',
45 | :require => 'Class[Cloudera::Java]'
46 | )}
47 | it { should contain_file('/usr/java/default/jre/lib/security/US_export_policy.jar').with(
48 | :ensure => 'present',
49 | :source => 'puppet:///modules/cloudera/jce/US_export_policy.jar',
50 | :mode => '0644',
51 | :owner => 'root',
52 | :group => 'root',
53 | :require => 'Class[Cloudera::Java]'
54 | )}
55 | end
56 |
57 | context 'on a supported operatingsystem, custom parameters' do
58 | let :facts do {
59 | :osfamily => 'RedHat',
60 | :operatingsystem => 'OracleLinux',
61 | :operatingsystemrelease => '6.0',
62 | :operatingsystemmajrelease => '6',
63 | :architecture => 'x86_64'
64 | }
65 | end
66 |
67 | describe 'ensure => absent' do
68 | let :params do {
69 | :ensure => 'absent'
70 | }
71 | end
72 | it { should contain_file('/usr/java/default/jre/lib/security/README.txt').with_ensure('absent') }
73 | it { should contain_file('/usr/java/default/jre/lib/security/local_policy.jar').with_ensure('absent') }
74 | it { should contain_file('/usr/java/default/jre/lib/security/US_export_policy.jar').with_ensure('absent') }
75 | end
76 |
77 | describe 'ensure => badvalue' do
78 | let :params do {
79 | :ensure => 'badvalue'
80 | }
81 | end
82 | it 'should fail' do
83 | expect {
84 | should raise_error(Puppet::Error, /ensure parameter must be present or absent/)
85 | }
86 | end
87 | end
88 |
89 | end
90 | end
91 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_lzo_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::lzo', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | context 'CentOS 5.10' do
22 | let(:pre_condition) { 'class {"epel":}' }
23 | let(:params) {{}}
24 | let :facts do {
25 | :osfamily => 'RedHat',
26 | :operatingsystem => 'CentOS',
27 | :operatingsystemrelease => '5.10',
28 | :operatingsystemmajrelease => '5',
29 | :architecture => 'x86_64'
30 | }
31 | end
32 | it { should contain_class('epel') }
33 | it { should contain_package('lzo').with_ensure('present').with_name('lzo') }
34 | end
35 |
36 | context 'OracleLinux 6.5' do
37 | let(:params) {{}}
38 | let :facts do {
39 | :osfamily => 'RedHat',
40 | :operatingsystem => 'OracleLinux',
41 | :operatingsystemrelease => '6.5',
42 | :operatingsystemmajrelease => '6',
43 | :architecture => 'x86_64'
44 | }
45 | end
46 | it { should_not contain_class('epel') }
47 | it { should contain_package('lzo').with_ensure('present').with_name('lzo') }
48 | end
49 |
50 | context 'Ubuntu 10.04' do
51 | let(:params) {{}}
52 | let :facts do {
53 | :osfamily => 'Debian',
54 | :operatingsystem => 'Ubuntu',
55 | :operatingsystemrelease => '10.04',
56 | :architecture => 'amd64',
57 | :lsbdistcodename => 'lucid',
58 | :lsbdistid => 'Ubuntu',
59 | :lsbmajdistrelease => '10'
60 | }
61 | end
62 | it { should_not contain_class('epel') }
63 | it { should contain_package('lzo').with_ensure('present').with_name('liblzo2-2') }
64 | end
65 |
66 | context 'Debian 6.0.7' do
67 | let(:params) {{}}
68 | let :facts do {
69 | :osfamily => 'Debian',
70 | :operatingsystem => 'Debian',
71 | :operatingsystemrelease => '6.0.7',
72 | :architecture => 'amd64',
73 | :lsbdistcodename => 'squeeze',
74 | :lsbdistid => 'Debian',
75 | :lsbmajdistrelease => '6'
76 | }
77 | end
78 | it { should_not contain_class('epel') }
79 | it { should contain_package('lzo').with_ensure('present').with_name('liblzo2-2') }
80 | end
81 |
82 | context 'SLES 11SP1' do
83 | let(:params) {{}}
84 | let :facts do {
85 | :osfamily => 'Suse',
86 | :operatingsystem => 'SLES',
87 | :operatingsystemrelease => '11.1',
88 | :operatingsystemmajrelease => '11',
89 | :architecture => 'x86_64'
90 | }
91 | end
92 | it { should_not contain_class('epel') }
93 | it { should contain_package('lzo').with_ensure('present').with_name('liblzo2-2') }
94 | end
95 |
96 | end
97 | end
98 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_search_lilyhbase_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::search::lilyhbase', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('hbase-solr').with_ensure('present') }
28 | it { should contain_package('hbase-solr-doc').with_ensure('present') }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_search_mapreduce_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::search::mapreduce', :type => 'class' do
6 |
7 | # context 'on a non-supported operatingsystem' do
8 | # let :facts do {
9 | # :osfamily => 'foo',
10 | # :operatingsystem => 'bar'
11 | # }
12 | # end
13 | # it 'should fail' do
14 | # expect {
15 | # should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | # }
17 | # end
18 | # end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | # let(:params) {{}}
22 | # let :facts do {
23 | # :osfamily => 'RedHat',
24 | # :operatingsystem => 'CentOS'
25 | # }
26 | # end
27 | it { should contain_package('solr-mapreduce').with_ensure('present') }
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/classes/cloudera_search_spec.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rspec
2 |
3 | require 'spec_helper'
4 |
5 | describe 'cloudera::search', :type => 'class' do
6 |
7 | context 'on a non-supported operatingsystem' do
8 | let :facts do {
9 | :osfamily => 'foo',
10 | :operatingsystem => 'bar'
11 | }
12 | end
13 | it 'should fail' do
14 | expect {
15 | should raise_error(Puppet::Error, /Module cloudera is not supported on bar/)
16 | }
17 | end
18 | end
19 |
20 | context 'on a supported operatingsystem, default parameters' do
21 | let(:params) {{}}
22 | let :facts do {
23 | :osfamily => 'RedHat',
24 | :operatingsystem => 'CentOS',
25 | :operatingsystemrelease => '6.0',
26 | :operatingsystemmajrelease => '6',
27 | :architecture => 'x86_64'
28 | }
29 | end
30 | it { should contain_package('solr-server').with_ensure('present') }
31 | it { should contain_service('solr-server').with_enable('false') }
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/spec/spec.opts:
--------------------------------------------------------------------------------
1 | --format
2 | s
3 | --colour
4 | --loadby
5 | mtime
6 | --backtrace
7 |
--------------------------------------------------------------------------------
/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | require 'puppetlabs_spec_helper/module_spec_helper'
2 |
--------------------------------------------------------------------------------
/templates/db.properties.erb:
--------------------------------------------------------------------------------
1 | ###
2 | ### File managed by Puppet
3 | ###
4 | # Copyright (c) 2012 Cloudera, Inc. All rights reserved.
5 | #
6 | # This file describes the database connection.
7 | #
8 |
9 | # The database type
10 | com.cloudera.cmf.db.type=<%= @db_type %>
11 |
12 | # The database host
13 | # If a non standard port is needed, use 'hostname:port'
14 | com.cloudera.cmf.db.host=<%= @db_host %>:<%= @db_port %>
15 |
16 | # The database name
17 | com.cloudera.cmf.db.name=<%= @database_name %>
18 |
19 | # The database user
20 | com.cloudera.cmf.db.user=<%= @username %>
21 |
22 | # The database user's password
23 | com.cloudera.cmf.db.password=<%= @password %>
24 |
--------------------------------------------------------------------------------
/templates/scm-config.ini.erb:
--------------------------------------------------------------------------------
1 | ###
2 | ### File managed by Puppet
3 | ###
4 | [General]
5 | # Hostname of Cloudera SCM Server
6 | server_host=<%= @server_host %>
7 |
8 | # Port that server is listening on
9 | server_port=<%= @server_port %>
10 |
11 | ## It should not normally be necessary to modify these.
12 | # Port that Agent should listen on
13 | # listening_port=9000
14 |
15 | # IP Address that Agent should listen on
16 | # listening_ip=
17 |
18 | # Hostname that Agent reports as its hostname
19 | listening_hostname=<%= scope.lookupvar('::fqdn') %>
20 |
21 | # Log file. The supervisord log file will be placed into
22 | # the same directory. Note that if the agent is being started
23 | # via the init.d script, /var/log/cloudera-scm-agent/cloudera-scm-agent.out
24 | # will also have a small amount of output (from before logging
25 | # is initialized.)
26 | # log_file=/var/log/cloudera-scm-agent/cloudera-scm-agent.log
27 |
28 | # Parcel directory
29 | # Unpacked parcels will be stored in this directory
30 | # Downloaded parcels will be stored in /../parcel-cache
31 | parcel_dir=<%= @parcel_dir %>
32 |
33 | # Heartbeat optimizations.
34 | # enable_eager_heartbeats=true
35 |
36 | # Monitoring max collection wait in seconds.
37 | max_collection_wait_seconds=10.0
38 |
39 | # Monitoring metric collection timeout in seconds.
40 | metrics_url_timeout_seconds=30.0
41 |
42 | # Monitoring task collection timeout in seconds.
43 | task_metrics_timeout_seconds=5.0
44 |
45 | # The list of non-device (nodev) filesystem types which will be monitored.
46 | monitored_nodev_filesystem_types=nfs,nfs4,tmpfs
47 |
48 | [Security]
49 | <% if @use_tls -%>
50 | use_tls=1
51 | verify_cert_file=<%= @verify_cert_file %>
52 | <% else -%>
53 | use_tls=0
54 | # verify_cert_file=
55 | <% end -%>
56 | # client_key_file=
57 | # client_keypw_file=
58 | # client_cert_file=
59 |
60 | ## Location of Hadoop files. These are the CDH locations when installed by
61 | ## packages. These are not used when CDH is installed by parcels.
62 | #[Hadoop]
63 | #cdh_flume_home=/usr/lib/flume-ng
64 | #cdh_hadoop_bin=/usr/bin/hadoop
65 | #cdh_hadoop_home=/usr/lib/hadoop
66 | #cdh_hbase_home=/usr/lib/hbase
67 | #cdh_hcat_home=/usr/lib/hcatalog
68 | #cdh_hdfs_home=/usr/lib/hadoop-hdfs
69 | #cdh_hive_home=/usr/lib/hive
70 | #cdh_httpfs_home=/usr/lib/hadoop-httpfs
71 | #cdh_hue_home=/usr/share/hue
72 | #cdh_hue_plugins_home=/usr/lib/hadoop
73 | #cdh_impala_home=/usr/lib/impala
74 | #cdh_mr1_home=/usr/lib/hadoop-0.20-mapreduce
75 | #cdh_mr2_home=/usr/lib/hadoop-mapreduce
76 | #cdh_oozie_home=/usr/lib/oozie
77 | #cdh_pig_home=/usr/lib/pig
78 | #cdh_solr_home=/usr/lib/solr
79 | #cdh_sqoop2_home=/usr/lib/sqoop2
80 | #cdh_yarn_home=/usr/lib/hadoop-yarn
81 | #cdh_zookeeper_home=/usr/lib/zookeeper
82 | #hive_default_xml=/etc/hive/conf.dist/hive-default.xml
83 | #jsvc_home=/usr/libexec/bigtop-utils
84 | #tomcat_home=/usr/lib/bigtop-tomcat
85 |
86 | ## Location of Cloudera Management Suite Binaries
87 | #[Cloudera]
88 | #mgmt_home=/usr/share/cmf
89 |
90 | ## Location of JDBC Drivers.
91 | #[JDBC]
92 | #cloudera_mysql_connector_jar=/usr/share/java/mysql-connector-java.jar
93 | #cloudera_oracle_connector_jar=/usr/share/java/oracle-connector-java.jar
94 | #By default, postgres jar is found dynamically in $MGMT_HOME/lib
95 | #cloudera_postgresql_jdbc_jar=
96 |
--------------------------------------------------------------------------------
/tests/cm/server+agent.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | cm_version => '4',
4 | install_cmserver => true,
5 | }
6 |
--------------------------------------------------------------------------------
/tests/cm/server-mysql.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::cm::repo': }
2 | -> class { 'cloudera::java': }
3 | -> class { 'cloudera::cm::server':
4 | db_type => 'mysql',
5 | }
6 |
7 | include '::mysql::server'
8 | #class { 'cloudera':
9 | # cm_server_host => 'localhost',
10 | # install_cmserver => true,
11 | # db_type => 'mysql',
12 | #}
13 |
--------------------------------------------------------------------------------
/tests/cm/server-postgresql.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::cm::repo': }
2 | -> class { 'cloudera::java': }
3 | -> class { 'cloudera::cm::server':
4 | db_type => 'postgresql',
5 | db_user => 'postgres',
6 | db_pass => '',
7 | db_port => '5432',
8 | }
9 |
10 | include '::postgresql::server'
11 | #class { 'cloudera':
12 | # cm_server_host => 'localhost',
13 | # install_cmserver => true,
14 | # db_type => 'postgresql',
15 | #}
16 |
--------------------------------------------------------------------------------
/tests/cm/server.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::cm::repo': }
2 | -> class { 'cloudera::java': }
3 | -> class { 'cloudera::cm::server': }
4 |
5 | #class { 'cloudera':
6 | # cm_server_host => 'localhost',
7 | # install_cmserver => true,
8 | #}
9 |
--------------------------------------------------------------------------------
/tests/cm5/server+agent.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | install_cmserver => true,
4 | }
5 |
--------------------------------------------------------------------------------
/tests/cm5/server-mysql.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::cm5::repo': }
2 | -> class { 'cloudera::java5': }
3 | -> class { 'cloudera::cm5::server':
4 | db_type => 'mysql',
5 | }
6 |
7 | include '::mysql::server'
8 | #class { 'cloudera':
9 | # cm_server_host => 'localhost',
10 | # install_cmserver => true,
11 | # db_type => 'mysql',
12 | #}
13 |
--------------------------------------------------------------------------------
/tests/cm5/server-postgresql.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::cm5::repo': }
2 | -> class { 'cloudera::java5': }
3 | -> class { 'cloudera::cm5::server':
4 | db_type => 'postgresql',
5 | db_user => 'postgres',
6 | db_pass => '',
7 | db_port => '5432',
8 | }
9 |
10 | include '::postgresql::server'
11 | #class { 'cloudera':
12 | # cm_server_host => 'localhost',
13 | # install_cmserver => true,
14 | # db_type => 'postgresql',
15 | #}
16 |
--------------------------------------------------------------------------------
/tests/cm5/server.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::cm5::repo': }
2 | -> class { 'cloudera::java5': }
3 | -> class { 'cloudera::cm5::server': }
4 |
5 | #class { 'cloudera':
6 | # cm_server_host => 'localhost',
7 | # install_cmserver => true,
8 | #}
9 |
--------------------------------------------------------------------------------
/tests/gateway.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'smhost.example.com',
3 | }
4 | class { 'cloudera::cdh::hue': }
5 | class { 'cloudera::cdh::mahout': }
6 | class { 'cloudera::cdh::sqoop': }
7 | # Install Oozie WebUI support (optional):
8 | #class { 'cloudera::cdh::oozie::ext': }
9 | # Install MySQL support (optional):
10 | #class { 'cloudera::cdh::hue::mysql': }
11 | #class { 'cloudera::cdh::oozie::mysql': }
12 |
--------------------------------------------------------------------------------
/tests/gplextras.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::gplextras': }
2 | class { 'cloudera::gplextras::repo': }
3 |
--------------------------------------------------------------------------------
/tests/gplextras5.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::gplextras5': }
2 | class { 'cloudera::gplextras5::repo': }
3 |
--------------------------------------------------------------------------------
/tests/impala.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::impala': }
2 | class { 'cloudera::impala::repo': }
3 |
--------------------------------------------------------------------------------
/tests/init.pp:
--------------------------------------------------------------------------------
1 | # The baseline for module testing used by Puppet Labs is that each manifest
2 | # should have a corresponding test manifest that declares that class or defined
3 | # type.
4 | #
5 | # Tests are then run by using puppet apply --noop (to check for compilation
6 | # errors and view a log of events) or by fully applying the test in a virtual
7 | # environment (to compare the resulting system state to the desired state).
8 | #
9 | # Learn more about module testing here:
10 | # http://docs.puppetlabs.com/guides/tests_smoke.html
11 | #
12 | class { 'cloudera':
13 | cm_server_host => 'localhost',
14 | }
15 |
--------------------------------------------------------------------------------
/tests/init_noparcels.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | use_parcels => false,
4 | }
5 |
--------------------------------------------------------------------------------
/tests/init_noparcels_4.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | use_parcels => false,
4 | cdh_version => '4',
5 | }
6 |
--------------------------------------------------------------------------------
/tests/init_noparcels_gplextras.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | use_parcels => false,
4 | install_lzo => true,
5 | }
6 |
--------------------------------------------------------------------------------
/tests/init_noparcels_gplextras_4.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | use_parcels => false,
4 | install_lzo => true,
5 | cdh_version => '4',
6 | }
7 |
--------------------------------------------------------------------------------
/tests/install_lzo.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | install_lzo => true,
4 | }
5 |
--------------------------------------------------------------------------------
/tests/java.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | install_java => false,
4 | }
5 |
--------------------------------------------------------------------------------
/tests/java/jce.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera':
2 | cm_server_host => 'localhost',
3 | install_jce => true,
4 | }
5 |
--------------------------------------------------------------------------------
/tests/search.pp:
--------------------------------------------------------------------------------
1 | class { 'cloudera::search': }
2 | class { 'cloudera::search::repo': }
3 | class { 'cloudera::cdh::repo': }
4 |
--------------------------------------------------------------------------------
/tests/tls_client.pp:
--------------------------------------------------------------------------------
1 | # The node that will be the CM agent may use this declaration:
2 | class { 'cloudera':
3 | cm_server_host => 'some.other.host',
4 | use_tls => true,
5 | use_parcels => true,
6 | }
7 | -> class { 'cloudera::java::jce': }
8 | file { '/etc/pki/tls/certs/cloudera_manager.crt':
9 | ensure => present,
10 | source => 'puppet:///modules/cloudera/cloudera_manager_chain.crt',
11 | mode => '0644',
12 | owner => 'root',
13 | group => 'root',
14 | before => Class['cloudera::cm'],
15 | }
16 |
--------------------------------------------------------------------------------
/tests/tls_server.pp:
--------------------------------------------------------------------------------
1 | # The node that will be the CM server may use this declaration:
2 | class { 'cloudera':
3 | cm_server_host => $::fqdn,
4 | use_tls => true,
5 | use_parcels => true,
6 | }
7 | -> class { 'cloudera::java::jce': }
8 | -> class { 'cloudera::cm::server':
9 | use_tls => true,
10 | server_keypw => 'myPassWord',
11 | }
12 | file { '/etc/pki/tls/certs/cloudera_manager.crt':
13 | ensure => present,
14 | source => 'puppet:///modules/cloudera/cloudera_manager_chain.crt',
15 | mode => '0644',
16 | owner => 'root',
17 | group => 'root',
18 | before => Class['cloudera::cm'],
19 | }
20 | file { '/etc/pki/tls/certs/cloudera_manager-ca.crt':
21 | ensure => present,
22 | source => 'puppet:///modules/cloudera/cloudera_manager-ca.crt',
23 | mode => '0644',
24 | owner => 'root',
25 | group => 'root',
26 | before => Class['cloudera::cm'],
27 | }
28 | file { "/etc/pki/tls/certs/${::fqdn}-cloudera_manager.crt":
29 | ensure => present,
30 | source => "puppet:///modules/cloudera/${::fqdn}-cloudera_manager.crt",
31 | mode => '0644',
32 | owner => 'root',
33 | group => 'root',
34 | before => Class['cloudera::cm::server'],
35 | }
36 | file { "/etc/pki/tls/private/${::fqdn}-cloudera_manager.key":
37 | ensure => present,
38 | source => "puppet:///modules/cloudera/${::fqdn}-cloudera_manager.key",
39 | mode => '0400',
40 | owner => 'root',
41 | group => 'root',
42 | before => Class['cloudera::cm::server'],
43 | }
44 |
--------------------------------------------------------------------------------