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
da119303
authored
Nov 18, 2019
by
source_reader
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug fixes
parent
53f64a94
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
3 deletions
cleanup.sh
modules/docs/manifests/nilm.pp
modules/first_boot/manifests/init.pp
modules/first_boot/templates/first_boot.sh.erb
modules/nginx/manifests/init.pp
modules/nilm/manifests/init.pp
modules/nilmdb/files/nilmdb.service
cleanup.sh
View file @
da119303
...
...
@@ -21,5 +21,8 @@ systemctl enable first_boot.service
echo
"5] Clearing command history"
history
-c
rm
-rf
/root/puppet
rm
-rf
/root/.joule
rm
-rf
~/.joule
echo
"Remember to remove ubuntu user and /home/ubuntu!"
history
-c
modules/docs/manifests/nilm.pp
View file @
da119303
...
...
@@ -140,6 +140,7 @@ class docs::nilm(String $docs_path, String $owner){
provider
=>
git
,
source
=>
"
${git_cmd}
/uscg-dashboard/nilm-dashboard.git"
,
user
=>
$owner
,
submodules
=>
false
}
vcsrepo
{
"
${src_path}
/load-detector"
:
ensure
=>
latest
,
...
...
modules/first_boot/manifests/init.pp
View file @
da119303
...
...
@@ -6,6 +6,11 @@ class first_boot {
}
else
{
$nilmdb
=
false
}
if
$facts
[
'platform'
]
==
'pi'
{
$pi
=
true
}
else
{
$pi
=
false
}
file
{
'/usr/local/bin/first_boot'
:
ensure
=>
present
,
owner
=>
root
,
...
...
modules/first_boot/templates/first_boot.sh.erb
View file @
da119303
...
...
@@ -22,8 +22,10 @@ fi
# only run once
systemctl disable first_boot.service
<%
if
@pi
%>
(
<%
end
%>
echo "# Generating Encryption Keys"
RAILS_PWD="$(openssl rand -hex 8)"
JOULE_PWD="$(openssl rand -hex 8)"
...
...
@@ -76,7 +78,8 @@ echo "# Starting Lumen Webserver"
service
nginx
restart
echo
"#
All
Done
!"
sleep
1
<%
if
@pi
%>
)
|
cat
>
$pipe
<%
end
%>
service joule start
modules/nginx/manifests/init.pp
View file @
da119303
class
nginx
{
require
joule
if
$facts
[
'platform'
]
==
'ubuntu'
{
$install
=
'nginx::install::ubuntu'
}
else
{
...
...
modules/nilm/manifests/init.pp
View file @
da119303
...
...
@@ -3,7 +3,7 @@ class nilm {
$pip_url
=
'https://pypi.wattsworth.net/'
$pip_cmd
=
"pip3 install --upgrade --extra-index-url
${pip_url}
"
package
{
'libfreetype6-dev'
:
package
{
[
'libfreetype6-dev'
,
'python3-tk'
,
'libatlas-base-dev'
]
:
ensure
=>
present
}
exec
{
'install_nilm'
:
...
...
modules/nilmdb/files/nilmdb.service
View file @
da119303
...
...
@@ -6,6 +6,7 @@ Restart = always
StandardOutput=journal
#ExecStartPre = /usr/local/bin/nilmdb-fsck -f -n /opt/data
ExecStart = /usr/local/bin/uwsgi --ini /etc/nilmdb/nilmdb.ini
KillSignal = SIGQUIT
[Install]
WantedBy=multi-user.target
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