Deploy meas_web everywhere
This commit is contained in:
parent
e4d27d6494
commit
cfe9f78071
5 changed files with 36 additions and 1 deletions
4
modules/rhizo_base/files/etc/sv/meas-web/log/run
Executable file
4
modules/rhizo_base/files/etc/sv/meas-web/log/run
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
LOG_FOLDER=/var/log/meas-web
|
||||
mkdir -p $LOG_FOLDER
|
||||
exec svlogd -tt $LOG_FOLDER
|
3
modules/rhizo_base/files/etc/sv/meas-web/run
Executable file
3
modules/rhizo_base/files/etc/sv/meas-web/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
exec 2>&1
|
||||
exec /usr/bin/websocketd --staticdir=/var/www/meas --port=8080 /usr/bin/stdbuf -oL /usr/local/bin/meas_json
|
|
@ -240,6 +240,16 @@ class rhizo_base {
|
|||
Exec['restart-smpp'] ],
|
||||
}
|
||||
|
||||
vcsrepo { '/var/meas_web':
|
||||
ensure => latest,
|
||||
provider => git,
|
||||
source => 'https://github.com/whyteks/meas_web.git',
|
||||
revision => 'master',
|
||||
require => [ Package['git'] ],
|
||||
notify => [ Exec['restart-meas'] ],
|
||||
}
|
||||
|
||||
|
||||
file { '/var/rhizomatica/bin/get_account_balance.sh':
|
||||
ensure => present,
|
||||
content => template('rhizo_base/get_account_balance.sh.erb'),
|
||||
|
@ -308,6 +318,12 @@ class rhizo_base {
|
|||
command => '/usr/bin/sv restart smpp',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'restart-meas':
|
||||
command => '/usr/bin/sv restart meas-web',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
|
||||
if $operatingsystem == 'Ubuntu' {
|
||||
file { '/var/lib/locales/supported.d/local':
|
||||
|
@ -329,6 +345,12 @@ class rhizo_base {
|
|||
require => [ Vcsrepo['/var/rhizomatica'] ],
|
||||
}
|
||||
|
||||
file { '/var/www/meas':
|
||||
ensure => link,
|
||||
target => '/var/meas_web/usr/share/fairwaves-meas-web/',
|
||||
require => [ Vcsrepo['/var/meas_web'] ],
|
||||
}
|
||||
|
||||
file { '/var/www/html/rai':
|
||||
ensure => link,
|
||||
target => '/var/rhizomatica/rai',
|
||||
|
|
|
@ -19,7 +19,7 @@ class rhizo_base::packages::common {
|
|||
|
||||
package { ['mosh', 'git', 'openvpn', 'lm-sensors', 'runit', 'sqlite3',
|
||||
'libffi-dev', 'apcupsd', 'expect', 'gawk', 'swig', 'g++',
|
||||
'python-python-smpplib', 'libcdk5' ]:
|
||||
'python-python-smpplib', 'libcdk5', 'websocketd', 'osmo-meas' ]:
|
||||
ensure => installed,
|
||||
require => Class['rhizo_base::apt'],
|
||||
}
|
||||
|
|
|
@ -58,4 +58,10 @@ class rhizo_base::runit {
|
|||
require => [ File['/etc/sv'], Class['rhizo_base::kiwi'] ],
|
||||
}
|
||||
|
||||
file { '/etc/service/meas-web':
|
||||
ensure => link,
|
||||
target => '/etc/sv/meas-web',
|
||||
require => [ File['/etc/sv'], Package['websocketd'] ],
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue