Commit 576df75e295aacf7027a0aca8951cd9a76087078
1 parent
2375bb1c
Exists in
master
and in
39 other branches
Updated init.pp to support CentOS
Showing
1 changed file
with
16 additions
and
19 deletions
Show diff stats
puppet/modules/colab/manifests/init.pp
| ... | ... | @@ -2,6 +2,8 @@ |
| 2 | 2 | class colab { |
| 3 | 3 | |
| 4 | 4 | require pip |
| 5 | + require appdeploy::deps::python | |
| 6 | + require appdeploy::deps::essential | |
| 5 | 7 | |
| 6 | 8 | include appdeploy::deps::lxml |
| 7 | 9 | include appdeploy::deps::postgresql |
| ... | ... | @@ -10,31 +12,26 @@ class colab { |
| 10 | 12 | appdeploy::django { 'colab': |
| 11 | 13 | user => 'colab', |
| 12 | 14 | directory => '/home/colab/colab/src', |
| 13 | - proxy_hosts => [ | |
| 14 | - 'colab.interlegis.leg.br', | |
| 15 | - ], | |
| 15 | + proxy_hosts => $colab::hostnames, | |
| 16 | + } | |
| 16 | 17 | |
| 18 | + case $osfamily { | |
| 19 | + 'Redhat': { | |
| 20 | + ensure_packages(['java-1.7.0-openjdk','fuse-sshfs']) | |
| 21 | + } | |
| 22 | + 'Debian': { | |
| 23 | + ensure_packages(['openjdk-7-jre','sshfs']) | |
| 24 | + } | |
| 17 | 25 | } |
| 18 | 26 | |
| 19 | - ensure_packages(['mercurial', 'openjdk-7-jre', 'memcached', 'sshfs']) | |
| 27 | + ensure_packages(['mercurial', 'memcached']) | |
| 20 | 28 | |
| 21 | 29 | # XMPP connection manager |
| 22 | - package { 'punjab': | |
| 23 | - ensure => installed, | |
| 24 | - provider => pip, | |
| 25 | - } | |
| 26 | - | |
| 27 | - # Punjab dep | |
| 28 | - package { 'Twisted': | |
| 29 | - ensure => installed, | |
| 30 | - provider => pip, | |
| 31 | - } | |
| 30 | + pip::install { 'punjab': } | |
| 32 | 31 | |
| 33 | 32 | # Punjab dep |
| 34 | - package { 'pyOpenSSL': | |
| 35 | - ensure => installed, | |
| 36 | - provider => pip, | |
| 37 | - } | |
| 33 | + pip::install { 'Twisted': } | |
| 34 | + pip::install { 'pyOpenSSL': } | |
| 38 | 35 | |
| 39 | 36 | supervisor::app { 'punjab': |
| 40 | 37 | command => 'twistd --nodaemon punjab', |
| ... | ... | @@ -44,7 +41,7 @@ class colab { |
| 44 | 41 | |
| 45 | 42 | supervisor::app { 'solr': |
| 46 | 43 | command => 'java -jar start.jar', |
| 47 | - directory => '/home/colab/apache-solr-3.6.2/example', | |
| 44 | + directory => $colab::solr_project_path, | |
| 48 | 45 | user => 'colab', |
| 49 | 46 | } |
| 50 | 47 | } | ... | ... |