cloudera/puppet-scm — pull request #1 by codingtony (2012-11-12 21:15:02+00:00)
Title: Using a template for db.properties, The original module was not working ...

I changed the way scm-server:: was populating the database configuration.
The /usr/share/cmf/schema/scm_prepare_database.sh script was not working properly on my system.

Now it uses a template to write the db.propertries.

Assuming the cloudera repo, jdk, mysql-jdbc,connector and mysql are installed properly ,
this install successfully the scm-server with the latest cdh4 repo.

I've automated my mysql installation using http://github.com/puppetlabs/puppetlabs-mysql

If it can help someone, here is my puppet configuration that automate the creation of a node with an instance of cloudera manager running

node 'mynode' {
class { 'cloudera::scm-server::params':
db_host => 'localhost',
db_user => 'cmf',
db_pass => 'cmf',
}
<-class { 'cloudera::scm-server':}
<-Package[cloudera-manager-server]
~>file { '/usr/share/cmf/lib/mysql-connector-java.jar':
ensure => 'link',
target => '/usr/share/java/mysql-connector-java.jar',
}
<- class { 'mysql::java': }
<- mysql::db { 'cmf':
user => 'cmf',
password => 'cmf',
host => 'localhost',
grant => ['all'],
}
<- package { 'jdk':
ensure=>present
}
<- yumrepo { 'cloudera-manager':
baseurl => 'http://archive.cloudera.com/cm4/redhat/6/x86_64/cm/4/',
descr => 'Cloudera Manager',
enabled => 1,
gpgkey => 'http://archive.cloudera.com/cm4/redhat/6/x86_64/cm/RPM-GPG-KEY-cloudera',
gpgcheck => 1
}
<-class { 'mysql::server':
config_hash => { 'root_password' => 'myrootpassword' }
}
}