Replace api-config.conf with monasca-api.conf

api-config.conf is the deprecated path for the configuration file. The
new path is /etc/monasca/monasca-api.conf .

Story: 2004708
Task: 28987

Change-Id: If06d9114529c3ef4520247dfc7c32d3769f07084
This commit is contained in:
Thomas Bechtold 2019-01-07 12:20:55 +01:00
parent ac7ca4bf2b
commit 96e13dad75
13 changed files with 17 additions and 16 deletions

View File

@ -34,7 +34,7 @@ kafka server is located:
::
/etc/monasca/api-config.ini
/etc/monasca/api-config.conf
/etc/monasca/monasca-api.conf
/etc/monasca/api-logging.conf
Once the configuration files are modified to match your environment, you

View File

@ -14,6 +14,6 @@ After generation you will have sample available in
``etc/api-policy.yaml.sample``. It contains default values for all policies.
After you change it to suit your needs you will need to change monasca-api
configuration to look for the new policy configuration with specific file name.
Head to ``api-config.conf`` file and then you will need to replace
Head to ``monasca-api.conf`` file and then you will need to replace
in ``[oslo_policy]`` section ``policy_file`` to your desired file name
(like ``api-policy.yaml``).

View File

@ -1,5 +1,5 @@
[DEFAULT]
output_file = etc/api-config.conf.sample
output_file = etc/monasca-api.conf.sample
wrap_width = 79
format = ini
summarize = True

View File

@ -832,10 +832,10 @@ function configure_monasca_api_python {
# create configuration files in target locations
rm -rf $MONASCA_API_CONF $MONASCA_API_PASTE_INI $MONASCA_API_LOGGING_CONF
$MONASCA_API_BIN_DIR/oslo-config-generator \
--config-file $MONASCA_API_DIR/config-generator/api-config.conf \
--output-file /tmp/api.conf
--config-file $MONASCA_API_DIR/config-generator/monasca-api.conf \
--output-file /tmp/monasca-api.conf
install -m 600 /tmp/api.conf $MONASCA_API_CONF && rm -rf /tmp/api.conf
install -m 600 /tmp/monasca-api.conf $MONASCA_API_CONF && rm -rf /tmp/monasca-api.conf
install -m 600 $MONASCA_API_DIR/etc/api-logging.conf $MONASCA_API_LOGGING_CONF
install -m 600 $MONASCA_API_DIR/etc/api-config.ini $MONASCA_API_PASTE_INI
# create configuration files in target locations
@ -957,7 +957,7 @@ function clean_monasca_api_python {
echo_summary "Clean Monasca monasca_api_python"
sudo rm -rf /etc/monasca/api-config.conf
sudo rm -rf /etc/monasca/monasca-api.conf
sudo rm -rf /etc/monasca/api-logging.conf
sudo rm -rf /etc/monasca/api-config.ini
sudo rm -rf $MON_API_GATE_CONFIGURATION_DIR

View File

@ -195,7 +195,7 @@ MONASCA_API_SERVICE_PROTOCOL=${MONASCA_API_SERVICE_PROTOCOL:-${SERVICE_PROTOCOL}
MONASCA_API_SERVICE_TIMEOUT=${MONASCA_API_SERVICE_TIMEOUT:-${SERVICE_TIMEOUT}}
MONASCA_API_CONF_DIR=${MONASCA_API_CONF_DIR:-/etc/monasca}
MONASCA_API_CONF=${MONASCA_API_CONF:-$MONASCA_API_CONF_DIR/api-config.conf}
MONASCA_API_CONF=${MONASCA_API_CONF:-$MONASCA_API_CONF_DIR/monasca-api.conf}
MONASCA_API_PASTE_INI=${MONASCA_API_PASTE_INI:-$MONASCA_API_CONF_DIR/api-config.ini}
MONASCA_API_LOGGING_CONF=${MONASCA_API_LOGGING_CONF:-$MONASCA_API_CONF_DIR/api-logging.conf}
MONASCA_API_LOG_DIR=${MONASCA_API_LOG_DIR:-/var/log/monasca/api}

View File

@ -53,7 +53,7 @@ author = u'OpenStack Foundation'
# sample config
config_generator_config_file = [
('config-generator/api-config.conf', '_static/api-config')
('config-generator/monasca-api.conf', '_static/monasca-api')
]
# Add any paths that contain templates here, relative to this directory.

View File

@ -15,10 +15,10 @@ of code in the monasca-api repository.
Sample Configuration For Application
------------------------------------
This sample configuration can also be viewed in `api-config.conf.sample
<../_static/api-config.conf.sample>`_.
This sample configuration can also be viewed in `monasca-api.conf.sample
<../_static/monasca-api.conf.sample>`_.
.. literalinclude:: ../_static/api-config.conf.sample
.. literalinclude:: ../_static/monasca-api.conf.sample
.. _sample-configuration-logging:

View File

@ -50,6 +50,7 @@ ENV \
# Copy all neccessary files to proper locations.
COPY api-* /etc/monasca/
COPY monasca-api.conf.j2 /etc/monasca/
# Run here all additionals steps your service need post installation.
# Stay with only one `RUN` and use `&& \` for next steps to don't create

View File

@ -86,7 +86,7 @@ STAY_ALIVE_ON_FAILURE false
Provide Configuration templates
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* api-config.conf.j2
* monasca-api.conf.j2
* api-config.ini.j2
* api-logging.conf.j2

View File

@ -26,7 +26,7 @@ python3 /mysql_check.py
# Template all config files before start, it will use env variables.
# Read usage examples: https://pypi.org/project/Templer/
echo "Start script: creating config files from templates"
templer -v -f /etc/monasca/api-config.conf.j2 /etc/monasca/api-config.conf
templer -v -f /etc/monasca/monasca-api.conf.j2 /etc/monasca/monasca-api.conf
templer -v -f /etc/monasca/api-config.ini.j2 /etc/monasca/api-config.ini
templer -v -f /etc/monasca/api-logging.conf.j2 /etc/monasca/api-logging.conf
templer -v -f /etc/monasca/api-gunicorn.conf.j2 /etc/monasca/api-gunicorn.conf

View File

@ -100,7 +100,7 @@ def launch(conf):
def get_wsgi_app(config_base_path=None, **kwargs):
# allow to override names of the configuration files
config_file = kwargs.get('config_file', 'api-config.conf')
config_file = kwargs.get('config_file', 'monasca-api.conf')
paste_file = kwargs.get('paste_file', 'api-config.ini')
if config_base_path is None:

View File

@ -128,7 +128,7 @@ commands =
[testenv:genconfig]
basepython = python3
description = Generates sample configuration file for monasca-api
commands = oslo-config-generator --config-file=config-generator/api-config.conf
commands = oslo-config-generator --config-file=config-generator/monasca-api.conf
[testenv:genpolicy]
basepython = python3