|
@ -1,5 +1,5 @@ |
|
|
group { 'sigi': |
|
|
group { 'sigi': |
|
|
ensure => 'present', |
|
|
ensure => 'present', |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
user { 'sigi': |
|
|
user { 'sigi': |
|
@ -9,35 +9,35 @@ user { 'sigi': |
|
|
require => Group['sigi'] |
|
|
require => Group['sigi'] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
package { [ 'git', 'tree', |
|
|
package { [ 'git', 'tree', 'python-pip', 'python-dev', 'python-psycopg2', |
|
|
'python-pip', 'python-dev', 'python-psycopg2', |
|
|
'supervisor', 'memcached', ]: } |
|
|
'supervisor', 'memcached', |
|
|
|
|
|
]: } |
|
|
|
|
|
|
|
|
|
|
|
$sigi_dir = '/srv/sigi' |
|
|
$sigi_dir = '/srv/sigi' |
|
|
|
|
|
|
|
|
file { [ |
|
|
file { [ |
|
|
'/var/log/sigi', |
|
|
'/var/log/sigi', |
|
|
'/var/run/sigi', |
|
|
'/var/run/sigi', |
|
|
"${sigi_dir}/media", # Se for fazer cluster, essa pasta deve ser a mesma entre as instâncias |
|
|
"${sigi_dir}/media", |
|
|
"${sigi_dir}/media/apps", |
|
|
"${sigi_dir}/media/apps", |
|
|
"${sigi_dir}/media/apps/metas", |
|
|
"${sigi_dir}/media/apps/metas", |
|
|
]: |
|
|
]: |
|
|
ensure => 'directory', |
|
|
ensure => 'directory', |
|
|
owner => 'sigi', |
|
|
owner => 'sigi', |
|
|
group => 'sigi', |
|
|
group => 'sigi', |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# TODO A pasta "${sigi_dir}/media" deve ser compartilhada entre instancias de cluster |
|
|
|
|
|
|
|
|
file { '/var/log/sigi/sigi-supervisor.log': |
|
|
file { '/var/log/sigi/sigi-supervisor.log': |
|
|
ensure => file, |
|
|
ensure => file, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
vcsrepo { $sigi_dir: |
|
|
vcsrepo { $sigi_dir: |
|
|
ensure => latest, |
|
|
ensure => latest, |
|
|
provider => git, |
|
|
provider => git, |
|
|
source => 'https://github.com/interlegis/sigi.git', |
|
|
source => 'https://github.com/interlegis/sigi.git', |
|
|
revision => 'producao', |
|
|
revision => 'producao', |
|
|
require => Package['git'], |
|
|
require => Package['git'], |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
########################################################################### |
|
|
########################################################################### |
|
|