From: František Dvořák Date: Thu, 18 Dec 2014 18:32:00 +0000 (+0100) Subject: Class for hwraid repository and megacli, separate class for cloudera. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=b2cabd6ac952068881a62ebac6b0c009eede2680;p=meta-site_hadoop.git Class for hwraid repository and megacli, separate class for cloudera. --- diff --git a/files/hwraid.list b/files/hwraid.list new file mode 100644 index 0000000..47fab79 --- /dev/null +++ b/files/hwraid.list @@ -0,0 +1,2 @@ +# pro HW RAID +deb http://hwraid.le-vert.net/debian wheezy main diff --git a/manifests/cloudera.pp b/manifests/cloudera.pp new file mode 100644 index 0000000..493d4c6 --- /dev/null +++ b/manifests/cloudera.pp @@ -0,0 +1,22 @@ +class site_hadoop::cloudera { + if $::osfamily == 'Debian' { + # cloudera repo + exec { 'key-cloudera': + command => 'apt-key adv --fetch-key http://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/archive.key', + path => $site_hadoop::path, + creates => '/etc/apt/sources.list.d/cloudera.list', + } + -> + exec { 'wget-cloudera': + command => 'wget -P /etc/apt/sources.list.d/ http://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/cloudera.list', + path => $site_hadoop::path, + creates => '/etc/apt/sources.list.d/cloudera.list', + } + ~> + exec { 'apt-get-update': + command => 'apt-get update', + refreshonly => true, + path => $site_hadoop::path, + } + } +} diff --git a/manifests/hwraid.pp b/manifests/hwraid.pp new file mode 100644 index 0000000..681d169 --- /dev/null +++ b/manifests/hwraid.pp @@ -0,0 +1,21 @@ +class site_hadoop::hwraid { + $path='/sbin:/usr/sbin:/bin:/usr/bin' + + exec { 'key-hwraid': + command => 'apt-key adv --fetch-key http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key', + path => $path, + creates => '/etc/apt/sources.list.d/hwraid.list', + } + -> + file { '/etc/apt/sources.list.d/hwraid.list': + source => 'puppet:///modules/site_hadoop/hwraid.list', + } + ~> + exec { 'apt-get-update': + command => 'apt-get update', + refreshonly => true, + path => $path, + } + -> + package { 'megacli': } +} diff --git a/manifests/init.pp b/manifests/init.pp index 90e3510..b7bac97 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,7 +5,9 @@ class site_hadoop inherits site_hadoop::params { include 'site_hadoop::install' include 'site_hadoop::config' + include 'site_hadoop::cloudera' + Class['site_hadoop::cloudera'] -> Class['site_hadoop::install'] -> Class['site_hadoop::config'] -> Class['site_hadoop']