components/ruby/puppet-modules/openstack-horizon/patches/05-apache.patch
branchs11u3-sru
changeset 6035 c9748fcc32de
child 5860 afd31ba91ee9
equal deleted inserted replaced
6016:a477397bba8b 6035:c9748fcc32de
       
     1 In-house patch to add support for Solaris 11.3 and 12.0.  This patch
       
     2 has not yet been submitted upstream due to requirements for 3rd party
       
     3 CI testing.
       
     4 
       
     5 --- openstack-horizon-6.1.0/manifests/wsgi/apache.pp.orig       2015-08-10 09:59:25.006128695 -0700
       
     6 +++ openstack-horizon-6.1.0/manifests/wsgi/apache.pp   2015-08-10 10:01:46.943370519 -0700
       
     7 @@ -56,6 +56,14 @@
       
     8  #   (Optional) Description
       
     9  #   Defaults to 'horizon_ssl_vhost'.
       
    10  #
       
    11 +# [*docroot*]
       
    12 +#   (Optional) The DocumentRoot setting
       
    13 +#   Defaults to '/var/www'
       
    14 +#
       
    15 +# [*static_alias*]
       
    16 +#   (Optional) The path to alias to /static
       
    17 +#   Defaults to '/usr/share/openstack-dashboard/static'
       
    18 +#
       
    19  # [*extra_params*]
       
    20  #   (optional) A hash of extra paramaters for apache::wsgi class.
       
    21  #   Defaults to {}
       
    22 @@ -74,6 +82,8 @@ class horizon::wsgi::apache (
       
    23    $priority            = '15',
       
    24    $vhost_conf_name     = 'horizon_vhost',
       
    25    $vhost_ssl_conf_name = 'horizon_ssl_vhost',
       
    26 +  $docroot             = '/var/www',
       
    27 +  $static_alias        = '/usr/share/openstack-dashboard/static',
       
    28    $extra_params        = {},
       
    29  ) {
       
    30 
       
    31 @@ -132,7 +142,11 @@ class horizon::wsgi::apache (
       
    32      $redirect_url   = $::horizon::params::root_url
       
    33    }
       
    34 
       
    35 -  Package['horizon'] -> Package[$::horizon::params::http_service]
       
    36 +  if $::osfamily == 'Solaris' {
       
    37 +    Package[$::horizon::params::package_name] -> Package['web/server/apache-24']
       
    38 +  } else {
       
    39 +    Package['horizon'] -> Package[$::horizon::params::http_service]
       
    40 +  }
       
    41    File[$::horizon::params::config_file] ~> Service[$::horizon::params::http_service]
       
    42 
       
    43    $unix_user = $::osfamily ? {
       
    44 @@ -150,7 +164,7 @@ class horizon::wsgi::apache (
       
    45      group   => $unix_group,
       
    46      before  => Service[$::horizon::params::http_service],
       
    47      mode    => '0751',
       
    48 -    require => Package['horizon'],
       
    49 +    require => Package[$::horizon::params::package_name],
       
    50    }
       
    51 
       
    52    file { "${::horizon::params::logdir}/horizon.log":
       
    53 @@ -159,19 +173,19 @@ class horizon::wsgi::apache (
       
    54      group   => $unix_group,
       
    55      before  => Service[$::horizon::params::http_service],
       
    56      mode    => '0640',
       
    57 -    require => [ File[$::horizon::params::logdir], Package['horizon'] ],
       
    58 +    require => [ File[$::horizon::params::logdir], Package[$::horizon::params::package_name] ],
       
    59    }
       
    60 
       
    61    $default_vhost_conf_no_ip = {
       
    62      servername                  => $servername,
       
    63      serveraliases               => os_any2array($final_server_aliases),
       
    64 -    docroot                     => '/var/www/',
       
    65 +    docroot                     => $docroot,
       
    66      access_log_file             => 'horizon_access.log',
       
    67      error_log_file              => 'horizon_error.log',
       
    68      priority                    => $priority,
       
    69      aliases                     => [{
       
    70        alias => "${$::horizon::params::root_url}/static",
       
    71 -      path  => '/usr/share/openstack-dashboard/static',
       
    72 +      path  => $static_alias,
       
    73      }],
       
    74      port                        => 80,
       
    75      ssl_cert                    => $horizon_cert,