Add integrated Trove deployment.
Change-Id: Ic71703960e2259edd25faa3e992c7fa9c6d28674
This commit is contained in:
parent
5bac2e595d
commit
951e241089
@ -90,6 +90,10 @@
|
||||
scm: git
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-os_magnum
|
||||
version: 3475d51c5b5f73d1cf6bc66bdfd1e8f6f7e7e5ff
|
||||
- name: os_trove
|
||||
scm: git
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-os_trove
|
||||
version: 252822cfc2950c54059103eeccfab1daacdda64d
|
||||
- name: os_neutron
|
||||
scm: git
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-os_neutron
|
||||
|
3
etc/openstack_deploy/conf.d/trove.yml.aio
Normal file
3
etc/openstack_deploy/conf.d/trove.yml.aio
Normal file
@ -0,0 +1,3 @@
|
||||
trove-infra_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
8
etc/openstack_deploy/conf.d/trove.yml.example
Normal file
8
etc/openstack_deploy/conf.d/trove.yml.example
Normal file
@ -0,0 +1,8 @@
|
||||
# The infra nodes that will be running the trove services
|
||||
trove-infra_hosts:
|
||||
infra1:
|
||||
ip: 172.20.236.111
|
||||
infra2:
|
||||
ip: 172.20.236.112
|
||||
infra3:
|
||||
ip: 172.20.236.113
|
@ -134,3 +134,8 @@ magnum_trustee_password:
|
||||
|
||||
## Rally Options:
|
||||
rally_galera_password:
|
||||
|
||||
## Trove Options
|
||||
trove_galera_password:
|
||||
trove_rabbitmq_password:
|
||||
trove_service_password:
|
||||
|
@ -181,3 +181,9 @@ magnum_git_repo: https://git.openstack.org/openstack/magnum
|
||||
magnum_git_install_branch: de227ba88ccc2936bcab09905345f23b42f57964 # HEAD of "stable/newton" as of 27.09.2016
|
||||
magnum_git_dest: "/opt/magnum_{{ magnum_git_install_branch | replace('/', '_') }}"
|
||||
magnum_git_project_group: magnum_all
|
||||
|
||||
## Trove service
|
||||
trove_git_repo: https://git.openstack.org/openstack/trove
|
||||
trove_git_install_branch: 41f3dd6920eb60d438e1542e9994319c08e44461 # HEAD of "master" as of 02.10.2016
|
||||
trove_git_dest: "/opt/trove_{{ trove_git_install_branch | replace('/', '_') }}"
|
||||
trove_git_project_group: trove_all
|
||||
|
59
playbooks/inventory/env.d/trove.yml
Normal file
59
playbooks/inventory/env.d/trove.yml
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
component_skel:
|
||||
trove_api:
|
||||
belongs_to:
|
||||
- trove_all
|
||||
trove_conductor:
|
||||
belongs_to:
|
||||
- trove_all
|
||||
trove_taskmanager:
|
||||
belongs_to:
|
||||
- trove_all
|
||||
|
||||
container_skel:
|
||||
trove_api_container:
|
||||
belongs_to:
|
||||
- trove-infra_containers
|
||||
contains:
|
||||
- trove_api
|
||||
properties:
|
||||
service_name: trove
|
||||
trove_conductor_container:
|
||||
belongs_to:
|
||||
- trove-infra_containers
|
||||
contains:
|
||||
- trove_conductor
|
||||
properties:
|
||||
service_name: trove
|
||||
trove_taskmanager_container:
|
||||
belongs_to:
|
||||
- trove-infra_containers
|
||||
contains:
|
||||
- trove_taskmanager
|
||||
properties:
|
||||
service_name: trove
|
||||
|
||||
physical_skel:
|
||||
trove-infra_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
trove-infra_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
@ -134,6 +134,7 @@ ceilometer_rabbitmq_host_group: "{{ rabbitmq_host_group }}"
|
||||
|
||||
## Cinder
|
||||
cinder_service_region: "{{ service_region }}"
|
||||
cinder_service_port: 8776
|
||||
# If there are Swift hosts in the environment, then enable cinder backups to it
|
||||
cinder_service_backup_program_enabled: "{{ groups['swift_all'] is defined and groups['swift_all'] | length > 0 }}"
|
||||
# cinder_backend_rbd_inuse: True if current host has an rbd backend
|
||||
@ -395,6 +396,7 @@ sahara_rabbitmq_telemetry_host_group: "{{ sahara_rabbitmq_host_group }}"
|
||||
sahara_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['sahara_all'] is defined) and (groups['ceilometer_all'] | length > 0) and (groups['sahara_all'] | length > 0) }}"
|
||||
|
||||
## Swift
|
||||
swift_proxy_port: 8080
|
||||
swift_system_user_name: swift
|
||||
swift_system_shell: /bin/bash
|
||||
swift_system_comment: swift system user
|
||||
|
42
playbooks/inventory/group_vars/trove_all.yml
Normal file
42
playbooks/inventory/group_vars/trove_all.yml
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
|
||||
trove_service_region: "{{ service_region }}"
|
||||
trove_galera_user: trove
|
||||
trove_galera_database_name: trove_service
|
||||
trove_galera_address: "{{ galera_address }}"
|
||||
|
||||
# RPC
|
||||
trove_rabbitmq_userid: trove
|
||||
trove_rabbitmq_vhost: /trove
|
||||
trove_rabbitmq_port: "{{ rabbitmq_port }}"
|
||||
trove_rabbitmq_servers: "{{ rabbitmq_servers }}"
|
||||
trove_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
|
||||
trove_rabbitmq_host_group: "{{ rabbitmq_host_group }}"
|
||||
|
||||
# Telemetry notifications
|
||||
trove_rabbitmq_telemetry_userid: "{{ trove_rabbitmq_userid }}"
|
||||
trove_rabbitmq_telemetry_password: "{{ trove_rabbitmq_password }}"
|
||||
trove_rabbitmq_telemetry_vhost: "{{ trove_rabbitmq_vhost }}"
|
||||
trove_rabbitmq_telemetry_port: "{{ trove_rabbitmq_port }}"
|
||||
trove_rabbitmq_telemetry_servers: "{{ trove_rabbitmq_servers }}"
|
||||
trove_rabbitmq_telemetry_use_ssl: "{{ trove_rabbitmq_use_ssl }}"
|
||||
trove_rabbitmq_telemetry_host_group: "{{ trove_rabbitmq_host_group }}"
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
trove_ceilometer_enabled: "{{ (groups['trove_all'] is defined) and (groups['trove_all'] | length > 0) and (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
trove_package_state: "{{ package_state }}"
|
82
playbooks/os-trove-install.yml
Normal file
82
playbooks/os-trove-install.yml
Normal file
@ -0,0 +1,82 @@
|
||||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
- name: Install trove server
|
||||
hosts: trove_all
|
||||
gather_facts: "{{ gather_facts | default(True) }}"
|
||||
user: root
|
||||
pre_tasks:
|
||||
- include: common-tasks/rabbitmq-servers-sort.yml
|
||||
vars:
|
||||
sort_group_name: "trove_all"
|
||||
- include: common-tasks/os-lxc-container-setup.yml
|
||||
- include: common-tasks/rabbitmq-vhost-user.yml
|
||||
static: no
|
||||
vars:
|
||||
user: "{{ trove_rabbitmq_userid }}"
|
||||
password: "{{ trove_rabbitmq_password }}"
|
||||
vhost: "{{ trove_rabbitmq_vhost }}"
|
||||
_rabbitmq_host_group: "{{ trove_rabbitmq_host_group }}"
|
||||
when:
|
||||
- inventory_hostname == groups['trove_all'][0]
|
||||
- groups[trove_rabbitmq_host_group] | length > 0
|
||||
- include: common-tasks/rabbitmq-vhost-user.yml
|
||||
static: no
|
||||
vars:
|
||||
user: "{{ trove_rabbitmq_telemetry_userid }}"
|
||||
password: "{{ trove_rabbitmq_telemetry_password }}"
|
||||
vhost: "{{ trove_rabbitmq_telemetry_vhost }}"
|
||||
_rabbitmq_host_group: "{{ trove_rabbitmq_telemetry_host_group }}"
|
||||
when:
|
||||
- trove_ceilometer_enabled | bool
|
||||
- inventory_hostname == groups['trove_all'][0]
|
||||
- groups[trove_rabbitmq_telemetry_host_group] is defined
|
||||
- groups[trove_rabbitmq_telemetry_host_group] | length > 0
|
||||
- groups[trove_rabbitmq_telemetry_host_group] != groups[trove_rabbitmq_host_group]
|
||||
- include: common-tasks/os-log-dir-setup.yml
|
||||
vars:
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-trove"
|
||||
dest: "/var/log/trove"
|
||||
- include: common-tasks/mysql-db-user.yml
|
||||
static: no
|
||||
vars:
|
||||
user_name: "{{ trove_galera_user }}"
|
||||
password: "{{ trove_galera_password }}"
|
||||
login_host: "{{ trove_galera_address }}"
|
||||
db_name: "{{ trove_galera_database }}"
|
||||
when: inventory_hostname == groups['trove_all'][0]
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "os_trove"
|
||||
trove_venv_tag: "{{ openstack_release }}"
|
||||
trove_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/trove-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
|
||||
- role: "openstack_openrc"
|
||||
tags:
|
||||
- openrc
|
||||
- role: "rsyslog_client"
|
||||
rsyslog_client_log_rotate_file: trove_log_rotate
|
||||
rsyslog_client_log_dir: "/var/log/trove"
|
||||
rsyslog_client_config_name: "99-trove-rsyslog-client.conf"
|
||||
tags:
|
||||
- rsyslog
|
||||
vars:
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"
|
||||
tags:
|
||||
- trove
|
@ -33,4 +33,5 @@
|
||||
- include: os-gnocchi-install.yml
|
||||
- include: os-ironic-install.yml
|
||||
- include: os-magnum-install.yml
|
||||
- include: os-trove-install.yml
|
||||
- include: os-sahara-install.yml
|
||||
|
@ -252,3 +252,11 @@ haproxy_default_services:
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "httpchk GET /"
|
||||
- service:
|
||||
haproxy_service_name: trove
|
||||
haproxy_backend_nodes: "{{ groups['trove_api'] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_port: 8779
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "httpchk HEAD /"
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- Experimental support has been added to allow the deployment of the
|
||||
the OpenStack trove service when hosts are present in the host
|
||||
group ``trove-infra_hosts``.
|
@ -220,6 +220,16 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'magnum-infra_hosts',
|
||||
'magnum_all',
|
||||
'magnum_container',
|
||||
'trove_all',
|
||||
'trove_api',
|
||||
'trove_conductor',
|
||||
'trove_taskmanager',
|
||||
'trove_conductor_container',
|
||||
'trove_api_container',
|
||||
'trove_taskmanager_container',
|
||||
'trove-infra_containers',
|
||||
'trove-infra_hosts',
|
||||
'trove-infra_all',
|
||||
'memcached',
|
||||
'memcached_all',
|
||||
'memcached_container',
|
||||
|
Loading…
Reference in New Issue
Block a user