use tripleo-ansible-inventry to generate hosts

Change-Id: I54d6eba518910e6651758bc7d46624bafacaef6c
This commit is contained in:
Masco Kaliyamoorthy 2020-07-23 16:31:10 +05:30
parent c656da7c6c
commit 461b016f13
58 changed files with 294 additions and 227 deletions

View File

@ -33,12 +33,27 @@ Install your public key into stack's authorized\_keys
# ssh-copy-id stack@<undercloud-ip> # ssh-copy-id stack@<undercloud-ip>
Then run generate\_tripleo\_hosts.sh script to generate your overcloud's Generate overcloud's inventory file
hosts file for ansible and generate a "jumpbox" ssh config: -----------------------------------
Currently we have two scripts to generate overcloud's inventory file.
1. generate_tripleo_inventory.sh
2. generate_tripleo_hostfile.sh
`generate_tripleo_inventory.sh` is the recommended way to generate the overcloud inventory file.
It will use the `tripleo-ansible-inventory` command to generate the inventory file.
It is faster and maintained with tripleo release.
:: ::
# ./generate_tripleo_hostfile.sh <undercloud-ip> ~/.ssh/config # ./generate_tripleo_inventory.sh <undercloud-ip>
`generate_tripleo_hostfile.sh` is a shell script that will ssh to each machine and prepare the inventory file.
It is deprecated now and very slow, It may get removed in future releases.
::
# ./generate_tripleo_hostfile.sh <undercloud-ip>
Review the hosts file the script generates. Review the hosts file the script generates.

View File

@ -22,7 +22,7 @@
# ansible-playbook -i hosts browbeat/adjust-nova-allocation.yml # ansible-playbook -i hosts browbeat/adjust-nova-allocation.yml
# #
- hosts: controller,compute - hosts: Controller,Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:
@ -117,7 +117,7 @@
- httpd - httpd
when: when:
- "'Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode" - "'Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode"
- "'controller' in group_names" - "'Controller' in group_names"
- restart_nova - restart_nova
- name: (Pike, Queens) Restart Nova Compute Container - name: (Pike, Queens) Restart Nova Compute Container
@ -125,5 +125,5 @@
command: docker restart nova_compute command: docker restart nova_compute
when: when:
- "('Pike' in osp_version['content'] | b64decode or 'Queens' in osp_version['content'] | b64decode)" - "('Pike' in osp_version['content'] | b64decode or 'Queens' in osp_version['content'] | b64decode)"
- "'compute' in group_names" - "'Compute' in group_names"
- restart_nova - restart_nova

View File

@ -9,7 +9,7 @@
# ansible-playbook -i hosts browbeat/adjustment-httpd.yml -e 'httpd_startservers=8 httpd_minspareservers=5 httpd_maxspareservers=20 httpd_serverlimit=256 httpd_maxclients=256 httpd_maxrequestsperchild=4000' # ansible-playbook -i hosts browbeat/adjustment-httpd.yml -e 'httpd_startservers=8 httpd_minspareservers=5 httpd_maxspareservers=20 httpd_serverlimit=256 httpd_maxclients=256 httpd_maxrequestsperchild=4000'
# #
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -18,7 +18,7 @@
# ansible-playbook -i hosts browbeat/adjustment-ceilometer.yml # ansible-playbook -i hosts browbeat/adjustment-ceilometer.yml
# #
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -2,7 +2,7 @@
# #
# #
- hosts: controller - hosts: Controller
remote_user: heat-admin remote_user: heat-admin
gather_facts: false gather_facts: false
vars: vars:

View File

@ -1,4 +1,4 @@
- hosts: controller - hosts: Controller
remote_user: heat-admin remote_user: heat-admin
gather_facts: false gather_facts: false
vars: vars:
@ -7,7 +7,7 @@
roles: roles:
- neutron-firewall - neutron-firewall
- hosts: compute - hosts: Compute
remote_user: heat-admin remote_user: heat-admin
gather_facts: false gather_facts: false
vars: vars:

View File

@ -5,7 +5,7 @@
# Versions tested: Newton, Ocata # Versions tested: Newton, Ocata
# #
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:
@ -14,7 +14,7 @@
- name: Create low-workload archive-policy - name: Create low-workload archive-policy
shell: ". {{ overcloudrc }}; gnocchi archive-policy create -d points:8640,granularity:0:05:00 -b 0 -m std -m count -m min -m max -m sum -m mean low-workload" shell: ". {{ overcloudrc }}; gnocchi archive-policy create -d points:8640,granularity:0:05:00 -b 0 -m std -m count -m min -m max -m sum -m mean low-workload"
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -9,7 +9,7 @@
# ansible-playbook -i hosts browbeat/adjustment-gnocchi-wsgi.yml -e "gnocchi_api_processes=24 gnocchi_api_threads=6" # ansible-playbook -i hosts browbeat/adjustment-gnocchi-wsgi.yml -e "gnocchi_api_processes=24 gnocchi_api_threads=6"
# #
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -9,7 +9,7 @@
# ansible-playbook -i hosts browbeat/adjustment-gnocchi.yml -e 'metricd_workers=12 metric_processing_delay=30 processing_replicas=3' # ansible-playbook -i hosts browbeat/adjustment-gnocchi.yml -e 'metricd_workers=12 metric_processing_delay=30 processing_replicas=3'
# #
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -9,7 +9,7 @@
# ansible-playbook -i hosts browbeat/adjustment-haproxy.yml -e 'old_maxconn=4096 new_maxconn=8192' # ansible-playbook -i hosts browbeat/adjustment-haproxy.yml -e 'old_maxconn=4096 new_maxconn=8192'
# #
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -7,7 +7,7 @@
# ansible-playbook -i hosts browbeat/adjustment-keystone-token.yml -e "token_provider=uuid" # ansible-playbook -i hosts browbeat/adjustment-keystone-token.yml -e "token_provider=uuid"
# #
- hosts: controller - hosts: Controller
remote_user: heat-admin remote_user: heat-admin
pre_tasks: pre_tasks:
- name: Check for variable (token_provider) - name: Check for variable (token_provider)

View File

@ -6,7 +6,7 @@
# ansible-playbook -i hosts browbeat/adjustment-l3.yml -e "max_l3_agents=3 min_l3_agents=3" # ansible-playbook -i hosts browbeat/adjustment-l3.yml -e "max_l3_agents=3 min_l3_agents=3"
# #
- hosts: controller - hosts: Controller
remote_user: heat-admin remote_user: heat-admin
gather_facts: false gather_facts: false
vars: vars:

View File

@ -22,7 +22,7 @@
# ansible-playbook -i hosts browbeat/adjustment-nova-scheduler.yml # ansible-playbook -i hosts browbeat/adjustment-nova-scheduler.yml
# #
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -12,7 +12,7 @@
# ansible-playbook -i hosts browbeat/adjustment-workers.yml -e "service=keystone workers=12 keystone_deployment=httpd" # ansible-playbook -i hosts browbeat/adjustment-workers.yml -e "service=keystone workers=12 keystone_deployment=httpd"
# #
- hosts: controller - hosts: Controller
remote_user: heat-admin remote_user: heat-admin
gather_facts: false gather_facts: false
vars: vars:

View File

@ -6,7 +6,7 @@
# use the same new archive-policy. # use the same new archive-policy.
# #
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -3,7 +3,7 @@
# Playbook to clean log files on controller nodes # Playbook to clean log files on controller nodes
# #
- hosts: controller - hosts: Controller
remote_user: heat-admin remote_user: heat-admin
gather_facts: false gather_facts: false
tasks: tasks:

View File

@ -1,4 +1,4 @@
- hosts: controller - hosts: Controller
remote_user: "{{host_remote_user}}" remote_user: "{{host_remote_user}}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml

View File

@ -74,7 +74,7 @@
- name: Setup fernet keys - name: Setup fernet keys
become: true become: true
command: keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone command: keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
when: (token_provider == 'fernet') and (inventory_hostname == groups['controller'][0]) when: (token_provider == 'fernet') and (inventory_hostname == groups['Controller'][0])
- name: Get fernet keys - name: Get fernet keys
become: true become: true
@ -82,7 +82,7 @@
with_items: with_items:
- 0 - 0
- 1 - 1
when: (token_provider == 'fernet') and (inventory_hostname == groups['controller'][0]) when: (token_provider == 'fernet') and (inventory_hostname == groups['Controller'][0])
changed_when: false changed_when: false
- name: Copy fernet keys - name: Copy fernet keys
@ -91,7 +91,7 @@
with_items: with_items:
- "0" - "0"
- "1" - "1"
when: (token_provider == 'fernet') and (inventory_hostname != groups['controller'][0]) when: (token_provider == 'fernet') and (inventory_hostname != groups['Controller'][0])
- name: Copy keystone type enforcement file - name: Copy keystone type enforcement file
become: true become: true

View File

