Merge "Implement designate-producer service"

This commit is contained in:
Zuul 2017-12-11 14:39:34 +00:00 committed by Gerrit Code Review
commit 88dd7eab53
10 changed files with 82 additions and 0 deletions

View File

@ -556,6 +556,9 @@ designate
[designate-central:children]
designate
[designate-producer:children]
designate
[designate-mdns:children]
network

View File

@ -575,6 +575,9 @@ designate
[designate-central:children]
designate
[designate-producer:children]
designate
[designate-mdns:children]
network

View File

@ -39,6 +39,15 @@ designate_services:
- "{{ node_config_directory }}/designate-mdns/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
designate-producer:
container_name: designate_producer
group: designate-producer
enabled: true
image: "{{ designate_producer_image_full }}"
volumes:
- "{{ node_config_directory }}/designate-producer/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
designate-worker:
container_name: designate_worker
group: designate-worker
@ -81,6 +90,10 @@ designate_central_image: "{{ docker_registry ~ '/' if docker_registry else '' }}
designate_central_tag: "{{ designate_tag }}"
designate_central_image_full: "{{ designate_central_image }}:{{ designate_central_tag }}"
designate_producer_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-producer"
designate_producer_tag: "{{ designate_tag }}"
designate_producer_image_full: "{{ designate_central_image }}:{{ designate_central_tag }}"
designate_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-api"
designate_api_tag: "{{ designate_tag }}"
designate_api_image_full: "{{ designate_api_image }}:{{ designate_api_tag }}"

View File

@ -67,6 +67,29 @@
or policy_json.changed | bool
or designate_central_container.changed | bool
- name: Restart designate-producer container
vars:
service_name: "designate-producer"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_conf: "{{ designate_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ designate_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_producer_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_conf.changed | bool
or policy_json.changed | bool
or designate_producer_container.changed | bool
- name: Restart designate-mdns container
vars:
service_name: "designate-mdns"

View File

@ -21,6 +21,7 @@
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-backend-bind9 container
@ -45,6 +46,7 @@
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-worker container
@ -135,6 +137,7 @@
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-worker container
@ -155,6 +158,7 @@
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-backend-bind9 container

View File

@ -5,6 +5,7 @@
- include: config.yml
when: inventory_hostname in groups['designate-api'] or
inventory_hostname in groups['designate-central'] or
inventory_hostname in groups['designate-producer'] or
inventory_hostname in groups['designate-mdns'] or
inventory_hostname in groups['designate-worker'] or
inventory_hostname in groups['designate-sink'] or

View File

@ -0,0 +1,25 @@
{
"command": "designate-producer --config-file /etc/designate/designate.conf",
"config_files": [
{
"source": "{{ container_config_directory }}/designate.conf",
"dest": "/etc/designate/designate.conf",
"owner": "designate",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/policy.json",
"dest": "/etc/designate/policy.json",
"owner": "designate",
"perm": "0600",
"optional": true
}
],
"permissions": [
{
"path": "/var/log/kolla/designate",
"owner": "designate:designate",
"recurse": true
}
]
}

View File

@ -49,6 +49,12 @@ enabled = True
notify = True
workers = {{ openstack_service_workers }}
[service:producer]
workers = {{ openstack_service_workers }}
threads = 1000
enabled_tasks = None
export_synchronous = True
[service:pool_manager]
cache_driver = sqlalchemy
pool_id = {{ designate_pool_id }}

View File

@ -566,6 +566,7 @@
hosts:
- designate-api
- designate-central
- designate-producer
- designate-mdns
- designate-worker
- designate-sink

View File

@ -0,0 +1,3 @@
---
features:
- Add designate-producer ansible role. Orchestrates periodic tasks that are run by designate.