Add support to deploy placement

Depends-On: I7600f1750538335c1348e7d042e6bf450910e12c
Depends-On: Id9bd94923e05b3911a9dfd4e10c43f4c0ab81b9b
Depends-On: I1ee165b06fe6c6a840784565a7a661b11bf9ebff
Depends-On: I4619d333187a0e96c1b60fe2f203df0838c12059
Change-Id: Iae04e60622d1ecde78676c105e35655541065d04
This commit is contained in:
Guilherme Steinmüller 2019-05-02 22:35:15 +00:00 committed by Jesse Pretorius (odyssey4me)
parent d1d3aeeca6
commit 8393ad3cbc
17 changed files with 178 additions and 9 deletions

View File

@ -168,6 +168,11 @@
src: https://opendev.org/openstack/openstack-ansible-os_panko
version: master
trackbranch: master
- name: os_placement
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_placement
version: master
trackbranch: master
- name: os_rally
scm: git
src: https://opendev.org/openstack/openstack-ansible-os_rally

View File

@ -0,0 +1,3 @@
placement-infra_hosts:
aio1:
ip: 172.29.236.100

View File

@ -0,0 +1,8 @@
# The infra nodes that will be running the placement services
placement-infra_hosts:
infra1:
ip: 172.20.236.111
infra2:
ip: 172.20.236.112
infra3:
ip: 172.20.236.113

View File

@ -99,6 +99,9 @@ container_skel:
panko_container:
properties:
is_metal: true
placement_container:
properties:
is_metal: true
repo_container:
properties:
is_metal: true

View File

@ -285,3 +285,10 @@ manila_profiler_hmac_key:
# your user variables.
#manila_oslomsg_notify_password:
manila_service_password:
# Placement Options
# TODO(logan): Replace nova_placement_service_password with
# this var and add an upgrade playbook cleaning up the old
# var from user_secrets before releasing Train
# placement_service_password:
placement_galera_password:

View File

@ -0,0 +1,36 @@
---
# Copyright 2019, VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
component_skel:
placement_api:
belongs_to:
- placement_all
container_skel:
placement_container:
belongs_to:
- os-infra_containers
- placement-infra_containers
contains:
- placement_api
physical_skel:
placement-infra_containers:
belongs_to:
- all_containers
placement-infra_hosts:
belongs_to:
- hosts

View File

@ -160,18 +160,17 @@ haproxy_default_services:
- "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
haproxy_service_enabled: "{{ groups['nova_api_os_compute'] is defined and groups['nova_api_os_compute'] | length > 0 }}"
- service:
haproxy_service_name: nova_api_placement
haproxy_backend_nodes: "{{ groups['nova_api_placement'] | default([]) }}"
haproxy_ssl: False
haproxy_bind: "{{ [internal_lb_vip_address] }}"
haproxy_service_name: placement
haproxy_backend_nodes: "{{ groups['placement_all'] | default([]) }}"
haproxy_ssl: "{{ haproxy_ssl }}"
haproxy_port: 8780
haproxy_balance_type: http
haproxy_backend_options:
- "httpchk GET / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
haproxy_backend_httpcheck_options:
- "expect status 200"
haproxy_whitelist_networks: "{{ haproxy_nova_placement_whitelist_networks }}"
haproxy_service_enabled: "{{ groups['nova_api_placement'] is defined and groups['nova_api_placement'] | length > 0 }}"
haproxy_service_enabled: "{{ groups['placement_all'] is defined and groups['placement_all'] | length > 0 }}"
- service:
haproxy_service_name: nova_api_placement
state: absent
- service:
haproxy_service_name: nova_console
haproxy_backend_nodes: "{{ groups['nova_console'] | default([]) }}"

View File

@ -67,3 +67,7 @@ nova_reserved_host_disk_mb: 0
neutron_designate_enabled: "{{ hostvars['localhost']['neutron_designate_enabled'] }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
neutron_ceilometer_enabled: "{{ hostvars['localhost']['neutron_ceilometer_enabled'] }}"
# TODO(logan): Remove this once placement is removed from os_nova
# Placement is now implemented as a separate service
nova_placement_service_enabled: False

View File

