-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.pp
63 lines (56 loc) · 1.85 KB
/
run.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package { 'git-core':
ensure => installed,
}
group{"datawinners": ensure => "present",}
user { "datawinners":
ensure => "present",
managehome => true,
gid => "datawinners",
require => Group["datawinners"],
}
class {'python': virtualenv => true}
python::virtualenv { '/home/datawinners/virtual_env/datawinner':
ensure => present,
owner => "datawinners",
group => "datawinners",
}
python::pip {"pip":
virtualenv => '/home/datawinners/virtual_env/datawinner',
owner => 'datawinners',
require => User["datawinners"],
}
vcsrepo { '/home/datawinners/workspace/datawinners':
ensure => present,
provider => git,
source => 'git://github.com/mangroveorg/datawinners.git',
}
vcsrepo { '/home/datawinners/workspace/mangrove':
ensure => present,
provider => git,
source => 'git://github.com/mangroveorg/mangrove.git',
}
python::requirements { '/home/datawinners/workspace/datawinners/requirements.pip':
virtualenv => '/home/datawinners/virtual_env/datawinner',
owner => 'datawinners',
group => 'datawinners',
}
python::requirements { '/home/datawinners/workspace/mangrove/requirements.pip':
virtualenv => '/home/datawinners/virtual_env/datawinner',
owner => 'datawinners',
group => 'datawinners',
}
class { 'uwsgi':}
uwsgi::plugin { 'python': ensure => present, }
uwsgi::app { 'datawinners':
require => User["datawinners"],
socket => ":9001",
plugins => "python",
env => "DJANGO_SETTINGS_MODULE=datawinners.settings",
virtualenv => "/home/datawinners/virtual_env",
pythonpath => "/home/datawinners/virtual_env",
uid => "datawinners",
gid => "datawinners",
chdir => "/home/datawinners/workspace/datawinners/datawinners",
home => "/home/datawinners/virtual_env",
module => "django.core.handlers.wsgi:WSGIHandler()",
}