Merge "add support for non-default database_port in kolla/ansible"

This commit is contained in:
Jenkins 2016-05-26 09:24:56 +00:00 committed by Gerrit Code Review
commit 6f17a71d7f
26 changed files with 42 additions and 25 deletions

View File

@ -44,6 +44,7 @@ kolla_enable_sanity_swift: "{{ kolla_enable_sanity_checks }}"
#################### ####################
database_address: "{{ kolla_internal_fqdn }}" database_address: "{{ kolla_internal_fqdn }}"
database_user: "root" database_user: "root"
database_port: "3306"
#################### ####################
@ -94,7 +95,7 @@ neutron_plugin_agent: "openvswitch"
# The default ports used by each service. # The default ports used by each service.
iscsi_port: "3260" iscsi_port: "3260"
mariadb_port: "3306" mariadb_port: "{{ database_port }}"
mariadb_wsrep_port: "4567" mariadb_wsrep_port: "4567"
mariadb_ist_port: "4568" mariadb_ist_port: "4568"
mariadb_sst_port: "4444" mariadb_sst_port: "4444"

View File

@ -24,7 +24,7 @@ cinder_backup_cache_mode: "{{ ceph_cinder_backup_cache_mode }}"
#################### ####################
cinder_database_name: "cinder" cinder_database_name: "cinder"
cinder_database_user: "cinder" cinder_database_user: "cinder"
cinder_database_address: "{{ kolla_internal_fqdn }}" cinder_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,6 +3,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ cinder_database_name }}'" name='{{ cinder_database_name }}'"
@ -21,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ cinder_database_name }}' name='{{ cinder_database_name }}'

View File

@ -23,7 +23,7 @@ glance_cache_mode: "{{ ceph_glance_cache_mode }}"
#################### ####################
glance_database_name: "glance" glance_database_name: "glance"
glance_database_user: "glance" glance_database_user: "glance"
glance_database_address: "{{ kolla_internal_fqdn }}" glance_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,8 +3,8 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_port='{{ mariadb_port }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ glance_database_name }}'" name='{{ glance_database_name }}'"
register: database register: database
@ -22,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ glance_database_name }}' name='{{ glance_database_name }}'

View File

@ -34,4 +34,4 @@
- name: Waiting for virtual IP to appear - name: Waiting for virtual IP to appear
wait_for: wait_for:
host: "{{ kolla_internal_vip_address }}" host: "{{ kolla_internal_vip_address }}"
port: "{{ mariadb_port }}" port: "{{ database_port }}"

View File

@ -6,7 +6,7 @@ project_name: "heat"
#################### ####################
heat_database_name: "heat" heat_database_name: "heat"
heat_database_user: "heat" heat_database_user: "heat"
heat_database_address: "{{ kolla_internal_fqdn }}" heat_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,8 +3,8 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_port='{{ mariadb_port }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ heat_database_name }}'" name='{{ heat_database_name }}'"
register: database register: database
@ -22,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ heat_database_name }}' name='{{ heat_database_name }}'

View File

@ -6,7 +6,7 @@ project_name: "ironic"
#################### ####################
ironic_database_name: "ironic" ironic_database_name: "ironic"
ironic_database_user: "ironic" ironic_database_user: "ironic"
ironic_database_address: "{{ kolla_internal_fqdn }}" ironic_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,7 +3,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ mariadb_port }}' login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ ironic_database_name }}'" name='{{ ironic_database_name }}'"
@ -22,7 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ mariadb_port }}' login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ ironic_database_name }}' name='{{ ironic_database_name }}'

View File

@ -6,7 +6,7 @@ project_name: "keystone"
#################### ####################
keystone_database_name: "keystone" keystone_database_name: "keystone"
keystone_database_user: "keystone" keystone_database_user: "keystone"
keystone_database_address: "{{ kolla_internal_fqdn }}" keystone_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,7 +3,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ mariadb_port }}' login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ keystone_database_name }}'" name='{{ keystone_database_name }}'"
@ -22,7 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ mariadb_port }}' login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ keystone_database_name }}' name='{{ keystone_database_name }}'

View File

@ -6,7 +6,7 @@ project_name: "magnum"
#################### ####################
magnum_database_name: "magnum" magnum_database_name: "magnum"
magnum_database_user: "magnum" magnum_database_user: "magnum"
magnum_database_address: "{{ kolla_internal_fqdn }}" magnum_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,6 +3,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ magnum_database_name }}'" name='{{ magnum_database_name }}'"
@ -21,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ magnum_database_name }}' name='{{ magnum_database_name }}'

View File