@ -0,0 +1,29 @@
---
# Copyright 2019, VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
placement_service_port: 8780
placement_service_proto: http
placement_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(placement_service_proto) }}"
placement_service_publicurl: "{{ placement_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ placement_service_port }}"
placement_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(placement_service_proto) }}"
placement_service_internalurl: "{{ placement_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ placement_service_port }}"
placement_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(placement_service_proto) }}"
placement_service_adminurl: "{{ placement_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ placement_service_port }}"
placement_service_region: "{{ service_region }}"
# TODO(logan): Remove this before releasing Train after adding
# placement_service_password to user_secrets and cleaning up the old
# secret in an upgrade playbook
placement_service_password: "{{ nova_placement_service_password }}"

View File

@ -206,6 +206,9 @@ nova_scheduler
[panko_all:children]
panko_api
[placement_all:children]
placement_api
[rsyslog_all]
[sahara_all:children]

View File

@ -54,6 +54,7 @@ nova_bin: /usr/bin
octavia_install_method: distro
octavia_bin: /usr/bin
panko_install_method: distro
placement_install_method: distro
rally_install_method: distro
sahara_install_method: distro
searchlight_install_method: distro

View File

@ -301,6 +301,11 @@ panko_git_install_branch: 91f809625560d770f39299f782eff2b56ec84874 # HEAD as of
panko_git_project_group: panko_all
panko_git_track_branch: master
## Placement service
placement_git_repo: https://git.openstack.org/openstack/placement
placement_git_install_branch: 8f2a400208d6abb96e7c6feec68fae4dc31095ec # HEAD as of 02.05.2019
placement_git_project_group: placement_all
placement_git_track_branch: master
## Tacker service
tacker_git_repo: https://opendev.org/openstack/tacker

View File

@ -0,0 +1,55 @@
---
# Copyright 2019, VEXXHOST, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Install placement components
hosts: placement_all
gather_facts: "{{ osa_gather_facts | default(True) }}"
environment: "{{ deployment_environment_variables | default({}) }}"
user: root
vars_files:
- "defaults/{{ install_method }}_install.yml"
tags:
- placement
pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal
- name: Configure log directories (on metal)
include_tasks: common-tasks/os-log-dir-setup.yml
vars:
log_dirs:
- src: "/openstack/log/{{ inventory_hostname }}-placement"
dest: "/var/log/placement"
- include_tasks: common-tasks/unbound-clients.yml
when:
- hostvars['localhost']['resolvconf_enabled'] | bool
- name: Configure package proxy cache
include_tasks: common-tasks/package-cache-proxy.yml
when: install_method == "source"
roles:
- role: "os_placement"
- role: "system_crontab_coordination"
tags:
- crontab
post_tasks:
- include_tasks: "common-tasks/rsyslog-client.yml"
vars:
rsyslog_client_log_rotate_file: placement_log_rotate
rsyslog_client_log_dir: "/var/log/placement"
rsyslog_client_config_name: "99-placement-rsyslog-client.conf"

View File

@ -15,6 +15,7 @@
- import_playbook: os-keystone-install.yml
- import_playbook: os-barbican-install.yml
- import_playbook: os-placement-install.yml
- import_playbook: os-glance-install.yml
- import_playbook: os-cinder-install.yml
- import_playbook: os-nova-install.yml

View File

@ -0,0 +1,4 @@
---
features:
- A new playbook ``os-placement-install.yml`` has been added which will deploy the new placement
service to hosts assigned to the host group ``placement-infra_hosts``.

View File

@ -33,7 +33,7 @@ bootstrap_host_services: >-
{%- set _ = service_list.append('haproxy') %}
{%- endif %}
{%- if 'aio' in scenario_list or 'translations' in scenario_list %}
{%- set _ = service_list.extend(['cinder', 'glance', 'neutron', 'nova']) %}
{%- set _ = service_list.extend(['cinder', 'glance', 'neutron', 'nova', 'placement']) %}
{%- if 'metal' not in scenario_list %}
{%- set _ = service_list.append('horizon') %}
{%- endif %}

View File

@ -327,6 +327,12 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'panko_all',
'panko_api',
'panko_container',
'placement-infra_all',
'placement-infra_containers',
'placement-infra_hosts',
'placement_all',
'placement_container',
'placement_api',
'policy_all',
'policy_containers',
'policy_hosts',