Implement designate-producer service
Depends-On: Ia22128e5ce4a717612af658d63258e78e52176ad Implements: blueprint designate-producer Change-Id: I98b5e99e8fcfe18fde442b317348ec261f4d2f99
This commit is contained in:
parent
4d8816a045
commit
b82f5cc9f0
@ -556,6 +556,9 @@ designate
|
||||
[designate-central:children]
|
||||
designate
|
||||
|
||||
[designate-producer:children]
|
||||
designate
|
||||
|
||||
[designate-mdns:children]
|
||||
network
|
||||
|
||||
|
@ -574,6 +574,9 @@ designate
|
||||
[designate-central:children]
|
||||
designate
|
||||
|
||||
[designate-producer:children]
|
||||
designate
|
||||
|
||||
[designate-mdns:children]
|
||||
network
|
||||
|
||||
|
@ -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 }}"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
25
ansible/roles/designate/templates/designate-producer.json.j2
Normal file
25
ansible/roles/designate/templates/designate-producer.json.j2
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
@ -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 }}
|
||||
|
@ -566,6 +566,7 @@
|
||||
hosts:
|
||||
- designate-api
|
||||
- designate-central
|
||||
- designate-producer
|
||||
- designate-mdns
|
||||
- designate-worker
|
||||
- designate-sink
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add designate-producer ansible role. Orchestrates periodic tasks that are run by designate.
|
Loading…
Reference in New Issue
Block a user