Merge "support other components using apache mod_wsgi"

This commit is contained in:
Jenkins 2014-10-27 12:38:49 +00:00 committed by Gerrit Code Review
commit a0454d82fa
6 changed files with 58 additions and 11 deletions

View File

@ -104,6 +104,19 @@ def initConfig(controller):
"USE_DEFAULT": True,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "keystone-service-name",
"USAGE": "Name of service to use to run keystone (keystone or httpd)",
"PROMPT": "Enter the Keystone service name.",
"OPTION_LIST": ['keystone', 'httpd'],
"VALIDATORS": [validators.validate_options],
"DEFAULT_VALUE": "keystone",
"MASK_INPUT": False,
"LOOSE_VALIDATION": False,
"CONF_NAME": 'CONFIG_KEYSTONE_SERVICE_NAME',
"USE_DEFAULT": True,
"NEED_CONFIRM": False,
"CONDITION": False},
]
group = {"GROUP_NAME": "KEYSTONE",
"DESCRIPTION": "Keystone Config parameters",

View File

@ -0,0 +1,26 @@
# Code common to all classes that use Apache
#
# This allows multiple modules to safely use ::apache without
# overwriting existing config or the ports file.
#
# Any module that uses apache must include this class
# include packstack_apache_common
class packstack::apache_common {
include ::apache::params
# make sure the include ::apache in the module
# does not overwrite the contents of the config dirs
# from a previous module
if $::apache::params::confd_dir {
File<| title == $::apache::params::confd_dir |> {
purge => false,
}
}
# make sure the ports.conf concat fragments from previous
# runs are not overwritten by subsequent runs
include ::concat::setup
$my_safe_name = regsubst($::apache::params::ports_file, '[/:]', '_', 'G')
$my_fragdir = "${concat::setup::concatdir}/${my_safe_name}"
File<| title == "${my_fragdir}/fragments" |> {
purge => false,
}
}

View File

@ -1,4 +1,4 @@
include concat::setup
include packstack::apache_common
$horizon_packages = ["python-memcached", "python-netaddr"]

View File

@ -1,3 +1,4 @@
$keystone_use_ssl = false
class {"keystone":
admin_token => "%(CONFIG_KEYSTONE_ADMIN_TOKEN)s",
@ -6,6 +7,15 @@ class {"keystone":
verbose => true,
debug => %(CONFIG_DEBUG_MODE)s,
mysql_module => '2.2',
service_name => '%(CONFIG_KEYSTONE_SERVICE_NAME)s',
enable_ssl => $keystone_use_ssl,
}
if '%(CONFIG_KEYSTONE_SERVICE_NAME)s' == 'httpd' {
include packstack::apache_common
class {"keystone::wsgi::apache":
ssl => $keystone_use_ssl,
}
}
class {"keystone::roles::admin":

View File

@ -1,3 +1,5 @@
include packstack::apache_common
package{['nagios', 'nagios-plugins-nrpe']:
ensure => present,
before => Class['nagios_configs']
@ -63,11 +65,7 @@ class{'nagios_configs':
notify => [Service['nagios'], Service['httpd']],
}
include concat::setup
class {'apache':
purge_configs => false,
}
include ::apache
class {'apache::mod::php': }
service{['nagios']:
@ -81,8 +79,3 @@ firewall { '001 nagios incoming':
dport => ['80'],
action => 'accept',
}
# ensure that we won't stop listening on 443 if horizon has ssl enabled
if %(CONFIG_HORIZON_SSL)s {
apache::listen { '443': }
}

View File

@ -1,4 +1,9 @@
include firewall
# This does the initial apache setup for all components that
# require apache/httpd.
# Other packstack components that use apache should do
# include packstack_apache_common
include ::apache
$el_releases = ['RedHat', 'CentOS', 'Scientific']