Merge "Track ansible overcloud deployment with ARA"

This commit is contained in:
Zuul 2018-09-21 06:34:16 +00:00 committed by Gerrit Code Review
commit 29b339d18e
8 changed files with 40 additions and 5 deletions

View File

@ -32,6 +32,17 @@
{% if artcl_gzip_only|bool %}gzip --best --recursive {{ artcl_collect_dir }}/ara_oooq_root;{% endif %}
ignore_errors: yes
- name: Generate and retrieve the ARA static playbook report for OC deploy
become: yes
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: yes
environment:
ARA_DATABASE: 'sqlite:///{{ ara_overcloud_db_path }}'
- include: ara_graphite.yml
when: ara_graphite_server is defined
ignore_errors: yes

View File

@ -160,6 +160,9 @@ overcloud_services:
services:
- OS::TripleO::Services::Kernel
ara_overcloud_db_path: "/var/lib/mistral/overcloud/ara_overcloud.sqlite"
override_ansiblecfg: true
# Use to populate the resource registry for nic configs
resource_registry_args:
OS::TripleO::BlockStorage::Net::SoftwareConfig: nic-configs/cinder-storage.yaml

View File

@ -66,3 +66,9 @@
template:
src: "overcloud_network_params.yaml.j2"
dest: "{{ working_dir }}/overcloud_network_params.yaml"
- name: Create overriding ansible.cfg for overcloud deployment
when: override_ansiblecfg|bool
template:
src: "ansible.cfg.j2"
dest: "{{ working_dir }}/custom_ansible.cfg"

View File

@ -0,0 +1,6 @@
[defaults]
action_plugins = /usr/lib/python2.7/site-packages/ara/plugins/actions
callback_plugins = /usr/lib/python2.7/site-packages/ara/plugins/callbacks
[ara]
database=sqlite:///{{ ara_overcloud_db_path }}

View File

@ -30,7 +30,7 @@ done
## * Deploy the overcloud!
## ::
openstack overcloud deploy \
openstack overcloud deploy {% if release is not in ['newton', 'ocata', 'pike', 'queens', 'rocky'] %}--override-ansible-cfg {{ working_dir }}/custom_ansible.cfg{% endif %} \
--templates {{overcloud_templates_path}} \
{{ deploy_args | regex_replace("\n", " ") }} \
"$@" && status_code=0 || status_code=$?

View File

@ -222,4 +222,11 @@ sudo kill $pidof_tcpdump
{% endif %}
{% if release not in ['newton', 'ocata', 'pike', 'queens'] %}
cont=$(docker ps | grep executor | awk {'print $1'})
docker exec --user root $cont bash -c "easy_install pip && pip install ara"
# check it
docker exec --user root $cont ls /usr/lib/python2.7/site-packages/ | grep ara
{% endif %}
### --stop_docs

View File

@ -1,13 +1,17 @@
---
# Configure the undercloud to use ARA
# for ansible undercloud or standalone only. Ansible deployment of node
- name: Install ara dependencies
- name: Install ara
become: true
pip:
name: "{{ item }}"
state: latest
with_items:
- flask
- pip
- setuptools
- ara
# TODO(sshnaidm): https://bugs.launchpad.net/tripleo/+bug/1792622
ignore_errors: True
- name: Update the default ansible callback setting in /etc/ansible/ansible.cfg
become: true

View File

@ -30,5 +30,3 @@
include: ansible_cfg.yml
when:
- undercloud_ansible_cfg|bool
- containerized_undercloud|bool