From 53e98a28f25c74701e0e202e4c3d3cb38eed9fd1 Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Mon, 27 Feb 2017 09:37:32 +0000 Subject: [PATCH] Adjust to per-service configuration Change-Id: Ibff46ab612b0e1ac2a35fddd66550c6435d165ca Depends-On: Ia4d29167cea6dfd19a1970706aafda51a31d5b24 --- service/calico-dhcp-agent.yaml | 4 ++-- service/files/backup.sh.j2 | 2 +- service/files/neutron.conf.j2 | 2 +- service/neutron-dhcp-agent.yaml | 4 ++-- service/neutron-l3-agent.yaml | 4 ++-- service/neutron-metadata-agent.yaml | 2 +- service/neutron-openvswitch-agent.yaml | 4 ++-- service/neutron-server.yaml | 8 ++++---- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/service/calico-dhcp-agent.yaml b/service/calico-dhcp-agent.yaml index 2bb6a26..c1ef2cd 100644 --- a/service/calico-dhcp-agent.yaml +++ b/service/calico-dhcp-agent.yaml @@ -15,8 +15,8 @@ service: command: calico-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: - neutron.conf - ml2-conf.ini diff --git a/service/files/backup.sh.j2 b/service/files/backup.sh.j2 index 43ef0e5..ac24707 100644 --- a/service/files/backup.sh.j2 +++ b/service/files/backup.sh.j2 @@ -1,6 +1,6 @@ #!/bin/bash -ex set -o pipefail BACKUP_FILE="/var/ccp/backup/neutron/backup-$(date "+%Y%m%d%H%M%S").sql" -mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.database) }} \ +mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address("database") }} \ -u {{ neutron.db.username }} -p{{ neutron.db.password }} \ --single-transaction {{ neutron.db.name }} > "${BACKUP_FILE}" diff --git a/service/files/neutron.conf.j2 b/service/files/neutron.conf.j2 index ec20ee9..e25be7e 100644 --- a/service/files/neutron.conf.j2 +++ b/service/files/neutron.conf.j2 @@ -56,7 +56,7 @@ root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf root_helper_daemon = sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf [database] -connection = mysql+pymysql://{{ neutron.db.username }}:{{ neutron.db.password }}@{{ address(service.database) }}/{{ neutron.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} +connection = mysql+pymysql://{{ neutron.db.username }}:{{ neutron.db.password }}@{{ address("database") }}/{{ neutron.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} max_retries = -1 max_pool_size = {{ neutron.db.max_pool_size }} max_overflow = {{ neutron.db.max_overflow }} diff --git a/service/neutron-dhcp-agent.yaml b/service/neutron-dhcp-agent.yaml index 0df854c..61e0b46 100644 --- a/service/neutron-dhcp-agent.yaml +++ b/service/neutron-dhcp-agent.yaml @@ -18,8 +18,8 @@ service: command: neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-l3-agent.yaml b/service/neutron-l3-agent.yaml index 60d74be..982932f 100644 --- a/service/neutron-l3-agent.yaml +++ b/service/neutron-l3-agent.yaml @@ -18,8 +18,8 @@ service: command: neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-metadata-agent.yaml b/service/neutron-metadata-agent.yaml index 0a56d73..e74b272 100644 --- a/service/neutron-metadata-agent.yaml +++ b/service/neutron-metadata-agent.yaml @@ -17,7 +17,7 @@ service: command: neutron-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata-agent.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" + - rpc files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-openvswitch-agent.yaml b/service/neutron-openvswitch-agent.yaml index 641cbe0..6f34fb3 100644 --- a/service/neutron-openvswitch-agent.yaml +++ b/service/neutron-openvswitch-agent.yaml @@ -18,8 +18,8 @@ service: command: neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications - openvswitch-vswitchd:local files: - neutron.conf diff --git a/service/neutron-server.yaml b/service/neutron-server.yaml index fd312ae..9e6d6db 100644 --- a/service/neutron-server.yaml +++ b/service/neutron-server.yaml @@ -15,9 +15,9 @@ service: pre: - name: neutron-db-create dependencies: - - {{ service.database }} + - database type: single - command: mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e 'create database `{{ neutron.db.name }}`; + command: mysql -u root -p{{ db.root_password }} -h {{ address("database") }} -e 'create database `{{ neutron.db.name }}`; create user "{{ neutron.db.username }}"@"%" identified by "{{ neutron.db.password }}" {% if db.tls.enabled %} require ssl {% endif %}; grant all privileges on `{{ neutron.db.name }}`.* to "{{ neutron.db.username }}"@"%" identified by "{{ neutron.db.password }}" @@ -26,8 +26,8 @@ service: type: single command: neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head dependencies: - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications - neutron-db-create files: - neutron.conf