Add Meas-Web Installation
This commit is contained in:
parent
a9319f3d90
commit
1f1db0f869
3 changed files with 28 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
|
|
@ -249,6 +249,15 @@ class rhizo_base {
|
||||||
Exec['restart-apache'] ],
|
Exec['restart-apache'] ],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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':
|
file { '/var/rhizomatica/bin/get_account_balance.sh':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => template('rhizo_base/get_account_balance.sh.erb'),
|
content => template('rhizo_base/get_account_balance.sh.erb'),
|
||||||
|
@ -328,6 +337,11 @@ class rhizo_base {
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exec { 'restart-meas':
|
||||||
|
command => '/usr/bin/sv restart meas-web',
|
||||||
|
refreshonly => true,
|
||||||
|
}
|
||||||
|
|
||||||
if $operatingsystem == 'Ubuntu' {
|
if $operatingsystem == 'Ubuntu' {
|
||||||
file { '/var/lib/locales/supported.d/local':
|
file { '/var/lib/locales/supported.d/local':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -347,7 +361,13 @@ class rhizo_base {
|
||||||
target => '/var/rhizomatica/rccn/log',
|
target => '/var/rhizomatica/rccn/log',
|
||||||
require => [ Vcsrepo['/var/rhizomatica'] ],
|
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':
|
file { '/var/www/html/rai':
|
||||||
ensure => link,
|
ensure => link,
|
||||||
target => '/var/rhizomatica/rai',
|
target => '/var/rhizomatica/rai',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue