Puppet Class: crm::dash
- Defined in:
- puppet/modules/crm/manifests/dash.pp
Overview
Class: crm::dash
Fundraising dashboard
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'puppet/modules/crm/manifests/dash.pp', line 5
class crm::dash (
$dir,
) {
require ::npm
git::clone { 'wikimedia/fundraising/dash':
directory => $dir
}
npm::install { 'dash_npm_install':
directory => $dir,
require => Git::Clone['wikimedia/fundraising/dash']
}
exec { 'dash_bower_install':
command => "${dir}/node_modules/bower/bin/bower install",
cwd => $dir,
require => Npm::Install['dash_npm_install'],
user => 'vagrant',
environment => 'HOME=/home/vagrant'
}
file { 'dash_settings_js':
path => "${dir}/settings.js",
content => template('crm/dash.js.erb'),
mode => '0644',
require => Exec['dash_bower_install'],
}
exec { 'dash_schema':
command => "cat ${dir}/schema/*.sql | /usr/bin/mysql fredge -qfsA",
require => [
File['dash_settings_js'],
Mysql::Db['fredge'],
],
}
file { '/etc/init/fundraising_dash.conf':
content => template('crm/fundraising_dash.conf.erb'),
}
systemd::service { 'fundraising_dash':
ensure => present,
require => Exec['dash_schema'],
}
}
|