@ -6,7 +6,7 @@ project_name: "manila"
##################### #####################
manila_database_name: "manila" manila_database_name: "manila"
manila_database_user: "manila" manila_database_user: "manila"
manila_database_address: "{{ kolla_internal_fqdn }}" manila_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
##################### #####################

View File

@ -3,6 +3,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ manila_database_name }}'" name='{{ manila_database_name }}'"
@ -21,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ manila_database_name }}' name='{{ manila_database_name }}'

View File

@ -1,6 +1,6 @@
--- ---
- name: Waiting for MariaDB service to be ready through VIP - name: Waiting for MariaDB service to be ready through VIP
command: "docker exec mariadb mysql -h {{ kolla_internal_fqdn }} -u haproxy -e 'show databases;'" command: "docker exec mariadb mysql -h {{ kolla_internal_fqdn }} -P {{ mariadb_port }} -u haproxy -e 'show databases;'"
register: result register: result
until: result | success until: result | success
changed_when: False changed_when: False

View File

@ -6,7 +6,7 @@ project_name: "mistral"
#################### ####################
mistral_database_name: "mistral" mistral_database_name: "mistral"
mistral_database_user: "mistral" mistral_database_user: "mistral"
mistral_database_address: "{{ kolla_internal_fqdn }}" mistral_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,8 +3,8 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_port='{{ mariadb_port }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ mistral_database_name }}'" name='{{ mistral_database_name }}'"
register: database register: database
@ -22,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ mistral_database_name }}' name='{{ mistral_database_name }}'

View File

@ -6,7 +6,7 @@ project_name: "murano"
#################### ####################
murano_database_name: "murano" murano_database_name: "murano"
murano_database_user: "murano" murano_database_user: "murano"
murano_database_address: "{{ kolla_internal_fqdn }}" murano_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,8 +3,8 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_port='{{ mariadb_port }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ murano_database_name }}'" name='{{ murano_database_name }}'"
register: database register: database
@ -22,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ murano_database_name }}' name='{{ murano_database_name }}'

View File

@ -6,7 +6,7 @@ project_name: "neutron"
#################### ####################
neutron_database_name: "neutron" neutron_database_name: "neutron"
neutron_database_user: "neutron" neutron_database_user: "neutron"
neutron_database_address: "{{ kolla_internal_fqdn }}" neutron_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################

View File

@ -3,6 +3,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ neutron_database_name }}'" name='{{ neutron_database_name }}'"
@ -21,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ neutron_database_name }}' name='{{ neutron_database_name }}'

View File

@ -19,11 +19,11 @@ nova_cache_mode: "{{ ceph_nova_cache_mode }}"
#################### ####################
nova_database_name: "nova" nova_database_name: "nova"
nova_database_user: "nova" nova_database_user: "nova"
nova_database_address: "{{ kolla_internal_fqdn }}" nova_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
nova_api_database_name: "nova_api" nova_api_database_name: "nova_api"
nova_api_database_user: "nova_api" nova_api_database_user: "nova_api"
nova_api_database_address: "{{ kolla_internal_fqdn }}" nova_api_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
#################### ####################
# Docker # Docker

View File

@ -3,6 +3,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ nova_database_name }}'" name='{{ nova_database_name }}'"
@ -21,6 +22,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db -m mysql_db
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ nova_api_database_name }}'" name='{{ nova_api_database_name }}'"
@ -39,6 +41,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ nova_database_name }}' name='{{ nova_database_name }}'
@ -57,6 +60,7 @@
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user -m mysql_user
-a "login_host='{{ database_address }}' -a "login_host='{{ database_address }}'
login_port='{{ database_port }}'
login_user='{{ database_user }}' login_user='{{ database_user }}'
login_password='{{ database_password }}' login_password='{{ database_password }}'
name='{{ nova_api_database_name }}' name='{{ nova_api_database_name }}'

View File

@ -162,7 +162,7 @@
- name: Checking free port for MariaDB - name: Checking free port for MariaDB
wait_for: wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ mariadb_port }}" port: "{{ database_port }}"
connect_timeout: 1 connect_timeout: 1
state: stopped state: stopped
when: inventory_hostname in groups['mariadb'] when: inventory_hostname in groups['mariadb']
@ -170,7 +170,7 @@
- name: Checking free port for MariaDB HAProxy - name: Checking free port for MariaDB HAProxy
wait_for: wait_for:
host: "{{ kolla_internal_vip_address }}" host: "{{ kolla_internal_vip_address }}"
port: "{{ mariadb_port }}" port: "{{ database_port }}"
connect_timeout: 1 connect_timeout: 1
state: stopped state: stopped
when: inventory_hostname in groups['haproxy'] when: inventory_hostname in groups['haproxy']