Puppet Class: galaxy_roles_profiles::profile::apache

Defined in:
manifests/profile/apache.pp

Overview

Class galaxy_roles_profiles::profile::apache

Managing Apache for Galaxy in loadbalancing mode: -Install apache and all mods wich are needed -Manage apache’s configuration

Parameters

galaxy_roles_profiles::profile::port_to_listen

Set the port wich you want to use for your Galaxy

Examples

include galaxy_roles_profiles::profile::apache

Authors

  1. Bridel <sbridel@versailles.inra.fr>

  2. Inizan <oinizan@versailles.inra.fr>

  3. Loac <mloac@versailles.inra.fr>

Copyright 2014, unless otherwise noted.

Parameters:

  • port_to_listen (Any) (defaults to: 8081)


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
63
64
65
66
67
# File 'manifests/profile/apache.pp', line 23

class galaxy_roles_profiles::profile::apache(
  $port_to_listen = 8081
){
  include ::apache
  include apache::mod::proxy
  include apache::mod::proxy_balancer
  include apache::mod::rewrite
  if $operatingsystem == Ubuntu and $operatingsystemrelease == 14.04{
  apache::mod { 'slotmem_shm':}
  apache::mod { 'lbmethod_byrequests':}
  }
  if $galaxy::universe::wk_config{
    include galaxy_roles_profiles::balancer_config
    apache::vhost{ 'galaxy':
      port     => $port_to_listen,
      docroot  => '/var/www/galaxy',
      rewrites =>
      [
        {
          comment      => 'Rules for Galaxy in loadbalancing mode',
          rewrite_rule => [ '^/static/style/(.*) /home/galaxy/galaxy-dist/static/june_2007_style/blue/$1 [L]',
                            '^/static/scripts/(.*) /home/galaxy/galaxy-dist/static/scripts/packed/$1 [L]',
                            '^/static/(.*) /home/galaxy/galaxy-dist/static/$1 [L]',
                            '^/favicon.ico /home/galaxy/galaxy-dist/static/favicon.ico [L]',
                            '^/robots.txt /home/galaxy/galaxy-dist/static/robots.txt [L]',
                            '^(.*) balancer://galaxy$1 [P]',
                          ]
       },
      ]
    }
  }
  else{
    apache::vhost{ 'galaxy':
      port     => $port_to_listen,
      docroot  => '/var/www/galaxy',
      rewrites =>
      [
        {
          comment      => 'Rules for Galaxy in oncecore mode',
          rewrite_rule => '^(.*) http://localhost:8080$1 [P]',
        },
      ]
    }
  }
}