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
93bda248
authored
May 16, 2017
by
John Doe
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
puppet bug fixes
parent
594563b6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
14 deletions
modules/common/manifests/init.pp
modules/joule/manifests/init.pp
modules/nilmdb/manifests/init.pp
modules/python3/lib/facter/python_version.rb
modules/python3/manifests/build.pp
modules/python3/manifests/init.pp
site.pp
modules/common/manifests/init.pp
View file @
93bda248
...
...
@@ -3,10 +3,10 @@
# Packages required by multiple modules
#
class
common
{
$pkgs
=
[
'build-essential'
]
package
{
$pkgs
:
ensure
=>
present
}
}
$pkgs
=
[
'build-essential'
]
package
{
$pkgs
:
ensure
=>
present
}
}
modules/joule/manifests/init.pp
View file @
93bda248
...
...
@@ -26,7 +26,8 @@ class joule {
exec
{
'install_joule'
:
command
=>
"
${pip_cmd}
joule"
,
timeout
=>
0
,
path
=>
[
"/usr/local/bin"
,
"/usr/bin"
]
path
=>
[
"/usr/local/bin"
,
"/usr/bin"
],
require
=>
Package
[
$deps
]
}
exec
{
'initialize_joule'
:
command
=>
"joule initialize"
,
...
...
modules/nilmdb/manifests/init.pp
View file @
93bda248
...
...
@@ -11,10 +11,12 @@
# Copyright 2017 John Donnal, unless otherwise noted
#
class
nilmdb
{
require
'common'
$pip_url
=
"http://puppet:wX27zvbA@pypi.wattsworth.net:8080/"
$pip_cmd
=
"pip2 install --extra-index-url
${pip_url}
"
$deps
=
[
'cython'
,
'
build-essential'
,
'
python2.7'
,
'python2.7-dev'
,
'python-setuptools'
,
'python-pip'
,
$deps
=
[
'cython'
,
'python2.7'
,
'python2.7-dev'
,
'python-setuptools'
,
'python-pip'
,
'python-cherrypy3'
,
'python-decorator'
,
'python-requests'
,
'python-dateutil'
,
'python-tz'
,
'python-progressbar'
,
'python-psutil'
,
'python-simplejson'
,
'apache2'
,
'libapache2-mod-wsgi'
]
...
...
@@ -26,7 +28,8 @@ class nilmdb {
exec
{
'install_nilmdb'
:
command
=>
"
${pip_cmd}
nilmdb nilmtools"
,
timeout
=>
0
,
path
=>
[
"/usr/local/bin"
,
"/usr/bin"
]
path
=>
[
"/usr/local/bin"
,
"/usr/bin"
],
require
=>
Package
[
$deps
]
}
user
{
'nilmdb'
:
...
...
modules/python3/lib/facter/python_version.rb
View file @
93bda248
Facter
.
add
(
'python_version'
)
do
setcode
do
Facter
::
Core
::
Execution
.
exec
(
'python3 -V'
)
begin
Facter
::
Core
::
Execution
.
exec
(
'python3 -V'
)
rescue
0
#not installed
end
end
end
modules/python3/manifests/build.pp
View file @
93bda248
...
...
@@ -13,8 +13,7 @@ class python3::build {
"lzma-dev"
,
"libbz2-dev"
]
package
{
'prereqs'
:
name
=>
$build_deps
,
package
{
$build_deps
:
ensure
=>
present
}
#get the source code
...
...
@@ -28,7 +27,7 @@ class python3::build {
command
=>
"/bin/tar -xvf Python-3.5.2.tgz"
,
cwd
=>
"/tmp"
,
creates
=>
"/tmp/Python-3.5.2"
,
require
=>
[
Exec
[
'wget_python'
],
Package
[
'prereqs'
]]
require
=>
[
Exec
[
'wget_python'
],
Package
[
$build_deps
]]
}
#compile the code
exec
{
'compile_python'
:
...
...
modules/python3/manifests/init.pp
View file @
93bda248
...
...
@@ -17,6 +17,7 @@
# Copyright 2017 John Donnal, unless otherwise noted.
#
class
python3
{
require
common
if
$::python_version
!=
'Python 3.5.2'
{
include
python3::build
}
...
...
site.pp
View file @
93bda248
...
...
@@ -5,3 +5,9 @@ node 'raspberrypi' {
include
nilmdb
include
nilm
}
node
'default'
{
include
python3
include
joule
include
nilmdb
include
nilm
}
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