Integrate cloudkitty
Integrate the required bits to make Cloudkitty deploy without having to hand-pick files from the os_cloudkitty repo Change-Id: Id191e07eab2bef84dad30e55f59fd914b0358bfe
This commit is contained in:
parent
8fbac7c4f3
commit
77068780b2
4
etc/openstack_deploy/conf.d/cloudkitty.yml.aio
Normal file
4
etc/openstack_deploy/conf.d/cloudkitty.yml.aio
Normal file
@ -0,0 +1,4 @@
|
||||
# The controller host that will be running the cloudkitty services
|
||||
cloudkitty_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
8
etc/openstack_deploy/conf.d/cloudkitty.yml.example
Normal file
8
etc/openstack_deploy/conf.d/cloudkitty.yml.example
Normal file
@ -0,0 +1,8 @@
|
||||
# The infra nodes that will be running the cloudkitty services
|
||||
cloudkitty_hosts:
|
||||
infra1:
|
||||
ip: 172.20.236.111
|
||||
infra2:
|
||||
ip: 172.20.236.112
|
||||
infra3:
|
||||
ip: 172.20.236.113
|
@ -80,6 +80,16 @@ cinder_oslomsg_rpc_password:
|
||||
## Ceph/rbd: a UUID to be used by libvirt to refer to the client.cinder user
|
||||
cinder_ceph_client_uuid:
|
||||
|
||||
## Cloudkitty Options
|
||||
cloudkitty_container_mysql_password:
|
||||
cloudkitty_service_password:
|
||||
cloudkitty_oslomsg_rpc_password:
|
||||
#NOTE: Please uncomment those
|
||||
# if you want to split rpc and notify users
|
||||
# Please also wire the appropriate userid in
|
||||
# your user variables.
|
||||
#cloudkitty_oslomsg_notify_password:
|
||||
|
||||
## Glance Options
|
||||
glance_container_mysql_password:
|
||||
glance_service_password:
|
||||
|
24
inventory/env.d/cloudkitty.yml
Normal file
24
inventory/env.d/cloudkitty.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
component_skel:
|
||||
cloudkitty_api:
|
||||
belongs_to:
|
||||
- cloudkitty_all
|
||||
cloudkitty_engine:
|
||||
belongs_to:
|
||||
- cloudkitty_all
|
||||
|
||||
container_skel:
|
||||
cloudkitty_container:
|
||||
belongs_to:
|
||||
- cloudkitty_containers
|
||||
contains:
|
||||
- cloudkitty_api
|
||||
- cloudkitty_engine
|
||||
|
||||
physical_skel:
|
||||
cloudkitty_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
cloudkitty_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
@ -99,6 +99,18 @@ haproxy_cinder_api_service:
|
||||
- "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
haproxy_service_enabled: "{{ groups['cinder_api'] is defined and groups['cinder_api'] | length > 0 }}"
|
||||
|
||||
haproxy_cloudkitty_api_service:
|
||||
haproxy_service_name: cloudkitty_api
|
||||
haproxy_backend_nodes: "{{ groups['cloudkitty_api'] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_ssl_all_vips: "{{ haproxy_ssl_all_vips }}"
|
||||
haproxy_port: 8089
|
||||
haproxy_balance_type: http
|
||||
haproxy_balance_alg: source
|
||||
haproxy_backend_options:
|
||||
- "httpchk GET / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
haproxy_service_enabled: "{{ groups['cloudkitty_api'] is defined and groups['cloudkitty_api'] | length > 0 }}"
|
||||
|
||||
haproxy_designate_api_service:
|
||||
haproxy_service_name: designate_api
|
||||
haproxy_backend_nodes: "{{ groups['designate_api'] | default([]) }}"
|
||||
@ -558,6 +570,7 @@ haproxy_default_services:
|
||||
- service: "{{ haproxy_barbican_service }}"
|
||||
- service: "{{ haproxy_ceph_rgw_service }}"
|
||||
- service: "{{ haproxy_cinder_api_service }}"
|
||||
- service: "{{ haproxy_cloudkitty_api_service }}"
|
||||
- service: "{{ haproxy_designate_api_service }}"
|
||||
- service: "{{ haproxy_galera_service }}"
|
||||
- service: "{{ haproxy_glance_api_service }}"
|
||||
|
@ -16,6 +16,7 @@
|
||||
horizon_external_ssl: "{{ openstack_external_ssl }}"
|
||||
horizon_service_region: "{{ service_region }}"
|
||||
horizon_enable_cinder_backup: "{{ hostvars['localhost']['cinder_service_backup_program_enabled'] }}"
|
||||
horizon_enable_cloudkitty_ui: "{{ (groups['cloudkitty_all'] is defined) and (groups['cloudkitty_all'] | length > 0) }}"
|
||||
horizon_enable_adjutant_ui: "{{ (groups['adjutant_all'] is defined) and (groups['adjutant_all'] | length > 0) }}"
|
||||
horizon_enable_blazar_ui: "{{ (groups['blazar_all'] is defined) and (groups['blazar_all'] | length > 0) }}"
|
||||
horizon_enable_heat_ui: "{{ (groups['heat_all'] is defined) and (groups['heat_all'] | length > 0) }}"
|
||||
|
@ -92,6 +92,12 @@ cinder_volume
|
||||
[cinder_volume]
|
||||
#[cinder_volumes_container]
|
||||
|
||||
[cloudkitty_all:children]
|
||||
cloudkitty_api
|
||||
cloudkitty_engine
|
||||
[cloudkitty_api]
|
||||
[cloudkitty_engine]
|
||||
|
||||
[designate_all]
|
||||
|
||||
[elasticsearch]
|
||||
|
@ -74,6 +74,18 @@ cinder_git_install_branch: 355681cd53fbb2f5fd2c4cecb55a83c5e0c27c2c # HEAD as of
|
||||
cinder_git_track_branch: master
|
||||
|
||||
|
||||
## Cloudkitty service
|
||||
cloudkitty_git_repo: https://opendev.org/openstack/cloudkitty
|
||||
cloudkitty_git_install_branch: 3bf565997f3dc315cbcc37f6c8240e6253f6bb48 # HEAD as of 26.03.2021
|
||||
cloudkitty_git_track_branch: master
|
||||
|
||||
|
||||
## Cloudkitty dashboard plugin
|
||||
cloudkitty_dashboard_git_repo: https://opendev.org/openstack/cloudkitty-dashboard
|
||||
cloudkitty_dashboard_git_install_branch: 4e166ded43d51dd2baf0d13bbe88c1333b1a5d22 # HEAD as of 29.03.2021
|
||||
cloudkitty_dashboard_git_track_branch: master
|
||||
|
||||
|
||||
## Designate service
|
||||
designate_git_repo: https://opendev.org/openstack/designate
|
||||
designate_git_install_branch: 518e8a74c6d3809914ab19241d7062815ae69623 # HEAD as of 11.04.2021
|
||||
|
65
playbooks/os-cloudkitty-install.yml
Normal file
65
playbooks/os-cloudkitty-install.yml
Normal file
@ -0,0 +1,65 @@
|
||||
---
|
||||
# Copyright 2021, ELITS Cloud Services AB
|
||||
#
|
||||
# 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: Gather cloudkitty facts
|
||||
hosts: cloudkitty_all
|
||||
gather_facts: "{{ osa_gather_facts | default(True) }}"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Install cloudkitty services
|
||||
hosts: cloudkitty_all
|
||||
serial: "{{ cloudkitty_api_serial | default(['1', '100%']) }}"
|
||||
gather_facts: false
|
||||
user: root
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
vars_files:
|
||||
- "defaults/repo_packages/openstack_services.yml"
|
||||
- "defaults/{{ install_method }}_install.yml"
|
||||
tags:
|
||||
- cloudkitty
|
||||
pre_tasks:
|
||||
# In order to ensure that any container, software or
|
||||
# config file changes which causes a container/service
|
||||
# restart do not cause an unexpected outage, we drain
|
||||
# the load balancer back end for this container.
|
||||
- include_tasks: common-tasks/haproxy-endpoint-manage.yml
|
||||
vars:
|
||||
haproxy_backend: cloudkitty_api-back
|
||||
haproxy_state: disabled
|
||||
when:
|
||||
- "'cloudkitty_api' in group_names"
|
||||
- "groups['cloudkitty_api'] | length > 1"
|
||||
|
||||
- include_tasks: common-tasks/unbound-clients.yml
|
||||
when:
|
||||
- hostvars['localhost']['resolvconf_enabled'] | bool
|
||||
|
||||
roles:
|
||||
- role: "os_cloudkitty"
|
||||
|
||||
post_tasks:
|
||||
# Now that container changes are done, we can set
|
||||
# the load balancer back end for this container
|
||||
# to available again.
|
||||
- include_tasks: common-tasks/haproxy-endpoint-manage.yml
|
||||
vars:
|
||||
haproxy_backend: cloudkitty_api-back
|
||||
haproxy_state: enabled
|
||||
when:
|
||||
- "'cloudkitty_api' in group_names"
|
||||
- "groups['cloudkitty_api'] | length > 1"
|
||||
|
@ -28,6 +28,7 @@
|
||||
- import_playbook: os-adjutant-install.yml
|
||||
- import_playbook: os-ceilometer-install.yml
|
||||
- import_playbook: os-aodh-install.yml
|
||||
- import_playbook: os-cloudkitty-install.yml
|
||||
- import_playbook: os-panko-install.yml
|
||||
- import_playbook: os-ironic-install.yml
|
||||
- import_playbook: os-magnum-install.yml
|
||||
|
@ -75,6 +75,23 @@
|
||||
tags:
|
||||
- update-secrets
|
||||
|
||||
# TODO(jonher): Remove after W cycle
|
||||
- name: Add Cloudkitty secrets to user_secrets if defined elsewhere
|
||||
lineinfile:
|
||||
dest: "{{ openstack_config_dir }}/user_secrets.yml"
|
||||
regexp: "^{{ item.key }}"
|
||||
line: "{{ item.key }}: {{ item.value }}"
|
||||
loop:
|
||||
- { key: "cloudkitty_container_mysql_password", value: "{{ cloudkitty_container_mysql_password | default([]) }}" }
|
||||
- { key: "cloudkitty_service_password", value: "{{ cloudkitty_service_password | default([]) }}" }
|
||||
- { key: "cloudkitty_oslomsg_rpc_password", value: "{{ cloudkitty_oslomsg_rpc_password | default([]) }}" }
|
||||
- { key: "cloudkitty_oslomsg_notify_password", value: "{{ cloudkitty_oslomsg_notify_password | default([]) }}" }
|
||||
when:
|
||||
- item.value
|
||||
- not (user_secrets.stdout | regex_search('((^|\n)' ~ item.key ~ ')'))
|
||||
tags:
|
||||
- update-secrets
|
||||
|
||||
- name: Add missing secrets
|
||||
lineinfile:
|
||||
dest: "{{ openstack_config_dir }}/user_secrets.yml"
|
||||
|
@ -190,6 +190,12 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'cinder_scheduler',
|
||||
'cinder_volume',
|
||||
'cinder_volumes_container',
|
||||
'cloudkitty_all',
|
||||
'cloudkitty_api',
|
||||
'cloudkitty_containers',
|
||||
'cloudkitty_container',
|
||||
'cloudkitty_engine',
|
||||
'cloudkitty_hosts',
|
||||
'compute-infra_all',
|
||||
'compute-infra_containers',
|
||||
'compute-infra_hosts',
|
||||
|
@ -132,6 +132,7 @@
|
||||
- name: openstack/openstack-ansible-os_barbican
|
||||
- name: openstack/openstack-ansible-os_blazar
|
||||
- name: openstack/openstack-ansible-os_ceilometer
|
||||
- name: openstack/openstack-ansible-os_cloudkitty
|
||||
- name: openstack/openstack-ansible-os_cinder
|
||||
- name: openstack/openstack-ansible-os_designate
|
||||
- name: openstack/openstack-ansible-os_glance
|
||||
@ -178,6 +179,7 @@
|
||||
- name: openstack/barbican-ui
|
||||
- name: openstack/ceilometer
|
||||
- name: openstack/cinder
|
||||
- name: openstack/cloudkitty
|
||||
- name: openstack/designate
|
||||
- name: openstack/designate-dashboard
|
||||
- name: openstack/glance
|
||||
|
Loading…
x
Reference in New Issue
Block a user