@ -11,7 +11,7 @@
# ansible-playbook -i hosts browbeat/scale-virtlogd.yml -e 'max_open_files=10000' # ansible-playbook -i hosts browbeat/scale-virtlogd.yml -e 'max_open_files=10000'
# #
- hosts: compute - hosts: Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -10,7 +10,7 @@
# ansible-playbook -i hosts browbeat/sync-ceilometer-polling.yml -e 'task_time=18:25' # ansible-playbook -i hosts browbeat/sync-ceilometer-polling.yml -e 'task_time=18:25'
# #
- hosts: controller,compute - hosts: Controller,Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:
@ -25,22 +25,22 @@
- name: (Newton, Ocata) Set Controller Task - name: (Newton, Ocata) Set Controller Task
set_fact: set_fact:
the_task: "systemctl restart openstack-ceilometer-central.service" the_task: "systemctl restart openstack-ceilometer-central.service"
when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('controller' in group_names)" when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('Controller' in group_names)"
- name: (Newton, Ocata) Set Compute Task - name: (Newton, Ocata) Set Compute Task
set_fact: set_fact:
the_task: "systemctl restart openstack-ceilometer-compute.service" the_task: "systemctl restart openstack-ceilometer-compute.service"
when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('compute' in group_names)" when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('Compute' in group_names)"
- name: (Pike) Set Controller Task - name: (Pike) Set Controller Task
set_fact: set_fact:
the_task: "docker restart ceilometer_agent_central" the_task: "docker restart ceilometer_agent_central"
when: "('Pike' in osp_version['content'] | b64decode) and ('controller' in group_names)" when: "('Pike' in osp_version['content'] | b64decode) and ('Controller' in group_names)"
- name: (Pike) Set Compute Task - name: (Pike) Set Compute Task
set_fact: set_fact:
the_task: "docker restart ceilometer_agent_compute" the_task: "docker restart ceilometer_agent_compute"
when: "('Pike' in osp_version['content'] | b64decode) and ('compute' in group_names)" when: "('Pike' in osp_version['content'] | b64decode) and ('Compute' in group_names)"
roles: roles:
- run-task-at - run-task-at

View File

@ -5,7 +5,7 @@
# Cuts off the flow of measures into the backlog. # Cuts off the flow of measures into the backlog.
# #
- hosts: controller, compute - hosts: Controller, Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:
@ -20,22 +20,22 @@
- name: (Ocata) Set Controller Polling Daemon - name: (Ocata) Set Controller Polling Daemon
set_fact: set_fact:
polling_daemon: "openstack-ceilometer-central.service" polling_daemon: "openstack-ceilometer-central.service"
when: "('Ocata' in osp_version['content'] | b64decode) and ('controller' in group_names)" when: "('Ocata' in osp_version['content'] | b64decode) and ('Controller' in group_names)"
- name: (Ocata) Set Compute Polling Daemon - name: (Ocata) Set Compute Polling Daemon
set_fact: set_fact:
polling_daemon: "openstack-ceilometer-compute.service" polling_daemon: "openstack-ceilometer-compute.service"
when: "('Ocata' in osp_version['content'] | b64decode) and ('compute' in group_names)" when: "('Ocata' in osp_version['content'] | b64decode) and ('Compute' in group_names)"
- name: (Pike) Set Controller Polling Daemon - name: (Pike) Set Controller Polling Daemon
set_fact: set_fact:
polling_daemon: "openstack-ceilometer-polling.service" polling_daemon: "openstack-ceilometer-polling.service"
when: "('Pike' in osp_version['content'] | b64decode) and ('controller' in group_names)" when: "('Pike' in osp_version['content'] | b64decode) and ('Controller' in group_names)"
- name: (Pike) Set Compute Polling Daemon - name: (Pike) Set Compute Polling Daemon
set_fact: set_fact:
polling_daemon: "openstack-ceilometer-polling.service" polling_daemon: "openstack-ceilometer-polling.service"
when: "('Pike' in osp_version['content'] | b64decode) and ('compute' in group_names)" when: "('Pike' in osp_version['content'] | b64decode) and ('Compute' in group_names)"
- name: Stopping Ceilometer Polling Daemon - name: Stopping Ceilometer Polling Daemon
systemd: systemd:

View File

@ -3,7 +3,7 @@
# Playbook to disable Telemetry Services # Playbook to disable Telemetry Services
# #
- hosts: controller, compute - hosts: Controller, Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:
@ -67,7 +67,7 @@
dest: /root/10-gnocchi_wsgi.conf dest: /root/10-gnocchi_wsgi.conf
- src: /etc/httpd/conf.d/10-panko_wsgi.conf - src: /etc/httpd/conf.d/10-panko_wsgi.conf
dest: /root/10-panko_wsgi.conf dest: /root/10-panko_wsgi.conf
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Delete HTTPD wsgi service config files in order to temporarily disable them - name: Delete HTTPD wsgi service config files in order to temporarily disable them
become: true become: true
@ -79,21 +79,21 @@
- "/etc/httpd/conf.d/10-ceilometer_wsgi.conf" - "/etc/httpd/conf.d/10-ceilometer_wsgi.conf"
- "/etc/httpd/conf.d/10-gnocchi_wsgi.conf" - "/etc/httpd/conf.d/10-gnocchi_wsgi.conf"
- "/etc/httpd/conf.d/10-panko_wsgi.conf" - "/etc/httpd/conf.d/10-panko_wsgi.conf"
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Stopping Telemetry Controller Services - name: Stopping Telemetry Controller Services
systemd: systemd:
name: "{{ item }}" name: "{{ item }}"
state: stopped state: stopped
with_items: "{{controller_services}}" with_items: "{{controller_services}}"
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Stopping Telemetry Compute Services - name: Stopping Telemetry Compute Services
systemd: systemd:
name: "{{ item }}" name: "{{ item }}"
state: stopped state: stopped
with_items: "{{compute_services}}" with_items: "{{compute_services}}"
when: "'compute' in group_names" when: "'Compute' in group_names"
- name: Setting Nova Notification Driver to noop - name: Setting Nova Notification Driver to noop
become: true become: true
@ -130,7 +130,7 @@
group: keystone group: keystone
- dest: /etc/neutron/neutron.conf - dest: /etc/neutron/neutron.conf
group: neutron group: neutron
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Restart Controller Services to disable notifications - name: Restart Controller Services to disable notifications
systemd: systemd:
@ -145,10 +145,10 @@
- openstack-nova-conductor.service - openstack-nova-conductor.service
- openstack-nova-scheduler.service - openstack-nova-scheduler.service
- httpd - httpd
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Restart Nova Compute Service to disable notifications - name: Restart Nova Compute Service to disable notifications
systemd: systemd:
name: openstack-nova-compute.service name: openstack-nova-compute.service
state: restarted state: restarted
when: "'compute' in group_names" when: "'Compute' in group_names"

View File

@ -3,7 +3,7 @@
# Playbook to reverse disable Telemetry Services playbook # Playbook to reverse disable Telemetry Services playbook
# #
- hosts: controller, compute - hosts: Controller, Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:
@ -67,7 +67,7 @@
dest: /etc/httpd/conf.d/10-gnocchi_wsgi.conf dest: /etc/httpd/conf.d/10-gnocchi_wsgi.conf
- src: /root/10-panko_wsgi.conf - src: /root/10-panko_wsgi.conf
dest: /etc/httpd/conf.d/10-panko_wsgi.conf dest: /etc/httpd/conf.d/10-panko_wsgi.conf
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Clean Up HTTPD wsgi service config files in /root - name: Clean Up HTTPD wsgi service config files in /root
become: true become: true
@ -79,21 +79,21 @@
- "/root/10-ceilometer_wsgi.conf" - "/root/10-ceilometer_wsgi.conf"
- "/root/10-gnocchi_wsgi.conf" - "/root/10-gnocchi_wsgi.conf"
- "/root/10-panko_wsgi.conf" - "/root/10-panko_wsgi.conf"
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Starting Telemetry Controller Services - name: Starting Telemetry Controller Services
systemd: systemd:
name: "{{ item }}" name: "{{ item }}"
state: started state: started
with_items: "{{controller_services}}" with_items: "{{controller_services}}"
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Starting Telemetry Compute Service(s) - name: Starting Telemetry Compute Service(s)
systemd: systemd:
name: "{{ item }}" name: "{{ item }}"
state: started state: started
with_items: "{{compute_services}}" with_items: "{{compute_services}}"
when: "'compute' in group_names" when: "'Compute' in group_names"
- name: Setting Nova Notification Driver to messagingv2 - name: Setting Nova Notification Driver to messagingv2
become: true become: true
@ -135,7 +135,7 @@
- dest: /etc/neutron/neutron.conf - dest: /etc/neutron/neutron.conf
group: neutron group: neutron
value: value:
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Restart Controller Services to enable notifications - name: Restart Controller Services to enable notifications
systemd: systemd:
@ -150,10 +150,10 @@
- openstack-nova-conductor.service - openstack-nova-conductor.service
- openstack-nova-scheduler.service - openstack-nova-scheduler.service
- httpd - httpd
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: Restart Nova Compute Services to enable notifications - name: Restart Nova Compute Services to enable notifications
systemd: systemd:
name: openstack-nova-compute.service name: openstack-nova-compute.service
state: restarted state: restarted
when: "'compute' in group_names" when: "'Compute' in group_names"

