Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
puppet
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bf54c189
authored
Nov 13, 2019
by
source_reader
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
changed apply script
parent
ff2ba80f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
3 deletions
Puppetfile
apply.sh
site.pp
vagrant/Vagrantfile
Puppetfile
View file @
bf54c189
...
...
@@ -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'
apply.sh
View file @
bf54c189
...
...
@@ -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
site.pp
View file @
bf54c189
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
}
}
vagrant/Vagrantfile
View file @
bf54c189
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment