Merge "Rename role name to service name"
This commit is contained in:
commit
e9db94135d
@ -15,10 +15,10 @@ localhost ansible_connection=local
|
||||
[haproxy:children]
|
||||
support
|
||||
|
||||
[database:children]
|
||||
[mariadb:children]
|
||||
support
|
||||
|
||||
[message-broker:children]
|
||||
[rabbitmq:children]
|
||||
support
|
||||
|
||||
[keystone:children]
|
||||
|
@ -18,10 +18,10 @@ compute01
|
||||
[haproxy:children]
|
||||
support
|
||||
|
||||
[database:children]
|
||||
[mariadb:children]
|
||||
support
|
||||
|
||||
[message-broker:children]
|
||||
[rabbitmq:children]
|
||||
support
|
||||
|
||||
[keystone:children]
|
||||
|
@ -21,7 +21,7 @@ listen mariadb
|
||||
|
||||
# TODO(SamYaple): Make DB port configurable throughout Ansible
|
||||
bind {{ kolla_internal_address }}:3306
|
||||
{% for host in groups['database'] %}
|
||||
{% for host in groups['mariadb'] %}
|
||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:3306 check inter 2000 rise 2 fall 5 {% if not loop.first %}backup{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
@ -32,7 +32,7 @@ listen rabbitmq
|
||||
|
||||
# TODO(SamYaple): Make rabbitmq port configurable throughout Ansible
|
||||
bind {{ kolla_internal_address }}:5672
|
||||
{% for host in groups['message-broker'] %}
|
||||
{% for host in groups['rabbitmq'] %}
|
||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:5672 check inter 2000 rise 2 fall 5
|
||||
{% endfor %}
|
||||
|
||||
|
@ -8,7 +8,7 @@ vrrp_instance Floating {
|
||||
state MASTER
|
||||
interface {{ api_interface }}
|
||||
virtual_router_id 51
|
||||
priority {{ groups['database'].index(inventory_hostname) }}
|
||||
priority {{ groups['rabbitmq'].index(inventory_hostname) }}
|
||||
advert_int 1
|
||||
virtual_ipaddress {
|
||||
{{ kolla_internal_address }}
|
||||
|
@ -57,4 +57,4 @@
|
||||
- "{{ node_config_directory }}/mariadb/:/opt/kolla/mariadb/:ro"
|
||||
container_volumes_from:
|
||||
- "mariadb_data"
|
||||
when: delegate_host == 'None' and inventory_hostname == groups['database'][0]
|
||||
when: delegate_host == 'None' and inventory_hostname == groups['mariadb'][0]
|
@ -3,7 +3,7 @@
|
||||
vars:
|
||||
service_name: "mariadb"
|
||||
config_source:
|
||||
- "roles/database/templates/galera.cnf.j2"
|
||||
- "roles/mariadb/templates/galera.cnf.j2"
|
||||
config_template_dest:
|
||||
- "{{ node_templates_directory }}/mariadb/galera.cnf_minimal"
|
||||
config_dest: "{{ node_config_directory }}/mariadb/galera.cnf"
|
@ -9,5 +9,5 @@
|
||||
- "{{ node_config_directory }}/mariadb/:/opt/kolla/mariadb/:ro"
|
||||
container_volumes_from:
|
||||
- "mariadb_data"
|
||||
when: delegate_host != 'None' or (groups['database'] | length) == 1 or
|
||||
( delegate_host == 'None' and inventory_hostname != groups['database'][0] )
|
||||
when: delegate_host != 'None' or (groups['mariadb'] | length) == 1 or
|
||||
( delegate_host == 'None' and inventory_hostname != groups['mariadb'][0] )
|
@ -8,7 +8,7 @@ query_cache_type=0
|
||||
innodb_log_file_size=48M
|
||||
|
||||
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
|
||||
wsrep_cluster_address=gcomm://{% if (groups['database'] | length) > 1 %}{% for host in groups['database'] %}{{ hostvars[host]['ansible_hostname'] }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
|
||||
wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for host in groups['mariadb'] %}{{ hostvars[host]['ansible_hostname'] }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
|
||||
|
||||
wsrep_cluster_name="{{ database_cluster_name }}"
|
||||
wsrep_node_address={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
|
@ -10,7 +10,7 @@
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- { src: "roles/message-broker/templates/rabbitmq-env.conf.j2",
|
||||
- { src: "rabbitmq-env.conf.j2",
|
||||
dest: "{{ node_config_directory }}/rabbitmq/rabbitmq-env.conf" }
|
||||
- { src: "roles/message-broker/templates/rabbitmq.config.j2",
|
||||
- { src: "rabbitmq.config.j2",
|
||||
dest: "{{ node_config_directory }}/rabbitmq/rabbitmq.config" }
|
@ -10,7 +10,7 @@
|
||||
{default_pass, <<"{{ rabbitmq_password }}">>},
|
||||
{cluster_partition_handling, autoheal},
|
||||
{cluster_nodes, [
|
||||
{% for host in groups['database'] %}'rabbit@{{ hostvars[host]['ansible_hostname'] }}'{% if not loop.last %},{% endif %}{% endfor %}
|
||||
{% for host in groups['rabbitmq'] %}'rabbit@{{ hostvars[host]['ansible_hostname'] }}'{% if not loop.last %},{% endif %}{% endfor %}
|
||||
|
||||
]}
|
||||
]},
|
@ -4,16 +4,15 @@
|
||||
- haproxy
|
||||
tags: haproxy
|
||||
|
||||
- hosts: database
|
||||
- hosts: mariadb
|
||||
roles:
|
||||
- database
|
||||
tags:
|
||||
- database
|
||||
- mariadb
|
||||
tags: mariadb
|
||||
|
||||
- hosts: message-broker
|
||||
- hosts: rabbitmq
|
||||
roles:
|
||||
- message-broker
|
||||
tags: message-broker
|
||||
- rabbitmq
|
||||
tags: rabbitmq
|
||||
|
||||
- hosts: keystone
|
||||
roles:
|
||||
|
@ -86,8 +86,8 @@ To run the playbooks for only a particular service, Ansible tags can be used.
|
||||
Multiple tags may be specified, and order is still determined by the playbooks.
|
||||
|
||||
cd ./kolla/ansible
|
||||
ansible-playbook -i inventory/all-in-one -e @/etc/kolla/defaults.yml -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml site.yml --tags message-broker
|
||||
ansible-playbook -i inventory/all-in-one -e @/etc/kolla/defaults.yml -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml site.yml --tags message-broker,database
|
||||
ansible-playbook -i inventory/all-in-one -e @/etc/kolla/defaults.yml -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml site.yml --tags rabbitmq
|
||||
ansible-playbook -i inventory/all-in-one -e @/etc/kolla/defaults.yml -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml site.yml --tags rabbitmq,mariadb
|
||||
|
||||
|
||||
Further Reading
|
||||
|
Loading…
x
Reference in New Issue
Block a user