View File

@ -13,7 +13,7 @@
# Remember to sync polling daemons afterwards (Restarting openstack-ceilometer-[central,compute]) # Remember to sync polling daemons afterwards (Restarting openstack-ceilometer-[central,compute])
# #
- hosts: controller,compute - hosts: Controller,Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
gather_facts: false gather_facts: false
vars_files: vars_files:

View File

@ -1,18 +1,18 @@
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml
roles: roles:
- { role: browbeat_logging } - { role: browbeat_logging }
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml
roles: roles:
- { role: browbeat_logging } - { role: browbeat_logging }
- hosts: compute - hosts: Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml

View File

@ -1,4 +1,4 @@
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml
@ -8,7 +8,7 @@
- { role: osp_version } - { role: osp_version }
- { role: filebeat_setup } - { role: filebeat_setup }
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml
@ -18,7 +18,7 @@
- { role: osp_version } - { role: osp_version }
- { role: filebeat_setup } - { role: filebeat_setup }
- hosts: compute - hosts: Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml

View File

@ -3,7 +3,7 @@
# For podman containers change "container_cli" configuration to podman # For podman containers change "container_cli" configuration to podman
# #
- hosts: stockpile - hosts: Stockpile
tasks: tasks:
- name: setting facts needed - name: setting facts needed
set_fact: set_fact:
@ -16,7 +16,7 @@
set_fact: set_fact:
overcloud_user: "{{ host_remote_user }}" overcloud_user: "{{ host_remote_user }}"
- hosts: undercloud - hosts: Undercloud
tasks: tasks:
- name: setting facts - name: setting facts
set_fact: set_fact:
@ -26,7 +26,7 @@
vars: vars:
stockpile_output_path: "{{ md_output_path }}" stockpile_output_path: "{{ md_output_path }}"
- hosts: stockpile - hosts: Stockpile
tasks: tasks:
- name: run prescribe - name: run prescribe
command: '"{{ ansible_python.executable }}" {{ browbeat_path }}/browbeat/prescribe.py {{ browbeat_path }}/metadata' command: '"{{ ansible_python.executable }}" {{ browbeat_path }}/browbeat/prescribe.py {{ browbeat_path }}/metadata'

View File

