diff --git a/roles/cinder_api/templates/cinder.conf-2.j2 b/roles/cinder_api/templates/cinder.conf-2.j2 index 55c1274..493206a 100644 --- a/roles/cinder_api/templates/cinder.conf-2.j2 +++ b/roles/cinder_api/templates/cinder.conf-2.j2 @@ -17,7 +17,7 @@ my_ip = {{ controller02_mgmt_ip }} glance_host = {{ glance_host }} [database] -connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_MGMT }}/cinder +connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_DB }}/cinder [keystone_authtoken] auth_uri = http://{{ VIP_MGMT }}:5000/v2.0 diff --git a/roles/cinder_api/templates/cinder.conf.j2 b/roles/cinder_api/templates/cinder.conf.j2 index 4a829c0..692bbba 100644 --- a/roles/cinder_api/templates/cinder.conf.j2 +++ b/roles/cinder_api/templates/cinder.conf.j2 @@ -17,7 +17,7 @@ my_ip = {{ controller01_mgmt_ip }} glance_host = {{ glance_host }} [database] -connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_MGMT }}/cinder +connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_DB }}/cinder [keystone_authtoken] auth_uri = http://{{ VIP_MGMT }}:5000/v2.0 diff --git a/roles/cinder_controller/templates/cinder.conf.j2 b/roles/cinder_controller/templates/cinder.conf.j2 index 2f97927..c8a1b67 100644 --- a/roles/cinder_controller/templates/cinder.conf.j2 +++ b/roles/cinder_controller/templates/cinder.conf.j2 @@ -16,7 +16,7 @@ rabbit_password = {{ rabbitmq_guest_password }} my_ip = {{ controller1_management_network_ip }} [database] -connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_MGMT }}/cinder +connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_DB }}/cinder [keystone_authtoken] auth_uri = http://{{ VIP_MGMT }}:5000/v2.0 diff --git a/roles/cinder_storage/templates/cinder.conf.j2 b/roles/cinder_storage/templates/cinder.conf.j2 index 6b2cd73..246198c 100644 --- a/roles/cinder_storage/templates/cinder.conf.j2 +++ b/roles/cinder_storage/templates/cinder.conf.j2 @@ -17,7 +17,7 @@ my_ip = {{ MANAGEMENT_INTERFACE_IP_ADDRESS }} glance_host = {{ glance_host }} [database] -connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_MGMT }}/cinder +connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_DB }}/cinder [keystone_authtoken] auth_uri = http://{{ VIP_MGMT }}:5000/v2.0 diff --git a/roles/cinder_volume_ceph/templates/cinder.conf-2.j2 b/roles/cinder_volume_ceph/templates/cinder.conf-2.j2 index b77dbd8..fb8c6e0 100644 --- a/roles/cinder_volume_ceph/templates/cinder.conf-2.j2 +++ b/roles/cinder_volume_ceph/templates/cinder.conf-2.j2 @@ -25,7 +25,7 @@ my_ip = {{ controller02_mgmt_ip }} glance_host = {{ glance_host }} [database] -connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_MGMT }}/cinder +connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_DB }}/cinder [keystone_authtoken] auth_uri = http://{{ VIP_MGMT }}:5000/v2.0 diff --git a/roles/cinder_volume_ceph/templates/cinder.conf.j2 b/roles/cinder_volume_ceph/templates/cinder.conf.j2 index 41323ca..a335f3d 100644 --- a/roles/cinder_volume_ceph/templates/cinder.conf.j2 +++ b/roles/cinder_volume_ceph/templates/cinder.conf.j2 @@ -25,7 +25,7 @@ my_ip = {{ controller01_mgmt_ip }} glance_host = {{ glance_host }} [database] -connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_MGMT }}/cinder +connection = mysql://cinder:{{ cinder_db_password }}@{{ VIP_DB }}/cinder [keystone_authtoken] auth_uri = http://{{ VIP_MGMT }}:5000/v2.0 diff --git a/roles/compute_controller/templates/nova.conf-2.j2 b/roles/compute_controller/templates/nova.conf-2.j2 index 2458e14..e491bfe 100644 --- a/roles/compute_controller/templates/nova.conf-2.j2 +++ b/roles/compute_controller/templates/nova.conf-2.j2 @@ -24,7 +24,7 @@ network_api_class = nova.network.api.API security_group_api = nova [database] -connection = mysql://nova:{{ nova_db_password }}@{{ VIP_MGMT }}/nova +connection = mysql://nova:{{ nova_db_password }}@{{ VIP_DB }}/nova [keystone_authtoken] auth_uri = {{ auth_uri }} diff --git a/roles/compute_controller/templates/nova.conf.j2 b/roles/compute_controller/templates/nova.conf.j2 index c47ea3b..e248041 100644 --- a/roles/compute_controller/templates/nova.conf.j2 +++ b/roles/compute_controller/templates/nova.conf.j2 @@ -24,7 +24,7 @@ network_api_class = nova.network.api.API security_group_api = nova [database] -connection = mysql://nova:{{ nova_db_password }}@{{ VIP_MGMT }}/nova +connection = mysql://nova:{{ nova_db_password }}@{{ VIP_DB }}/nova [keystone_authtoken] auth_uri = {{ auth_uri }} diff --git a/roles/glance/templates/glance-api.conf.j2 b/roles/glance/templates/glance-api.conf.j2 index 75f6f5b..9c812fd 100644 --- a/roles/glance/templates/glance-api.conf.j2 +++ b/roles/glance/templates/glance-api.conf.j2 @@ -303,7 +303,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = mysql://glance:{{ glance_db_password }}@{{ VIP_MGMT }}/glance +connection = mysql://glance:{{ glance_db_password }}@{{ VIP_DB }}/glance # The SQL mode to be used for MySQL sessions. This option, # including the default, overrides any server-set SQL mode. To @@ -699,4 +699,4 @@ sheepdog_store_chunk_size = 64 #vmware_store_image_dir = /openstack_glance # Allow to perform insecure SSL requests to the target system (boolean value) -#vmware_api_insecure = False \ No newline at end of file +#vmware_api_insecure = False diff --git a/roles/glance/templates/glance-registry.conf.j2 b/roles/glance/templates/glance-registry.conf.j2 index 9e7c2d3..52ef1c8 100644 --- a/roles/glance/templates/glance-registry.conf.j2 +++ b/roles/glance/templates/glance-registry.conf.j2 @@ -142,7 +142,7 @@ backend = sqlalchemy # Deprecated group/name - [DEFAULT]/sql_connection # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection -connection = mysql://glance:{{ openstack_glance_pass }}@{{ VIP_MGMT }}/glance +connection = mysql://glance:{{ openstack_glance_pass }}@{{ VIP_DB }}/glance # The SQL mode to be used for MySQL sessions. This option, # including the default, overrides any server-set SQL mode. To @@ -244,4 +244,4 @@ flavor = keystone #enabled = False # If False doesn't trace SQL requests. -#trace_sqlalchemy = False \ No newline at end of file +#trace_sqlalchemy = False diff --git a/roles/heat_controller/templates/heat.conf.j2 b/roles/heat_controller/templates/heat.conf.j2 index 8823d26..0513e33 100644 --- a/roles/heat_controller/templates/heat.conf.j2 +++ b/roles/heat_controller/templates/heat.conf.j2 @@ -871,7 +871,7 @@ log_dir=/var/log/heat # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection= -connection = mysql://heat:{{ heat_db_password }}@{{ VIP_MGMT }}/heat +connection = mysql://heat:{{ heat_db_password }}@{{ VIP_DB }}/heat # The SQLAlchemy connection string to use to connect to the # slave database. (string value) diff --git a/roles/nova_network_controller/templates/nova.conf.j2 b/roles/nova_network_controller/templates/nova.conf.j2 index c6ca002..d4f3844 100644 --- a/roles/nova_network_controller/templates/nova.conf.j2 +++ b/roles/nova_network_controller/templates/nova.conf.j2 @@ -22,7 +22,7 @@ network_api_class = nova.network.api.API security_group_api = nova [database] -connection = mysql://nova:{{ nova_db_password }}@{{ VIP_MGMT }}/nova +connection = mysql://nova:{{ nova_db_password }}@{{ VIP_DB }}/nova [keystone_authtoken] auth_uri = {{ auth_uri }} diff --git a/roles/switch_glance_file/templates/glance-api.conf.j2 b/roles/switch_glance_file/templates/glance-api.conf.j2 index 370732a..579b636 100644 --- a/roles/switch_glance_file/templates/glance-api.conf.j2 +++ b/roles/switch_glance_file/templates/glance-api.conf.j2 @@ -301,7 +301,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = mysql://glance:{{ glance_db_password }}@{{ controller1_management_network_ip }}/glance +connection = mysql://glance:{{ glance_db_password }}@{{ VIP_DB }}/glance # The SQL mode to be used for MySQL sessions. This option, # including the default, overrides any server-set SQL mode. To @@ -696,4 +696,4 @@ sheepdog_store_chunk_size = 64 #vmware_store_image_dir = /openstack_glance # Allow to perform insecure SSL requests to the target system (boolean value) -#vmware_api_insecure = False \ No newline at end of file +#vmware_api_insecure = False diff --git a/roles/switch_glance_swift/templates/glance-api.conf.j2 b/roles/switch_glance_swift/templates/glance-api.conf.j2 index abfecde..e4b09f3 100644 --- a/roles/switch_glance_swift/templates/glance-api.conf.j2 +++ b/roles/switch_glance_swift/templates/glance-api.conf.j2 @@ -301,7 +301,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = mysql://glance:{{ glance_db_password }}@{{ controller1_management_network_ip }}/glance +connection = mysql://glance:{{ glance_db_password }}@{{ VIP_DB }}/glance # The SQL mode to be used for MySQL sessions. This option, # including the default, overrides any server-set SQL mode. To @@ -697,4 +697,4 @@ sheepdog_store_chunk_size = 64 #vmware_store_image_dir = /openstack_glance # Allow to perform insecure SSL requests to the target system (boolean value) -#vmware_api_insecure = False \ No newline at end of file +#vmware_api_insecure = False diff --git a/vars/openstack/openstack.yml b/vars/openstack/openstack.yml index 6559149..9846e8a 100644 --- a/vars/openstack/openstack.yml +++ b/vars/openstack/openstack.yml @@ -113,6 +113,7 @@ flat_interface: eth2 # Management network VIP and storage network VIP VIP_MGMT: 10.32.151.3 VIP_STORAGE: 192.168.1.3 +VIP_DB: 127.0.0.1 # Both of mariadb ips for HAProxy wsrep_cluster_address: 10.32.151.19,10.32.151.17