Skip to content

Commit

Permalink
Experimental configuration for filescan; fixes #40
Browse files Browse the repository at this point in the history
  • Loading branch information
mackensen committed Jun 25, 2017
1 parent 7d64750 commit e09c385
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion puppet/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node 'moodlehat' {
include composer, selenium, vim, moodle, ldap, webgrind
include composer, selenium, vim, moodle, ldap, webgrind, filescan
}
34 changes: 34 additions & 0 deletions puppet/modules/filescan/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class filescan {
vcsrepo { "/var/www/filescan":
ensure => present,
provider => git,
source => 'https://github.com/Swarthmore/filescan-server',
revision => 'master',
group => www-data,
owner => www-data,
}

exec { 'install-filescan':
command => 'npm install',
path => '/usr/bin',
cwd => '/var/www/filescan',
require => Vcsrepo['/var/www/filescan'],
}

exec { 'install-pm2':
command => 'npm install -g grunt-cli',
path => '/usr/bin',
require => Package['nodejs'],
creates => '/usr/bin/pm2',
}

exec { 'run-filescan':
command => 'pm2 start index.js -s',
cwd => '/var/www/filescan',
path => '/usr/bin',
require => [
Exec['install-pm2'],
Exec['install-filescan'],
]
}
}

0 comments on commit e09c385

Please sign in to comment.