@ -281,7 +281,7 @@ echo "---------------------------"
echo "Creating ansible inventory file:" echo "Creating ansible inventory file:"
echo "---------------------------" echo "---------------------------"
echo "" echo ""
echo "[browbeat]" | tee ${ansible_inventory_file} echo "[Browbeat]" | tee ${ansible_inventory_file}
echo "# Pick host depending on desired install" | tee -a ${ansible_inventory_file} echo "# Pick host depending on desired install" | tee -a ${ansible_inventory_file}
if [ "${uncomment_localhost}" = true ]; then if [ "${uncomment_localhost}" = true ]; then
echo "localhost" | tee -a ${ansible_inventory_file} echo "localhost" | tee -a ${ansible_inventory_file}
@ -291,10 +291,10 @@ else
echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file} echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file}
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[undercloud]" | tee -a ${ansible_inventory_file} echo "[Undercloud]" | tee -a ${ansible_inventory_file}
echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file} echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file}
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[controller]" | tee -a ${ansible_inventory_file} echo "[Controller]" | tee -a ${ansible_inventory_file}
if [[ ${#controller_hn} -gt 0 ]]; then if [[ ${#controller_hn} -gt 0 ]]; then
for ct in ${controller_hn[@]}; do for ct in ${controller_hn[@]}; do
ironic_uuid='' ironic_uuid=''
@ -310,7 +310,7 @@ if [[ ${#controller_hn} -gt 0 ]]; then
done done
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[networker]" | tee -a ${ansible_inventory_file} echo "[Networker]" | tee -a ${ansible_inventory_file}
if [[ ${#networker_hn} -gt 0 ]]; then if [[ ${#networker_hn} -gt 0 ]]; then
for networker in ${networker_hn[@]}; do for networker in ${networker_hn[@]}; do
ironic_uuid='' ironic_uuid=''
@ -326,7 +326,7 @@ if [[ ${#networker_hn} -gt 0 ]]; then
done done
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[blockstorage]" | tee -a ${ansible_inventory_file} echo "[BlockStorage]" | tee -a ${ansible_inventory_file}
if [[ ${#blockstorage_hn} -gt 0 ]]; then if [[ ${#blockstorage_hn} -gt 0 ]]; then
for blockstorage in ${blockstorage_hn[@]}; do for blockstorage in ${blockstorage_hn[@]}; do
ironic_uuid='' ironic_uuid=''
@ -342,7 +342,7 @@ if [[ ${#blockstorage_hn} -gt 0 ]]; then
done done
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[objectstorage]" | tee -a ${ansible_inventory_file} echo "[ObjectStorage]" | tee -a ${ansible_inventory_file}
if [[ ${#objectstorage_hn} -gt 0 ]]; then if [[ ${#objectstorage_hn} -gt 0 ]]; then
for objectstorage in ${objectstorage_hn[@]}; do for objectstorage in ${objectstorage_hn[@]}; do
ironic_uuid='' ironic_uuid=''
@ -358,7 +358,7 @@ if [[ ${#objectstorage_hn} -gt 0 ]]; then
done done
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[cephstorage]" | tee -a ${ansible_inventory_file} echo "[CephStorage]" | tee -a ${ansible_inventory_file}
if [[ ${#cephstorage_hn} -gt 0 ]]; then if [[ ${#cephstorage_hn} -gt 0 ]]; then
for cephstorage in ${cephstorage_hn[@]}; do for cephstorage in ${cephstorage_hn[@]}; do
ironic_uuid='' ironic_uuid=''
@ -374,7 +374,7 @@ if [[ ${#cephstorage_hn} -gt 0 ]]; then
done done
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[compute]" | tee -a ${ansible_inventory_file} echo "[Compute]" | tee -a ${ansible_inventory_file}
if [[ ${#compute_hn} -gt 0 ]]; then if [[ ${#compute_hn} -gt 0 ]]; then
for compute in ${compute_hn[@]}; do for compute in ${compute_hn[@]}; do
ironic_uuid='' ironic_uuid=''
@ -393,22 +393,22 @@ if [[ ${#controller_hn} -gt 0 ]] || [[ ${#blockstorage_hn} -gt 0 ]] || [[ ${#obj
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[overcloud:children]" | tee -a ${ansible_inventory_file} echo "[overcloud:children]" | tee -a ${ansible_inventory_file}
if [[ ${#controller_hn} -gt 0 ]]; then if [[ ${#controller_hn} -gt 0 ]]; then
echo "controller" | tee -a ${ansible_inventory_file} echo "Controller" | tee -a ${ansible_inventory_file}
fi fi
if [[ ${#networker_hn} -gt 0 ]]; then if [[ ${#networker_hn} -gt 0 ]]; then
echo "networker" | tee -a ${ansible_inventory_file} echo "Networker" | tee -a ${ansible_inventory_file}
fi fi
if [[ ${#blockstorage_hn} -gt 0 ]]; then if [[ ${#blockstorage_hn} -gt 0 ]]; then
echo "blockstorage" | tee -a ${ansible_inventory_file} echo "BlockStorage" | tee -a ${ansible_inventory_file}
fi fi
if [[ ${#objectstorage_hn} -gt 0 ]]; then if [[ ${#objectstorage_hn} -gt 0 ]]; then
echo "objectstorage" | tee -a ${ansible_inventory_file} echo "ObjectStorage" | tee -a ${ansible_inventory_file}
fi fi
if [[ ${#cephstorage_hn} -gt 0 ]]; then if [[ ${#cephstorage_hn} -gt 0 ]]; then
echo "cephstorage" | tee -a ${ansible_inventory_file} echo "CephStorage" | tee -a ${ansible_inventory_file}
fi fi
if [[ ${#compute_hn} -gt 0 ]]; then if [[ ${#compute_hn} -gt 0 ]]; then
echo "compute" | tee -a ${ansible_inventory_file} echo "Compute" | tee -a ${ansible_inventory_file}
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[overcloud:vars]" | tee -a ${ansible_inventory_file} echo "[overcloud:vars]" | tee -a ${ansible_inventory_file}
@ -422,11 +422,11 @@ if [[ ${#other_hn} -gt 0 ]]; then
done done
fi fi
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[graphite]" | tee -a ${ansible_inventory_file} echo "[Graphite]" | tee -a ${ansible_inventory_file}
echo "## example host entry." | tee -a ${ansible_inventory_file} echo "## example host entry." | tee -a ${ansible_inventory_file}
echo "#host-01" | tee -a ${ansible_inventory_file} echo "#host-01" | tee -a ${ansible_inventory_file}
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[grafana]" | tee -a ${ansible_inventory_file} echo "[Grafana]" | tee -a ${ansible_inventory_file}
echo "## example host entry." | tee -a ${ansible_inventory_file} echo "## example host entry." | tee -a ${ansible_inventory_file}
echo "#host-02" | tee -a ${ansible_inventory_file} echo "#host-02" | tee -a ${ansible_inventory_file}
@ -440,7 +440,7 @@ echo "[elk-client]" | tee -a ${ansible_inventory_file}
echo "## example host entry." | tee -a ${ansible_inventory_file} echo "## example host entry." | tee -a ${ansible_inventory_file}
echo "#host-02" | tee -a ${ansible_inventory_file} echo "#host-02" | tee -a ${ansible_inventory_file}
echo "" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file}
echo "[stockpile]" | tee -a ${ansible_inventory_file} echo "[Stockpile]" | tee -a ${ansible_inventory_file}
echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file} echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file}
echo "---------------------------" echo "---------------------------"

View File

@ -0,0 +1,54 @@
#!/bin/bash
function usage
{
echo "usage: generate_tripleo_hostfile.sh"
echo " [-t | --tripleo_ip_address <tripleo_ip_address> [-l | --localhost]]"
echo " [-o | --overcloud_stack_name <overcloud_stack_name>]"
echo " [-u | --user <user>]"
echo " [-c | --ceph_stack_name <ceph_stack_name>]"
echo " [-h | --help]"
echo "Generates ssh config file to use with an TripleO undercloud host as a jumpbox and creates ansible inventory file."
}
user="stack"
uncomment_localhost=false
tripleo_ip_address=
while [ "$1" != "" ]; do
case $1 in
-l | --localhost ) uncomment_localhost=true
tripleo_ip_address="localhost"
;;
-t | --tripleo_ip_address )
shift
tripleo_ip_address=$1
;;
-u | --user )
shift
user=$1
;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac
shift
done
if [ -z "$tripleo_ip_address" ]; then
usage
exit 1
fi
out_file="hosts.yml"
if [ $uncomment_localhost ]; then
source ~/stackrc
tripleo-ansible-inventory --static-yaml-inventory ${out_file}
else
file_path=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" ${user}@${tripleo_ip_address} ". ~/stackrc; tripleo-ansible-inventory --static-yaml-inventory ${out_file}; pwd ${out_file}")
scp -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" ${user}@${tripleo_ip_address}:${file_path}/${out_file} .
fi
sed -i '1iBrowbeat:\n hosts:\n undercloud: {}' ${out_file}
sed -i '$aStockpile:\n hosts:\n undercloud: {}' ${out_file}

View File

@ -3,7 +3,7 @@
# Playbook to install Browbeat (Rally + Shaker) on undercloud # Playbook to install Browbeat (Rally + Shaker) on undercloud
# #
- hosts: browbeat - hosts: Browbeat
remote_user: "{{ browbeat_user }}" remote_user: "{{ browbeat_user }}"
roles: roles:
- common - common
@ -19,7 +19,7 @@
- { role: workloads, when: install_browbeat_workloads} - { role: workloads, when: install_browbeat_workloads}
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: controller, compute - hosts: Controller, Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
roles: roles:
- no-sshd-dns - no-sshd-dns

View File

@ -16,7 +16,7 @@
# #
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
vars: vars:
config_type: undercloud config_type: undercloud
@ -34,7 +34,7 @@
tags: undercloud tags: undercloud
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: controller config_type: controller
@ -53,7 +53,7 @@
tags: controller tags: controller
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: networker - hosts: Networker
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: networker config_type: networker
@ -71,7 +71,7 @@
tags: networker tags: networker
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: blockstorage - hosts: BlockStorage
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: blockstorage config_type: blockstorage
@ -89,7 +89,7 @@
tags: blockstorage tags: blockstorage
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: objectstorage - hosts: ObjectStorage
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: objectstorage config_type: objectstorage
@ -107,7 +107,7 @@
tags: objectstorage tags: objectstorage
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: cephstorage - hosts: CephStorage
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: cephstorage config_type: cephstorage
@ -125,7 +125,7 @@
tags: cephstorage tags: cephstorage
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: compute - hosts: Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: compute config_type: compute

View File

@ -9,7 +9,7 @@
# ansible-playbook -i hosts install/collectd.yml --tags="compute" # ansible-playbook -i hosts install/collectd.yml --tags="compute"
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
vars: vars:
config_type: undercloud config_type: undercloud
@ -21,7 +21,7 @@
tags: undercloud tags: undercloud
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: controller - hosts: Controller
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: controller config_type: controller
@ -32,7 +32,7 @@
- { role: collectd, when: collectd_controller|bool } - { role: collectd, when: collectd_controller|bool }
tags: controller tags: controller
- hosts: compute - hosts: Compute
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: compute config_type: compute
@ -43,7 +43,7 @@
- { role: collectd, when: collectd_compute|bool } - { role: collectd, when: collectd_compute|bool }
tags: compute tags: compute
- hosts: networker - hosts: Networker
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: networker config_type: networker
@ -54,7 +54,7 @@
- { role: collectd, when: collectd_networker|bool } - { role: collectd, when: collectd_networker|bool }
tags: networker tags: networker
- hosts: blockstroage - hosts: BlockStroage
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: blockstorage config_type: blockstorage
@ -65,7 +65,7 @@
- { role: collectd, when: collectd_blockstorage|bool } - { role: collectd, when: collectd_blockstorage|bool }
tags: blockstorage tags: blockstorage
- hosts: objectstorage - hosts: ObjectStorage
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: objectstorage config_type: objectstorage
@ -76,7 +76,7 @@
- { role: collectd, when: collectd_objectstorage|bool } - { role: collectd, when: collectd_objectstorage|bool }
tags: objectstorage tags: objectstorage
- hosts: cephstorage - hosts: CephStorage
remote_user: "{{ host_remote_user }}" remote_user: "{{ host_remote_user }}"
vars: vars:
config_type: cephstorage config_type: cephstorage
@ -86,5 +86,3 @@
- { role: common, when: collectd_cephstorage|bool } - { role: common, when: collectd_cephstorage|bool }
- { role: collectd, when: collectd_cephstorage|bool } - { role: collectd, when: collectd_cephstorage|bool }
tags: cephstorage tags: cephstorage

View File

@ -30,7 +30,7 @@
tags: guest tags: guest
environment: "{{proxy_env}}" environment: "{{proxy_env}}"
- hosts: graphite - hosts: Graphite
remote_user: root remote_user: root
vars: vars:
config_type: graphite config_type: graphite

View File

@ -3,7 +3,7 @@
# Playbook to install Grafana # Playbook to install Grafana
# #
- hosts: grafana - hosts: Grafana
remote_user: root remote_user: root
roles: roles:
- {role: epel, when: ansible_distribution_major_version == '7'} - {role: epel, when: ansible_distribution_major_version == '7'}

View File

@ -3,7 +3,7 @@
# Playbook to install Carbon and Graphite # Playbook to install Carbon and Graphite
# #
- hosts: graphite - hosts: Graphite
remote_user: root remote_user: root
roles: roles:
- {role: epel, when: ansible_distribution_major_version == '7'} - {role: epel, when: ansible_distribution_major_version == '7'}

View File

@ -2,7 +2,7 @@
# #
# enables Ironic StatsD metrics and points at the StatsD host configured in groupvars/all.yml # enables Ironic StatsD metrics and points at the StatsD host configured in groupvars/all.yml
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
roles: roles:
- statsd-ironic - statsd-ironic

View File

@ -58,7 +58,7 @@
name: "{{item}}" name: "{{item}}"
state: present state: present
become: true become: true
when: "(('controller' in group_names and keystone_overcloud_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and keystone_undercloud_collectd_plugin))" when: "(('Controller' in group_names and keystone_overcloud_collectd_plugin and inventory_hostname == groups['Controller'][0]) or ('Undercloud' in group_names and keystone_undercloud_collectd_plugin))"
with_items: with_items:
- libdbi-dbd-mysql - libdbi-dbd-mysql
- collectd-dbi - collectd-dbi
@ -69,24 +69,24 @@
command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password
become: true become: true
register: mysql_root_password register: mysql_root_password
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: (Undercloud) Get mysql root password - name: (Undercloud) Get mysql root password
shell: cat /home/stack/undercloud-passwords.conf | grep 'undercloud_db_password=' | sed 's/undercloud_db_password=//g' shell: cat /home/stack/undercloud-passwords.conf | grep 'undercloud_db_password=' | sed 's/undercloud_db_password=//g'
register: undercloud_mysql_password register: undercloud_mysql_password
when: "'undercloud' in group_names" when: "'Undercloud' in group_names"
- name: (Undercloud) Get password - name: (Undercloud) Get password
become: true become: true
shell: "hiera admin_password | awk '{$0=\"Environment=OS_PASSWORD=\"$0;print }'" shell: "hiera admin_password | awk '{$0=\"Environment=OS_PASSWORD=\"$0;print }'"
register: undercloud_password register: undercloud_password
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
- name: (Undercloud) Get stackrc - name: (Undercloud) Get stackrc
remote_user: "{{local_remote_user}}" remote_user: "{{local_remote_user}}"
shell: "cat /home/stack/stackrc | egrep '^OS_[AUT]|^OS_PRO' | awk '{$0=\"Environment=\"$0;print }'" shell: "cat /home/stack/stackrc | egrep '^OS_[AUT]|^OS_PRO' | awk '{$0=\"Environment=\"$0;print }'"
register: stackrc_file register: stackrc_file
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
- name: (Undercloud) Add environment variables to collectd.service systemd file - name: (Undercloud) Add environment variables to collectd.service systemd file
become: true become: true
@ -95,7 +95,7 @@
insertafter: '\[Service\]' insertafter: '\[Service\]'
line: "{{item}}" line: "{{item}}"
with_items: "{{stackrc_file.stdout_lines | default(omit)}}" with_items: "{{stackrc_file.stdout_lines | default(omit)}}"
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
- name: (Undercloud) Add environment variables to collectd.service systemd file - name: (Undercloud) Add environment variables to collectd.service systemd file
become: true become: true
@ -104,14 +104,14 @@
insertafter: '\[Service\]' insertafter: '\[Service\]'
line: "{{item}}" line: "{{item}}"
with_items: "{{undercloud_password.stdout_lines | default(omit)}}" with_items: "{{undercloud_password.stdout_lines | default(omit)}}"
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
- name: (Controller, delegated to UC) Get overcloudrc - name: (Controller, delegated to UC) Get overcloudrc
remote_user: "{{local_remote_user}}" remote_user: "{{local_remote_user}}"
shell: "cat /home/stack/overcloudrc | grep 'export OS' | awk '{gsub(/export /,\"Environment=\");print }'" shell: "cat /home/stack/overcloudrc | grep 'export OS' | awk '{gsub(/export /,\"Environment=\");print }'"
delegate_to: "{{groups['undercloud'][0]}}" delegate_to: "{{groups['Undercloud'][0]}}"
register: overcloudrc_file register: overcloudrc_file
when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
- name: (Controller) Add environment variables to collectd.service systemd file - name: (Controller) Add environment variables to collectd.service systemd file
become: true become: true
@ -120,7 +120,7 @@
insertafter: '\[Service\]' insertafter: '\[Service\]'
line: "{{item}}" line: "{{item}}"
with_items: "{{overcloudrc_file.stdout_lines | default(omit)}}" with_items: "{{overcloudrc_file.stdout_lines | default(omit)}}"
when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
# Apache Request Response Timing # Apache Request Response Timing
- name: (Newton, Ocata) Deploy Apache httpd.conf for request timings - name: (Newton, Ocata) Deploy Apache httpd.conf for request timings
@ -132,7 +132,7 @@
group: root group: root
mode: 0644 mode: 0644
backup: true backup: true
when: "('controller' in group_names and apache_controller_collectd_request_time) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)" when: "('Controller' in group_names and apache_controller_collectd_request_time) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)"
- name: (Queens/Pike) Patch Apache httpd.conf for request timings - name: (Queens/Pike) Patch Apache httpd.conf for request timings
become: true become: true
@ -142,7 +142,7 @@
- /var/lib/config-data/puppet-generated/keystone/etc/httpd/conf/httpd.conf - /var/lib/config-data/puppet-generated/keystone/etc/httpd/conf/httpd.conf
- /var/lib/config-data/puppet-generated/nova_placement/etc/httpd/conf/httpd.conf - /var/lib/config-data/puppet-generated/nova_placement/etc/httpd/conf/httpd.conf
when: when:
- "'controller' in group_names" - "'Controller' in group_names"
- apache_controller_collectd_request_time - apache_controller_collectd_request_time
- "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)" - "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)"
@ -152,7 +152,7 @@
name: httpd name: httpd
state: restarted state: restarted
enabled: true enabled: true
when: "('controller' in group_names and apache_controller_collectd_request_time) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)" when: "('Controller' in group_names and apache_controller_collectd_request_time) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)"
- name: (Queens/Pike) Restart Gnocchi/Keystone/Nova Placement API Containers - name: (Queens/Pike) Restart Gnocchi/Keystone/Nova Placement API Containers
become: true become: true
@ -162,7 +162,7 @@
- keystone - keystone
- nova_placement - nova_placement
when: when:
- "'controller' in group_names" - "'Controller' in group_names"
- apache_controller_collectd_request_time - apache_controller_collectd_request_time
- "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)" - "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)"
# End Apache Request Response Timing # End Apache Request Response Timing
@ -175,17 +175,17 @@
owner: root owner: root
group: root group: root
become: true become: true
when: "(('controller' in group_names and apache_controller_collectd_plugin) or ('undercloud' in group_names and apache_undercloud_collectd_plugin))" when: "(('Controller' in group_names and apache_controller_collectd_plugin) or ('Undercloud' in group_names and apache_undercloud_collectd_plugin))"
- name: (Undercloud) Allow httpd to listen to port ({{apache_undercloud_mod_status_port}}) - name: (Undercloud) Allow httpd to listen to port ({{apache_undercloud_mod_status_port}})
command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_undercloud_mod_status_port}}" command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_undercloud_mod_status_port}}"
become: true become: true
when: "('undercloud' in group_names and apache_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and apache_undercloud_collectd_plugin)"
- name: (Controller) Allow httpd to listen to port ({{apache_controller_mod_status_port}}) - name: (Controller) Allow httpd to listen to port ({{apache_controller_mod_status_port}})
command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_controller_mod_status_port}}" command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_controller_mod_status_port}}"
become: true become: true
when: "(ansible_selinux['status'] == 'enabled') and ('controller' in group_names and apache_controller_collectd_plugin)" when: "(ansible_selinux['status'] == 'enabled') and ('Controller' in group_names and apache_controller_collectd_plugin)"
- name: Restart Apache - name: Restart Apache
service: service:
@ -193,13 +193,13 @@
state: restarted state: restarted
enabled: true enabled: true
become: true become: true
when: "(('controller' in group_names and apache_controller_collectd_plugin) or ('undercloud' in group_names and apache_undercloud_collectd_plugin))" when: "(('Controller' in group_names and apache_controller_collectd_plugin) or ('Undercloud' in group_names and apache_undercloud_collectd_plugin))"
# End Apache Monitoring # End Apache Monitoring
- name: Reload systemd units - name: Reload systemd units
command: systemctl daemon-reload command: systemctl daemon-reload
become: true become: true
when: "('controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" when: "('Controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]) or ('Undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
- name: (All Nodes) Copy python plugins - name: (All Nodes) Copy python plugins
copy: copy:
@ -230,7 +230,7 @@
dest: /usr/local/bin/collectd_rabbitmq_monitoring.py dest: /usr/local/bin/collectd_rabbitmq_monitoring.py
- src: collectd_swift_stat.py - src: collectd_swift_stat.py
dest: /usr/local/bin/collectd_swift_stat.py dest: /usr/local/bin/collectd_swift_stat.py
when: "('controller' in group_names and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names)" when: "('Controller' in group_names and inventory_hostname == groups['Controller'][0]) or ('Undercloud' in group_names)"
- name: Copy python plugins - name: Copy python plugins
copy: copy:
@ -243,7 +243,7 @@
with_items: with_items:
- src: collectd_ovsagent.py - src: collectd_ovsagent.py
dest: /usr/local/bin/collectd_ovsagent.py dest: /usr/local/bin/collectd_ovsagent.py
when: "('controller' in group_names ) or ('compute' in group_names) or ('networker' in group_names)" when: "('Controller' in group_names ) or ('Compute' in group_names) or ('Networker' in group_names)"
- name: Copy exec plugins - name: Copy exec plugins
copy: copy:
@ -256,49 +256,49 @@
with_items: with_items:
- src: ovs_flows.sh - src: ovs_flows.sh
dest: /usr/local/bin/ovs_flows.sh dest: /usr/local/bin/ovs_flows.sh
when: "('controller' in group_names ) or ('compute' in group_names)" when: "('Controller' in group_names ) or ('Compute' in group_names)"
# Rabbitmq monitoring # Rabbitmq monitoring
- name: Install pyrabbit - name: Install pyrabbit
easy_install: easy_install:
name: pyrabbit name: pyrabbit
become: true become: true
when: "(('controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin))" when: "(('Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]) or ('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin))"
- name: Enable Rabbitmq management plugin - name: Enable Rabbitmq management plugin
command: /sbin/rabbitmq-plugins enable rabbitmq_management command: /sbin/rabbitmq-plugins enable rabbitmq_management
become: true become: true
when: "(('controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin))" when: "(('Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]) or ('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin))"
- name: (Undercloud) Get ctlplane ip address - name: (Undercloud) Get ctlplane ip address
shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}' shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}'
register: undercloud_ctlplane_ip_address register: undercloud_ctlplane_ip_address
become: true become: true
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
- name: (Undercloud) Get Rabbitmq username - name: (Undercloud) Get Rabbitmq username
shell: cat undercloud-passwords.conf | grep undercloud_rabbit_username | awk -F '=' '{print $2}' shell: cat undercloud-passwords.conf | grep undercloud_rabbit_username | awk -F '=' '{print $2}'
register: undercloud_rabbitmq_username register: undercloud_rabbitmq_username
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
- name: (Undercloud) Get Rabbitmq password - name: (Undercloud) Get Rabbitmq password
shell: cat undercloud-passwords.conf | grep undercloud_rabbit_password | awk -F '=' '{print $2}' shell: cat undercloud-passwords.conf | grep undercloud_rabbit_password | awk -F '=' '{print $2}'
register: undercloud_rabbitmq_password register: undercloud_rabbitmq_password
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
# Works with: Newton, Ocata # Works with: Newton, Ocata
- name: (Controller) Get Rabbitmq username - name: (Controller) Get Rabbitmq username
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user
register: controller0_rabbitmq_username register: controller0_rabbitmq_username
become: true become: true
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
# Works with: Newton, Ocata # Works with: Newton, Ocata
- name: (Controller) Get Rabbitmq password - name: (Controller) Get Rabbitmq password
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass
register: controller0_rabbitmq_password register: controller0_rabbitmq_password
become: true become: true
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
# End Rabbitmq monitoring # End Rabbitmq monitoring
# Gnocchi Swift Stat Service monitoring # Gnocchi Swift Stat Service monitoring
@ -306,25 +306,25 @@
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_authurl command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_authurl
register: controller0_gnocchi_swift_authurl register: controller0_gnocchi_swift_authurl
become: true become: true
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
- name: Get Gnocchi Swift Auth Version - name: Get Gnocchi Swift Auth Version
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_auth_version command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_auth_version
register: controller0_gnocchi_swift_authversion register: controller0_gnocchi_swift_authversion
become: true become: true
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
- name: Get Gnocchi Swift User - name: Get Gnocchi Swift User
shell: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_user | sed 's/service://' shell: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_user | sed 's/service://'
register: controller0_gnocchi_swift_user register: controller0_gnocchi_swift_user
become: true become: true
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
- name: Get Gnocchi Swift Key - name: Get Gnocchi Swift Key
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_key command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_key
register: controller0_gnocchi_swift_auth_key register: controller0_gnocchi_swift_auth_key
become: true become: true
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
# End Swift Stat Service monitoring # End Swift Stat Service monitoring
# CephStorage OSD monitoring # CephStorage OSD monitoring
@ -333,7 +333,7 @@
shell: ls /var/run/ceph/ceph-osd.*.asok | head -n 1 | egrep -o '[0-9]+' shell: ls /var/run/ceph/ceph-osd.*.asok | head -n 1 | egrep -o '[0-9]+'
register: cephstorage_osd_socket register: cephstorage_osd_socket
become: true become: true
when: "('cephstorage' in group_names and ceph_storage_collectd_plugin)" when: "('CephStorage' in group_names and ceph_storage_collectd_plugin)"
# End CephStorage OSD monitoring # End CephStorage OSD monitoring
- name: Configure collectd.conf - name: Configure collectd.conf

View File

@ -2,18 +2,18 @@
LoadModule status_module modules/mod_status.so LoadModule status_module modules/mod_status.so
{% if 'undercloud' in group_names %} {% if 'Undercloud' in group_names %}
Listen {{apache_undercloud_mod_status_port}} Listen {{apache_undercloud_mod_status_port}}
{% endif %} {% endif %}
{% if 'controller' in group_names %} {% if 'Controller' in group_names %}
Listen {{apache_controller_mod_status_port}} Listen {{apache_controller_mod_status_port}}
{% endif %} {% endif %}
ExtendedStatus on ExtendedStatus on
{% if 'undercloud' in group_names %} {% if 'Undercloud' in group_names %}
<VirtualHost *:{{apache_undercloud_mod_status_port}}> <VirtualHost *:{{apache_undercloud_mod_status_port}}>
{% endif %} {% endif %}
{% if 'controller' in group_names %} {% if 'Controller' in group_names %}
<VirtualHost *:{{apache_controller_mod_status_port}}> <VirtualHost *:{{apache_controller_mod_status_port}}>
{% endif %} {% endif %}
<Location /mod_status> <Location /mod_status>

View File

@ -27,7 +27,7 @@ LoadPlugin write_graphite
LoadPlugin apache LoadPlugin apache
{% endif %} {% endif %}
{% if ceph_controller_collectd_plugin %} {% if ceph_controller_collectd_plugin %}
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
LoadPlugin ceph LoadPlugin ceph
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -39,7 +39,7 @@ LoadPlugin conntrack
LoadPlugin network LoadPlugin network
{% endif %} {% endif %}
{% if keystone_overcloud_collectd_plugin %} {% if keystone_overcloud_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
LoadPlugin dbi LoadPlugin dbi
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -125,7 +125,7 @@ PreCacheChain "PreCache"
</Plugin> </Plugin>
{% endif %} {% endif %}
{% if ceph_controller_collectd_plugin %} {% if ceph_controller_collectd_plugin %}
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
{% if ovs_flows_monitoring %} {% if ovs_flows_monitoring %}
<Plugin exec> <Plugin exec>
@ -144,7 +144,7 @@ PreCacheChain "PreCache"
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if ceph_controller_collectd_radosbench_plugin or ceph_controller_collectd_mon_plugin or ceph_controller_collectd_osd_plugin or ceph_controller_collectd_pg_plugin or ceph_controller_collectd_pool_plugin %} {% if ceph_controller_collectd_radosbench_plugin or ceph_controller_collectd_mon_plugin or ceph_controller_collectd_osd_plugin or ceph_controller_collectd_pg_plugin or ceph_controller_collectd_pool_plugin %}
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
LogTraces true LogTraces true
@ -169,7 +169,7 @@ PreCacheChain "PreCache"
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if keystone_overcloud_collectd_plugin %} {% if keystone_overcloud_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin dbi> <Plugin dbi>
<Query token_count> <Query token_count>
@ -191,7 +191,7 @@ PreCacheChain "PreCache"
</Database> </Database>
</Plugin> </Plugin>
{% else %} {% else %}
# Token Count plugin installed and enabled on {{groups['controller'][0]}} # Token Count plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -255,7 +255,7 @@ PreCacheChain "PreCache"
{% endif %} {% endif %}
{%if gnocchi_status_controller_collectd_plugin %} {%if gnocchi_status_controller_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
ModulePath "/usr/local/bin/" ModulePath "/usr/local/bin/"
LogTraces true LogTraces true
@ -267,7 +267,7 @@ PreCacheChain "PreCache"
</Plugin> </Plugin>
{% else %} {% else %}
# Gnocchi status plugin installed and enabled on {{groups['controller'][0]}} # Gnocchi status plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -432,7 +432,7 @@ PreCacheChain "PreCache"
</Plugin> </Plugin>
{%if rabbitmq_controller_collectd_plugin %} {%if rabbitmq_controller_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
ModulePath "/usr/local/bin/" ModulePath "/usr/local/bin/"
LogTraces true LogTraces true
@ -449,11 +449,11 @@ PreCacheChain "PreCache"
</Module> </Module>
</Plugin> </Plugin>
{% else %} {% else %}
# Rabbitmq plugin installed and enabled on {{groups['controller'][0]}} # Rabbitmq plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
{%if swift_stat_controller_collectd_plugin %} {%if swift_stat_controller_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
ModulePath "/usr/local/bin/" ModulePath "/usr/local/bin/"
@ -471,7 +471,7 @@ PreCacheChain "PreCache"
</Module> </Module>
</Plugin> </Plugin>
{% else %} {% else %}
# swift_stat plugin installed and enabled on {{groups['controller'][0]}} # swift_stat plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -482,17 +482,17 @@ PreCacheChain "PreCache"
# ping plugin # ping plugin
{% if ping_plugin %} {% if ping_plugin %}
{% if groups['controller'] | length > 1 %} {% if groups['Controller'] | length > 1 %}
<Plugin "ping"> <Plugin "ping">
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
Host "{{groups['controller'][1]}}" Host "{{groups['Controller'][1]}}"
Host "{{groups['controller'][2]}}" Host "{{groups['Controller'][2]}}"
{% elif inventory_hostname == groups['controller'][1] %} {% elif inventory_hostname == groups['Controller'][1] %}
Host "{{groups['controller'][0]}}" Host "{{groups['Controller'][0]}}"
Host "{{groups['controller'][2]}}" Host "{{groups['Controller'][2]}}"
{% elif inventory_hostname == groups['controller'][2] %} {% elif inventory_hostname == groups['Controller'][2] %}
Host "{{groups['controller'][0]}}" Host "{{groups['Controller'][0]}}"
Host "{{groups['controller'][1]}}" Host "{{groups['Controller'][1]}}"
{% endif %} {% endif %}
Interval {{ping_interval}} Interval {{ping_interval}}
</Plugin> </Plugin>

View File

@ -6,7 +6,7 @@
- name: (Undercloud) Get ctlplane ip address - name: (Undercloud) Get ctlplane ip address
shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}' shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}'
register: undercloud_ctlplane_ip_address register: undercloud_ctlplane_ip_address
when: "'undercloud' in group_names" when: "'Undercloud' in group_names"
- name: Configure mysql for collectd.conf - name: Configure mysql for collectd.conf
block: block:
@ -14,13 +14,13 @@
command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password
become: true become: true
register: mysql_root_password register: mysql_root_password
when: "'controller' in group_names" when: "'Controller' in group_names"
- name: (Undercloud) Get mysql root password - name: (Undercloud) Get mysql root password
shell: | shell: |
grep undercloud_mysql_root_password: undercloud-passwords.conf | sed 's/undercloud_mysql_root_password: //g' grep undercloud_mysql_root_password: undercloud-passwords.conf | sed 's/undercloud_mysql_root_password: //g'
register: undercloud_mysql_password register: undercloud_mysql_password
when: "'undercloud' in group_names" when: "'Undercloud' in group_names"
- name: Configure rabbitmq monitoring - name: Configure rabbitmq monitoring
block: block:
@ -28,25 +28,25 @@
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user
become: true become: true
register: undercloud_rabbitmq_username register: undercloud_rabbitmq_username
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
- name: (Undercloud) Get Rabbitmq password - name: (Undercloud) Get Rabbitmq password
shell: | shell: |
grep undercloud_rabbit_password /home/stack/undercloud-passwords.conf | sed 's/undercloud_rabbit_password: //g' grep undercloud_rabbit_password /home/stack/undercloud-passwords.conf | sed 's/undercloud_rabbit_password: //g'
register: undercloud_rabbitmq_password register: undercloud_rabbitmq_password
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" when: "('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
- name: (Controller) Get Rabbitmq username - name: (Controller) Get Rabbitmq username
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user
register: controller0_rabbitmq_username register: controller0_rabbitmq_username
become: true become: true
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
- name: (Controller) Get Rabbitmq password - name: (Controller) Get Rabbitmq password
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass
register: controller0_rabbitmq_password register: controller0_rabbitmq_password
become: true become: true
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]" when: "'Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]"
- name: Check if Container Files Directory exists - name: Check if Container Files Directory exists
stat: stat:

View File

@ -2,18 +2,18 @@
LoadModule status_module modules/mod_status.so LoadModule status_module modules/mod_status.so
{% if 'undercloud' in group_names %} {% if 'Undercloud' in group_names %}
Listen {{apache_undercloud_mod_status_port}} Listen {{apache_undercloud_mod_status_port}}
{% endif %} {% endif %}
{% if 'controller' in group_names %} {% if 'Controller' in group_names %}
Listen {{apache_controller_mod_status_port}} Listen {{apache_controller_mod_status_port}}
{% endif %} {% endif %}
ExtendedStatus on ExtendedStatus on
{% if 'undercloud' in group_names %} {% if 'Undercloud' in group_names %}
<VirtualHost *:{{apache_undercloud_mod_status_port}}> <VirtualHost *:{{apache_undercloud_mod_status_port}}>
{% endif %} {% endif %}
{% if 'controller' in group_names %} {% if 'Controller' in group_names %}
<VirtualHost *:{{apache_controller_mod_status_port}}> <VirtualHost *:{{apache_controller_mod_status_port}}>
{% endif %} {% endif %}
<Location /mod_status> <Location /mod_status>

View File

@ -30,7 +30,7 @@ LoadPlugin apache
LoadPlugin network LoadPlugin network
{% endif %} {% endif %}
{% if ceph_controller_collectd_plugin %} {% if ceph_controller_collectd_plugin %}
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
LoadPlugin ceph LoadPlugin ceph
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -39,7 +39,7 @@ LoadPlugin cpu
LoadPlugin conntrack LoadPlugin conntrack
{% endif %} {% endif %}
{% if keystone_overcloud_collectd_plugin %} {% if keystone_overcloud_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
LoadPlugin dbi LoadPlugin dbi
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -115,7 +115,7 @@ PreCacheChain "PreCache"
</Plugin> </Plugin>
{% endif %} {% endif %}
{% if ceph_controller_collectd_plugin %} {% if ceph_controller_collectd_plugin %}
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
<Plugin ceph> <Plugin ceph>
LongRunAvgLatency false LongRunAvgLatency false
@ -128,7 +128,7 @@ PreCacheChain "PreCache"
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if ceph_controller_collectd_radosbench_plugin or ceph_controller_collectd_mon_plugin or ceph_controller_collectd_osd_plugin or ceph_controller_collectd_pg_plugin or ceph_controller_collectd_pool_plugin %} {% if ceph_controller_collectd_radosbench_plugin or ceph_controller_collectd_mon_plugin or ceph_controller_collectd_osd_plugin or ceph_controller_collectd_pg_plugin or ceph_controller_collectd_pool_plugin %}
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
LogTraces true LogTraces true
@ -153,7 +153,7 @@ PreCacheChain "PreCache"
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if keystone_overcloud_collectd_plugin %} {% if keystone_overcloud_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin dbi> <Plugin dbi>
<Query token_count> <Query token_count>
@ -175,7 +175,7 @@ PreCacheChain "PreCache"
</Database> </Database>
</Plugin> </Plugin>
{% else %} {% else %}
# Token Count plugin installed and enabled on {{groups['controller'][0]}} # Token Count plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -246,7 +246,7 @@ PreCacheChain "PreCache"
{% endif %} {% endif %}
{%if gnocchi_status_controller_collectd_plugin %} {%if gnocchi_status_controller_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
ModulePath "/usr/local/bin/" ModulePath "/usr/local/bin/"
LogTraces true LogTraces true
@ -258,7 +258,7 @@ PreCacheChain "PreCache"
</Plugin> </Plugin>
{% else %} {% else %}
# Gnocchi status plugin installed and enabled on {{groups['controller'][0]}} # Gnocchi status plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -425,7 +425,7 @@ PreCacheChain "PreCache"
</Plugin> </Plugin>
{%if rabbitmq_controller_collectd_plugin %} {%if rabbitmq_controller_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
ModulePath "/usr/local/bin/" ModulePath "/usr/local/bin/"
LogTraces true LogTraces true
@ -442,11 +442,11 @@ PreCacheChain "PreCache"
</Module> </Module>
</Plugin> </Plugin>
{% else %} {% else %}
# Rabbitmq plugin installed and enabled on {{groups['controller'][0]}} # Rabbitmq plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
{%if swift_stat_controller_collectd_plugin %} {%if swift_stat_controller_collectd_plugin %}
{%if inventory_hostname == groups['controller'][0] %} {%if inventory_hostname == groups['Controller'][0] %}
<Plugin python> <Plugin python>
ModulePath "/usr/local/bin/" ModulePath "/usr/local/bin/"
@ -464,7 +464,7 @@ PreCacheChain "PreCache"
</Module> </Module>
</Plugin> </Plugin>
{% else %} {% else %}
# swift_stat plugin installed and enabled on {{groups['controller'][0]}} # swift_stat plugin installed and enabled on {{groups['Controller'][0]}}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -475,17 +475,17 @@ PreCacheChain "PreCache"
# ping plugin # ping plugin
{% if ping_plugin %} {% if ping_plugin %}
{% if groups['controller'] | length > 1 %} {% if groups['Controller'] | length > 1 %}
<Plugin "ping"> <Plugin "ping">
{% if inventory_hostname == groups['controller'][0] %} {% if inventory_hostname == groups['Controller'][0] %}
Host "{{groups['controller'][1]}}" Host "{{groups['Controller'][1]}}"
Host "{{groups['controller'][2]}}" Host "{{groups['Controller'][2]}}"
{% elif inventory_hostname == groups['controller'][1] %} {% elif inventory_hostname == groups['Controller'][1] %}
Host "{{groups['controller'][0]}}" Host "{{groups['Controller'][0]}}"
Host "{{groups['controller'][2]}}" Host "{{groups['Controller'][2]}}"
{% elif inventory_hostname == groups['controller'][2] %} {% elif inventory_hostname == groups['Controller'][2] %}
Host "{{groups['controller'][0]}}" Host "{{groups['Controller'][0]}}"
Host "{{groups['controller'][1]}}" Host "{{groups['Controller'][1]}}"
{% endif %} {% endif %}
Interval {{ping_interval}} Interval {{ping_interval}}
</Plugin> </Plugin>

View File

@ -56,7 +56,7 @@
dest: "{{home_dir}}/undercloudrc" dest: "{{home_dir}}/undercloudrc"
- name: Get the OS_AUTH_URL value in stackrc - name: Get the OS_AUTH_URL value in stackrc
shell: cat undercloudrc | grep OS_AUTH_URL= shell: cat {{home_dir}}/undercloudrc | grep OS_AUTH_URL=
register: os_auth_url register: os_auth_url
- name: Add v3 to OS_AUTH_URL in stackrc - name: Add v3 to OS_AUTH_URL in stackrc

View File

@ -4,7 +4,7 @@
# #
- hosts: undercloud - hosts: Undercloud
remote_user: "{{ local_remote_user }}" remote_user: "{{ local_remote_user }}"
vars: vars:
- ansible_ssh_pipelining: yes - ansible_ssh_pipelining: yes

View File

@ -3,7 +3,7 @@
# Playbook to build shaker-image # Playbook to build shaker-image
# #
- hosts: browbeat - hosts: Browbeat
remote_user: "{{ browbeat_user }}" remote_user: "{{ browbeat_user }}"
tasks: tasks:
- name: Check external connectivity - name: Check external connectivity

View File

@ -1,5 +1,5 @@
--- ---
- hosts: controller - hosts: Controller
remote_user: "{{host_remote_user}}" remote_user: "{{host_remote_user}}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml
@ -32,7 +32,7 @@
- common - common
- fetch-logs - fetch-logs
- hosts: compute - hosts: Compute
remote_user: "{{host_remote_user}}" remote_user: "{{host_remote_user}}"
vars_files: vars_files:
- ../install/group_vars/all.yml - ../install/group_vars/all.yml

View File

@ -17,6 +17,6 @@
- import_playbook: gather-metadata.yml - import_playbook: gather-metadata.yml
- name: Run Browbeat - name: Run Browbeat
hosts: undercloud hosts: Undercloud
roles: roles:
- browbeat/browbeat-run - browbeat/browbeat-run

View File

@ -15,7 +15,7 @@
- import_playbook: gather-metadata.yml - import_playbook: gather-metadata.yml
- name: Run Browbeat - name: Run Browbeat
hosts: undercloud hosts: Undercloud
roles: roles:
- browbeat/browbeat-run - browbeat/browbeat-run
# - browbeat/browbeat-classify # - browbeat/browbeat-classify

View File

@ -3,13 +3,13 @@
- name: Validate IPMI and instackenv.json - name: Validate IPMI and instackenv.json
hosts: undercloud hosts: Undercloud
gather_facts: yes gather_facts: yes
roles: roles:
- validate-ipmi - validate-ipmi
- name: Deploy the undercloud - name: Deploy the undercloud
hosts: undercloud hosts: Undercloud
gather_facts: no gather_facts: no
roles: roles:
- undercloud-deploy - undercloud-deploy
@ -17,55 +17,55 @@
- import_playbook: undercloud-metrics.yml - import_playbook: undercloud-metrics.yml
- name: copy over config files - name: copy over config files
hosts: undercloud hosts: Undercloud
gather_facts: no gather_facts: no
roles: roles:
- overcloud-prep-config - overcloud-prep-config
- name: Perpare the baremetal overcloud - name: Perpare the baremetal overcloud
hosts: undercloud hosts: Undercloud
gather_facts: yes gather_facts: yes
roles: roles:
- baremetal-prep-overcloud - baremetal-prep-overcloud
- name: Prepare overcloud containers - name: Prepare overcloud containers
hosts: undercloud hosts: Undercloud
gather_facts: no gather_facts: no
roles: roles:
- { role: overcloud-prep-containers, when: containerized_overcloud|bool } - { role: overcloud-prep-containers, when: containerized_overcloud|bool }
- name: Prepare the overcloud images for deployment - name: Prepare the overcloud images for deployment
hosts: undercloud hosts: Undercloud
gather_facts: no gather_facts: no
roles: roles:
- overcloud-prep-images - overcloud-prep-images
- name: Prepare overcloud flavors - name: Prepare overcloud flavors
hosts: undercloud hosts: Undercloud
gather_facts: no gather_facts: no
roles: roles:
- overcloud-prep-flavors - overcloud-prep-flavors
- name: Prepare the undercloud networks for the overcloud deployment - name: Prepare the undercloud networks for the overcloud deployment
hosts: undercloud hosts: Undercloud
gather_facts: no gather_facts: no
roles: roles:
- overcloud-prep-network - overcloud-prep-network
- name: Prepare the SSL Configuration for the overcloud deployment - name: Prepare the SSL Configuration for the overcloud deployment
hosts: undercloud hosts: Undercloud
gather_facts: no gather_facts: no
roles: roles:
- { role: overcloud-ssl, when: ssl_overcloud|bool } - { role: overcloud-ssl, when: ssl_overcloud|bool }
- name: Configure Browbeat - name: Configure Browbeat
hosts: undercloud hosts: Undercloud
roles: roles:
- browbeat/pre-install-setup - browbeat/pre-install-setup
- browbeat/oooq-metadata - browbeat/oooq-metadata
- name: Install Browbeat - name: Install Browbeat
hosts: undercloud hosts: Undercloud
vars: vars:
- results_in_httpd: false - results_in_httpd: false
roles: roles:
@ -74,6 +74,6 @@
- browbeat/template-configs - browbeat/template-configs
- name: Run Browbeat - name: Run Browbeat
hosts: undercloud hosts: Undercloud
roles: roles:
- browbeat/browbeat-run - browbeat/browbeat-run

View File

@ -12,7 +12,7 @@
when: enable_minimal_browbeat|default(false)|bool when: enable_minimal_browbeat|default(false)|bool
- name: Run Browbeat - name: Run Browbeat
hosts: undercloud hosts: Undercloud
roles: roles:
- { role: browbeat/browbeat-run, - { role: browbeat/browbeat-run,
when: enable_minimal_browbeat|default(false)|bool } when: enable_minimal_browbeat|default(false)|bool }

View File

@ -1,5 +1,5 @@
--- ---
- name: Configure Browbeat - name: Configure Browbeat
hosts: undercloud hosts: Undercloud
roles: roles:
- browbeat/pre-install-setup - browbeat/pre-install-setup

View File

@ -1,12 +1,12 @@
--- ---
- hosts: compute - hosts: Compute
remote_user: "heat_admin" remote_user: "heat_admin"
become: true become: true
roles: roles:
- browbeat-metadata/common - browbeat-metadata/common
- browbeat-metadata/compute - browbeat-metadata/compute
- hosts: controller - hosts: Controller
remote_user: "heat_admin" remote_user: "heat_admin"
become: true become: true
roles: roles:
@ -22,7 +22,7 @@
- browbeat-metadata/rabbitmq - browbeat-metadata/rabbitmq
- browbeat-metadata/glance - browbeat-metadata/glance
- hosts: undercloud - hosts: Undercloud
remote_user: "stack" remote_user: "stack"
become: true become: true
roles: roles:
@ -31,7 +31,7 @@
- browbeat-metadata/mistral - browbeat-metadata/mistral
- name: Dump metadata to files - name: Dump metadata to files
hosts: undercloud hosts: Undercloud
roles: roles:
- browbeat-metadata/dump-facts - browbeat-metadata/dump-facts
- browbeat/oooq-metadata - browbeat/oooq-metadata

View File

@ -1,6 +1,6 @@
--- ---
- name: Install Browbeat - name: Install Browbeat
hosts: undercloud hosts: Undercloud
vars: vars:
results_in_httpd: false results_in_httpd: false
statsd_host: "{{ graphite_host }}" statsd_host: "{{ graphite_host }}"

View File

@ -13,7 +13,7 @@
- import_playbook: gather-metadata.yml - import_playbook: gather-metadata.yml
- name: Run Browbeat - name: Run Browbeat
hosts: undercloud hosts: Undercloud
roles: roles:
- browbeat/browbeat-run - browbeat/browbeat-run
- browbeat/browbeat-classify - browbeat/browbeat-classify

View File

@ -10,7 +10,7 @@
shell: docker ps | wc -l shell: docker ps | wc -l
register: docker_ps register: docker_ps
delegate_to: overcloud-controller-0 delegate_to: overcloud-controller-0
when: "'overcloud' in group_names" when: "'Overcloud' in group_names"
ignore_errors: True ignore_errors: True
- name: Set var for container deployment - name: Set var for container deployment

View File

@ -1,6 +1,6 @@
--- ---
- name: Setup Undercloud Metrics - name: Setup Undercloud Metrics
hosts: undercloud hosts: Undercloud
vars: vars:
- config_type: "{{group_names[0]}}" - config_type: "{{group_names[0]}}"
- statsd_host: "{{ graphite_host }}" - statsd_host: "{{ graphite_host }}"

View File

@ -3,7 +3,7 @@
# Tunes overcloud for browbeat/performance # Tunes overcloud for browbeat/performance
# #
- hosts: controller:compute - hosts: Controller:Compute
gather_facts: false gather_facts: false
remote_user: heat-admin remote_user: heat-admin
roles: roles:

View File

@ -24,7 +24,7 @@ class Metadata(object):
def __init__(self): def __init__(self):
# These are the only groups from the ansible inventory, that we are # These are the only groups from the ansible inventory, that we are
# Interested in # Interested in
self._supported_node_types = ['overcloud', 'undercloud'] self._supported_node_types = ['Overcloud', 'Undercloud']
pass pass
def load_file(self, filename): def load_file(self, filename):
@ -83,7 +83,7 @@ class Metadata(object):
def get_version_metadata(self, sys_data): def get_version_metadata(self, sys_data):
version = {} version = {}
for item, dictionary in six.iteritems(sys_data): for item, dictionary in six.iteritems(sys_data):
if 'undercloud' in sys_data[item]['group_names']: if 'Undercloud' in sys_data[item]['group_names']:
if 'stockpile_rhosp_version' in dictionary: if 'stockpile_rhosp_version' in dictionary:
version['rhosp_version'] = dictionary['stockpile_rhosp_version'] version['rhosp_version'] = dictionary['stockpile_rhosp_version']
if 'stockpile_rhosp_major' in dictionary: if 'stockpile_rhosp_major' in dictionary: