Commit 53f64a94 by source_reader

added source for nilm builds

parent 4d23b468
View NILM documentation locally:
http://localhost/docs/nilm
meters.yml link to /opt/configs/meters.yml
=== Source Code ===
--- Data Acquisition ---
nilmdb NilmDB timeseries database
nilmtools Utilities for NilmDB (Python 2.7)
ethstream Data acquistion from LabJack and NerdJack
labjack Joule module for LabJack U3
iv_sensor Firmware for noncontact sensors
wemo Software and Firmware for Belkin Smart plugs
--- Wattsworth ---
joule Joule daemon and client
lumen_backend Lumen server
lumen_frontend Lumen client
flot plotting library (submodule of lumen_frontend)
--- Nilm Dashboard ---
d3-timeline
dashboard
load_detector
metric_generator
--- Misc ---
puppet Scripts for building system images "sticks"
nilm_admin
\ No newline at end of file
......@@ -17,7 +17,12 @@ class docs {
source => 'puppet:///modules/docs/NETWORK_README'
}
}
if $facts['image_type'] == 'nilm'{
class{'docs::nilm':
docs_path => $docs_path,
owner => $owner
}
}
file {"${docs_path}/README":
ensure => present,
......
class docs::nilm(String $docs_path, String $owner){
require nilm
require nginx
file{"${docs_path}/nilm":
ensure => directory,
owner => $owner,
group => $owner
}
file{"${docs_path}/nilm/source_code":
ensure => directory,
owner => $owner,
group => $owner
}
file{"${docs_path}/nilm/meters.yml":
ensure => link,
target => '/opt/configs/meters.yml'
}
$docs_cmd = "wget http://docs.wattsworth.net/nilm.tar > /dev/null &&\
tar -xf nilm.tar -C /var/www/docs &&\
rm nilm.tar"
exec{ 'InstallNilmDocs':
command => $docs_cmd,
timeout => 0,
path => ['/bin', '/usr/sbin', '/usr/bin'],
creates => "/var/www/docs/nilm"
}
$src_path = "${docs_path}/nilm/source_code"
file{"${docs_path}/nilm/README":
source => 'puppet:///modules/docs/nilm/README',
owner => $owner,
group => $owner
}
$git_user="source_reader"
$git_pwd="KjvSwevjYUY"
$git_cmd="https://${git_user}:${git_pwd}@git.wattsworth.net"
vcsrepo{"${src_path}/nilmdb":
ensure => latest,
provider => git,
source => "${git_cmd}/jim/nilmdb.git",
user => $owner,
}
vcsrepo{"${src_path}/ethstream":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/ethstream.git",
user => $owner,
}
vcsrepo{"${src_path}/submeter":
ensure => latest,
provider => git,
source => "${git_cmd}/nilm/submeter.git",
user => $owner,
}
vcsrepo{"${src_path}/nilm_admin":
ensure => latest,
provider => git,
source => "${git_cmd}/nilm/nilm-admin.git",
user => $owner,
}
vcsrepo{"${src_path}/nilmtools":
ensure => latest,
provider => git,
source => "${git_cmd}/nilm/nilmtools.git",
user => $owner,
}
vcsrepo{"${src_path}/iv_sensor":
ensure => latest,
provider => git,
source => "${git_cmd}/nilm/iv-sensor.git",
user => $owner,
}
$asf_cmd = "wget http://bucket.mit.edu/asf.tar.gz > /dev/null &&\
tar -xf asf.tar.gz -C ${src_path}/iv_sensor &&\
rm asf.tar.gz"
exec{"Atmel Software Framework":
command => $asf_cmd,
timeout => 0,
path => ['/bin', '/usr/sbin', '/usr/bin'],
require => Vcsrepo["${src_path}/iv_sensor"],
creates => "$src_path/iv_sensor/asf"
}
package{['gcc-arm-none-eabi','gdb-multiarch']:
ensure => present,
}
vcsrepo{"${src_path}/wemo_firmware":
ensure => latest,
provider => git,
source => "${git_cmd}/nilm/wemo-firmware.git",
user => $owner,
}
vcsrepo{"${src_path}/puppet":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/puppet.git",
user => $owner,
}
vcsrepo{"${src_path}/joule":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/joule.git",
user => $owner,
}
vcsrepo{"${src_path}/lumen_backend":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/control-api.git",
user => $owner,
}
vcsrepo{"${src_path}/lumen_frontend":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/lumen.git",
user => $owner,
submodules => false
}
vcsrepo{"${src_path}/flot":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/flot.git",
user => $owner,
}
vcsrepo{"${src_path}/labjack":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/labjack-module.git",
user => $owner,
}
vcsrepo{"${src_path}/dashboard":
ensure => latest,
provider => git,
source => "${git_cmd}/uscg-dashboard/nilm-dashboard.git",
user => $owner,
}
vcsrepo{"${src_path}/load-detector":
ensure => latest,
provider => git,
source => "${git_cmd}/uscg-dashboard/load-detector.git",
user => $owner,
}
vcsrepo{"${src_path}/metric_generator":
ensure => latest,
provider => git,
source => "${git_cmd}/uscg-dashboard/metric-generator.git",
user => $owner,
}
vcsrepo{"${src_path}/d3-timeline":
ensure => latest,
provider => git,
source => "${git_cmd}/uscg-dashboard/d3-timeline.git",
user => $owner,
}
}
......@@ -40,6 +40,7 @@ class nginx::sites {
command => $docs_cmd,
timeout => 0,
path => ['/bin', '/usr/sbin', '/usr/bin'],
require => File['/var/www/frontend']
require => File['/var/www/frontend'],
creates => "/var/www/docs/index.html"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment