Fix missing tacker-conductor service

Tacker has included a new conductor service
to manage mistral workflows for VIM monitoring.

Without conductor, Tacker cannot create VIMs.

This change reworks tacker to include tacker-conductor
service.

Depends-On: I52778e86e4f2c297ead8d4b09983e5e38ca88c70
Closes-Bug: #1710874
Change-Id: I6901e919887551bedc9dba8983ac904e8c48c9ce
This commit is contained in:
Eduardo Gonzalez 2017-06-26 14:35:05 +02:00
parent 7db9ce7c3e
commit ecc022177c
16 changed files with 144 additions and 38 deletions

View File

@ -574,3 +574,9 @@ skydive
compute
network
# Tacker
[tacker-server:children]
tacker
[tacker-conductor:children]
tacker

View File

@ -591,3 +591,10 @@ skydive
[skydive-agent:children]
compute
network
# Tacker
[tacker-server:children]
tacker
[tacker-conductor:children]
tacker

View File

@ -30,4 +30,5 @@
rewriterule27 programname ^(gnocchi-api|gnocchi-statsd|gnocchi-metricd|gnocchi-upgrade)$ openstack_python
rewriterule28 programname ^(ironic-api|ironic-conductor)$ openstack_python
rewriterule29 programname ^(panko-api|panko-dbsync)$ openstack_python
rewriterule30 programname ^(tacker-server|tacker-conductor)$ openstack_python
</match>

View File

@ -2,13 +2,22 @@
project_name: "tacker"
tacker_services:
tacker:
container_name: "tacker"
group: "tacker"
tacker-server:
container_name: "tacker_server"
group: "tacker-server"
enabled: true
image: "{{ tacker_image_full }}"
image: "{{ tacker_server_image_full }}"
volumes:
- "{{ node_config_directory }}/tacker/:{{ container_config_directory }}/:ro"
- "{{ node_config_directory }}/tacker-server/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
tacker-conductor:
container_name: "tacker_conductor"
group: "tacker-conductor"
enabled: true
image: "{{ tacker_conductor_image_full }}"
volumes:
- "{{ node_config_directory }}/tacker-conductor/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
@ -22,9 +31,16 @@ tacker_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
########
# Docker
########
tacker_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-tacker"
tacker_install_type: "{{ kolla_install_type }}"
tacker_tag: "{{ openstack_release }}"
tacker_image_full: "{{ tacker_image }}:{{ tacker_tag }}"
tacker_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ tacker_install_type }}-tacker-server"
tacker_server_tag: "{{ tacker_tag }}"
tacker_server_image_full: "{{ tacker_server_image }}:{{ tacker_server_tag }}"
tacker_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ tacker_install_type }}-tacker-conductor"
tacker_conductor_tag: "{{ tacker_tag }}"
tacker_conductor_image_full: "{{ tacker_conductor_image }}:{{ tacker_conductor_tag }}"
####################
# OpenStack

View File

@ -1,12 +1,12 @@
---
- name: Restart tacker container
- name: Restart tacker-conductor container
vars:
service_name: "tacker"
service_name: "tacker-conductor"
service: "{{ tacker_services[service_name] }}"
config_json: "{{ tacker_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
tacker_conf: "{{ tacker_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ tacker_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
tacker_container: "{{ check_tacker_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
tacker_conductor_container: "{{ check_tacker_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
@ -20,4 +20,27 @@
- config_json.changed | bool
or tacker_conf.changed | bool
or policy_json.changed | bool
or tacker_container.changed | bool
or tacker_conductor_container.changed | bool
- name: Restart tacker-server container
vars:
service_name: "tacker-server"
service: "{{ tacker_services[service_name] }}"
config_json: "{{ tacker_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
tacker_conf: "{{ tacker_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ tacker_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
tacker_server_container: "{{ check_tacker_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|reject('equalto', '')|list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or tacker_conf.changed | bool
or policy_json.changed | bool
or tacker_server_container.changed | bool

View File

@ -10,7 +10,7 @@
name: "{{ tacker_database_name }}"
register: database
run_once: True
delegate_to: "{{ groups['tacker'][0] }}"
delegate_to: "{{ groups['tacker-server'][0] }}"
- name: Creating tacker database user and setting permissions
kolla_toolbox:
@ -26,7 +26,7 @@
priv: "{{ tacker_database_name }}.*:ALL"
append_privs: "yes"
run_once: True
delegate_to: "{{ groups['tacker'][0] }}"
delegate_to: "{{ groups['tacker-server'][0] }}"
- include: bootstrap_service.yml
when: database.changed

View File

@ -1,7 +1,7 @@
---
- name: Running tacker bootstrap container
vars:
tacker: "{{ tacker_services.tacker }}"
tacker_server: "{{ tacker_services['tacker-server'] }}"
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
@ -9,11 +9,11 @@
environment:
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
image: "{{ tacker.image }}"
image: "{{ tacker_server.image }}"
labels:
BOOTSTRAP:
name: "bootstrap_tacker"
restart_policy: "never"
volumes: "{{ tacker.volumes|reject('equalto', '')|list }}"
volumes: "{{ tacker_server.volumes|reject('equalto', '')|list }}"
run_once: True
delegate_to: "{{ groups[tacker.group][0] }}"
delegate_to: "{{ groups[tacker_server.group][0] }}"

View File

@ -19,7 +19,8 @@
- inventory_hostname in groups[item.value.group]
- item.value.enabled
notify:
- Restart tacker container
- Restart tacker-server container
- Restart tacker-conductor container
- name: Copying over tacker.conf
vars:
@ -40,7 +41,8 @@
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
notify:
- Restart tacker container
- Restart tacker-server container
- Restart tacker-conductor container
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/tacker/policy.json"
@ -58,7 +60,8 @@
- tacker_policy.stat.exists
with_dict: "{{ tacker_services }}"
notify:
- Restart tacker container
- Restart tacker-server containers
- Restart tacker-conductor container
- name: Check tacker container
kolla_docker:
@ -73,4 +76,5 @@
register: check_tacker_containers
with_dict: "{{ tacker_services }}"
notify:
- Restart tacker container
- Restart tacker-server container
- Restart tacker-conductor container

View File

@ -1,9 +1,13 @@
---
- include: register.yml
when: inventory_hostname in groups['tacker-server']
- include: config.yml
when: inventory_hostname in groups['tacker-server'] or
inventory_hostname in groups['tacker-conductor']
- include: bootstrap.yml
when: inventory_hostname in groups['tacker-server']
- name: Flush handlers
meta: flush_handlers

View File

@ -2,7 +2,7 @@
- name: Get container facts
kolla_container_facts:
name:
- tacker
- tacker_server
register: container_facts
- name: Checking free port for Tacker Server
@ -13,5 +13,5 @@
timeout: 1
state: stopped
when:
- container_facts['tacker'] is not defined
- inventory_hostname in groups['tacker']
- container_facts['tacker_server'] is not defined
- inventory_hostname in groups['tacker-server']

View File

@ -1,5 +1,5 @@
---
- name: Pulling tacker image
- name: Pulling tacker images
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"

View File

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

View File

@ -1,6 +1,5 @@
[DEFAULT]
debug = {{ tacker_logging_debug }}
log_dir = /var/log/kolla/tacker
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
@ -8,6 +7,7 @@ transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}
bind_host = {{ api_interface_address }}
bind_port = {{ tacker_server_port }}
api_workers = {{ openstack_service_workers }}
service_plugins = nfvo,vnfm
{% if enable_nova | bool %}
nova_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ nova_api_port }}
@ -16,22 +16,29 @@ nova_admin_password = {{ nova_keystone_password }}
nova_admin_tenant_id = service
nova_admin_auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
[tacker]
monitor_driver = ping,http_ping
{% if enable_ceilometer | bool %}
alarm_monitor_driver = ceilometer
{% endif %}
[tacker_nova]
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
auth_type = password
project_domain_id = {{ default_project_domain_id }}
user_domain_id = {{ default_user_domain_id }}
project_domain_name = {{ default_project_domain_id }}
user_domain_name = {{ default_user_domain_id }}
project_name = service
username = {{ nova_keystone_user }}
password = {{ nova_keystone_password }}
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
{% endif %}
[nfvo]
vim_drivers = openstack
{% if enable_barbican | bool %}
[vim_keys]
use_barbican = True
{% endif %}
[tacker]
monitor_driver = ping,http_ping
{% if enable_ceilometer | bool %}
alarm_monitor_driver = ceilometer
{% endif %}
[database]
@ -42,8 +49,8 @@ max_retries = -1
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
auth_type = password
project_domain_id = {{ default_project_domain_id }}
user_domain_id = {{ default_user_domain_id }}
project_domain_name = {{ default_project_domain_id }}
user_domain_name = {{ default_user_domain_id }}
project_name = service
username = {{ tacker_keystone_user }}
password = {{ tacker_keystone_password }}

View File

@ -663,7 +663,9 @@
- name: Apply role tacker
gather_facts: false
hosts: tacker
hosts:
- tacker-server
- tacker-conductor
serial: '{{ serial|default("0") }}'
roles:
- { role: tacker,

View File

@ -0,0 +1,11 @@
---
features:
- |
New Tacker conductor service is implemented.
upgrade:
- |
To support new tacker-conductor service, tacker role has been
reformated, before upgrade, tacker-server and tacker-conductor
groups should be included in inventory files.
- Tacker requires Mistral service to be enabled as of Pike release
to implement vim monitoring.