Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and top scope fact. Change-Id: I8dc98b5988ae84df176c3baff520ad3e8d8bd390
This commit is contained in:
parent
c530c74482
commit
bced4f3e03
|
@ -44,7 +44,7 @@ class { 'sahara::service::api':
|
||||||
# these and fix the apache configuration for you but the Ubuntu packages
|
# these and fix the apache configuration for you but the Ubuntu packages
|
||||||
# requires these files to exist for upgrading the sahara-api package to not
|
# requires these files to exist for upgrading the sahara-api package to not
|
||||||
# break.
|
# break.
|
||||||
if ($::operatingsystem == 'Ubuntu') and (versioncmp($::operatingsystemmajrelease, '18') >= 0) {
|
if ($facts['os']['name'] == 'Ubuntu') {
|
||||||
ensure_resource('file', '/etc/apache2/sites-available/sahara-api.conf', {
|
ensure_resource('file', '/etc/apache2/sites-available/sahara-api.conf', {
|
||||||
'ensure' => 'present',
|
'ensure' => 'present',
|
||||||
'content' => '',
|
'content' => '',
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# [*database_db_max_retries*]
|
# [*database_db_max_retries*]
|
||||||
# (optional) Maximum retries in case of connection error or deadlock error
|
# (optional) Maximum retries in case of connection error or deadlock error
|
||||||
# before error is raised. Set to -1 to specify an infinite retry count.
|
# before error is raised. Set to -1 to specify an infinite retry count.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*database_connection*]
|
# [*database_connection*]
|
||||||
# (Optional) The connection string to use to connect to the database.
|
# (Optional) The connection string to use to connect to the database.
|
||||||
|
@ -16,43 +16,43 @@
|
||||||
# [*database_max_retries*]
|
# [*database_max_retries*]
|
||||||
# (Optional) Maximum number of database connection retries during startup.
|
# (Optional) Maximum number of database connection retries during startup.
|
||||||
# Set to -1 to specify an infinite retry count.
|
# Set to -1 to specify an infinite retry count.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*database_connection_recycle_time*]
|
# [*database_connection_recycle_time*]
|
||||||
# (Optional) Timeout before idle SQL connections are reaped.
|
# (Optional) Timeout before idle SQL connections are reaped.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*database_retry_interval*]
|
# [*database_retry_interval*]
|
||||||
# (optional) Interval between retries of opening a database connection.
|
# (optional) Interval between retries of opening a database connection.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*database_max_pool_size*]
|
# [*database_max_pool_size*]
|
||||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
# (optional) Maximum number of SQL connections to keep open in a pool.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*database_max_overflow*]
|
# [*database_max_overflow*]
|
||||||
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*database_pool_timeout*]
|
# [*database_pool_timeout*]
|
||||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*mysql_enable_ndb*]
|
# [*mysql_enable_ndb*]
|
||||||
# (Optional) If True, transparently enables support for handling MySQL
|
# (Optional) If True, transparently enables support for handling MySQL
|
||||||
# Cluster (NDB).
|
# Cluster (NDB).
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class sahara::db (
|
class sahara::db (
|
||||||
$database_db_max_retries = $::os_service_default,
|
$database_db_max_retries = $facts['os_service_default'],
|
||||||
$database_connection = 'mysql+pymysql://sahara:secrete@localhost:3306/sahara',
|
$database_connection = 'mysql+pymysql://sahara:secrete@localhost:3306/sahara',
|
||||||
$database_connection_recycle_time = $::os_service_default,
|
$database_connection_recycle_time = $facts['os_service_default'],
|
||||||
$database_max_pool_size = $::os_service_default,
|
$database_max_pool_size = $facts['os_service_default'],
|
||||||
$database_max_retries = $::os_service_default,
|
$database_max_retries = $facts['os_service_default'],
|
||||||
$database_retry_interval = $::os_service_default,
|
$database_retry_interval = $facts['os_service_default'],
|
||||||
$database_max_overflow = $::os_service_default,
|
$database_max_overflow = $facts['os_service_default'],
|
||||||
$database_pool_timeout = $::os_service_default,
|
$database_pool_timeout = $facts['os_service_default'],
|
||||||
$mysql_enable_ndb = $::os_service_default,
|
$mysql_enable_ndb = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
|
@ -6,28 +6,28 @@
|
||||||
#
|
#
|
||||||
# [*detailed*]
|
# [*detailed*]
|
||||||
# (Optional) Show more detailed information as part of the response.
|
# (Optional) Show more detailed information as part of the response.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*backends*]
|
# [*backends*]
|
||||||
# (Optional) Additional backends that can perform health checks and report
|
# (Optional) Additional backends that can perform health checks and report
|
||||||
# that information back as part of a request.
|
# that information back as part of a request.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*disable_by_file_path*]
|
# [*disable_by_file_path*]
|
||||||
# (Optional) Check the presense of a file to determine if an application
|
# (Optional) Check the presense of a file to determine if an application
|
||||||
# is running on a port.
|
# is running on a port.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*disable_by_file_paths*]
|
# [*disable_by_file_paths*]
|
||||||
# (Optional) Check the presense of a file to determine if an application
|
# (Optional) Check the presense of a file to determine if an application
|
||||||
# is running on a port. Expects a "port:path" list of strings.
|
# is running on a port. Expects a "port:path" list of strings.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class sahara::healthcheck (
|
class sahara::healthcheck (
|
||||||
$detailed = $::os_service_default,
|
$detailed = $facts['os_service_default'],
|
||||||
$backends = $::os_service_default,
|
$backends = $facts['os_service_default'],
|
||||||
$disable_by_file_path = $::os_service_default,
|
$disable_by_file_path = $facts['os_service_default'],
|
||||||
$disable_by_file_paths = $::os_service_default,
|
$disable_by_file_paths = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
|
@ -10,48 +10,48 @@
|
||||||
#
|
#
|
||||||
# [*host*]
|
# [*host*]
|
||||||
# (Optional) Hostname for sahara to listen on
|
# (Optional) Hostname for sahara to listen on
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*port*]
|
# [*port*]
|
||||||
# (Optional) Port for sahara to listen on
|
# (Optional) Port for sahara to listen on
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*plugins*]
|
# [*plugins*]
|
||||||
# (Optional) List of plugins to be loaded.
|
# (Optional) List of plugins to be loaded.
|
||||||
# Sahara preserves the order of the list when returning it.
|
# Sahara preserves the order of the list when returning it.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*use_floating_ips*]
|
# [*use_floating_ips*]
|
||||||
# (Optional) Whether to use floating IPs to communicate with instances.
|
# (Optional) Whether to use floating IPs to communicate with instances.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*node_domain*]
|
# [*node_domain*]
|
||||||
# (Optional) The suffix of the node's FQDN.
|
# (Optional) The suffix of the node's FQDN.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*use_designate*]
|
# [*use_designate*]
|
||||||
# (Optional) Use Designate for internal and external hostnames resolution.
|
# (Optional) Use Designate for internal and external hostnames resolution.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*nameservers*]
|
# [*nameservers*]
|
||||||
# (Optional) IP addresses of Designate nameservers.
|
# (Optional) IP addresses of Designate nameservers.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*use_ssl*]
|
# [*use_ssl*]
|
||||||
# (optional) Enable SSL on the API server
|
# (optional) Enable SSL on the API server
|
||||||
# Defaults to $::os_service_default, not set.
|
# Defaults to $facts['os_service_default'], not set.
|
||||||
#
|
#
|
||||||
# [*cert_file*]
|
# [*cert_file*]
|
||||||
# (optinal) Certificate file to use when starting API server securely
|
# (optinal) Certificate file to use when starting API server securely
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*key_file*]
|
# [*key_file*]
|
||||||
# (optional) Private key file to use when starting API server securely
|
# (optional) Private key file to use when starting API server securely
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*ca_file*]
|
# [*ca_file*]
|
||||||
# (optional) CA certificate file to use to verify connecting clients
|
# (optional) CA certificate file to use to verify connecting clients
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# == database configuration options
|
# == database configuration options
|
||||||
#
|
#
|
||||||
|
@ -65,39 +65,39 @@
|
||||||
# (optional) A URL representing the messaging driver to use and its full
|
# (optional) A URL representing the messaging driver to use and its full
|
||||||
# configuration. Transport URLs take the form:
|
# configuration. Transport URLs take the form:
|
||||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*rpc_response_timeout*]
|
# [*rpc_response_timeout*]
|
||||||
# (Optional) Seconds to wait for a response from a call.
|
# (Optional) Seconds to wait for a response from a call.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*control_exchange*]
|
# [*control_exchange*]
|
||||||
# (Optional) The default exchange to scope topics.
|
# (Optional) The default exchange to scope topics.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_durable_queues*]
|
# [*amqp_durable_queues*]
|
||||||
# (optional) Use durable queues in AMQP
|
# (optional) Use durable queues in AMQP
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*rabbit_ha_queues*]
|
# [*rabbit_ha_queues*]
|
||||||
# (Optional) Use durable queues in RabbitMQ.
|
# (Optional) Use durable queues in RabbitMQ.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*rabbit_use_ssl*]
|
# [*rabbit_use_ssl*]
|
||||||
# (Optional) Connect over SSL for RabbitMQ.
|
# (Optional) Connect over SSL for RabbitMQ.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*rabbit_login_method*]
|
# [*rabbit_login_method*]
|
||||||
# (Optional) Method to auth with the rabbit server.
|
# (Optional) Method to auth with the rabbit server.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*rabbit_retry_interval*]
|
# [*rabbit_retry_interval*]
|
||||||
# (Optional) Reconnection attempt frequency for rabbit.
|
# (Optional) Reconnection attempt frequency for rabbit.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*rabbit_retry_backoff*]
|
# [*rabbit_retry_backoff*]
|
||||||
# (Optional) Backoff between reconnection attempts for rabbit.
|
# (Optional) Backoff between reconnection attempts for rabbit.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*rabbit_heartbeat_in_pthread*]
|
# [*rabbit_heartbeat_in_pthread*]
|
||||||
# (Optional) EXPERIMENTAL: Run the health check heartbeat thread
|
# (Optional) EXPERIMENTAL: Run the health check heartbeat thread
|
||||||
|
@ -107,102 +107,102 @@
|
||||||
# example if the parent process have monkey patched the
|
# example if the parent process have monkey patched the
|
||||||
# stdlib by using eventlet/greenlet then the heartbeat
|
# stdlib by using eventlet/greenlet then the heartbeat
|
||||||
# will be run through a green thread.
|
# will be run through a green thread.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*kombu_ssl_version*]
|
# [*kombu_ssl_version*]
|
||||||
# (optional) SSL version to use (valid only if SSL enabled).
|
# (optional) SSL version to use (valid only if SSL enabled).
|
||||||
# Valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may be
|
# Valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may be
|
||||||
# available on some distributions.
|
# available on some distributions.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*kombu_ssl_keyfile*]
|
# [*kombu_ssl_keyfile*]
|
||||||
# (Optional) SSL key file (valid only if SSL enabled).
|
# (Optional) SSL key file (valid only if SSL enabled).
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*kombu_ssl_certfile*]
|
# [*kombu_ssl_certfile*]
|
||||||
# (Optional) SSL cert file (valid only if SSL enabled).
|
# (Optional) SSL cert file (valid only if SSL enabled).
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*kombu_ssl_ca_certs*]
|
# [*kombu_ssl_ca_certs*]
|
||||||
# (Optional) SSL certification authority file (valid only if SSL enabled).
|
# (Optional) SSL certification authority file (valid only if SSL enabled).
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*kombu_reconnect_delay*]
|
# [*kombu_reconnect_delay*]
|
||||||
# (Optional) Backoff on cancel notification (valid only if SSL enabled).
|
# (Optional) Backoff on cancel notification (valid only if SSL enabled).
|
||||||
# (floating-point value)
|
# (floating-point value)
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*kombu_failover_strategy*]
|
# [*kombu_failover_strategy*]
|
||||||
# (Optional) Determines how the next RabbitMQ node is chosen in case the one
|
# (Optional) Determines how the next RabbitMQ node is chosen in case the one
|
||||||
# we are currently connected to becomes unavailable. Takes effect only if
|
# we are currently connected to becomes unavailable. Takes effect only if
|
||||||
# more than one RabbitMQ node is provided in config. (string value)
|
# more than one RabbitMQ node is provided in config. (string value)
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*kombu_compression*]
|
# [*kombu_compression*]
|
||||||
# (optional) Possible values are: gzip, bz2. If not set compression will not
|
# (optional) Possible values are: gzip, bz2. If not set compression will not
|
||||||
# be used. This option may notbe available in future versions. EXPERIMENTAL.
|
# be used. This option may notbe available in future versions. EXPERIMENTAL.
|
||||||
# (string value)
|
# (string value)
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_server_request_prefix*]
|
# [*amqp_server_request_prefix*]
|
||||||
# (Optional) Address prefix used when sending to a specific server
|
# (Optional) Address prefix used when sending to a specific server
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_broadcast_prefix*]
|
# [*amqp_broadcast_prefix*]
|
||||||
# (Optional) address prefix used when broadcasting to all servers
|
# (Optional) address prefix used when broadcasting to all servers
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_group_request_prefix*]
|
# [*amqp_group_request_prefix*]
|
||||||
# (Optional) address prefix when sending to any server in group
|
# (Optional) address prefix when sending to any server in group
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_container_name*]
|
# [*amqp_container_name*]
|
||||||
# (Optional) Name for the AMQP container
|
# (Optional) Name for the AMQP container
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_idle_timeout*]
|
# [*amqp_idle_timeout*]
|
||||||
# (Optional) Timeout for inactive connections
|
# (Optional) Timeout for inactive connections
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_trace*]
|
# [*amqp_trace*]
|
||||||
# (Optional) Debug: dump AMQP frames to stdout
|
# (Optional) Debug: dump AMQP frames to stdout
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_ssl_ca_file*]
|
# [*amqp_ssl_ca_file*]
|
||||||
# (Optional) CA certificate PEM file to verify server certificate
|
# (Optional) CA certificate PEM file to verify server certificate
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_ssl_cert_file*]
|
# [*amqp_ssl_cert_file*]
|
||||||
# (Optional) Identifying certificate PEM file to present to clients
|
# (Optional) Identifying certificate PEM file to present to clients
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_ssl_key_file*]
|
# [*amqp_ssl_key_file*]
|
||||||
# (Optional) Private key PEM file used to sign cert_file certificate
|
# (Optional) Private key PEM file used to sign cert_file certificate
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_ssl_key_password*]
|
# [*amqp_ssl_key_password*]
|
||||||
# (Optional) Password for decrypting ssl_key_file (if encrypted)
|
# (Optional) Password for decrypting ssl_key_file (if encrypted)
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_sasl_mechanisms*]
|
# [*amqp_sasl_mechanisms*]
|
||||||
# (Optional) Space separated list of acceptable SASL mechanisms
|
# (Optional) Space separated list of acceptable SASL mechanisms
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_sasl_config_dir*]
|
# [*amqp_sasl_config_dir*]
|
||||||
# (Optional) Path to directory that contains the SASL configuration
|
# (Optional) Path to directory that contains the SASL configuration
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_sasl_config_name*]
|
# [*amqp_sasl_config_name*]
|
||||||
# (Optional) Name of configuration file (without .conf suffix)
|
# (Optional) Name of configuration file (without .conf suffix)
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_username*]
|
# [*amqp_username*]
|
||||||
# (Optional) User name for message broker authentication
|
# (Optional) User name for message broker authentication
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*amqp_password*]
|
# [*amqp_password*]
|
||||||
# (Optional) Password for message broker authentication
|
# (Optional) Password for message broker authentication
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*purge_config*]
|
# [*purge_config*]
|
||||||
# (optional) Whether to set only the specified config options
|
# (optional) Whether to set only the specified config options
|
||||||
|
@ -211,56 +211,56 @@
|
||||||
#
|
#
|
||||||
# [*default_ntp_server*]
|
# [*default_ntp_server*]
|
||||||
# (optional) default ntp server to be used by the cluster instances
|
# (optional) default ntp server to be used by the cluster instances
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class sahara(
|
class sahara(
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$host = $::os_service_default,
|
$host = $facts['os_service_default'],
|
||||||
$port = $::os_service_default,
|
$port = $facts['os_service_default'],
|
||||||
$plugins = $::os_service_default,
|
$plugins = $facts['os_service_default'],
|
||||||
$use_floating_ips = $::os_service_default,
|
$use_floating_ips = $facts['os_service_default'],
|
||||||
$node_domain = $::os_service_default,
|
$node_domain = $facts['os_service_default'],
|
||||||
$use_designate = $::os_service_default,
|
$use_designate = $facts['os_service_default'],
|
||||||
$nameservers = $::os_service_default,
|
$nameservers = $facts['os_service_default'],
|
||||||
$use_ssl = $::os_service_default,
|
$use_ssl = $facts['os_service_default'],
|
||||||
$ca_file = $::os_service_default,
|
$ca_file = $facts['os_service_default'],
|
||||||
$cert_file = $::os_service_default,
|
$cert_file = $facts['os_service_default'],
|
||||||
$key_file = $::os_service_default,
|
$key_file = $facts['os_service_default'],
|
||||||
$sync_db = true,
|
$sync_db = true,
|
||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $facts['os_service_default'],
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $facts['os_service_default'],
|
||||||
$control_exchange = $::os_service_default,
|
$control_exchange = $facts['os_service_default'],
|
||||||
$amqp_durable_queues = $::os_service_default,
|
$amqp_durable_queues = $facts['os_service_default'],
|
||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $facts['os_service_default'],
|
||||||
$rabbit_use_ssl = $::os_service_default,
|
$rabbit_use_ssl = $facts['os_service_default'],
|
||||||
$rabbit_login_method = $::os_service_default,
|
$rabbit_login_method = $facts['os_service_default'],
|
||||||
$rabbit_retry_interval = $::os_service_default,
|
$rabbit_retry_interval = $facts['os_service_default'],
|
||||||
$rabbit_retry_backoff = $::os_service_default,
|
$rabbit_retry_backoff = $facts['os_service_default'],
|
||||||
$rabbit_heartbeat_in_pthread = $::os_service_default,
|
$rabbit_heartbeat_in_pthread = $facts['os_service_default'],
|
||||||
$kombu_ssl_version = $::os_service_default,
|
$kombu_ssl_version = $facts['os_service_default'],
|
||||||
$kombu_ssl_keyfile = $::os_service_default,
|
$kombu_ssl_keyfile = $facts['os_service_default'],
|
||||||
$kombu_ssl_certfile = $::os_service_default,
|
$kombu_ssl_certfile = $facts['os_service_default'],
|
||||||
$kombu_ssl_ca_certs = $::os_service_default,
|
$kombu_ssl_ca_certs = $facts['os_service_default'],
|
||||||
$kombu_reconnect_delay = $::os_service_default,
|
$kombu_reconnect_delay = $facts['os_service_default'],
|
||||||
$kombu_failover_strategy = $::os_service_default,
|
$kombu_failover_strategy = $facts['os_service_default'],
|
||||||
$kombu_compression = $::os_service_default,
|
$kombu_compression = $facts['os_service_default'],
|
||||||
$amqp_server_request_prefix = $::os_service_default,
|
$amqp_server_request_prefix = $facts['os_service_default'],
|
||||||
$amqp_broadcast_prefix = $::os_service_default,
|
$amqp_broadcast_prefix = $facts['os_service_default'],
|
||||||
$amqp_group_request_prefix = $::os_service_default,
|
$amqp_group_request_prefix = $facts['os_service_default'],
|
||||||
$amqp_container_name = $::os_service_default,
|
$amqp_container_name = $facts['os_service_default'],
|
||||||
$amqp_idle_timeout = $::os_service_default,
|
$amqp_idle_timeout = $facts['os_service_default'],
|
||||||
$amqp_trace = $::os_service_default,
|
$amqp_trace = $facts['os_service_default'],
|
||||||
$amqp_ssl_ca_file = $::os_service_default,
|
$amqp_ssl_ca_file = $facts['os_service_default'],
|
||||||
$amqp_ssl_cert_file = $::os_service_default,
|
$amqp_ssl_cert_file = $facts['os_service_default'],
|
||||||
$amqp_ssl_key_file = $::os_service_default,
|
$amqp_ssl_key_file = $facts['os_service_default'],
|
||||||
$amqp_ssl_key_password = $::os_service_default,
|
$amqp_ssl_key_password = $facts['os_service_default'],
|
||||||
$amqp_sasl_mechanisms = $::os_service_default,
|
$amqp_sasl_mechanisms = $facts['os_service_default'],
|
||||||
$amqp_sasl_config_dir = $::os_service_default,
|
$amqp_sasl_config_dir = $facts['os_service_default'],
|
||||||
$amqp_sasl_config_name = $::os_service_default,
|
$amqp_sasl_config_name = $facts['os_service_default'],
|
||||||
$amqp_username = $::os_service_default,
|
$amqp_username = $facts['os_service_default'],
|
||||||
$amqp_password = $::os_service_default,
|
$amqp_password = $facts['os_service_default'],
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$default_ntp_server = $::os_service_default,
|
$default_ntp_server = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# [*password*]
|
# [*password*]
|
||||||
# (Optional) Password to create for the service user
|
# (Optional) Password to create for the service user
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# (Optional) The URL to use for authentication.
|
# (Optional) The URL to use for authentication.
|
||||||
|
@ -31,21 +31,21 @@
|
||||||
#
|
#
|
||||||
# [*system_scope*]
|
# [*system_scope*]
|
||||||
# (Optional) Scope for system operations
|
# (Optional) Scope for system operations
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*insecure*]
|
# [*insecure*]
|
||||||
# (Optional) If true, explicitly allow TLS without checking server cert
|
# (Optional) If true, explicitly allow TLS without checking server cert
|
||||||
# against any certificate authorities. WARNING: not recommended. Use with
|
# against any certificate authorities. WARNING: not recommended. Use with
|
||||||
# caution.
|
# caution.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*auth_section*]
|
# [*auth_section*]
|
||||||
# (Optional) Config Section from which to load plugin specific options
|
# (Optional) Config Section from which to load plugin specific options
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*auth_type*]
|
# [*auth_type*]
|
||||||
# (Optional) Authentication type to load
|
# (Optional) Authentication type to load
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*www_authenticate_uri*]
|
# [*www_authenticate_uri*]
|
||||||
# (Optional) Complete public Identity API endpoint.
|
# (Optional) Complete public Identity API endpoint.
|
||||||
|
@ -53,26 +53,26 @@
|
||||||
#
|
#
|
||||||
# [*auth_version*]
|
# [*auth_version*]
|
||||||
# (Optional) API version of the admin Identity API endpoint.
|
# (Optional) API version of the admin Identity API endpoint.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*cache*]
|
# [*cache*]
|
||||||
# (Optional) Env key for the swift cache.
|
# (Optional) Env key for the swift cache.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*cafile*]
|
# [*cafile*]
|
||||||
# (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs
|
# (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs
|
||||||
# connections.
|
# connections.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*certfile*]
|
# [*certfile*]
|
||||||
# (Optional) Required if identity server requires client certificate
|
# (Optional) Required if identity server requires client certificate
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*delay_auth_decision*]
|
# [*delay_auth_decision*]
|
||||||
# (Optional) Do not handle authorization requests within the middleware, but
|
# (Optional) Do not handle authorization requests within the middleware, but
|
||||||
# delegate the authorization decision to downstream WSGI components. Boolean
|
# delegate the authorization decision to downstream WSGI components. Boolean
|
||||||
# value
|
# value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*enforce_token_bind*]
|
# [*enforce_token_bind*]
|
||||||
# (Optional) Used to control the use and type of token binding. Can be set
|
# (Optional) Used to control the use and type of token binding. Can be set
|
||||||
|
@ -82,57 +82,57 @@
|
||||||
# type is unknown the token will be rejected. "required" any form of token
|
# type is unknown the token will be rejected. "required" any form of token
|
||||||
# binding is needed to be allowed. Finally the name of a binding method that
|
# binding is needed to be allowed. Finally the name of a binding method that
|
||||||
# must be present in tokens. String value.
|
# must be present in tokens. String value.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*http_connect_timeout*]
|
# [*http_connect_timeout*]
|
||||||
# (Optional) Request timeout value for communicating with Identity API
|
# (Optional) Request timeout value for communicating with Identity API
|
||||||
# server.
|
# server.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*http_request_max_retries*]
|
# [*http_request_max_retries*]
|
||||||
# (Optional) How many times are we trying to reconnect when communicating
|
# (Optional) How many times are we trying to reconnect when communicating
|
||||||
# with Identity API Server. Integer value
|
# with Identity API Server. Integer value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*include_service_catalog*]
|
# [*include_service_catalog*]
|
||||||
# (Optional) Indicate whether to set the X-Service-Catalog header. If False,
|
# (Optional) Indicate whether to set the X-Service-Catalog header. If False,
|
||||||
# middleware will not ask for service catalog on token validation and will
|
# middleware will not ask for service catalog on token validation and will
|
||||||
# not set the X-Service-Catalog header. Boolean value.
|
# not set the X-Service-Catalog header. Boolean value.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*keyfile*]
|
# [*keyfile*]
|
||||||
# (Optional) Required if identity server requires client certificate
|
# (Optional) Required if identity server requires client certificate
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_pool_conn_get_timeout*]
|
# [*memcache_pool_conn_get_timeout*]
|
||||||
# (Optional) Number of seconds that an operation will wait to get a memcached
|
# (Optional) Number of seconds that an operation will wait to get a memcached
|
||||||
# client connection from the pool. Integer value
|
# client connection from the pool. Integer value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_pool_dead_retry*]
|
# [*memcache_pool_dead_retry*]
|
||||||
# (Optional) Number of seconds memcached server is considered dead before it
|
# (Optional) Number of seconds memcached server is considered dead before it
|
||||||
# is tried again. Integer value
|
# is tried again. Integer value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_pool_maxsize*]
|
# [*memcache_pool_maxsize*]
|
||||||
# (Optional) Maximum total number of open connections to every memcached
|
# (Optional) Maximum total number of open connections to every memcached
|
||||||
# server. Integer value
|
# server. Integer value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_pool_socket_timeout*]
|
# [*memcache_pool_socket_timeout*]
|
||||||
# (Optional) Number of seconds a connection to memcached is held unused in
|
# (Optional) Number of seconds a connection to memcached is held unused in
|
||||||
# the pool before it is closed. Integer value
|
# the pool before it is closed. Integer value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_pool_unused_timeout*]
|
# [*memcache_pool_unused_timeout*]
|
||||||
# (Optional) Number of seconds a connection to memcached is held unused in
|
# (Optional) Number of seconds a connection to memcached is held unused in
|
||||||
# the pool before it is closed. Integer value
|
# the pool before it is closed. Integer value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_secret_key*]
|
# [*memcache_secret_key*]
|
||||||
# (Optional, mandatory if memcache_security_strategy is defined) This string
|
# (Optional, mandatory if memcache_security_strategy is defined) This string
|
||||||
# is used for key derivation.
|
# is used for key derivation.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_security_strategy*]
|
# [*memcache_security_strategy*]
|
||||||
# (Optional) If defined, indicate whether token data should be authenticated
|
# (Optional) If defined, indicate whether token data should be authenticated
|
||||||
|
@ -140,17 +140,17 @@
|
||||||
# HMAC) in the cache. If ENCRYPT, token data is encrypted and authenticated in the
|
# HMAC) in the cache. If ENCRYPT, token data is encrypted and authenticated in the
|
||||||
# cache. If the value is not one of these options or empty, auth_token will
|
# cache. If the value is not one of these options or empty, auth_token will
|
||||||
# raise an exception on initialization.
|
# raise an exception on initialization.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_use_advanced_pool*]
|
# [*memcache_use_advanced_pool*]
|
||||||
# (Optional) Use the advanced (eventlet safe) memcached client pool. The
|
# (Optional) Use the advanced (eventlet safe) memcached client pool. The
|
||||||
# advanced pool will only work under python 2.x Boolean value
|
# advanced pool will only work under python 2.x Boolean value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcached_servers*]
|
# [*memcached_servers*]
|
||||||
# (Optional) Optionally specify a list of memcached server(s) to use for
|
# (Optional) Optionally specify a list of memcached server(s) to use for
|
||||||
# caching. If left undefined, tokens will instead be cached in-process.
|
# caching. If left undefined, tokens will instead be cached in-process.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*manage_memcache_package*]
|
# [*manage_memcache_package*]
|
||||||
# (Optional) Whether to install the python-memcache package.
|
# (Optional) Whether to install the python-memcache package.
|
||||||
|
@ -158,13 +158,13 @@
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
# (Optional) The region in which the identity server can be found.
|
# (Optional) The region in which the identity server can be found.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*token_cache_time*]
|
# [*token_cache_time*]
|
||||||
# (Optional) In order to prevent excessive effort spent validating tokens,
|
# (Optional) In order to prevent excessive effort spent validating tokens,
|
||||||
# the middleware caches previously-seen tokens for a configurable duration
|
# the middleware caches previously-seen tokens for a configurable duration
|
||||||
# (in seconds). Set to -1 to disable caching completely. Integer value
|
# (in seconds). Set to -1 to disable caching completely. Integer value
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*service_token_roles*]
|
# [*service_token_roles*]
|
||||||
# (Optional) A choice of roles that must be present in a service token.
|
# (Optional) A choice of roles that must be present in a service token.
|
||||||
|
@ -174,62 +174,62 @@
|
||||||
# here are applied as an ANY check so any role in this list
|
# here are applied as an ANY check so any role in this list
|
||||||
# must be present. For backwards compatibility reasons this
|
# must be present. For backwards compatibility reasons this
|
||||||
# currently only affects the allow_expired check. (list value)
|
# currently only affects the allow_expired check. (list value)
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*service_token_roles_required*]
|
# [*service_token_roles_required*]
|
||||||
# (optional) backwards compatibility to ensure that the service tokens are
|
# (optional) backwards compatibility to ensure that the service tokens are
|
||||||
# compared against a list of possible roles for validity
|
# compared against a list of possible roles for validity
|
||||||
# true/false
|
# true/false
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*service_type*]
|
# [*service_type*]
|
||||||
# (Optional) The name or type of the service as it appears in the service
|
# (Optional) The name or type of the service as it appears in the service
|
||||||
# catalog. This is used to validate tokens that have restricted access rules.
|
# catalog. This is used to validate tokens that have restricted access rules.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*interface*]
|
# [*interface*]
|
||||||
# (Optional) Interface to use for the Identity API endpoint. Valid values are
|
# (Optional) Interface to use for the Identity API endpoint. Valid values are
|
||||||
# "public", "internal" or "admin".
|
# "public", "internal" or "admin".
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
class sahara::keystone::authtoken(
|
class sahara::keystone::authtoken(
|
||||||
$username = 'sahara',
|
$username = 'sahara',
|
||||||
$password = $::os_service_default,
|
$password = $facts['os_service_default'],
|
||||||
$auth_url = 'http://127.0.0.1:5000/',
|
$auth_url = 'http://127.0.0.1:5000/',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
$project_domain_name = 'Default',
|
$project_domain_name = 'Default',
|
||||||
$system_scope = $::os_service_default,
|
$system_scope = $facts['os_service_default'],
|
||||||
$insecure = $::os_service_default,
|
$insecure = $facts['os_service_default'],
|
||||||
$auth_section = $::os_service_default,
|
$auth_section = $facts['os_service_default'],
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$www_authenticate_uri = 'http://127.0.0.1:5000/',
|
$www_authenticate_uri = 'http://127.0.0.1:5000/',
|
||||||
$auth_version = $::os_service_default,
|
$auth_version = $facts['os_service_default'],
|
||||||
$cache = $::os_service_default,
|
$cache = $facts['os_service_default'],
|
||||||
$cafile = $::os_service_default,
|
$cafile = $facts['os_service_default'],
|
||||||
$certfile = $::os_service_default,
|
$certfile = $facts['os_service_default'],
|
||||||
$delay_auth_decision = $::os_service_default,
|
$delay_auth_decision = $facts['os_service_default'],
|
||||||
$enforce_token_bind = $::os_service_default,
|
$enforce_token_bind = $facts['os_service_default'],
|
||||||
$http_connect_timeout = $::os_service_default,
|
$http_connect_timeout = $facts['os_service_default'],
|
||||||
$http_request_max_retries = $::os_service_default,
|
$http_request_max_retries = $facts['os_service_default'],
|
||||||
$include_service_catalog = $::os_service_default,
|
$include_service_catalog = $facts['os_service_default'],
|
||||||
$keyfile = $::os_service_default,
|
$keyfile = $facts['os_service_default'],
|
||||||
$memcache_pool_conn_get_timeout = $::os_service_default,
|
$memcache_pool_conn_get_timeout = $facts['os_service_default'],
|
||||||
$memcache_pool_dead_retry = $::os_service_default,
|
$memcache_pool_dead_retry = $facts['os_service_default'],
|
||||||
$memcache_pool_maxsize = $::os_service_default,
|
$memcache_pool_maxsize = $facts['os_service_default'],
|
||||||
$memcache_pool_socket_timeout = $::os_service_default,
|
$memcache_pool_socket_timeout = $facts['os_service_default'],
|
||||||
$memcache_pool_unused_timeout = $::os_service_default,
|
$memcache_pool_unused_timeout = $facts['os_service_default'],
|
||||||
$memcache_secret_key = $::os_service_default,
|
$memcache_secret_key = $facts['os_service_default'],
|
||||||
$memcache_security_strategy = $::os_service_default,
|
$memcache_security_strategy = $facts['os_service_default'],
|
||||||
$memcache_use_advanced_pool = $::os_service_default,
|
$memcache_use_advanced_pool = $facts['os_service_default'],
|
||||||
$memcached_servers = $::os_service_default,
|
$memcached_servers = $facts['os_service_default'],
|
||||||
$manage_memcache_package = false,
|
$manage_memcache_package = false,
|
||||||
$region_name = $::os_service_default,
|
$region_name = $facts['os_service_default'],
|
||||||
$token_cache_time = $::os_service_default,
|
$token_cache_time = $facts['os_service_default'],
|
||||||
$service_token_roles = $::os_service_default,
|
$service_token_roles = $facts['os_service_default'],
|
||||||
$service_token_roles_required = $::os_service_default,
|
$service_token_roles_required = $facts['os_service_default'],
|
||||||
$service_type = $::os_service_default,
|
$service_type = $facts['os_service_default'],
|
||||||
$interface = $::os_service_default,
|
$interface = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
|
@ -6,71 +6,71 @@
|
||||||
#
|
#
|
||||||
# [*debug*]
|
# [*debug*]
|
||||||
# (Optional) Should the daemons log debug messages
|
# (Optional) Should the daemons log debug messages
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*use_syslog*]
|
# [*use_syslog*]
|
||||||
# Use syslog for logging.
|
# Use syslog for logging.
|
||||||
# (Optional) Defaults to $::os_service_default.
|
# (Optional) Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*use_json*]
|
# [*use_json*]
|
||||||
# Use json for logging.
|
# Use json for logging.
|
||||||
# (Optional) Defaults to $::os_service_default.
|
# (Optional) Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*use_journal*]
|
# [*use_journal*]
|
||||||
# Use journal for logging.
|
# Use journal for logging.
|
||||||
# (Optional) Defaults to $::os_service_default.
|
# (Optional) Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*use_stderr*]
|
# [*use_stderr*]
|
||||||
# (Optional) Use stderr for logging
|
# (Optional) Use stderr for logging
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*log_facility*]
|
# [*log_facility*]
|
||||||
# Syslog facility to receive log lines.
|
# Syslog facility to receive log lines.
|
||||||
# (Optional) Defaults to $::os_service_default.
|
# (Optional) Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*log_file*]
|
# [*log_file*]
|
||||||
# (optional) Where to log
|
# (optional) Where to log
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*watch_log_file*]
|
# [*watch_log_file*]
|
||||||
# (Optional) Uses logging handler designed to watch file system (boolean value).
|
# (Optional) Uses logging handler designed to watch file system (boolean value).
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*log_dir*]
|
# [*log_dir*]
|
||||||
# (Optional) Directory where logs should be stored.
|
# (Optional) Directory where logs should be stored.
|
||||||
# If set to $::os_service_default, it will not log to any directory.
|
# If set to $facts['os_service_default'], it will not log to any directory.
|
||||||
# Defaults to '/var/log/sahara'
|
# Defaults to '/var/log/sahara'
|
||||||
#
|
#
|
||||||
# [*logging_context_format_string*]
|
# [*logging_context_format_string*]
|
||||||
# (Optional) Format string to use for log messages with context.
|
# (Optional) Format string to use for log messages with context.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
||||||
# [%(request_id)s %(user_identity)s] %(instance)s%(message)s'
|
# [%(request_id)s %(user_identity)s] %(instance)s%(message)s'
|
||||||
#
|
#
|
||||||
# [*logging_default_format_string*]
|
# [*logging_default_format_string*]
|
||||||
# (Optional) Format string to use for log messages without context.
|
# (Optional) Format string to use for log messages without context.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
||||||
# [-] %(instance)s%(message)s'
|
# [-] %(instance)s%(message)s'
|
||||||
#
|
#
|
||||||
# [*logging_debug_format_suffix*]
|
# [*logging_debug_format_suffix*]
|
||||||
# (Optional) Formatted data to append to log format when level is DEBUG.
|
# (Optional) Formatted data to append to log format when level is DEBUG.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example: '%(funcName)s %(pathname)s:%(lineno)d'
|
# Example: '%(funcName)s %(pathname)s:%(lineno)d'
|
||||||
#
|
#
|
||||||
# [*logging_exception_prefix*]
|
# [*logging_exception_prefix*]
|
||||||
# (Optional) Prefix each line of exception output with this format.
|
# (Optional) Prefix each line of exception output with this format.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s'
|
# Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s'
|
||||||
#
|
#
|
||||||
# [*log_config_append*]
|
# [*log_config_append*]
|
||||||
# (Optional) The name of an additional logging configuration file.
|
# (Optional) The name of an additional logging configuration file.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# See https://docs.python.org/2/howto/logging.html
|
# See https://docs.python.org/2/howto/logging.html
|
||||||
#
|
#
|
||||||
# [*default_log_levels*]
|
# [*default_log_levels*]
|
||||||
# (0ptional) Hash of logger (keys) and level (values) pairs.
|
# (0ptional) Hash of logger (keys) and level (values) pairs.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example:
|
# Example:
|
||||||
# {'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN',
|
# {'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN',
|
||||||
# 'sqlalchemy' => 'WARN', 'suds' => 'INFO', 'iso8601' => 'WARN',
|
# 'sqlalchemy' => 'WARN', 'suds' => 'INFO', 'iso8601' => 'WARN',
|
||||||
|
@ -78,50 +78,50 @@
|
||||||
#
|
#
|
||||||
# [*publish_errors*]
|
# [*publish_errors*]
|
||||||
# (Optional) Publish error events (boolean value).
|
# (Optional) Publish error events (boolean value).
|
||||||
# Defaults to $::os_service_default (false if unconfigured).
|
# Defaults to $facts['os_service_default'] (false if unconfigured).
|
||||||
#
|
#
|
||||||
# [*fatal_deprecations*]
|
# [*fatal_deprecations*]
|
||||||
# (Optional) Make deprecations fatal (boolean value)
|
# (Optional) Make deprecations fatal (boolean value)
|
||||||
# Defaults to $::os_service_default (false if unconfigured).
|
# Defaults to $facts['os_service_default'] (false if unconfigured).
|
||||||
#
|
#
|
||||||
# [*instance_format*]
|
# [*instance_format*]
|
||||||
# (Optional) If an instance is passed with the log message, format it
|
# (Optional) If an instance is passed with the log message, format it
|
||||||
# like this (string value).
|
# like this (string value).
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example: '[instance: %(uuid)s] '
|
# Example: '[instance: %(uuid)s] '
|
||||||
#
|
#
|
||||||
# [*instance_uuid_format*]
|
# [*instance_uuid_format*]
|
||||||
# (Optional) If an instance UUID is passed with the log message, format
|
# (Optional) If an instance UUID is passed with the log message, format
|
||||||
# It like this (string value).
|
# It like this (string value).
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example: instance_uuid_format='[instance: %(uuid)s] '
|
# Example: instance_uuid_format='[instance: %(uuid)s] '
|
||||||
|
|
||||||
# [*log_date_format*]
|
# [*log_date_format*]
|
||||||
# (Optional) Format string for %%(asctime)s in log records.
|
# (Optional) Format string for %%(asctime)s in log records.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
# Example: 'Y-%m-%d %H:%M:%S'
|
# Example: 'Y-%m-%d %H:%M:%S'
|
||||||
#
|
#
|
||||||
class sahara::logging(
|
class sahara::logging(
|
||||||
$debug = $::os_service_default,
|
$debug = $facts['os_service_default'],
|
||||||
$use_syslog = $::os_service_default,
|
$use_syslog = $facts['os_service_default'],
|
||||||
$use_json = $::os_service_default,
|
$use_json = $facts['os_service_default'],
|
||||||
$use_journal = $::os_service_default,
|
$use_journal = $facts['os_service_default'],
|
||||||
$use_stderr = $::os_service_default,
|
$use_stderr = $facts['os_service_default'],
|
||||||
$log_facility = $::os_service_default,
|
$log_facility = $facts['os_service_default'],
|
||||||
$log_file = $::os_service_default,
|
$log_file = $facts['os_service_default'],
|
||||||
$watch_log_file = $::os_service_default,
|
$watch_log_file = $facts['os_service_default'],
|
||||||
$log_dir = '/var/log/sahara',
|
$log_dir = '/var/log/sahara',
|
||||||
$logging_context_format_string = $::os_service_default,
|
$logging_context_format_string = $facts['os_service_default'],
|
||||||
$logging_default_format_string = $::os_service_default,
|
$logging_default_format_string = $facts['os_service_default'],
|
||||||
$logging_debug_format_suffix = $::os_service_default,
|
$logging_debug_format_suffix = $facts['os_service_default'],
|
||||||
$logging_exception_prefix = $::os_service_default,
|
$logging_exception_prefix = $facts['os_service_default'],
|
||||||
$log_config_append = $::os_service_default,
|
$log_config_append = $facts['os_service_default'],
|
||||||
$default_log_levels = $::os_service_default,
|
$default_log_levels = $facts['os_service_default'],
|
||||||
$publish_errors = $::os_service_default,
|
$publish_errors = $facts['os_service_default'],
|
||||||
$fatal_deprecations = $::os_service_default,
|
$fatal_deprecations = $facts['os_service_default'],
|
||||||
$instance_format = $::os_service_default,
|
$instance_format = $facts['os_service_default'],
|
||||||
$instance_uuid_format = $::os_service_default,
|
$instance_uuid_format = $facts['os_service_default'],
|
||||||
$log_date_format = $::os_service_default,
|
$log_date_format = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
|
@ -8,20 +8,20 @@
|
||||||
# (Optional) A URL representing the messaging driver to use for notifications
|
# (Optional) A URL representing the messaging driver to use for notifications
|
||||||
# and its full configuration. Transport URLs take the form:
|
# and its full configuration. Transport URLs take the form:
|
||||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*notification_driver*]
|
# [*notification_driver*]
|
||||||
# (Optional) Notification driver to use.
|
# (Optional) Notification driver to use.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*notification_topics*]
|
# [*notification_topics*]
|
||||||
# (Optional) Topic to use for notifications.
|
# (Optional) Topic to use for notifications.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
class sahara::notify (
|
class sahara::notify (
|
||||||
$notification_transport_url = $::os_service_default,
|
$notification_transport_url = $facts['os_service_default'],
|
||||||
$notification_driver = $::os_service_default,
|
$notification_driver = $facts['os_service_default'],
|
||||||
$notification_topics = $::os_service_default,
|
$notification_topics = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
|
@ -9,7 +9,7 @@ class sahara::params {
|
||||||
$user = 'sahara'
|
$user = 'sahara'
|
||||||
$group = 'sahara'
|
$group = 'sahara'
|
||||||
|
|
||||||
case $::osfamily {
|
case $facts['os']['family'] {
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
$common_package_name = 'openstack-sahara-common'
|
$common_package_name = 'openstack-sahara-common'
|
||||||
$api_package_name = 'openstack-sahara-api'
|
$api_package_name = 'openstack-sahara-api'
|
||||||
|
@ -29,8 +29,7 @@ class sahara::params {
|
||||||
$sahara_wsgi_script_source = '/usr/bin/sahara-wsgi-api'
|
$sahara_wsgi_script_source = '/usr/bin/sahara-wsgi-api'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \
|
fail("Unsupported osfamily: ${facts['os']['family']}")
|
||||||
module ${module_name} only support osfamily RedHat and Debian")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
#
|
#
|
||||||
# [*enforce_scope*]
|
# [*enforce_scope*]
|
||||||
# (Optional) Whether or not to enforce scope when evaluating policies.
|
# (Optional) Whether or not to enforce scope when evaluating policies.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*enforce_new_defaults*]
|
# [*enforce_new_defaults*]
|
||||||
# (Optional) Whether or not to use old deprecated defaults when evaluating
|
# (Optional) Whether or not to use old deprecated defaults when evaluating
|
||||||
# policies.
|
# policies.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*policies*]
|
# [*policies*]
|
||||||
# (Optional) Set of policies to configure for sahara
|
# (Optional) Set of policies to configure for sahara
|
||||||
|
@ -34,11 +34,11 @@
|
||||||
#
|
#
|
||||||
# [*policy_default_rule*]
|
# [*policy_default_rule*]
|
||||||
# (Optional) Default rule. Enforced when a requested rule is not found.
|
# (Optional) Default rule. Enforced when a requested rule is not found.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*policy_dirs*]
|
# [*policy_dirs*]
|
||||||
# (Optional) Path to the sahara policy folder
|
# (Optional) Path to the sahara policy folder
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*purge_config*]
|
# [*purge_config*]
|
||||||
# (optional) Whether to set only the specified policy rules in the policy
|
# (optional) Whether to set only the specified policy rules in the policy
|
||||||
|
@ -46,12 +46,12 @@
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
#
|
#
|
||||||
class sahara::policy (
|
class sahara::policy (
|
||||||
$enforce_scope = $::os_service_default,
|
$enforce_scope = $facts['os_service_default'],
|
||||||
$enforce_new_defaults = $::os_service_default,
|
$enforce_new_defaults = $facts['os_service_default'],
|
||||||
$policies = {},
|
$policies = {},
|
||||||
$policy_path = '/etc/sahara/policy.yaml',
|
$policy_path = '/etc/sahara/policy.yaml',
|
||||||
$policy_default_rule = $::os_service_default,
|
$policy_default_rule = $facts['os_service_default'],
|
||||||
$policy_dirs = $::os_service_default,
|
$policy_dirs = $facts['os_service_default'],
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# [*api_workers*]
|
# [*api_workers*]
|
||||||
# (Optional) Number of workers for Sahara API service
|
# (Optional) Number of workers for Sahara API service
|
||||||
# 0 means all-in-one-thread configuration
|
# 0 means all-in-one-thread configuration
|
||||||
# Defaults to $::os_workers
|
# Defaults to $facts['os_workers']
|
||||||
#
|
#
|
||||||
# [*enabled*]
|
# [*enabled*]
|
||||||
# (Optional) Should the service be enabled.
|
# (Optional) Should the service be enabled.
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
# Defaults to '$::sahara::params::api_service_name'
|
# Defaults to '$::sahara::params::api_service_name'
|
||||||
#
|
#
|
||||||
class sahara::service::api (
|
class sahara::service::api (
|
||||||
$api_workers = $::os_workers,
|
$api_workers = $facts['os_workers'],
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
|
@ -41,7 +41,7 @@ class sahara::service::api (
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
include sahara::policy
|
include sahara::policy
|
||||||
|
|
||||||
if $::operatingsystem == 'Ubuntu' and $service_name == $::sahara::params::api_service_name {
|
if $facts['os']['name'] == 'Ubuntu' and $service_name == $::sahara::params::api_service_name {
|
||||||
fail('The Sahara API must be run with WSGI on Ubuntu')
|
fail('The Sahara API must be run with WSGI on Ubuntu')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class sahara::service::api (
|
||||||
tag => 'sahara-service',
|
tag => 'sahara-service',
|
||||||
}
|
}
|
||||||
} elsif $service_name == 'httpd' {
|
} elsif $service_name == 'httpd' {
|
||||||
if $::operatingsystem != 'Ubuntu' {
|
if $facts['os']['name'] != 'Ubuntu' {
|
||||||
service { 'sahara-api':
|
service { 'sahara-api':
|
||||||
ensure => 'stopped',
|
ensure => 'stopped',
|
||||||
name => $::sahara::params::api_service_name,
|
name => $::sahara::params::api_service_name,
|
||||||
|
|
|
@ -18,56 +18,56 @@
|
||||||
#
|
#
|
||||||
# [*periodic_enable*]
|
# [*periodic_enable*]
|
||||||
# (Optional) Enable periodic tasks.
|
# (Optional) Enable periodic tasks.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*periodic_fuzzy_delay*]
|
# [*periodic_fuzzy_delay*]
|
||||||
# (Optional) Range in seconds to randomly delay when starting the periodic
|
# (Optional) Range in seconds to randomly delay when starting the periodic
|
||||||
# task scheduler to reduse stampending.
|
# task scheduler to reduse stampending.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*periodic_interval_max*]
|
# [*periodic_interval_max*]
|
||||||
# (Optional) Max interval size between periodic tasks execution in seconds.
|
# (Optional) Max interval size between periodic tasks execution in seconds.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*min_transient_cluster_active_time*]
|
# [*min_transient_cluster_active_time*]
|
||||||
# (Optional) Minimal "lifetime" in seconds for a transient cluster.
|
# (Optional) Minimal "lifetime" in seconds for a transient cluster.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*cleanup_time_for_incomplete_clusters*]
|
# [*cleanup_time_for_incomplete_clusters*]
|
||||||
# (Optional) Maximal time (in hours) for clusters allowed to be in states
|
# (Optional) Maximal time (in hours) for clusters allowed to be in states
|
||||||
# other than "Active", "Deleting" or "Error".
|
# other than "Active", "Deleting" or "Error".
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*periodic_coordinator_backend_url*]
|
# [*periodic_coordinator_backend_url*]
|
||||||
# (Optional) The backend URL to use for distributed periodic tasks
|
# (Optional) The backend URL to use for distributed periodic tasks
|
||||||
# coordination.
|
# coordination.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*periodic_workers_number*]
|
# [*periodic_workers_number*]
|
||||||
# (Optional) Number of threads to run periodic tasks.
|
# (Optional) Number of threads to run periodic tasks.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*coordinator_heartbeat_interval*]
|
# [*coordinator_heartbeat_interval*]
|
||||||
# (Optional) Interval size between heartbeat execution in seconds.
|
# (Optional) Interval size between heartbeat execution in seconds.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*hash_ring_replicas_count*]
|
# [*hash_ring_replicas_count*]
|
||||||
# (Optional) Number of points that belongs to each number on a hash ring.
|
# (Optional) Number of points that belongs to each number on a hash ring.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class sahara::service::engine (
|
class sahara::service::engine (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$periodic_enable = $::os_service_default,
|
$periodic_enable = $facts['os_service_default'],
|
||||||
$periodic_fuzzy_delay = $::os_service_default,
|
$periodic_fuzzy_delay = $facts['os_service_default'],
|
||||||
$periodic_interval_max = $::os_service_default,
|
$periodic_interval_max = $facts['os_service_default'],
|
||||||
$min_transient_cluster_active_time = $::os_service_default,
|
$min_transient_cluster_active_time = $facts['os_service_default'],
|
||||||
$cleanup_time_for_incomplete_clusters = $::os_service_default,
|
$cleanup_time_for_incomplete_clusters = $facts['os_service_default'],
|
||||||
$periodic_coordinator_backend_url = $::os_service_default,
|
$periodic_coordinator_backend_url = $facts['os_service_default'],
|
||||||
$periodic_workers_number = $::os_service_default,
|
$periodic_workers_number = $facts['os_service_default'],
|
||||||
$coordinator_heartbeat_interval = $::os_service_default,
|
$coordinator_heartbeat_interval = $facts['os_service_default'],
|
||||||
$hash_ring_replicas_count = $::os_service_default,
|
$hash_ring_replicas_count = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#
|
#
|
||||||
# [*servername*]
|
# [*servername*]
|
||||||
# (Optional) The servername for the virtualhost.
|
# (Optional) The servername for the virtualhost.
|
||||||
# Defaults to $::fqdn
|
# Defaults to $facts['networking']['fqdn']
|
||||||
#
|
#
|
||||||
# [*port*]
|
# [*port*]
|
||||||
# (Optional) The port.
|
# (Optional) The port.
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
#
|
#
|
||||||
# [*workers*]
|
# [*workers*]
|
||||||
# (Optional) Number of WSGI workers to spawn.
|
# (Optional) Number of WSGI workers to spawn.
|
||||||
# Defaults to $::os_workers
|
# Defaults to $facts['os_workers']
|
||||||
#
|
#
|
||||||
# [*priority*]
|
# [*priority*]
|
||||||
# (Optional) The priority for the vhost.
|
# (Optional) The priority for the vhost.
|
||||||
|
@ -119,12 +119,12 @@
|
||||||
# class { 'sahara::wsgi::apache': }
|
# class { 'sahara::wsgi::apache': }
|
||||||
#
|
#
|
||||||
class sahara::wsgi::apache (
|
class sahara::wsgi::apache (
|
||||||
$servername = $::fqdn,
|
$servername = $facts['networking']['fqdn'],
|
||||||
$port = 8386,
|
$port = 8386,
|
||||||
$bind_host = undef,
|
$bind_host = undef,
|
||||||
$path = '/',
|
$path = '/',
|
||||||
$ssl = false,
|
$ssl = false,
|
||||||
$workers = $::os_workers,
|
$workers = $facts['os_workers'],
|
||||||
$ssl_cert = undef,
|
$ssl_cert = undef,
|
||||||
$ssl_key = undef,
|
$ssl_key = undef,
|
||||||
$ssl_chain = undef,
|
$ssl_chain = undef,
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# [*processes*]
|
# [*processes*]
|
||||||
# (Optional) Number of processes.
|
# (Optional) Number of processes.
|
||||||
# Defaults to $::os_workers.
|
# Defaults to $facts['os_workers'].
|
||||||
#
|
#
|
||||||
# [*threads*]
|
# [*threads*]
|
||||||
# (Optional) Number of threads.
|
# (Optional) Number of threads.
|
||||||
|
@ -22,14 +22,14 @@
|
||||||
# Defaults to 100
|
# Defaults to 100
|
||||||
#
|
#
|
||||||
class sahara::wsgi::uwsgi (
|
class sahara::wsgi::uwsgi (
|
||||||
$processes = $::os_workers,
|
$processes = $facts['os_workers'],
|
||||||
$threads = 32,
|
$threads = 32,
|
||||||
$listen_queue_size = 100,
|
$listen_queue_size = 100,
|
||||||
){
|
){
|
||||||
|
|
||||||
include sahara::deps
|
include sahara::deps
|
||||||
|
|
||||||
if $::operatingsystem != 'Debian'{
|
if $facts['os']['name'] != 'Debian'{
|
||||||
warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.')
|
warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ describe 'sahara::service::api' do
|
||||||
facts.merge(OSDefaults.get_facts)
|
facts.merge(OSDefaults.get_facts)
|
||||||
end
|
end
|
||||||
|
|
||||||
case facts[:osfamily]
|
case facts[:os]['family']
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
let (:platform_params) do
|
let (:platform_params) do
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@ describe 'sahara::service::api' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if facts[:operatingsystem] == 'Ubuntu'
|
if facts[:os]['name'] == 'Ubuntu'
|
||||||
it_behaves_like 'sahara-api eventlet ubuntu'
|
it_behaves_like 'sahara-api eventlet ubuntu'
|
||||||
it_behaves_like 'sahara-api wsgi ubuntu'
|
it_behaves_like 'sahara-api wsgi ubuntu'
|
||||||
else
|
else
|
||||||
|
|
|
@ -42,7 +42,7 @@ describe 'sahara::client' do
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:platform_params) do
|
let(:platform_params) do
|
||||||
case facts[:osfamily]
|
case facts[:os]['family']
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
{ :client_package_name => 'python3-saharaclient' }
|
{ :client_package_name => 'python3-saharaclient' }
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
|
|
|
@ -61,9 +61,7 @@ describe 'sahara::db::sync' do
|
||||||
}).each do |os,facts|
|
}).each do |os,facts|
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge(OSDefaults.get_facts({
|
facts.merge(OSDefaults.get_facts())
|
||||||
:concat_basedir => '/var/lib/puppet/concat'
|
|
||||||
}))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it_configures 'sahara-dbsync'
|
it_configures 'sahara-dbsync'
|
||||||
|
|
|
@ -94,7 +94,7 @@ describe 'sahara::service::engine' do
|
||||||
facts.merge(OSDefaults.get_facts)
|
facts.merge(OSDefaults.get_facts)
|
||||||
end
|
end
|
||||||
|
|
||||||
case facts[:osfamily]
|
case facts[:os]['family']
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
let (:platform_params) do
|
let (:platform_params) do
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe 'sahara::wsgi::apache' do
|
||||||
:group => 'sahara',
|
:group => 'sahara',
|
||||||
:path => '/',
|
:path => '/',
|
||||||
:priority => 10,
|
:priority => 10,
|
||||||
:servername => facts[:fqdn],
|
:servername => 'foo.example.com',
|
||||||
:ssl => false,
|
:ssl => false,
|
||||||
:threads => 1,
|
:threads => 1,
|
||||||
:user => 'sahara',
|
:user => 'sahara',
|
||||||
|
@ -160,14 +160,12 @@ describe 'sahara::wsgi::apache' do
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge!(OSDefaults.get_facts({
|
facts.merge!(OSDefaults.get_facts({
|
||||||
:os_workers => 4,
|
:os_workers => 4,
|
||||||
:concat_basedir => '/var/lib/puppet/concat',
|
|
||||||
:fqdn => 'some.host.tld',
|
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:platform_params) do
|
let(:platform_params) do
|
||||||
case facts[:osfamily]
|
case facts[:os]['family']
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
{
|
{
|
||||||
:wsgi_script_path => '/usr/lib/cgi-bin/sahara',
|
:wsgi_script_path => '/usr/lib/cgi-bin/sahara',
|
||||||
|
|
Loading…
Reference in New Issue