Integrate Blazar with OpenStack Ansible

Change-Id: I27874f755bcef493165877a24e284c493d99cb2a
This commit is contained in:
Taseer Ahmed 2018-03-06 11:01:15 +05:00 committed by Taseer
parent c3d326226c
commit df54583ca7
13 changed files with 175 additions and 0 deletions

View File

@ -62,6 +62,10 @@
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_barbican
version: master
- name: os_blazar
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_blazar
version: master
- name: os_ceilometer
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_ceilometer

View File

@ -0,0 +1,4 @@
---
reservation_hosts:
aio1:
ip: 172.29.236.100

View File

@ -218,6 +218,16 @@ barbican_oslomsg_rpc_password:
#barbican_oslomsg_notify_password:
barbican_service_password:
## Blazar Options
blazar_oslomsg_rpc_password:
#NOTE: Please uncomment those
# if you want to split rpc and notify users
# Please also wire the appropriate userid in
# your variables
#blazar_oslomsg_notify_password:
blazar_service_password:
blazar_container_mysql_password:
## Designate Options
designate_galera_password:
designate_oslomsg_rpc_password:

View File

@ -0,0 +1,39 @@
---
# Copyright 2018, taseer94@gmail.com
#
# 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:
blazar_api:
belongs_to:
- blazar_all
blazar_manager:
belongs_to:
- blazar_all
container_skel:
blazar_container:
belongs_to:
- reservation_containers
contains:
- blazar_api
- blazar_manager
physical_skel:
reservation_containers:
belongs_to:
- all_containers
reservation_hosts:
belongs_to:
- hosts

View File

@ -0,0 +1,20 @@
---
# Copyright 2018, taseer94@gmail.com
#
# 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.
blazar_service_region: "{{ service_region }}"
blazar_service_in_ldap: "{{ service_ldap_backend_enabled }}"
# Ensure that the package state matches the global setting
blazar_package_state: "{{ package_state }}"

View File

@ -42,6 +42,14 @@ aodh_listener
[barbican_all]
[blazar_all:children]
blazar_api
blazar_manager
[blazar_api]
[blazar_manager]
[ceilometer_all:children]
ceilometer_agent_central
ceilometer_agent_compute

View File

@ -294,3 +294,15 @@ octavia_dashboard_git_install_branch: 4f7a5591ae8dd61b25af7f746f20d8f058aa991c #
octavia_dashboard_git_project_group: horizon_all
octavia_dashboard_git_track_branch: master
## Blazar service
blazar_git_repo: https://git.openstack.org/openstack/blazar
blazar_git_install_branch: 3cdd01a3cd5235489b290a3eeb5f4af8301adf60 # HEAD of "master" as of 08.08.2018
blazar_git_project_group: blazar_all
blazar_git_track_branch: master
## Blazar Nova Service
blazar_nova_git_repo: https://git.openstack.org/openstack/blazar-nova
blazar_nova_git_intall: 67f04e32cc7d701ee60132645cf5cd1258fe1722 # HEAD of "master" as of 08.08.2018
blazar_nova_project_group: blazar_all
blazar_nova_git_track_branch: master

View File

@ -0,0 +1,55 @@
---
# Copyright 2018, taseer94@gmail.com
#
# 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 blazar components
hosts: blazar_all
gather_facts: "{{ osa_gather_facts | default(True) }}"
environment: "{{ deployment_environment_variables | default({}) }}"
user: root
vars_files:
- "defaults/{{ install_method }}_install.yml"
tags:
- blazar
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 }}-blazar"
dest: "/var/log/blazar"
- 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_blazar"
- role: "system_crontab_coordination"
tags:
- crontab
post_tasks:
- include_tasks: "common-tasks/rsyslog-client.yml"
vars:
rsyslog_client_log_rotate_file: blazar_log_rotate
rsyslog_client_log_dir: "/var/log/blazar"
rsyslog_client_config_name: "99-blazar-rsyslog-client.conf"

View File

@ -39,6 +39,7 @@
- include: os-sahara-install.yml
- include: os-octavia-install.yml
- include: os-tacker-install.yml
- include: os-blazar-install.yml
# This is not an OpenStack service, but integrates with Keystone and must be
# deployed afterward.

View File

@ -145,6 +145,10 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'barbican_all',
'barbican_api',
'barbican_container',
'blazar_all',
'blazar_container',
'blazar_api',
'blazar_manager',
'ceilometer_all',
'ceilometer_agent_central',
'ceilometer_agent_compute',
@ -291,6 +295,9 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'powervm-compute_hosts',
'qemu-compute_containers',
'qemu-compute_hosts',
'reservation_all',
'reservation_containers',
'reservation_hosts',
'trove_all',
'trove_api',
'trove_conductor',

View File

@ -36,6 +36,13 @@ confd_overrides:
- name: keystone.yml.aio
- name: neutron.yml.aio
- name: nova.yml.aio
blazar:
- name: haproxy.yml.aio
- name: nova.yml.aio
- name: neutron.yml.aio
- name: keystone.yml.aio
- name: glance.yml.aio
- name: blazar.yml.aio
ceph:
- name: haproxy.yml.aio
- name: ceph.yml.aio

View File

@ -166,6 +166,13 @@
action: deploy
scenario: barbican
- job:
name: openstack-ansible-deploy-blazar-ubuntu-bionic
parent: openstack-ansible-deploy-aio_lxc-ubuntu-bionic
vars:
action: deploy
scenario: blazar
# centos
- job:
name: openstack-ansible-deploy-aio_lxc-centos-7

View File

@ -33,6 +33,7 @@
- openstack-ansible-deploy-octavia-ubuntu-bionic
- openstack-ansible-deploy_with_ansible_devel-aio-ubuntu-bionic
- openstack-ansible-deploy_with_ansible_next-aio-ubuntu-bionic
- openstack-ansible-deploy-blazar-ubuntu-bionic
- project-template:
name: openstack-ansible-deploy-aio_lxc-jobs