Merge "Use infra generation of ARA reports"

This commit is contained in:
Zuul 2019-03-02 00:01:43 +00:00 committed by Gerrit Code Review
commit 0be2847fd8
2 changed files with 40 additions and 24 deletions

View File

@ -211,3 +211,4 @@ influxdb_create_data_file: true
odl_extra_log_dir: /var/log/extra/odl
odl_extra_info_log: "{{ odl_extra_log_dir }}/odl_info.log"
ara_overcloud_db_path: "/var/lib/mistral/overcloud/ara_overcloud.sqlite"
ara_generate_html: true

View File

@ -15,33 +15,48 @@
| gzip > {{ artcl_collect_dir }}/console.txt.gz
when: lookup('env', 'BUILD_URL') != ""
- name: Generate and retrieve the ARA static playbook report
shell: >
{{ local_working_dir }}/bin/ara generate html {{ local_working_dir }}/ara_oooq;
{{ local_working_dir }}/bin/ara task list --all -f json > {{ artcl_collect_dir }}/ara.json;
cp -r {{ local_working_dir }}/ara_oooq {{ artcl_collect_dir }}/;
{% if artcl_gzip_only|bool %}gzip --best --recursive {{ artcl_collect_dir }}/ara_oooq;{% endif %}
ignore_errors: true
- when: ara_generate_html|bool
block:
- name: Generate and retrieve root the ARA static playbook report
become: true
shell: >
{{ local_working_dir }}/bin/ara generate html {{ local_working_dir }}/ara_oooq_root;
{{ local_working_dir }}/bin/ara task list --all -f json > {{ artcl_collect_dir }}/ara.oooq.root.json;
cp -r {{ local_working_dir }}/ara_oooq_root {{ artcl_collect_dir }}/;
{% if artcl_gzip_only|bool %}gzip --best --recursive {{ artcl_collect_dir }}/ara_oooq_root;{% endif %}
ignore_errors: true
- name: Generate and retrieve the ARA static playbook report
shell: >
{{ local_working_dir }}/bin/ara generate html {{ local_working_dir }}/ara_oooq;
{{ local_working_dir }}/bin/ara task list --all -f json > {{ artcl_collect_dir }}/ara.json;
cp -r {{ local_working_dir }}/ara_oooq {{ artcl_collect_dir }}/;
{% if artcl_gzip_only|bool %}gzip --best --recursive {{ artcl_collect_dir }}/ara_oooq;{% endif %}
ignore_errors: true
- name: Generate and retrieve the ARA static playbook report for OC deploy
become: true
shell: >
{{ local_working_dir }}/bin/ara generate html {{ local_working_dir }}/ara_oooq_oc;
{{ local_working_dir }}/bin/ara task list --all -f json > {{ artcl_collect_dir }}/ara.oooq.oc.json;
cp -r {{ local_working_dir }}/ara_oooq_oc {{ artcl_collect_dir }}/;
{% if artcl_gzip_only|bool %}gzip --best --recursive {{ artcl_collect_dir }}/ara_oooq_oc;{% endif %}
- name: Generate and retrieve root the ARA static playbook report
become: true
shell: >
{{ local_working_dir }}/bin/ara generate html {{ local_working_dir }}/ara_oooq_root;
{{ local_working_dir }}/bin/ara task list --all -f json > {{ artcl_collect_dir }}/ara.oooq.root.json;
cp -r {{ local_working_dir }}/ara_oooq_root {{ artcl_collect_dir }}/;
{% if artcl_gzip_only|bool %}gzip --best --recursive {{ artcl_collect_dir }}/ara_oooq_root;{% endif %}
ignore_errors: true
- name: Generate and retrieve the ARA static playbook report for OC deploy
become: true
shell: >
{{ local_working_dir }}/bin/ara generate html {{ local_working_dir }}/ara_oooq_oc;
{{ local_working_dir }}/bin/ara task list --all -f json > {{ artcl_collect_dir }}/ara.oooq.oc.json;
cp -r {{ local_working_dir }}/ara_oooq_oc {{ artcl_collect_dir }}/;
{% if artcl_gzip_only|bool %}gzip --best --recursive {{ artcl_collect_dir }}/ara_oooq_oc;{% endif %}
ignore_errors: true
environment:
ARA_DATABASE: 'sqlite:///{{ ara_overcloud_db_path }}'
- name: Copy ara files to ara-report directories
shell: |
mkdir -p {{ artcl_collect_dir }}/{{ item.dir }}/ara-report;
cp {{ item.file }} {{ artcl_collect_dir }}/{{ item.dir }}/ara-report/ansible.sqlite;
loop:
- dir: ara_oooq
file: "{{ local_working_dir }}/ara.sqlite"
- dir: ara_oooq_overcloud
file: "{{ ara_overcloud_db_path }}"
ignore_errors: true
environment:
ARA_DATABASE: 'sqlite:///{{ ara_overcloud_db_path }}'
when: not ara_generate_html|bool
- include: ara_graphite.yml
when: ara_graphite_server is defined