diff --git a/docker-compose-production.yml b/docker-compose-production.yml index 9910e8f..12db51c 100644 --- a/docker-compose-production.yml +++ b/docker-compose-production.yml @@ -16,7 +16,7 @@ surveil: #SURVEIL_OS_PASSWORD: "password" #SURVEIL_OS_TENANT_NAME: "admin" -rabbitconsumer: +surveilosinterface: #build: . image: savoirfairelinux/surveil:0.7.0 links: @@ -37,7 +37,7 @@ rabbitconsumer: #SURVEIL_TENANT_NAME: "admin" #SURVEIL_DEFAULT_TAGS: "linux-openstackceilometer" #SURVEIL_NETWORK_LABEL: "surveil" - command: bash -c "cd /opt/surveil && ./setup.sh && /opt/surveil/env/bin/python setup.py develop && surveil-rabbitMQ-consumer" + command: bash -c "cd /opt/surveil && ./setup.sh && /opt/surveil/env/bin/python setup.py develop && surveil-os-interface" alignak: #build: tools/docker/alignak_container/ diff --git a/etc/surveil/surveil_rabbitMQ_consumer.cfg b/etc/surveil/surveil_os_interface.cfg similarity index 94% rename from etc/surveil/surveil_rabbitMQ_consumer.cfg rename to etc/surveil/surveil_os_interface.cfg index 48914ca..87d80fa 100644 --- a/etc/surveil/surveil_rabbitMQ_consumer.cfg +++ b/etc/surveil/surveil_os_interface.cfg @@ -1,4 +1,4 @@ -[rabbitconsumer] +[surveil-os-interface] SURVEIL_API_URL=http://surveil:8080/v2 SURVEIL_AUTH_URL=http://surveil:8080/v2/auth SURVEIL_VERSION=2_0 diff --git a/setup.cfg b/setup.cfg index f908a5f..5ce3282 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ console_scripts = surveil-init = surveil.cmd.init:main surveil-pack-upload = surveil.cmd.pack_upload:main surveil-os-discovery = surveil.cmd.os_discovery:main - surveil-rabbitMQ-consumer = surveil.cmd.rabbitMQ_consumer:main + surveil-os-interface = surveil.cmd.surveil_os_interface:main [build_sphinx] source-dir = doc/source diff --git a/surveil/cmd/rabbitMQ_consumer.py b/surveil/cmd/surveil_os_interface.py similarity index 87% rename from surveil/cmd/rabbitMQ_consumer.py rename to surveil/cmd/surveil_os_interface.py index 4f666ac..d4915fc 100644 --- a/surveil/cmd/rabbitMQ_consumer.py +++ b/surveil/cmd/surveil_os_interface.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -"""Starter script for the RabbitMQ receiver""" +"""Starter script for the surveil openstack interface""" from __future__ import print_function @@ -29,65 +29,65 @@ from surveilclient import client def main(): config = configparser.ConfigParser() - config.read("/etc/surveil/surveil_rabbitMQ_consumer.cfg") + config.read("/etc/surveil/surveil_os_interface.cfg") daemon_config = { "SURVEIL_API_URL": os.environ.get( 'SURVEIL_API_URL', - config.get("rabbitconsumer", "SURVEIL_API_URL") + config.get("surveil-os-interface", "SURVEIL_API_URL") ), "SURVEIL_AUTH_URL": os.environ.get( 'SURVEIL_AUTH_URL', - config.get("rabbitconsumer", "SURVEIL_AUTH_URL") + config.get("surveil-os-interface", "SURVEIL_AUTH_URL") ), "SURVEIL_VERSION": os.environ.get( 'SURVEIL_VERSION', - config.get("rabbitconsumer", "SURVEIL_VERSION") + config.get("surveil-os-interface", "SURVEIL_VERSION") ), "RABBIT_HOST": os.environ.get( 'RABBIT_HOST', - config.get("rabbitconsumer", "RABBIT_HOST") + config.get("surveil-os-interface", "RABBIT_HOST") ), "RABBIT_PORT": int(os.environ.get( 'RABBIT_PORT', - config.get("rabbitconsumer", "RABBIT_PORT") + config.get("surveil-os-interface", "RABBIT_PORT") ) ), "QUEUE": os.environ.get( 'QUEUE', - config.get("rabbitconsumer", "QUEUE") + config.get("surveil-os-interface", "QUEUE") ), "RABBIT_USER": os.environ.get( 'RABBIT_USER', - config.get("rabbitconsumer", "RABBIT_USER") + config.get("surveil-os-interface", "RABBIT_USER") ), "RABBIT_PASSWORD": os.environ.get( 'RABBIT_PASSWORD', - config.get("rabbitconsumer", "RABBIT_PASSWORD") + config.get("surveil-os-interface", "RABBIT_PASSWORD") ), "SURVEIL_OS_AUTH_URL": os.environ.get( 'SURVEIL_OS_AUTH_URL', - config.get("rabbitconsumer", "SURVEIL_OS_AUTH_URL") + config.get("surveil-os-interface", "SURVEIL_OS_AUTH_URL") ), "SURVEIL_OS_USERNAME": os.environ.get( 'SURVEIL_OS_USERNAME', - config.get("rabbitconsumer", "SURVEIL_OS_USERNAME") + config.get("surveil-os-interface", "SURVEIL_OS_USERNAME") ), "SURVEIL_OS_PASSWORD": os.environ.get( 'SURVEIL_OS_PASSWORD', - config.get("rabbitconsumer", "SURVEIL_OS_PASSWORD") + config.get("surveil-os-interface", "SURVEIL_OS_PASSWORD") ), "SURVEIL_OS_TENANT_NAME": os.environ.get( 'SURVEIL_OS_TENANT_NAME', - config.get("rabbitconsumer", "SURVEIL_OS_TENANT_NAME") + config.get("surveil-os-interface", "SURVEIL_OS_TENANT_NAME") ), "SURVEIL_DEFAULT_TAGS": os.environ.get( 'SURVEIL_DEFAULT_TAGS', - config.get("rabbitconsumer", "SURVEIL_DEFAULT_TAGS") + config.get("surveil-os-interface", "SURVEIL_DEFAULT_TAGS") ), "SURVEIL_NETWORK_LABEL": os.environ.get( 'SURVEIL_NETWORK_LABEL', - config.get("rabbitconsumer", "SURVEIL_NETWORK_LABEL") + config.get("surveil-os-interface", "SURVEIL_NETWORK_LABEL") ), }