summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-osa
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/config-osa')
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh11
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/policy.json15
-rwxr-xr-xdeploy/adapters/ansible/roles/config-osa/tasks/main.yml8
-rw-r--r--deploy/adapters/ansible/roles/config-osa/tasks/meters.yml71
-rw-r--r--deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j27
-rw-r--r--deploy/adapters/ansible/roles/config-osa/vars/main.yml1
6 files changed, 113 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh b/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh
index c598027f..fb197555 100644
--- a/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh
+++ b/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh
@@ -202,6 +202,17 @@ unset ROLE_VENV_WITH_INDEX
#unset ROLE_VENV_WITH_INDEX
ROLE_VENV_WITH_INDEX=false
+ROLE_VENV_PATH="/tmp/openstack-venv-builder/venvs/tacker"
+ROLE_VENV_FILE="tacker-15.1.4-x86_64"
+if [ ! -f "${ROLE_VENV_FILE}.tgz" ];then
+ venv_create "${ROLE_VENV_PATH}" "${ROLE_VENV_FILE}" "${ROLE_VENV_WITH_INDEX}" "python-tackerclient mysql-python networking-sfc==4.0.0 pymysql python-heatclient python-tackerclient tacker" &
+ pid[3]=$!
+fi
+unset ROLE_VENV_PATH
+unset ROLE_VENV_FILE
+unset ROLE_VENV_WITH_INDEX
+
+ROLE_VENV_WITH_INDEX=false
ROLE_VENV_PATH="/tmp/openstack-venv-builder/venvs/horizon"
ROLE_VENV_FILE="horizon-15.1.4-x86_64"
if [ ! -f "${ROLE_VENV_FILE}.tgz" ];then
diff --git a/deploy/adapters/ansible/roles/config-osa/files/policy.json b/deploy/adapters/ansible/roles/config-osa/files/policy.json
new file mode 100644
index 00000000..0aa0a3d1
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/files/policy.json
@@ -0,0 +1,15 @@
+{
+ "context_is_admin": "role:admin",
+ "segregation": "rule:context_is_admin",
+
+ "telemetry:get_samples": "",
+ "telemetry:get_sample": "",
+ "telemetry:query_sample": "",
+ "telemetry:create_samples": "",
+
+ "telemetry:compute_statistics": "",
+ "telemetry:get_meters": "",
+
+ "telemetry:get_resource": "",
+ "telemetry:get_resources": "",
+}
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
index d3779fd4..d2ce5c38 100755
--- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
@@ -138,6 +138,12 @@
{% endraw %}
when: offline_deployment is defined and offline_deployment == "Enable"
+# This is a bug in ocata, will be removed in the future
+- name: limit the version of networking-sfc in os_tacker
+ shell: |
+ sed -i 's/networking-sfc$/networking-sfc=={{ networking_sfc_version }}/g' \
+ /etc/ansible/roles/os_tacker/defaults/main.yml
+
- name: add rally and tempest to requirement.txt
blockinfile:
dest: /etc/ansible/roles/repo_build/tasks/repo_pre_build.yml
@@ -263,3 +269,5 @@
dest: /etc/ansible/roles/repo_build/tasks/main.yml
insertafter: "^- include: repo_post_build.yml"
line: "- include: repo_fix_pandas.yml"
+
+- include: meters.yml
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
new file mode 100644
index 00000000..163fc69d
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
@@ -0,0 +1,71 @@
+#############################################################################
+# Copyright (c) 2017 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: modify the aodh haproxy config
+ replace:
+ dest: /opt/openstack-ansible/playbooks/vars/configs/haproxy_config.yml
+ regexp: '- "expect status 401"'
+ replace: '- "expect status 200"'
+
+- name: add OS_AUTH_TYPE in openrc
+ lineinfile:
+ dest: /etc/ansible/roles/openstack_openrc/templates/openrc.j2
+ line: "export OS_AUTH_TYPE=password"
+
+- name: copy the ceilometer policy yaml
+ copy:
+ dest: /etc/ansible/roles/os_ceilometer/templates/policy.json.j2
+ src: policy.json
+ mode: 0664
+
+- name: replace the ceilometer policy
+ lineinfile:
+ dest: /etc/ansible/roles/os_ceilometer/tasks/ceilometer_post_install.yml
+ regexp: "ceilometer_policy_user_content"
+ line: ' src: "policy.json.j2"'
+ backrefs: "yes"
+
+- name: modify the os-ceilometer-install.yml
+ blockinfile:
+ dest: /opt/openstack-ansible/playbooks/os-ceilometer-install.yml
+ insertbefore: "common-tasks/package-cache-proxy.yml"
+ block: |
+ # create ceilometer db
+ - include: common-tasks/mysql-db-user.yml
+ static: no
+ vars: {% raw %}
+ user_name: "{{ ceilometer_galera_user }}"
+ password: "{{ ceilometer_container_db_password }}"
+ login_host: "{{ ceilometer_galera_address }}"
+ db_name: "{{ ceilometer_galera_database }}"
+ when: inventory_hostname == groups['ceilometer_all'][0]{% endraw %}
+
+- name: modify the os-ceilometer-install.yml
+ lineinfile:
+ dest: /opt/openstack-ansible/playbooks/os-ceilometer-install.yml
+ insertafter: "is_metal"
+ line: "{{ item }}"
+ with_items:
+ - " ceilometer_galera_user: ceilometer"
+ - " ceilometer_galera_database: ceilometer"
+
+- name: modify the os-ceilometer-install.yml
+ lineinfile:
+ dest: /opt/openstack-ansible/playbooks/os-ceilometer-install.yml
+ insertafter: "is_metal"
+ line: ' {% raw %} ceilometer_galera_address: "{{ galera_address }}"{% endraw %}'
+
+# yamllint disable rule:line-length
+- name: change the ceilometer.conf.j2
+ blockinfile:
+ dest: /etc/ansible/roles/os_ceilometer/templates/ceilometer.conf.j2
+ block: |
+ [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
diff --git a/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2
index cadf5308..be119fbe 100644
--- a/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2
+++ b/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2
@@ -213,6 +213,13 @@ metrics_hosts:
ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}
+# tacker (mano service)
+mano_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
# nova hypervisors
compute_hosts:
{% for host in groups.compute%}
diff --git a/deploy/adapters/ansible/roles/config-osa/vars/main.yml b/deploy/adapters/ansible/roles/config-osa/vars/main.yml
index 18687fa5..0b3b0c1e 100644
--- a/deploy/adapters/ansible/roles/config-osa/vars/main.yml
+++ b/deploy/adapters/ansible/roles/config-osa/vars/main.yml
@@ -10,3 +10,4 @@
LOCAL_REPOSITORY_IP: "192.168.137.222"
ceph_host: "{{ hostvars[inventory_hostname]['groups']['ceph_osd'][0] }}"
repo_dest_path: "/var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/"
+networking_sfc_version: 4.0.0