Skip to content

Instantly share code, notes, and snippets.

@deinspanjer
Created January 24, 2014 19:46
Show Gist options
  • Save deinspanjer/8604686 to your computer and use it in GitHub Desktop.
Save deinspanjer/8604686 to your computer and use it in GitHub Desktop.
# Note I'm not defining any nodes since this particular VM is a single instance box.
$mysql_override_options = {
'mysqld' => {
'query_cache_limit' => '128M',
'query_cache_size' => '256M',
'query_cache_type' => '1',
},
'mysqld_safe' => {
# Set the MySQL timezone.
# @see http://stackoverflow.com/questions/947299/how-do-i-make-mysqls-now-and-curdate-functions-use-utc
'timezone' => 'UTC',
},
}
$mysql_users = {
'xxx@localhost' => {
ensure => 'present',
password_hash => mysql_password('yyy'),
},
}
$mysql_grants = {
'xxx@localhost/*.*' => {
ensure => 'present',
options => ['GRANT'],
privileges => ['ALL'],
table => '*.*',
user => 'xxx@localhost',
},
}
class { '::mysql::server':
override_options => $mysql_override_options,
users => $mysql_users,
grants => $mysql_grants,
}
file { '/src':
ensure => 'directory',
owner => 'vagrant',
group => 'vagrant',
}
vcsrepo { '/src/mondrian-tajo':
ensure => latest,
provider => git,
source => 'git://github.com/deinspanjer/mondrian.git',
revision => 'tajo',
require => File['/src'],
}
mysql::db { 'steelwheels':
ensure => 'present',
charset => 'utf8',
user => 'foodmart',
password => 'foodmart',
sql => '/src/mondrian-tajo/demo/mysql/SteelWheels.sql',
require => VcsRepo['/src/mondrian-tajo'],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment