aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-osa
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/config-osa')
-rwxr-xr-xdeploy/adapters/ansible/roles/config-osa/files/collect-log.sh17
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/collect-log.yml32
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/haproxy.yml11
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/polling.yaml6
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/user_ceph.yml10
-rwxr-xr-xdeploy/adapters/ansible/roles/config-osa/tasks/main.yml16
-rw-r--r--deploy/adapters/ansible/roles/config-osa/tasks/meters.yml12
7 files changed, 104 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/config-osa/files/collect-log.sh b/deploy/adapters/ansible/roles/config-osa/files/collect-log.sh
new file mode 100755
index 00000000..7f51a2c3
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/files/collect-log.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2018 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+SCRIPT_PATH="$(dirname $(realpath ${BASH_SOURCE[0]}))"
+
+openstack-ansible $SCRIPT_PATH/collect-log.yml
diff --git a/deploy/adapters/ansible/roles/config-osa/files/collect-log.yml b/deploy/adapters/ansible/roles/config-osa/files/collect-log.yml
new file mode 100644
index 00000000..6e6f9e5a
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/files/collect-log.yml
@@ -0,0 +1,32 @@
+---
+##############################################################################
+# Copyright (c) 2018 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+- name: Collect log
+ hosts: rsyslog[0]
+ user: root
+ tasks:
+ - name: ensure log directory exist
+ stat:
+ path: /var/log/log-storage
+ register: log_dir
+
+ - name: compress log directory
+ archive:
+ path: "{{ log_dir.stat.path }}"
+ dest: "{{ log_dir.stat.path }}/log.tar.gz"
+ format: gz
+ when: log_dir.stat.exists is defined and log_dir.stat.exists
+
+ - name: fetch the log tarball
+ fetch:
+ src: "{{ log_dir.stat.path }}/log.tar.gz"
+ dest: /opt/log.tar.gz
+ flat: "yes"
+ when: log_dir.stat.exists is defined and log_dir.stat.exists
diff --git a/deploy/adapters/ansible/roles/config-osa/files/haproxy.yml b/deploy/adapters/ansible/roles/config-osa/files/haproxy.yml
index 3085f6aa..a0a09e49 100644
--- a/deploy/adapters/ansible/roles/config-osa/files/haproxy.yml
+++ b/deploy/adapters/ansible/roles/config-osa/files/haproxy.yml
@@ -261,3 +261,14 @@ haproxy_default_services:
haproxy_backend_options:
- "httpchk GET /"
haproxy_whitelist_networks: "{{ haproxy_octavia_whitelist_networks }}"
+
+ - service:
+ haproxy_service_name: tacker
+ haproxy_backend_nodes: "{{ groups['tacker_all'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 9890
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "forwardfor"
+ - "httpchk"
+ - "httplog"
diff --git a/deploy/adapters/ansible/roles/config-osa/files/polling.yaml b/deploy/adapters/ansible/roles/config-osa/files/polling.yaml
new file mode 100644
index 00000000..631e3687
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/files/polling.yaml
@@ -0,0 +1,6 @@
+---
+sources:
+ - name: all_pollsters
+ interval: 300
+ meters:
+ - "*"
diff --git a/deploy/adapters/ansible/roles/config-osa/files/user_ceph.yml b/deploy/adapters/ansible/roles/config-osa/files/user_ceph.yml
index 9d5f13a9..6daa1436 100644
--- a/deploy/adapters/ansible/roles/config-osa/files/user_ceph.yml
+++ b/deploy/adapters/ansible/roles/config-osa/files/user_ceph.yml
@@ -14,3 +14,13 @@ cinder_backends:
rbd_user: cinder
rbd_secret_uuid: "{{ cinder_ceph_client_uuid }}"
report_discard_supported: true
+
+gnocchi_storage_driver: ceph
+gnocchi_ceph_pool: "metrics"
+ceph_extra_components:
+ - component: gnocchi_api
+ package:
+ - "{{ python_ceph_package }}"
+ client:
+ - '{{ gnocchi_ceph_client }}'
+ service: '{{ ceph_gnocchi_service_names }}'
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
index f9eef749..8bb56656 100755
--- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
@@ -332,6 +332,16 @@
when:
- "{{ hostvars[inventory_hostname]['groups']['controller'] | length < 2 }}"
+- name: copy collect-log.sh to /opt
+ copy:
+ src: collect-log.sh
+ dest: /opt/collect-log.sh
+
+- name: copy collect-log.yml to /opt
+ copy:
+ src: collect-log.yml
+ dest: /opt/collect-log.yml
+
# - name: change repore build
# lineinfile:
# dest: /etc/ansible/roles/repo_build/tasks/main.yml
@@ -345,3 +355,9 @@
- include: fix_pip_version.yml
- include: fix_rescue.yml
+
+- name: include tacker in setup-openstack
+ lineinfile:
+ dest: /opt/openstack-ansible/playbooks/setup-openstack.yml
+ insertafter: "^- include: os-trove"
+ line: "- include: os-tacker-install.yml"
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
index 8f06a884..2b3bce5f 100644
--- a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
@@ -69,3 +69,15 @@
[database]{% raw %}
connection = mysql+pymysql://{{ ceilometer_galera_user }}:{{ ceilometer_container_db_password }}@{{ceilometer_galera_address }}/{{ ceilometer_galera_database }}?charset=utf86{% endraw %}
# yamllint enable rule:line-length
+
+- name: make sure the directory exist
+ file:
+ dest: /etc/openstack_deploy/ceilometer
+ state: directory
+ mode: 0755
+
+- name: copy the polling.yml
+ copy:
+ dest: /etc/openstack_deploy/ceilometer/polling.yaml
+ src: polling.yaml
+ mode: 0644