Automatically generate etc/orchestrator.ini file

This switches keystone to use oslo-config-generator, where the contents
of our sample configuration file are configured using a configuration
file in etc/oslo-config-generator.

Also fix some config problems.

blueprint autogen-astara-conf-file

Change-Id: I394805b18eecc4fbc583f9d64d34b8e95b55a845
This commit is contained in:
xiayu 2016-01-10 00:47:42 +08:00
parent 9e2517a038
commit ca21f3b647
14 changed files with 1123 additions and 143 deletions

View File

@ -29,7 +29,8 @@ LOG = logging.getLogger(__name__)
DEFAULT_AS = 64512
OPTIONS = [
cfg.StrOpt('provider_rules_path'),
cfg.StrOpt('provider_rules_path',
default='/etc/astara/provider_rules.json'),
cfg.IntOpt('asn', default=DEFAULT_AS),
cfg.IntOpt('neighbor_asn', default=DEFAULT_AS),
]

View File

@ -50,7 +50,8 @@ neutron_opts = [
cfg.StrOpt('external_prefix', default='172.16.77.0/24'),
cfg.IntOpt('astara_mgt_service_port', default=5000),
cfg.StrOpt('default_instance_flavor', default=1),
cfg.StrOpt('interface_driver'),
cfg.StrOpt('interface_driver',
default='astara.common.linux.interface.OVSInterfaceDriver'),
cfg.BoolOpt('neutron_port_security_extension_enabled', default=True),
# legacy_fallback option is deprecated and will be removed in the N-release

View File

@ -24,17 +24,6 @@ from oslo_config import cfg
from astara.common.i18n import _
_db_opts = [
cfg.StrOpt('connection',
deprecated_name='sql_connection',
default='',
secret=True,
help=_('URL to database')),
cfg.StrOpt('engine',
default='',
help=_('Database engine')),
]
CONF = cfg.CONF

View File

@ -46,7 +46,7 @@ MAIN_OPTS = [
cfg.StrOpt('host',
default=socket.getfqdn(),
help="The hostname Astara is running on"),
cfg.BoolOpt('plug_external_port', default=False),
cfg.BoolOpt('plug_external_port', default=True),
]
CONF.register_opts(MAIN_OPTS)

View File

@ -33,24 +33,6 @@ from oslo_log import log as logging
from astara.common.i18n import _LE
cfg.CONF.register_group(cfg.OptGroup(name='rabbit',
title='RabbitMQ options'))
RABBIT_OPTIONS = [
cfg.IntOpt('max_retries', default=0,
help='Maximum number of RabbitMQ connection retries. '
'Default is 0 (infinite retry count)'),
cfg.IntOpt('interval_start', default=2,
help='The starting interval time between connection '
'attempts.'),
cfg.IntOpt('interval_step', default=2,
help='The amount to increase the re-connection '
'interval by.'),
cfg.IntOpt('interval_max', default=30,
help='The maximum time interval to try between '
're-connection attempts.'),
]
cfg.CONF.register_opts(RABBIT_OPTIONS, group='rabbit')
NOTIFICATIONS_OPTS = [
cfg.StrOpt('amqp-url',
help='connection for AMQP server'),

84
astara/opts.py Normal file
View File

@ -0,0 +1,84 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import itertools
import astara.api.nova
import astara.drivers
import astara.main
import astara.common.linux.interface
import astara.notifications
import astara.coordination
import astara.pez.manager
import astara.drivers.router
import astara.api.rug
import astara.debug
def list_opts():
return [
('DEFAULT',
itertools.chain(
astara.api.api_opts,
astara.api.rug.RUG_API_OPTS,
astara.api.nova.OPTIONS,
astara.api.neutron.neutron_opts,
astara.api.astara_client.AK_CLIENT_OPTS,
astara.drivers.DRIVER_OPTS,
astara.main.MAIN_OPTS,
astara.common.linux.interface.OPTS,
astara.common.hash_ring.hash_opts,
astara.api.config.router.OPTIONS,
astara.notifications.NOTIFICATIONS_OPTS,
astara.debug.DEBUG_OPTS,
astara.scheduler.SCHEDULER_OPTS,
astara.worker.WORKER_OPTS,
astara.metadata.METADATA_OPTS,
astara.health.HEALTH_INSPECTOR_OPTS,
astara.instance_manager.INSTANCE_MANAGER_OPTS
))
]
def list_agent_opts():
return [
('AGENT', astara.common.linux.interface.AGENT_OPTIONS)
]
def list_coordination_opts():
return [
('coordination', astara.coordination.COORD_OPTS)
]
def list_ceilometer_opts():
return [
('ceilometer', astara.main.CEILOMETER_OPTS)
]
def list_router_opts():
return [
('router', astara.drivers.router.ROUTER_OPTS)
]
def list_loadbalancer_opts():
return [
('loadbalancer', astara.drivers.loadbalancer.LOADBALANCER_OPTS)
]
def list_pez_opts():
return [
('pez', astara.pez.manager.PEZ_OPTIONS)
]

View File

@ -23,6 +23,7 @@ ASTARA_HORIZON_BRANCH=${ASTARA_HORIZON_BRANCH:-master}
ASTARA_CONF_DIR=/etc/astara
ASTARA_CONF=$ASTARA_CONF_DIR/orchestrator.ini
ASTARA_PROVIDER_RULE_CONF=$ASTARA_CONF_DIR/provider_rules.json
# Router instances will run as a specific Nova flavor. These values configure
# the specs of the flavor devstack will create.
@ -71,9 +72,14 @@ function configure_astara() {
sudo cp $ASTARA_DIR/etc/rootwrap.conf $ASTARA_CONF_DIR
sudo cp $ASTARA_DIR/etc/rootwrap.d/* $ASTARA_CONF_DIR/rootwrap.d/
cp $ASTARA_DIR/etc/orchestrator.ini $ASTARA_CONF
cp $ASTARA_DIR/etc/orchestrator.ini.sample $ASTARA_CONF
cp $ASTARA_DIR/etc/provider_rules.json $ASTARA_PROVIDER_RULE_CONF
iniset $ASTARA_CONF DEFAULT debug True
iniset $ASTARA_CONF DEFAULT verbose True
configure_auth_token_middleware $ASTARA_CONF $Q_ADMIN_USERNAME $ASTARA_CACHE_DIR
iniset $ASTARA_CONF keystone_authtoken auth_plugin password
iniset $ASTARA_CONF DEFAULT auth_region $REGION_NAME
iniset_rpc_backend astara $ASTARA_CONF
iniset $ASTARA_CONF DEFAULT control_exchange "neutron"

View File

@ -1,110 +0,0 @@
[DEFAULT]
debug=True
versbose=True
auth_region=RegionOne
# Nova instance provider
# Currently available:
# - on_demand: Requests new nova instances as they are required
# - pez: Pre-provisions pools of instances to be used for appliances.
# Requires running the astara-pez-service.
# Note: This feature is marked experimental for Liberty.
instance_provider=on_demand
management_network_id=dca21cbf-fc11-4d0f-86a8-b856e95b0d1b
management_subnet_id=92607c63-0738-4e19-a1c8-f770a1dd48fd
management_prefix=fdca:3ba5:a17a:acda::/64
# Configure which neutron resource(s) this Rug should be managing.
# Currently available: router, loadbalancer
enabled_drivers=router
# *Deprecated* Use mgt_service_port in individual driver config sections
# instead.
akanda_mgt_service_port=5000
external_network_id=fbf6b360-be38-48cd-bce3-6a9b710b3cc9
external_subnet_id=f3803915-dd28-487c-81a7-b109ab13e2ee
external_prefix=172.16.77.0/24
plug_external_port=True
# Public SSH key to insert into the 'astara' user of appliance
# VMs.
ssh_public_key=/etc/astara/astara.pub
# *Deprecated* Use image_uuid/instance_flavor in the [router] section.
router_image_uuid=1e9c16f3-e070-47b7-b49c-ffcf38df5f9a
router_instance_flavor=1
# *Deprecated* Use ssh_public_key.
router_ssh_public_key=/etc/astara/astara.pub
# to plug in rug interface
interface_driver=astara.common.linux.interface.OVSInterfaceDriver
ovs_integration_bridge=br-int
# oslo_messaging backend configuration, rabbitmq client credentials
# configured in [oslo_messaging_rabbit] section.
rpc_backend = rabbit
# *Deprecated* Use [oslo_messaging_rabbit] for configuring amqp
# client credentials.
#amqp_url = amqp://rabbit:astara@127.0.0.1:/
provider_rules_path=/opt/stack/astara/etc/provider_rules.json
control_exchange = quantum
neutron_port_security_extension_enabled = True
# api_listen address and port for the astara administrative API
api_listen = 0.0.0.0
api_port = 44250
[AGENT]
root_helper=sudo astara-rootwrap /etc/astara/rootwrap.conf
# If running multiple astara instances, configure use of an external
# cluster coordinator here. For more information on supported coordination
# backends, see http://docs.openstack.org/developer/tooz/.
# NOTE: This feature is currently marked experimental for Liberty.
[coordination]
enabled = False
url = memcached://localhost:11211
group_id = astara
heartbeat_interval = 1
# This section should be updated as per service user credentials.
[keystone_authtoken]
signing_dir = /var/cache/astara
cafile = /etc/ssl/openstack/ca-bundle.pem
auth_uri = http://127.0.0.1:5000
project_domain_id = default
project_name = service
user_domain_id = default
password = astara
username = neutron
auth_url = http://127.0.0.1:35357
auth_plugin = password
# This section should be updated as per rabbitmq credentials
[oslo_messaging_rabbit]
rabbit_userid = rabbit
rabbit_password = secret
rabbit_hosts = 127.0.0.1
# Driver configuration
[router]
image_uuid = aa7bcd8e-7364-11e5-a721-a35eacf37e3b
instance_flavor = 1
mgt_service_port = 5000
[loadbalancer]
image_uuid = 4d6c8dd9-7767-4c55-ab73-655c14e4f838
instance_flavor = 1
mgt_service_port = 5000
# Pez instance pooling configuration, used when running the astara-pez-service
# process to manage pools of hot-standby # appliance VMs /w the pez instance
# provider (experimental)
[pez]
# The number of hot-standby nodes per pool (1 pool per enabled driver)
pool_size=1

964
etc/orchestrator.ini.sample Normal file
View File

@ -0,0 +1,964 @@
[DEFAULT]
#
# From astara
#
# (string value)
#admin_user = <None>
# (string value)
#admin_password = <None>
# (string value)
#admin_tenant_name = <None>
# (string value)
#auth_url = <None>
# (string value)
#auth_strategy = keystone
# (string value)
#auth_region = <None>
# (integer value)
#max_retries = 3
# (integer value)
#retry_delay = 1
# RUG API listening port (integer value)
#rug_api_port = 44250
# Path to the SSH public key for the 'astara' user within appliance instances
# (string value)
#ssh_public_key = /etc/astara/astara.pub
# Which instance provider to use (on_demand, pez) (string value)
#instance_provider = on_demand
# The boot command to run to configure the appliance (string value)
#astara_boot_command = astara-configure-management
# (string value)
#management_network_id = <None>
# (string value)
#external_network_id = <None>
# (string value)
#management_subnet_id = <None>
# (string value)
#external_subnet_id = <None>
# (string value)
#management_prefix = fdca:3ba5:a17a:acda::/64
# (string value)
#external_prefix = 172.16.77.0/24
# (integer value)
#astara_mgt_service_port = 5000
# (string value)
#default_instance_flavor = 1
# (string value)
#interface_driver = astara.common.linux.interface.OVSInterfaceDriver
# (boolean value)
#neutron_port_security_extension_enabled = true
# Check for resources using the Liberty naming scheme when the modern name does
# not exist. (boolean value)
#legacy_fallback_mode = true
# (integer value)
#alive_timeout = 3
# (integer value)
#config_timeout = 90
# list of drivers the rug process will load (list value)
#enabled_drivers = router
# The hostname Astara is running on (string value)
#host = localhost
# (boolean value)
#plug_external_port = true
# Name of Open vSwitch bridge to use (string value)
#ovs_integration_bridge = br-int
# Uses veth for an interface or not (boolean value)
#ovs_use_veth = false
# MTU setting for device. (string value)
#network_device_mtu = <None>
# Exponent to determine number of hash partitions to use when distributing load
# across Rugs. Larger values will result in more even distribution of load and
# less load when rebalancing the ring, but more memory usage. Number of
# partitions per rug is (2^hash_partition_exponent). This determines the
# granularity of rebalancing: given 10 hosts, and an exponent of the 2, there
# are 40 partitions in the ring.A few thousand partitions should make
# rebalancing smooth in most cases. The default is suitable for up to a few
# hundred rugs. Too many partitions has a CPU impact. (integer value)
#hash_partition_exponent = 5
# (string value)
#provider_rules_path = /etc/astara/provider_rules.json
# (integer value)
#asn = 64512
# (integer value)
#neighbor_asn = 64512
# connection for AMQP server (string value)
#amqp_url = <None>
# name of the exchange where we receive notifications (string value)
#incoming_notifications_exchange = neutron
# name of the exchange where we receive RPC calls (string value)
#rpc_exchange = l3_agent_fanout
# The name of the exchange used by Neutron for RPCs (string value)
#neutron_control_exchange = neutron
# The UUID for the router to debug (string value)
#router_id = <None>
# the number of worker processes to run (integer value)
#num_worker_processes = 16
# Directory to scan for routers to ignore for debugging (string value)
#ignored_router_directory = /etc/astara/ignored
# warn if the event backlog for a tenant exceeds this value (integer value)
#queue_warning_threshold = 100
# Number of reboots to allow before assuming a router needs manual intervention
# (integer value)
#reboot_error_threshold = 5
# the number of worker threads to run per process (integer value)
#num_worker_threads = 4
# IP address used by Nova metadata server. (string value)
#nova_metadata_ip = 127.0.0.1
# TCP Port used by Nova metadata server. (integer value)
#nova_metadata_port = 8775
# Shared secret to sign instance-id request (string value)
# Deprecated group/name - [DEFAULT]/quantum_metadata_proxy_shared_secret
#neutron_metadata_proxy_shared_secret =
# seconds between health checks (integer value)
#health_check_period = 60
# The amount of time to wait for nova to hotplug/unplug networks from the
# instances. (integer value)
#hotplug_timeout = 10
# (integer value)
#boot_timeout = 600
# Number of seconds to ignore new events when an instance goes into ERROR
# state. (integer value)
#error_state_cooldown = 30
#
# From oslo.log
#
# Print debugging output (set logging level to DEBUG instead of default INFO
# level). (boolean value)
#debug = false
# If set to false, will disable INFO logging level, making WARNING the default.
# (boolean value)
# This option is deprecated for removal.
# Its value may be silently ignored in the future.
#verbose = true
# The name of a logging configuration file. This file is appended to any
# existing logging configuration files. For details about logging configuration
# files, see the Python logging module documentation. Note that when logging
# configuration files are used then all logging configuration is set in the
# configuration file and other logging configuration options are ignored (for
# example, log_format). (string value)
# Deprecated group/name - [DEFAULT]/log_config
#log_config_append = <None>
# DEPRECATED. A logging.Formatter log message format string which may use any
# of the available logging.LogRecord attributes. This option is deprecated.
# Please use logging_context_format_string and logging_default_format_string
# instead. This option is ignored if log_config_append is set. (string value)
#log_format = <None>
# Format string for %%(asctime)s in log records. Default: %(default)s . This
# option is ignored if log_config_append is set. (string value)
#log_date_format = %Y-%m-%d %H:%M:%S
# (Optional) Name of log file to output to. If no default is set, logging will
# go to stdout. This option is ignored if log_config_append is set. (string
# value)
# Deprecated group/name - [DEFAULT]/logfile
#log_file = <None>
# (Optional) The base directory used for relative --log-file paths. This option
# is ignored if log_config_append is set. (string value)
# Deprecated group/name - [DEFAULT]/logdir
#log_dir = <None>
# (Optional) Uses logging handler designed to watch file system. When log file
# is moved or removed this handler will open a new log file with specified path
# instantaneously. It makes sense only if log-file option is specified and
# Linux platform is used. This option is ignored if log_config_append is set.
# (boolean value)
#watch_log_file = false
# Use syslog for logging. Existing syslog format is DEPRECATED and will be
# changed later to honor RFC5424. This option is ignored if log_config_append
# is set. (boolean value)
#use_syslog = false
# (Optional) Enables or disables syslog rfc5424 format for logging. If enabled,
# prefixes the MSG part of the syslog message with APP-NAME (RFC5424). The
# format without the APP-NAME is deprecated in Kilo, and will be removed in
# Mitaka, along with this option. This option is ignored if log_config_append
# is set. (boolean value)
# This option is deprecated for removal.
# Its value may be silently ignored in the future.
#use_syslog_rfc_format = true
# Syslog facility to receive log lines. This option is ignored if
# log_config_append is set. (string value)
#syslog_log_facility = LOG_USER
# Log output to standard error. This option is ignored if log_config_append is
# set. (boolean value)
#use_stderr = true
# Format string to use for log messages with context. (string value)
#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
# Format string to use for log messages without context. (string value)
#logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s
# Data to append to log format when level is DEBUG. (string value)
#logging_debug_format_suffix = %(funcName)s %(pathname)s:%(lineno)d
# Prefix each line of exception output with this format. (string value)
#logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s
# List of logger=LEVEL pairs. This option is ignored if log_config_append is
# set. (list value)
#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN
# Enables or disables publication of error events. (boolean value)
#publish_errors = false
# The format for an instance that is passed with the log message. (string
# value)
#instance_format = "[instance: %(uuid)s] "
# The format for an instance UUID that is passed with the log message. (string
# value)
#instance_uuid_format = "[instance: %(uuid)s] "
# Format string for user_identity field of the logging_context_format_string
# (string value)
#logging_user_identity_format = %(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s
# Enables or disables fatal status of deprecations. (boolean value)
#fatal_deprecations = false
#
# From oslo.messaging
#
# Size of RPC connection pool. (integer value)
# Deprecated group/name - [DEFAULT]/rpc_conn_pool_size
#rpc_conn_pool_size = 30
# ZeroMQ bind address. Should be a wildcard (*), an ethernet interface, or IP.
# The "host" option should point or resolve to this address. (string value)
#rpc_zmq_bind_address = *
# MatchMaker driver. (string value)
#rpc_zmq_matchmaker = redis
# Type of concurrency used. Either "native" or "eventlet" (string value)
#rpc_zmq_concurrency = eventlet
# Number of ZeroMQ contexts, defaults to 1. (integer value)
#rpc_zmq_contexts = 1
# Maximum number of ingress messages to locally buffer per topic. Default is
# unlimited. (integer value)
#rpc_zmq_topic_backlog = <None>
# Directory for holding IPC sockets. (string value)
#rpc_zmq_ipc_dir = /var/run/openstack
# Name of this node. Must be a valid hostname, FQDN, or IP address. Must match
# "host" option, if running Nova. (string value)
#rpc_zmq_host = localhost
# Seconds to wait before a cast expires (TTL). Only supported by impl_zmq.
# (integer value)
#rpc_cast_timeout = 30
# The default number of seconds that poll should wait. Poll raises timeout
# exception when timeout expired. (integer value)
#rpc_poll_timeout = 1
# Configures zmq-messaging to use proxy with non PUB/SUB patterns. (boolean
# value)
#direct_over_proxy = true
# Use PUB/SUB pattern for fanout methods. PUB/SUB always uses proxy. (boolean
# value)
#use_pub_sub = true
# Minimal port number for random ports range. (port value)
# Minimum value: 1
# Maximum value: 65535
#rpc_zmq_min_port = 49152
# Maximal port number for random ports range. (integer value)
# Minimum value: 1
# Maximum value: 65536
#rpc_zmq_max_port = 65536
# Number of retries to find free port number before fail with ZMQBindError.
# (integer value)
#rpc_zmq_bind_port_retries = 100
# Host to locate redis. (string value)
#host = 127.0.0.1
# Use this port to connect to redis host. (port value)
# Minimum value: 1
# Maximum value: 65535
#port = 6379
# Password for Redis server (optional). (string value)
#password =
# Size of executor thread pool. (integer value)
# Deprecated group/name - [DEFAULT]/rpc_thread_pool_size
#executor_thread_pool_size = 64
# The Drivers(s) to handle sending notifications. Possible values are
# messaging, messagingv2, routing, log, test, noop (multi valued)
# Deprecated group/name - [DEFAULT]/notification_driver
#driver =
# A URL representing the messaging driver to use for notifications. If not set,
# we fall back to the same configuration used for RPC. (string value)
# Deprecated group/name - [DEFAULT]/notification_transport_url
#transport_url = <None>
# AMQP topic used for OpenStack notifications. (list value)
# Deprecated group/name - [rpc_notifier2]/topics
# Deprecated group/name - [DEFAULT]/notification_topics
#topics = notifications
# Seconds to wait for a response from a call. (integer value)
#rpc_response_timeout = 60
# A URL representing the messaging driver to use and its full configuration. If
# not set, we fall back to the rpc_backend option and driver specific
# configuration. (string value)
#transport_url = <None>
# The messaging driver to use, defaults to rabbit. Other drivers include amqp
# and zmq. (string value)
#rpc_backend = rabbit
# The default exchange under which topics are scoped. May be overridden by an
# exchange name specified in the transport_url option. (string value)
#control_exchange = openstack
[AGENT]
#
# From astara.agent
#
# (string value)
#root_helper = sudo astara-rootwrap /etc/astara/rootwrap.conf
[ceilometer]
#
# From astara.ceilometer
#
# Enable reporting metrics to ceilometer. (boolean value)
#enabled = false
# The name of the topic queue ceilometer consumes events from. (string value)
#topic = notifications.info
[coordination]
#
# From astara.coordination
#
# Whether to use an external coordination service to a cluster of astara-
# orchestrator nodes. This may be disabled for astara-orchestrator node
# environments. (boolean value)
#enabled = false
# URL of suppoted coordination service (string value)
#url = memcached://localhost:11211
# ID of coordination group to join. (string value)
#group_id = astara.orchestrator
# Interval (in seconds) for cluster heartbeats (integer value)
#heartbeat_interval = 1
[database]
#
# From oslo.db
#
# The file name to use with SQLite. (string value)
# Deprecated group/name - [DEFAULT]/sqlite_db
#sqlite_db = oslo.sqlite
# If True, SQLite uses synchronous mode. (boolean value)
# Deprecated group/name - [DEFAULT]/sqlite_synchronous
#sqlite_synchronous = true
# The back end to use for the database. (string value)
# Deprecated group/name - [DEFAULT]/db_backend
#backend = sqlalchemy
# The SQLAlchemy connection string to use to connect to the database. (string
# value)
# Deprecated group/name - [DEFAULT]/sql_connection
# Deprecated group/name - [DATABASE]/sql_connection
# Deprecated group/name - [sql]/connection
#connection = <None>
# The SQLAlchemy connection string to use to connect to the slave database.
# (string value)
#slave_connection = <None>
# The SQL mode to be used for MySQL sessions. This option, including the
# default, overrides any server-set SQL mode. To use whatever SQL mode is set
# by the server configuration, set this to no value. Example: mysql_sql_mode=
# (string value)
#mysql_sql_mode = TRADITIONAL
# Timeout before idle SQL connections are reaped. (integer value)
# Deprecated group/name - [DEFAULT]/sql_idle_timeout
# Deprecated group/name - [DATABASE]/sql_idle_timeout
# Deprecated group/name - [sql]/idle_timeout
#idle_timeout = 3600
# Minimum number of SQL connections to keep open in a pool. (integer value)
# Deprecated group/name - [DEFAULT]/sql_min_pool_size
# Deprecated group/name - [DATABASE]/sql_min_pool_size
#min_pool_size = 1
# Maximum number of SQL connections to keep open in a pool. (integer value)
# Deprecated group/name - [DEFAULT]/sql_max_pool_size
# Deprecated group/name - [DATABASE]/sql_max_pool_size
#max_pool_size = <None>
# Maximum number of database connection retries during startup. Set to -1 to
# specify an infinite retry count. (integer value)
# Deprecated group/name - [DEFAULT]/sql_max_retries
# Deprecated group/name - [DATABASE]/sql_max_retries
#max_retries = 10
# Interval between retries of opening a SQL connection. (integer value)
# Deprecated group/name - [DEFAULT]/sql_retry_interval
# Deprecated group/name - [DATABASE]/reconnect_interval
#retry_interval = 10
# If set, use this value for max_overflow with SQLAlchemy. (integer value)
# Deprecated group/name - [DEFAULT]/sql_max_overflow
# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow
#max_overflow = <None>
# Verbosity of SQL debugging information: 0=None, 100=Everything. (integer
# value)
# Deprecated group/name - [DEFAULT]/sql_connection_debug
#connection_debug = 0
# Add Python stack traces to SQL as comment strings. (boolean value)
# Deprecated group/name - [DEFAULT]/sql_connection_trace
#connection_trace = false
# If set, use this value for pool_timeout with SQLAlchemy. (integer value)
# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout
#pool_timeout = <None>
# Enable the experimental use of database reconnect on connection lost.
# (boolean value)
#use_db_reconnect = false
# Seconds between retries of a database transaction. (integer value)
#db_retry_interval = 1
# If True, increases the interval between retries of a database operation up to
# db_max_retry_interval. (boolean value)
#db_inc_retry_interval = true
# If db_inc_retry_interval is set, the maximum seconds between retries of a
# database operation. (integer value)
#db_max_retry_interval = 10
# Maximum retries in case of connection error or deadlock error before error is
# raised. Set to -1 to specify an infinite retry count. (integer value)
#db_max_retries = 20
[keystone_authtoken]
#
# From keystonemiddleware.auth_token
#
# Complete public Identity API endpoint. (string value)
#auth_uri = <None>
# API version of the admin Identity API endpoint. (string value)
#auth_version = <None>
# Do not handle authorization requests within the middleware, but delegate the
# authorization decision to downstream WSGI components. (boolean value)
#delay_auth_decision = false
# Request timeout value for communicating with Identity API server. (integer
# value)
#http_connect_timeout = <None>
# How many times are we trying to reconnect when communicating with Identity
# API Server. (integer value)
#http_request_max_retries = 3
# Env key for the swift cache. (string value)
#cache = <None>
# Required if identity server requires client certificate (string value)
#certfile = <None>
# Required if identity server requires client certificate (string value)
#keyfile = <None>
# A PEM encoded Certificate Authority to use when verifying HTTPs connections.
# Defaults to system CAs. (string value)
#cafile = <None>
# Verify HTTPS connections. (boolean value)
#insecure = false
# The region in which the identity server can be found. (string value)
#region_name = <None>
# Directory used to cache files related to PKI tokens. (string value)
#signing_dir = <None>
# Optionally specify a list of memcached server(s) to use for caching. If left
# undefined, tokens will instead be cached in-process. (list value)
# Deprecated group/name - [DEFAULT]/memcache_servers
#memcached_servers = <None>
# In order to prevent excessive effort spent validating tokens, the middleware
# caches previously-seen tokens for a configurable duration (in seconds). Set
# to -1 to disable caching completely. (integer value)
#token_cache_time = 300
# Determines the frequency at which the list of revoked tokens is retrieved
# from the Identity service (in seconds). A high number of revocation events
# combined with a low cache duration may significantly reduce performance.
# (integer value)
#revocation_cache_time = 10
# (Optional) If defined, indicate whether token data should be authenticated or
# authenticated and encrypted. Acceptable values are MAC or ENCRYPT. If MAC,
# token data is authenticated (with 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 raise an exception on initialization.
# (string value)
#memcache_security_strategy = <None>
# (Optional, mandatory if memcache_security_strategy is defined) This string is
# used for key derivation. (string value)
#memcache_secret_key = <None>
# (Optional) Number of seconds memcached server is considered dead before it is
# tried again. (integer value)
#memcache_pool_dead_retry = 300
# (Optional) Maximum total number of open connections to every memcached
# server. (integer value)
#memcache_pool_maxsize = 10
# (Optional) Socket timeout in seconds for communicating with a memcached
# server. (integer value)
#memcache_pool_socket_timeout = 3
# (Optional) Number of seconds a connection to memcached is held unused in the
# pool before it is closed. (integer value)
#memcache_pool_unused_timeout = 60
# (Optional) Number of seconds that an operation will wait to get a memcached
# client connection from the pool. (integer value)
#memcache_pool_conn_get_timeout = 10
# (Optional) Use the advanced (eventlet safe) memcached client pool. The
# advanced pool will only work under python 2.x. (boolean value)
#memcache_use_advanced_pool = 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 not
# set the X-Service-Catalog header. (boolean value)
#include_service_catalog = true
# Used to control the use and type of token binding. Can be set to: "disabled"
# to not check token binding. "permissive" (default) to validate binding
# information if the bind type is of a form known to the server and ignore it
# if not. "strict" like "permissive" but if the bind 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 must be present in tokens.
# (string value)
#enforce_token_bind = permissive
# If true, the revocation list will be checked for cached tokens. This requires
# that PKI tokens are configured on the identity server. (boolean value)
#check_revocations_for_cached = false
# Hash algorithms to use for hashing PKI tokens. This may be a single algorithm
# or multiple. The algorithms are those supported by Python standard
# hashlib.new(). The hashes will be tried in the order given, so put the
# preferred one first for performance. The result of the first hash will be
# stored in the cache. This will typically be set to multiple values only while
# migrating from a less secure algorithm to a more secure one. Once all the old
# tokens are expired this option should be set to a single value for better
# performance. (list value)
#hash_algorithms = md5
# Prefix to prepend at the beginning of the path. Deprecated, use identity_uri.
# (string value)
#auth_admin_prefix =
# Host providing the admin Identity API endpoint. Deprecated, use identity_uri.
# (string value)
#auth_host = 127.0.0.1
# Port of the admin Identity API endpoint. Deprecated, use identity_uri.
# (integer value)
#auth_port = 35357
# Protocol of the admin Identity API endpoint (http or https). Deprecated, use
# identity_uri. (string value)
#auth_protocol = https
# Complete admin Identity API endpoint. This should specify the unversioned
# root endpoint e.g. https://localhost:35357/ (string value)
#identity_uri = <None>
# This option is deprecated and may be removed in a future release. Single
# shared secret with the Keystone configuration used for bootstrapping a
# Keystone installation, or otherwise bypassing the normal authentication
# process. This option should not be used, use `admin_user` and
# `admin_password` instead. (string value)
#admin_token = <None>
# Service username. (string value)
#admin_user = <None>
# Service user password. (string value)
#admin_password = <None>
# Service tenant name. (string value)
#admin_tenant_name = admin
# Authentication type to load (unknown value)
# Deprecated group/name - [DEFAULT]/auth_plugin
#auth_type = <None>
# Config Section from which to load plugin specific options (unknown value)
#auth_section = <None>
[loadbalancer]
#
# From astara.loadbalancer
#
# The image_uuid for loadbalancer instances. (string value)
#image_uuid = <None>
# The nova flavor id to use for loadbalancer instances (string value)
#instance_flavor = <None>
# The port on which the loadbalancer API service listens on loadbalancer
# appliances (integer value)
#mgt_service_port = 5000
[matchmaker_redis]
#
# From oslo.messaging
#
# Host to locate redis. (string value)
#host = 127.0.0.1
# Use this port to connect to redis host. (port value)
# Minimum value: 1
# Maximum value: 65535
#port = 6379
# Password for Redis server (optional). (string value)
#password =
[oslo_messaging_amqp]
#
# From oslo.messaging
#
# address prefix used when sending to a specific server (string value)
# Deprecated group/name - [amqp1]/server_request_prefix
#server_request_prefix = exclusive
# address prefix used when broadcasting to all servers (string value)
# Deprecated group/name - [amqp1]/broadcast_prefix
#broadcast_prefix = broadcast
# address prefix when sending to any server in group (string value)
# Deprecated group/name - [amqp1]/group_request_prefix
#group_request_prefix = unicast
# Name for the AMQP container (string value)
# Deprecated group/name - [amqp1]/container_name
#container_name = <None>
# Timeout for inactive connections (in seconds) (integer value)
# Deprecated group/name - [amqp1]/idle_timeout
#idle_timeout = 0
# Debug: dump AMQP frames to stdout (boolean value)
# Deprecated group/name - [amqp1]/trace
#trace = false
# CA certificate PEM file to verify server certificate (string value)
# Deprecated group/name - [amqp1]/ssl_ca_file
#ssl_ca_file =
# Identifying certificate PEM file to present to clients (string value)
# Deprecated group/name - [amqp1]/ssl_cert_file
#ssl_cert_file =
# Private key PEM file used to sign cert_file certificate (string value)
# Deprecated group/name - [amqp1]/ssl_key_file
#ssl_key_file =
# Password for decrypting ssl_key_file (if encrypted) (string value)
# Deprecated group/name - [amqp1]/ssl_key_password
#ssl_key_password = <None>
# Accept clients using either SSL or plain TCP (boolean value)
# Deprecated group/name - [amqp1]/allow_insecure_clients
#allow_insecure_clients = false
# Space separated list of acceptable SASL mechanisms (string value)
# Deprecated group/name - [amqp1]/sasl_mechanisms
#sasl_mechanisms =
# Path to directory that contains the SASL configuration (string value)
# Deprecated group/name - [amqp1]/sasl_config_dir
#sasl_config_dir =
# Name of configuration file (without .conf suffix) (string value)
# Deprecated group/name - [amqp1]/sasl_config_name
#sasl_config_name =
# User name for message broker authentication (string value)
# Deprecated group/name - [amqp1]/username
#username =
# Password for message broker authentication (string value)
# Deprecated group/name - [amqp1]/password
#password =
[oslo_messaging_rabbit]
#
# From oslo.messaging
#
# Use durable queues in AMQP. (boolean value)
# Deprecated group/name - [DEFAULT]/amqp_durable_queues
# Deprecated group/name - [DEFAULT]/rabbit_durable_queues
#amqp_durable_queues = false
# Auto-delete queues in AMQP. (boolean value)
# Deprecated group/name - [DEFAULT]/amqp_auto_delete
#amqp_auto_delete = false
# SSL version to use (valid only if SSL enabled). Valid values are TLSv1 and
# SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may be available on some
# distributions. (string value)
# Deprecated group/name - [DEFAULT]/kombu_ssl_version
#kombu_ssl_version =
# SSL key file (valid only if SSL enabled). (string value)
# Deprecated group/name - [DEFAULT]/kombu_ssl_keyfile
#kombu_ssl_keyfile =
# SSL cert file (valid only if SSL enabled). (string value)
# Deprecated group/name - [DEFAULT]/kombu_ssl_certfile
#kombu_ssl_certfile =
# SSL certification authority file (valid only if SSL enabled). (string value)
# Deprecated group/name - [DEFAULT]/kombu_ssl_ca_certs
#kombu_ssl_ca_certs =
# How long to wait before reconnecting in response to an AMQP consumer cancel
# notification. (floating point value)
# Deprecated group/name - [DEFAULT]/kombu_reconnect_delay
#kombu_reconnect_delay = 1.0
# How long to wait a missing client beforce abandoning to send it its replies.
# This value should not be longer than rpc_response_timeout. (integer value)
# Deprecated group/name - [DEFAULT]/kombu_reconnect_timeout
#kombu_missing_consumer_retry_timeout = 60
# Determines how the next RabbitMQ node is chosen in case the one we are
# currently connected to becomes unavailable. Takes effect only if more than
# one RabbitMQ node is provided in config. (string value)
# Allowed values: round-robin, shuffle
#kombu_failover_strategy = round-robin
# The RabbitMQ broker address where a single node is used. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_host
#rabbit_host = localhost
# The RabbitMQ broker port where a single node is used. (port value)
# Minimum value: 1
# Maximum value: 65535
# Deprecated group/name - [DEFAULT]/rabbit_port
#rabbit_port = 5672
# RabbitMQ HA cluster host:port pairs. (list value)
# Deprecated group/name - [DEFAULT]/rabbit_hosts
#rabbit_hosts = $rabbit_host:$rabbit_port
# Connect over SSL for RabbitMQ. (boolean value)
# Deprecated group/name - [DEFAULT]/rabbit_use_ssl
#rabbit_use_ssl = false
# The RabbitMQ userid. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_userid
#rabbit_userid = guest
# The RabbitMQ password. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_password
#rabbit_password = guest
# The RabbitMQ login method. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_login_method
#rabbit_login_method = AMQPLAIN
# The RabbitMQ virtual host. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_virtual_host
#rabbit_virtual_host = /
# How frequently to retry connecting with RabbitMQ. (integer value)
#rabbit_retry_interval = 1
# How long to backoff for between retries when connecting to RabbitMQ. (integer
# value)
# Deprecated group/name - [DEFAULT]/rabbit_retry_backoff
#rabbit_retry_backoff = 2
# Maximum number of RabbitMQ connection retries. Default is 0 (infinite retry
# count). (integer value)
# Deprecated group/name - [DEFAULT]/rabbit_max_retries
#rabbit_max_retries = 0
# Use HA queues in RabbitMQ (x-ha-policy: all). If you change this option, you
# must wipe the RabbitMQ database. (boolean value)
# Deprecated group/name - [DEFAULT]/rabbit_ha_queues
#rabbit_ha_queues = false
# Number of seconds after which the Rabbit broker is considered down if
# heartbeat's keep-alive fails (0 disable the heartbeat). EXPERIMENTAL (integer
# value)
#heartbeat_timeout_threshold = 60
# How often times during the heartbeat_timeout_threshold we check the
# heartbeat. (integer value)
#heartbeat_rate = 2
# Deprecated, use rpc_backend=kombu+memory or rpc_backend=fake (boolean value)
# Deprecated group/name - [DEFAULT]/fake_rabbit
#fake_rabbit = false
[pez]
#
# From astara.pez
#
# How many pre-allocated hot standby nodes to keep in the pez pool. (integer
# value)
#pool_size = 1
# Image uuid to boot. (string value)
#image_uuid = <None>
# Nova flavor to boot (string value)
#flavor = <None>
# (string value)
#rpc_topic = astara-pez
[router]
#
# From astara.router
#
# The image_uuid for router instances. (string value)
# Deprecated group/name - [DEFAULT]/router_image_uuid
#image_uuid = <None>
# The nova id flavor to use for router instances (string value)
# Deprecated group/name - [DEFAULT]/router_instance_flavor
#instance_flavor = <None>
# The port on which the router API service listens on router appliances
# (integer value)
# Deprecated group/name - [DEFAULT]/akanda_mgt_service_port
#mgt_service_port = 5000

View File

@ -0,0 +1,16 @@
[DEFAULT]
output_file = etc/orchestrator.ini.sample
wrap_width = 79
namespace = astara
namespace = astara.rabbit
namespace = astara.agent
namespace = astara.router
namespace = astara.loadbalancer
namespace = astara.ceilometer
namespace = astara.coordination
namespace = astara.pez
namespace = oslo.log
namespace = oslo.db
namespace = oslo.messaging
namespace = keystonemiddleware.auth_token

View File

@ -0,0 +1,6 @@
---
features:
- >
`blueprint autogen-astara-conf-file <https://blueprints.launchpad.net/astara/+spec/autogen-astara-conf-file>`_ \-
This switches astara to use oslo-config-generator, where the contents of our sample configuration file are
configured using a configuration file in etc/oslo-config-generator/.

View File

@ -59,6 +59,14 @@ astara.cli =
browse=astara.cli.browse:BrowseRouters
poll=astara.cli.poll:Poll
ssh=astara.cli.router:RouterSSH
oslo.config.opts =
astara = astara.opts:list_opts
astara.ceilometer = astara.opts:list_ceilometer_opts
astara.agent = astara.opts:list_agent_opts
astara.coordination = astara.opts:list_coordination_opts
astara.pez = astara.opts:list_pez_opts
astara.router = astara.opts:list_router_opts
astara.loadbalancer = astara.opts:list_loadbalancer_opts
[build_sphinx]
all_files = 1

View File

@ -0,0 +1,29 @@
#!/bin/sh
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -e
GEN_CMD=oslo-config-generator
if ! type "$GEN_CMD" > /dev/null; then
echo "ERROR: $GEN_CMD not installed on the system."
exit 1
fi
for file in `ls etc/oslo-config-generator/*`; do
$GEN_CMD --config-file=$file
done
set -x

View File

@ -36,3 +36,7 @@ commands = nosetests -v ./astara/test/functional/
[flake8]
ignore = E123,E133,E226,E241,E242,E731
[testenv:genconfig]
commands = {toxinidir}/tools/generate_config_file_samples.sh