Commit bf54c189 by source_reader

changed apply script

parent ff2ba80f
......@@ -3,3 +3,4 @@ mod 'puppetlabs-apt', '6.2.1'
mod 'puppetlabs-translate', '1.2.0'
mod 'puppetlabs-concat', '5.2.0'
mod 'puppetlabs-stdlib', '5.1.0'
mod 'puppetlabs-vcsrepo', '3.0.0'
......@@ -2,6 +2,15 @@
source set_locale.sh
if [[ $# == 0 ]]; then
IMAGE_TYPE='default'
elif [[ $1 = "--nilm" ]]; then
echo "BUILDING NILM IMAGE"
IMAGE_TYPE='nilm'
else
echo "Error, unknown type $1"
exit 1
fi
# install the puppet forge modules
mkdir -p forge_modules
......@@ -12,5 +21,7 @@ rm -f /etc/joule/main.conf
# run puppet
export FACTER_PLATFORM="ubuntu"
export FACTER_IMAGE_TYPE=$IMAGE_TYPE
/opt/puppetlabs/bin/puppet apply --verbose --modulepath=./forge_modules:./modules site.pp
node 'default' {
include timescaledb
include joule
include static_sites
include rails_api
include joule_labjack
include nginx
include hostapd
if($facts['image_type']=='nilm') {
include nilmdb
class{'nginx':
nilmdb=>true
}
class{'joule':
nilmdb=>true
}
} else{
notice("node type is default")
include nginx
include joule
}
}
......@@ -23,6 +23,7 @@ Vagrant.configure("2") do |config|
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 8080, host: 8081
config.vm.network "forwarded_port", guest: 443, host: 4430
# Create a private network, which allows host-only access to the machine
# using a specific IP.
......
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