Move set of database_connection to OctaviaBase

Other Octavia services like octavia-worker also require setting of
database connection in order to access the octavia database.

Closes-Bug: #1797098
Depends-On: https://review.openstack.org/#/c/612395/

Change-Id: I33a08521a4cfffc709de850b99f9292ca464537e
This commit is contained in:
Carlos Goncalves 2018-10-10 11:04:52 +01:00
parent dec6e40b30
commit 73cedbc851
5 changed files with 28 additions and 12 deletions

View File

@ -51,6 +51,9 @@ resources:
ContainersCommon:
type: ./containers-common.yaml
MySQLClient:
type: ../../puppet/services/database/mysql-client.yaml
OctaviaHealthManagerPuppetBase:
type: ../../puppet/services/octavia-health-manager.yaml
properties:
@ -80,7 +83,10 @@ outputs:
config_volume: octavia
puppet_tags: octavia_config
step_config:
get_attr: [OctaviaHealthManagerPuppetBase, role_data, step_config]
list_join:
- "\n"
- - {get_attr: [OctaviaHealthManagerPuppetBase, role_data, step_config]}
- {get_attr: [MySQLClient, role_data, step_config]}
config_image: {get_param: DockerOctaviaConfigImage}
kolla_config:
/var/lib/kolla/config_files/octavia_health_manager.json:

View File

@ -47,6 +47,9 @@ resources:
ContainersCommon:
type: ./containers-common.yaml
MySQLClient:
type: ../../puppet/services/database/mysql-client.yaml
OctaviaHousekeepingPuppetBase:
type: ../../puppet/services/octavia-housekeeping.yaml
properties:
@ -76,7 +79,10 @@ outputs:
config_volume: octavia
puppet_tags: octavia_config
step_config:
get_attr: [OctaviaHousekeepingPuppetBase, role_data, step_config]
list_join:
- "\n"
- - {get_attr: [OctaviaHousekeepingPuppetBase, role_data, step_config]}
- {get_attr: [MySQLClient, role_data, step_config]}
config_image: {get_param: DockerOctaviaConfigImage}
kolla_config:
/var/lib/kolla/config_files/octavia_housekeeping.json:

View File

@ -51,6 +51,9 @@ resources:
ContainersCommon:
type: ./containers-common.yaml
MySQLClient:
type: ../../puppet/services/database/mysql-client.yaml
OctaviaWorkerPuppetBase:
type: ../../puppet/services/octavia-worker.yaml
properties:
@ -84,6 +87,7 @@ outputs:
- "\n"
- - "['nova_flavor'].each |String $val| { noop_resource($val) }"
- {get_attr: [OctaviaWorkerPuppetBase, role_data, step_config]}
- {get_attr: [MySQLClient, role_data, step_config]}
config_image: {get_param: DockerOctaviaConfigImage}
kolla_config:
/var/lib/kolla/config_files/octavia_worker.json:

View File

@ -103,16 +103,6 @@ outputs:
- octavia::keystone::authtoken::www_authenticate_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
octavia::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
octavia::policy::policies: {get_param: OctaviaApiPolicies}
octavia::db::database_connection:
make_url:
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
username: {get_param: OctaviaUserName}
password: {get_param: OctaviaPassword}
host: {get_param: [EndpointMap, MysqlInternal, host]}
path: /octavia
query:
read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
octavia::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
octavia::keystone::authtoken::project_name: {get_param: OctaviaProjectName}
octavia::keystone::authtoken::password: {get_param: OctaviaPassword}

View File

@ -126,6 +126,16 @@ outputs:
- {get_param: OctaviaDebug }
octavia::purge_config: {get_param: EnableConfigPurge}
octavia::notification_driver: {get_param: NotificationDriver}
octavia::db::database_connection:
make_url:
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
username: {get_param: OctaviaUserName}
password: {get_param: OctaviaPassword}
host: {get_param: [EndpointMap, MysqlInternal, host]}
path: /octavia
query:
read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
# TODO(ansmith): remove once p-t-o switches to oslo params
octavia::rabbit_use_ssl: {get_param: RpcUseSSL}
octavia::rabbit_userid: {get_param: RpcUserName}