use tripleo-ansible-inventry to generate hosts
Change-Id: I54d6eba518910e6651758bc7d46624bafacaef6c
This commit is contained in:
parent
c656da7c6c
commit
461b016f13
@ -33,12 +33,27 @@ Install your public key into stack's authorized\_keys
|
||||
|
||||
# ssh-copy-id stack@<undercloud-ip>
|
||||
|
||||
Then run generate\_tripleo\_hosts.sh script to generate your overcloud's
|
||||
hosts file for ansible and generate a "jumpbox" ssh config:
|
||||
Generate overcloud's inventory file
|
||||
-----------------------------------
|
||||
|
||||
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.
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
# ansible-playbook -i hosts browbeat/adjust-nova-allocation.yml
|
||||
#
|
||||
|
||||
- hosts: controller,compute
|
||||
- hosts: Controller,Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
@ -117,7 +117,7 @@
|
||||
- httpd
|
||||
when:
|
||||
- "'Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode"
|
||||
- "'controller' in group_names"
|
||||
- "'Controller' in group_names"
|
||||
- restart_nova
|
||||
|
||||
- name: (Pike, Queens) Restart Nova Compute Container
|
||||
@ -125,5 +125,5 @@
|
||||
command: docker restart nova_compute
|
||||
when:
|
||||
- "('Pike' in osp_version['content'] | b64decode or 'Queens' in osp_version['content'] | b64decode)"
|
||||
- "'compute' in group_names"
|
||||
- "'Compute' in group_names"
|
||||
- restart_nova
|
||||
|
@ -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'
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -18,7 +18,7 @@
|
||||
# ansible-playbook -i hosts browbeat/adjustment-ceilometer.yml
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: heat-admin
|
||||
gather_facts: false
|
||||
vars:
|
||||
|
@ -1,4 +1,4 @@
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: heat-admin
|
||||
gather_facts: false
|
||||
vars:
|
||||
@ -7,7 +7,7 @@
|
||||
roles:
|
||||
- neutron-firewall
|
||||
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: heat-admin
|
||||
gather_facts: false
|
||||
vars:
|
||||
|
@ -5,7 +5,7 @@
|
||||
# Versions tested: Newton, Ocata
|
||||
#
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
@ -14,7 +14,7 @@
|
||||
- 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"
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -9,7 +9,7 @@
|
||||
# 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 }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -9,7 +9,7 @@
|
||||
# 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 }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -9,7 +9,7 @@
|
||||
# ansible-playbook -i hosts browbeat/adjustment-haproxy.yml -e 'old_maxconn=4096 new_maxconn=8192'
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -7,7 +7,7 @@
|
||||
# ansible-playbook -i hosts browbeat/adjustment-keystone-token.yml -e "token_provider=uuid"
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: heat-admin
|
||||
pre_tasks:
|
||||
- name: Check for variable (token_provider)
|
||||
|
@ -6,7 +6,7 @@
|
||||
# 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
|
||||
gather_facts: false
|
||||
vars:
|
||||
|
@ -22,7 +22,7 @@
|
||||
# ansible-playbook -i hosts browbeat/adjustment-nova-scheduler.yml
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -12,7 +12,7 @@
|
||||
# ansible-playbook -i hosts browbeat/adjustment-workers.yml -e "service=keystone workers=12 keystone_deployment=httpd"
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: heat-admin
|
||||
gather_facts: false
|
||||
vars:
|
||||
|
@ -6,7 +6,7 @@
|
||||
# use the same new archive-policy.
|
||||
#
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Playbook to clean log files on controller nodes
|
||||
#
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: heat-admin
|
||||
gather_facts: false
|
||||
tasks:
|
||||
|
@ -1,4 +1,4 @@
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{host_remote_user}}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
|
@ -74,7 +74,7 @@
|
||||
- name: Setup fernet keys
|
||||
become: true
|
||||
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
|
||||
become: true
|
||||
@ -82,7 +82,7 @@
|
||||
with_items:
|
||||
- 0
|
||||
- 1
|
||||
when: (token_provider == 'fernet') and (inventory_hostname == groups['controller'][0])
|
||||
when: (token_provider == 'fernet') and (inventory_hostname == groups['Controller'][0])
|
||||
changed_when: false
|
||||
|
||||
- name: Copy fernet keys
|
||||
@ -91,7 +91,7 @@
|
||||
with_items:
|
||||
- "0"
|
||||
- "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
|
||||
become: true
|
||||
|
@ -11,7 +11,7 @@
|
||||
# ansible-playbook -i hosts browbeat/scale-virtlogd.yml -e 'max_open_files=10000'
|
||||
#
|
||||
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -10,7 +10,7 @@
|
||||
# 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 }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
@ -25,22 +25,22 @@
|
||||
- name: (Newton, Ocata) Set Controller Task
|
||||
set_fact:
|
||||
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
|
||||
set_fact:
|
||||
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
|
||||
set_fact:
|
||||
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
|
||||
set_fact:
|
||||
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:
|
||||
- run-task-at
|
||||
|
@ -5,7 +5,7 @@
|
||||
# Cuts off the flow of measures into the backlog.
|
||||
#
|
||||
|
||||
- hosts: controller, compute
|
||||
- hosts: Controller, Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
@ -20,22 +20,22 @@
|
||||
- name: (Ocata) Set Controller Polling Daemon
|
||||
set_fact:
|
||||
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
|
||||
set_fact:
|
||||
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
|
||||
set_fact:
|
||||
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
|
||||
set_fact:
|
||||
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
|
||||
systemd:
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Playbook to disable Telemetry Services
|
||||
#
|
||||
|
||||
- hosts: controller, compute
|
||||
- hosts: Controller, Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
@ -67,7 +67,7 @@
|
||||
dest: /root/10-gnocchi_wsgi.conf
|
||||
- src: /etc/httpd/conf.d/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
|
||||
become: true
|
||||
@ -79,21 +79,21 @@
|
||||
- "/etc/httpd/conf.d/10-ceilometer_wsgi.conf"
|
||||
- "/etc/httpd/conf.d/10-gnocchi_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
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
with_items: "{{controller_services}}"
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: Stopping Telemetry Compute Services
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
with_items: "{{compute_services}}"
|
||||
when: "'compute' in group_names"
|
||||
when: "'Compute' in group_names"
|
||||
|
||||
- name: Setting Nova Notification Driver to noop
|
||||
become: true
|
||||
@ -130,7 +130,7 @@
|
||||
group: keystone
|
||||
- dest: /etc/neutron/neutron.conf
|
||||
group: neutron
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: Restart Controller Services to disable notifications
|
||||
systemd:
|
||||
@ -145,10 +145,10 @@
|
||||
- openstack-nova-conductor.service
|
||||
- openstack-nova-scheduler.service
|
||||
- httpd
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: Restart Nova Compute Service to disable notifications
|
||||
systemd:
|
||||
name: openstack-nova-compute.service
|
||||
state: restarted
|
||||
when: "'compute' in group_names"
|
||||
when: "'Compute' in group_names"
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Playbook to reverse disable Telemetry Services playbook
|
||||
#
|
||||
|
||||
- hosts: controller, compute
|
||||
- hosts: Controller, Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
@ -67,7 +67,7 @@
|
||||
dest: /etc/httpd/conf.d/10-gnocchi_wsgi.conf
|
||||
- src: /root/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
|
||||
become: true
|
||||
@ -79,21 +79,21 @@
|
||||
- "/root/10-ceilometer_wsgi.conf"
|
||||
- "/root/10-gnocchi_wsgi.conf"
|
||||
- "/root/10-panko_wsgi.conf"
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: Starting Telemetry Controller Services
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
with_items: "{{controller_services}}"
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: Starting Telemetry Compute Service(s)
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
with_items: "{{compute_services}}"
|
||||
when: "'compute' in group_names"
|
||||
when: "'Compute' in group_names"
|
||||
|
||||
- name: Setting Nova Notification Driver to messagingv2
|
||||
become: true
|
||||
@ -135,7 +135,7 @@
|
||||
- dest: /etc/neutron/neutron.conf
|
||||
group: neutron
|
||||
value:
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: Restart Controller Services to enable notifications
|
||||
systemd:
|
||||
@ -150,10 +150,10 @@
|
||||
- openstack-nova-conductor.service
|
||||
- openstack-nova-scheduler.service
|
||||
- httpd
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: Restart Nova Compute Services to enable notifications
|
||||
systemd:
|
||||
name: openstack-nova-compute.service
|
||||
state: restarted
|
||||
when: "'compute' in group_names"
|
||||
when: "'Compute' in group_names"
|
||||
|
@ -13,7 +13,7 @@
|
||||
# Remember to sync polling daemons afterwards (Restarting openstack-ceilometer-[central,compute])
|
||||
#
|
||||
|
||||
- hosts: controller,compute
|
||||
- hosts: Controller,Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
|
@ -1,18 +1,18 @@
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
roles:
|
||||
- { role: browbeat_logging }
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
roles:
|
||||
- { role: browbeat_logging }
|
||||
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
|
@ -1,4 +1,4 @@
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
@ -8,7 +8,7 @@
|
||||
- { role: osp_version }
|
||||
- { role: filebeat_setup }
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
@ -18,7 +18,7 @@
|
||||
- { role: osp_version }
|
||||
- { role: filebeat_setup }
|
||||
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
|
@ -3,7 +3,7 @@
|
||||
# For podman containers change "container_cli" configuration to podman
|
||||
#
|
||||
|
||||
- hosts: stockpile
|
||||
- hosts: Stockpile
|
||||
tasks:
|
||||
- name: setting facts needed
|
||||
set_fact:
|
||||
@ -16,7 +16,7 @@
|
||||
set_fact:
|
||||
overcloud_user: "{{ host_remote_user }}"
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
tasks:
|
||||
- name: setting facts
|
||||
set_fact:
|
||||
@ -26,7 +26,7 @@
|
||||
vars:
|
||||
stockpile_output_path: "{{ md_output_path }}"
|
||||
|
||||
- hosts: stockpile
|
||||
- hosts: Stockpile
|
||||
tasks:
|
||||
- name: run prescribe
|
||||
command: '"{{ ansible_python.executable }}" {{ browbeat_path }}/browbeat/prescribe.py {{ browbeat_path }}/metadata'
|
||||
|
@ -281,7 +281,7 @@ echo "---------------------------"
|
||||
echo "Creating ansible inventory file:"
|
||||
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}
|
||||
if [ "${uncomment_localhost}" = true ]; then
|
||||
echo "localhost" | tee -a ${ansible_inventory_file}
|
||||
@ -291,10 +291,10 @@ else
|
||||
echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file}
|
||||
fi
|
||||
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 "" | 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
|
||||
for ct in ${controller_hn[@]}; do
|
||||
ironic_uuid=''
|
||||
@ -310,7 +310,7 @@ if [[ ${#controller_hn} -gt 0 ]]; then
|
||||
done
|
||||
fi
|
||||
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
|
||||
for networker in ${networker_hn[@]}; do
|
||||
ironic_uuid=''
|
||||
@ -326,7 +326,7 @@ if [[ ${#networker_hn} -gt 0 ]]; then
|
||||
done
|
||||
fi
|
||||
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
|
||||
for blockstorage in ${blockstorage_hn[@]}; do
|
||||
ironic_uuid=''
|
||||
@ -342,7 +342,7 @@ if [[ ${#blockstorage_hn} -gt 0 ]]; then
|
||||
done
|
||||
fi
|
||||
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
|
||||
for objectstorage in ${objectstorage_hn[@]}; do
|
||||
ironic_uuid=''
|
||||
@ -358,7 +358,7 @@ if [[ ${#objectstorage_hn} -gt 0 ]]; then
|
||||
done
|
||||
fi
|
||||
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
|
||||
for cephstorage in ${cephstorage_hn[@]}; do
|
||||
ironic_uuid=''
|
||||
@ -374,7 +374,7 @@ if [[ ${#cephstorage_hn} -gt 0 ]]; then
|
||||
done
|
||||
fi
|
||||
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
|
||||
for compute in ${compute_hn[@]}; do
|
||||
ironic_uuid=''
|
||||
@ -393,22 +393,22 @@ if [[ ${#controller_hn} -gt 0 ]] || [[ ${#blockstorage_hn} -gt 0 ]] || [[ ${#obj
|
||||
echo "" | tee -a ${ansible_inventory_file}
|
||||
echo "[overcloud:children]" | tee -a ${ansible_inventory_file}
|
||||
if [[ ${#controller_hn} -gt 0 ]]; then
|
||||
echo "controller" | tee -a ${ansible_inventory_file}
|
||||
echo "Controller" | tee -a ${ansible_inventory_file}
|
||||
fi
|
||||
if [[ ${#networker_hn} -gt 0 ]]; then
|
||||
echo "networker" | tee -a ${ansible_inventory_file}
|
||||
echo "Networker" | tee -a ${ansible_inventory_file}
|
||||
fi
|
||||
if [[ ${#blockstorage_hn} -gt 0 ]]; then
|
||||
echo "blockstorage" | tee -a ${ansible_inventory_file}
|
||||
echo "BlockStorage" | tee -a ${ansible_inventory_file}
|
||||
fi
|
||||
if [[ ${#objectstorage_hn} -gt 0 ]]; then
|
||||
echo "objectstorage" | tee -a ${ansible_inventory_file}
|
||||
echo "ObjectStorage" | tee -a ${ansible_inventory_file}
|
||||
fi
|
||||
if [[ ${#cephstorage_hn} -gt 0 ]]; then
|
||||
echo "cephstorage" | tee -a ${ansible_inventory_file}
|
||||
echo "CephStorage" | tee -a ${ansible_inventory_file}
|
||||
fi
|
||||
if [[ ${#compute_hn} -gt 0 ]]; then
|
||||
echo "compute" | tee -a ${ansible_inventory_file}
|
||||
echo "Compute" | tee -a ${ansible_inventory_file}
|
||||
fi
|
||||
echo "" | tee -a ${ansible_inventory_file}
|
||||
echo "[overcloud:vars]" | tee -a ${ansible_inventory_file}
|
||||
@ -422,11 +422,11 @@ if [[ ${#other_hn} -gt 0 ]]; then
|
||||
done
|
||||
fi
|
||||
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 "#host-01" | 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 "#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 "#host-02" | 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 "---------------------------"
|
||||
|
54
ansible/generate_tripleo_inventory.sh
Executable file
54
ansible/generate_tripleo_inventory.sh
Executable 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}
|
@ -3,7 +3,7 @@
|
||||
# Playbook to install Browbeat (Rally + Shaker) on undercloud
|
||||
#
|
||||
|
||||
- hosts: browbeat
|
||||
- hosts: Browbeat
|
||||
remote_user: "{{ browbeat_user }}"
|
||||
roles:
|
||||
- common
|
||||
@ -19,7 +19,7 @@
|
||||
- { role: workloads, when: install_browbeat_workloads}
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: controller, compute
|
||||
- hosts: Controller, Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
roles:
|
||||
- no-sshd-dns
|
||||
|
@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
vars:
|
||||
config_type: undercloud
|
||||
@ -34,7 +34,7 @@
|
||||
tags: undercloud
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: controller
|
||||
@ -53,7 +53,7 @@
|
||||
tags: controller
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: networker
|
||||
- hosts: Networker
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: networker
|
||||
@ -71,7 +71,7 @@
|
||||
tags: networker
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: blockstorage
|
||||
- hosts: BlockStorage
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: blockstorage
|
||||
@ -89,7 +89,7 @@
|
||||
tags: blockstorage
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: objectstorage
|
||||
- hosts: ObjectStorage
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: objectstorage
|
||||
@ -107,7 +107,7 @@
|
||||
tags: objectstorage
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: cephstorage
|
||||
- hosts: CephStorage
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: cephstorage
|
||||
@ -125,7 +125,7 @@
|
||||
tags: cephstorage
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: compute
|
||||
|
@ -9,7 +9,7 @@
|
||||
# ansible-playbook -i hosts install/collectd.yml --tags="compute"
|
||||
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
vars:
|
||||
config_type: undercloud
|
||||
@ -21,7 +21,7 @@
|
||||
tags: undercloud
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: controller
|
||||
@ -32,7 +32,7 @@
|
||||
- { role: collectd, when: collectd_controller|bool }
|
||||
tags: controller
|
||||
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: compute
|
||||
@ -43,7 +43,7 @@
|
||||
- { role: collectd, when: collectd_compute|bool }
|
||||
tags: compute
|
||||
|
||||
- hosts: networker
|
||||
- hosts: Networker
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: networker
|
||||
@ -54,7 +54,7 @@
|
||||
- { role: collectd, when: collectd_networker|bool }
|
||||
tags: networker
|
||||
|
||||
- hosts: blockstroage
|
||||
- hosts: BlockStroage
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: blockstorage
|
||||
@ -65,7 +65,7 @@
|
||||
- { role: collectd, when: collectd_blockstorage|bool }
|
||||
tags: blockstorage
|
||||
|
||||
- hosts: objectstorage
|
||||
- hosts: ObjectStorage
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: objectstorage
|
||||
@ -76,7 +76,7 @@
|
||||
- { role: collectd, when: collectd_objectstorage|bool }
|
||||
tags: objectstorage
|
||||
|
||||
- hosts: cephstorage
|
||||
- hosts: CephStorage
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
config_type: cephstorage
|
||||
@ -86,5 +86,3 @@
|
||||
- { role: common, when: collectd_cephstorage|bool }
|
||||
- { role: collectd, when: collectd_cephstorage|bool }
|
||||
tags: cephstorage
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
tags: guest
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
- hosts: graphite
|
||||
- hosts: Graphite
|
||||
remote_user: root
|
||||
vars:
|
||||
config_type: graphite
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Playbook to install Grafana
|
||||
#
|
||||
|
||||
- hosts: grafana
|
||||
- hosts: Grafana
|
||||
remote_user: root
|
||||
roles:
|
||||
- {role: epel, when: ansible_distribution_major_version == '7'}
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Playbook to install Carbon and Graphite
|
||||
#
|
||||
|
||||
- hosts: graphite
|
||||
- hosts: Graphite
|
||||
remote_user: root
|
||||
roles:
|
||||
- {role: epel, when: ansible_distribution_major_version == '7'}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# enables Ironic StatsD metrics and points at the StatsD host configured in groupvars/all.yml
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
roles:
|
||||
- statsd-ironic
|
||||
|
@ -58,7 +58,7 @@
|
||||
name: "{{item}}"
|
||||
state: present
|
||||
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:
|
||||
- libdbi-dbd-mysql
|
||||
- collectd-dbi
|
||||
@ -69,24 +69,24 @@
|
||||
command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password
|
||||
become: true
|
||||
register: mysql_root_password
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: (Undercloud) Get mysql root password
|
||||
shell: cat /home/stack/undercloud-passwords.conf | grep 'undercloud_db_password=' | sed 's/undercloud_db_password=//g'
|
||||
register: undercloud_mysql_password
|
||||
when: "'undercloud' in group_names"
|
||||
when: "'Undercloud' in group_names"
|
||||
|
||||
- name: (Undercloud) Get password
|
||||
become: true
|
||||
shell: "hiera admin_password | awk '{$0=\"Environment=OS_PASSWORD=\"$0;print }'"
|
||||
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
|
||||
remote_user: "{{local_remote_user}}"
|
||||
shell: "cat /home/stack/stackrc | egrep '^OS_[AUT]|^OS_PRO' | awk '{$0=\"Environment=\"$0;print }'"
|
||||
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
|
||||
become: true
|
||||
@ -95,7 +95,7 @@
|
||||
insertafter: '\[Service\]'
|
||||
line: "{{item}}"
|
||||
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
|
||||
become: true
|
||||
@ -104,14 +104,14 @@
|
||||
insertafter: '\[Service\]'
|
||||
line: "{{item}}"
|
||||
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
|
||||
remote_user: "{{local_remote_user}}"
|
||||
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
|
||||
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
|
||||
become: true
|
||||
@ -120,7 +120,7 @@
|
||||
insertafter: '\[Service\]'
|
||||
line: "{{item}}"
|
||||
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
|
||||
- name: (Newton, Ocata) Deploy Apache httpd.conf for request timings
|
||||
@ -132,7 +132,7 @@
|
||||
group: root
|
||||
mode: 0644
|
||||
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
|
||||
become: true
|
||||
@ -142,7 +142,7 @@
|
||||
- /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
|
||||
when:
|
||||
- "'controller' in group_names"
|
||||
- "'Controller' in group_names"
|
||||
- apache_controller_collectd_request_time
|
||||
- "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)"
|
||||
|
||||
@ -152,7 +152,7 @@
|
||||
name: httpd
|
||||
state: restarted
|
||||
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
|
||||
become: true
|
||||
@ -162,7 +162,7 @@
|
||||
- keystone
|
||||
- nova_placement
|
||||
when:
|
||||
- "'controller' in group_names"
|
||||
- "'Controller' in group_names"
|
||||
- apache_controller_collectd_request_time
|
||||
- "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)"
|
||||
# End Apache Request Response Timing
|
||||
@ -175,17 +175,17 @@
|
||||
owner: root
|
||||
group: root
|
||||
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}})
|
||||
command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_undercloud_mod_status_port}}"
|
||||
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}})
|
||||
command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_controller_mod_status_port}}"
|
||||
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
|
||||
service:
|
||||
@ -193,13 +193,13 @@
|
||||
state: restarted
|
||||
enabled: 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
|
||||
|
||||
- name: Reload systemd units
|
||||
command: systemctl daemon-reload
|
||||
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
|
||||
copy:
|
||||
@ -230,7 +230,7 @@
|
||||
dest: /usr/local/bin/collectd_rabbitmq_monitoring.py
|
||||
- src: 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
|
||||
copy:
|
||||
@ -243,7 +243,7 @@
|
||||
with_items:
|
||||
- src: 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
|
||||
copy:
|
||||
@ -256,49 +256,49 @@
|
||||
with_items:
|
||||
- src: 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
|
||||
- name: Install pyrabbit
|
||||
easy_install:
|
||||
name: pyrabbit
|
||||
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
|
||||
command: /sbin/rabbitmq-plugins enable rabbitmq_management
|
||||
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
|
||||
shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}'
|
||||
register: undercloud_ctlplane_ip_address
|
||||
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
|
||||
shell: cat undercloud-passwords.conf | grep undercloud_rabbit_username | awk -F '=' '{print $2}'
|
||||
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
|
||||
shell: cat undercloud-passwords.conf | grep undercloud_rabbit_password | awk -F '=' '{print $2}'
|
||||
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
|
||||
- name: (Controller) Get Rabbitmq username
|
||||
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user
|
||||
register: controller0_rabbitmq_username
|
||||
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
|
||||
- name: (Controller) Get Rabbitmq password
|
||||
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass
|
||||
register: controller0_rabbitmq_password
|
||||
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
|
||||
|
||||
# Gnocchi Swift Stat Service monitoring
|
||||
@ -306,25 +306,25 @@
|
||||
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_authurl
|
||||
register: controller0_gnocchi_swift_authurl
|
||||
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
|
||||
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_auth_version
|
||||
register: controller0_gnocchi_swift_authversion
|
||||
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
|
||||
shell: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_user | sed 's/service://'
|
||||
register: controller0_gnocchi_swift_user
|
||||
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
|
||||
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_key
|
||||
register: controller0_gnocchi_swift_auth_key
|
||||
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
|
||||
|
||||
# CephStorage OSD monitoring
|
||||
@ -333,7 +333,7 @@
|
||||
shell: ls /var/run/ceph/ceph-osd.*.asok | head -n 1 | egrep -o '[0-9]+'
|
||||
register: cephstorage_osd_socket
|
||||
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
|
||||
|
||||
- name: Configure collectd.conf
|
||||
|
@ -2,18 +2,18 @@
|
||||
|
||||
LoadModule status_module modules/mod_status.so
|
||||
|
||||
{% if 'undercloud' in group_names %}
|
||||
{% if 'Undercloud' in group_names %}
|
||||
Listen {{apache_undercloud_mod_status_port}}
|
||||
{% endif %}
|
||||
{% if 'controller' in group_names %}
|
||||
{% if 'Controller' in group_names %}
|
||||
Listen {{apache_controller_mod_status_port}}
|
||||
{% endif %}
|
||||
|
||||
ExtendedStatus on
|
||||
{% if 'undercloud' in group_names %}
|
||||
{% if 'Undercloud' in group_names %}
|
||||
<VirtualHost *:{{apache_undercloud_mod_status_port}}>
|
||||
{% endif %}
|
||||
{% if 'controller' in group_names %}
|
||||
{% if 'Controller' in group_names %}
|
||||
<VirtualHost *:{{apache_controller_mod_status_port}}>
|
||||
{% endif %}
|
||||
<Location /mod_status>
|
||||
|
@ -27,7 +27,7 @@ LoadPlugin write_graphite
|
||||
LoadPlugin apache
|
||||
{% endif %}
|
||||
{% if ceph_controller_collectd_plugin %}
|
||||
{% if inventory_hostname == groups['controller'][0] %}
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
LoadPlugin ceph
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -39,7 +39,7 @@ LoadPlugin conntrack
|
||||
LoadPlugin network
|
||||
{% endif %}
|
||||
{% if keystone_overcloud_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
LoadPlugin dbi
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -125,7 +125,7 @@ PreCacheChain "PreCache"
|
||||
</Plugin>
|
||||
{% endif %}
|
||||
{% if ceph_controller_collectd_plugin %}
|
||||
{% if inventory_hostname == groups['controller'][0] %}
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
{% if ovs_flows_monitoring %}
|
||||
<Plugin exec>
|
||||
@ -144,7 +144,7 @@ PreCacheChain "PreCache"
|
||||
{% 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 inventory_hostname == groups['controller'][0] %}
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
<Plugin python>
|
||||
LogTraces true
|
||||
@ -169,7 +169,7 @@ PreCacheChain "PreCache"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if keystone_overcloud_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
<Plugin dbi>
|
||||
<Query token_count>
|
||||
@ -191,7 +191,7 @@ PreCacheChain "PreCache"
|
||||
</Database>
|
||||
</Plugin>
|
||||
{% else %}
|
||||
# Token Count plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# Token Count plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@ -255,7 +255,7 @@ PreCacheChain "PreCache"
|
||||
|
||||
{% endif %}
|
||||
{%if gnocchi_status_controller_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
<Plugin python>
|
||||
ModulePath "/usr/local/bin/"
|
||||
LogTraces true
|
||||
@ -267,7 +267,7 @@ PreCacheChain "PreCache"
|
||||
</Plugin>
|
||||
|
||||
{% else %}
|
||||
# Gnocchi status plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# Gnocchi status plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -432,7 +432,7 @@ PreCacheChain "PreCache"
|
||||
</Plugin>
|
||||
|
||||
{%if rabbitmq_controller_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
<Plugin python>
|
||||
ModulePath "/usr/local/bin/"
|
||||
LogTraces true
|
||||
@ -449,11 +449,11 @@ PreCacheChain "PreCache"
|
||||
</Module>
|
||||
</Plugin>
|
||||
{% else %}
|
||||
# Rabbitmq plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# Rabbitmq plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%if swift_stat_controller_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
<Plugin python>
|
||||
ModulePath "/usr/local/bin/"
|
||||
@ -471,7 +471,7 @@ PreCacheChain "PreCache"
|
||||
</Module>
|
||||
</Plugin>
|
||||
{% else %}
|
||||
# swift_stat plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# swift_stat plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@ -482,17 +482,17 @@ PreCacheChain "PreCache"
|
||||
|
||||
# ping plugin
|
||||
{% if ping_plugin %}
|
||||
{% if groups['controller'] | length > 1 %}
|
||||
{% if groups['Controller'] | length > 1 %}
|
||||
<Plugin "ping">
|
||||
{% if inventory_hostname == groups['controller'][0] %}
|
||||
Host "{{groups['controller'][1]}}"
|
||||
Host "{{groups['controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['controller'][1] %}
|
||||
Host "{{groups['controller'][0]}}"
|
||||
Host "{{groups['controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['controller'][2] %}
|
||||
Host "{{groups['controller'][0]}}"
|
||||
Host "{{groups['controller'][1]}}"
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
Host "{{groups['Controller'][1]}}"
|
||||
Host "{{groups['Controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['Controller'][1] %}
|
||||
Host "{{groups['Controller'][0]}}"
|
||||
Host "{{groups['Controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['Controller'][2] %}
|
||||
Host "{{groups['Controller'][0]}}"
|
||||
Host "{{groups['Controller'][1]}}"
|
||||
{% endif %}
|
||||
Interval {{ping_interval}}
|
||||
</Plugin>
|
||||
|
@ -6,7 +6,7 @@
|
||||
- name: (Undercloud) Get ctlplane ip address
|
||||
shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}'
|
||||
register: undercloud_ctlplane_ip_address
|
||||
when: "'undercloud' in group_names"
|
||||
when: "'Undercloud' in group_names"
|
||||
|
||||
- name: Configure mysql for collectd.conf
|
||||
block:
|
||||
@ -14,13 +14,13 @@
|
||||
command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password
|
||||
become: true
|
||||
register: mysql_root_password
|
||||
when: "'controller' in group_names"
|
||||
when: "'Controller' in group_names"
|
||||
|
||||
- name: (Undercloud) Get mysql root password
|
||||
shell: |
|
||||
grep undercloud_mysql_root_password: undercloud-passwords.conf | sed 's/undercloud_mysql_root_password: //g'
|
||||
register: undercloud_mysql_password
|
||||
when: "'undercloud' in group_names"
|
||||
when: "'Undercloud' in group_names"
|
||||
|
||||
- name: Configure rabbitmq monitoring
|
||||
block:
|
||||
@ -28,25 +28,25 @@
|
||||
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user
|
||||
become: true
|
||||
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
|
||||
shell: |
|
||||
grep undercloud_rabbit_password /home/stack/undercloud-passwords.conf | sed 's/undercloud_rabbit_password: //g'
|
||||
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
|
||||
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user
|
||||
register: controller0_rabbitmq_username
|
||||
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
|
||||
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass
|
||||
register: controller0_rabbitmq_password
|
||||
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
|
||||
stat:
|
||||
|
@ -2,18 +2,18 @@
|
||||
|
||||
LoadModule status_module modules/mod_status.so
|
||||
|
||||
{% if 'undercloud' in group_names %}
|
||||
{% if 'Undercloud' in group_names %}
|
||||
Listen {{apache_undercloud_mod_status_port}}
|
||||
{% endif %}
|
||||
{% if 'controller' in group_names %}
|
||||
{% if 'Controller' in group_names %}
|
||||
Listen {{apache_controller_mod_status_port}}
|
||||
{% endif %}
|
||||
|
||||
ExtendedStatus on
|
||||
{% if 'undercloud' in group_names %}
|
||||
{% if 'Undercloud' in group_names %}
|
||||
<VirtualHost *:{{apache_undercloud_mod_status_port}}>
|
||||
{% endif %}
|
||||
{% if 'controller' in group_names %}
|
||||
{% if 'Controller' in group_names %}
|
||||
<VirtualHost *:{{apache_controller_mod_status_port}}>
|
||||
{% endif %}
|
||||
<Location /mod_status>
|
||||
|
@ -30,7 +30,7 @@ LoadPlugin apache
|
||||
LoadPlugin network
|
||||
{% endif %}
|
||||
{% if ceph_controller_collectd_plugin %}
|
||||
{% if inventory_hostname == groups['controller'][0] %}
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
LoadPlugin ceph
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -39,7 +39,7 @@ LoadPlugin cpu
|
||||
LoadPlugin conntrack
|
||||
{% endif %}
|
||||
{% if keystone_overcloud_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
LoadPlugin dbi
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -115,7 +115,7 @@ PreCacheChain "PreCache"
|
||||
</Plugin>
|
||||
{% endif %}
|
||||
{% if ceph_controller_collectd_plugin %}
|
||||
{% if inventory_hostname == groups['controller'][0] %}
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
<Plugin ceph>
|
||||
LongRunAvgLatency false
|
||||
@ -128,7 +128,7 @@ PreCacheChain "PreCache"
|
||||
{% 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 inventory_hostname == groups['controller'][0] %}
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
<Plugin python>
|
||||
LogTraces true
|
||||
@ -153,7 +153,7 @@ PreCacheChain "PreCache"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if keystone_overcloud_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
<Plugin dbi>
|
||||
<Query token_count>
|
||||
@ -175,7 +175,7 @@ PreCacheChain "PreCache"
|
||||
</Database>
|
||||
</Plugin>
|
||||
{% else %}
|
||||
# Token Count plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# Token Count plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@ -246,7 +246,7 @@ PreCacheChain "PreCache"
|
||||
|
||||
{% endif %}
|
||||
{%if gnocchi_status_controller_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
<Plugin python>
|
||||
ModulePath "/usr/local/bin/"
|
||||
LogTraces true
|
||||
@ -258,7 +258,7 @@ PreCacheChain "PreCache"
|
||||
</Plugin>
|
||||
|
||||
{% else %}
|
||||
# Gnocchi status plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# Gnocchi status plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -425,7 +425,7 @@ PreCacheChain "PreCache"
|
||||
</Plugin>
|
||||
|
||||
{%if rabbitmq_controller_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
<Plugin python>
|
||||
ModulePath "/usr/local/bin/"
|
||||
LogTraces true
|
||||
@ -442,11 +442,11 @@ PreCacheChain "PreCache"
|
||||
</Module>
|
||||
</Plugin>
|
||||
{% else %}
|
||||
# Rabbitmq plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# Rabbitmq plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%if swift_stat_controller_collectd_plugin %}
|
||||
{%if inventory_hostname == groups['controller'][0] %}
|
||||
{%if inventory_hostname == groups['Controller'][0] %}
|
||||
|
||||
<Plugin python>
|
||||
ModulePath "/usr/local/bin/"
|
||||
@ -464,7 +464,7 @@ PreCacheChain "PreCache"
|
||||
</Module>
|
||||
</Plugin>
|
||||
{% else %}
|
||||
# swift_stat plugin installed and enabled on {{groups['controller'][0]}}
|
||||
# swift_stat plugin installed and enabled on {{groups['Controller'][0]}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@ -475,17 +475,17 @@ PreCacheChain "PreCache"
|
||||
|
||||
# ping plugin
|
||||
{% if ping_plugin %}
|
||||
{% if groups['controller'] | length > 1 %}
|
||||
{% if groups['Controller'] | length > 1 %}
|
||||
<Plugin "ping">
|
||||
{% if inventory_hostname == groups['controller'][0] %}
|
||||
Host "{{groups['controller'][1]}}"
|
||||
Host "{{groups['controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['controller'][1] %}
|
||||
Host "{{groups['controller'][0]}}"
|
||||
Host "{{groups['controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['controller'][2] %}
|
||||
Host "{{groups['controller'][0]}}"
|
||||
Host "{{groups['controller'][1]}}"
|
||||
{% if inventory_hostname == groups['Controller'][0] %}
|
||||
Host "{{groups['Controller'][1]}}"
|
||||
Host "{{groups['Controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['Controller'][1] %}
|
||||
Host "{{groups['Controller'][0]}}"
|
||||
Host "{{groups['Controller'][2]}}"
|
||||
{% elif inventory_hostname == groups['Controller'][2] %}
|
||||
Host "{{groups['Controller'][0]}}"
|
||||
Host "{{groups['Controller'][1]}}"
|
||||
{% endif %}
|
||||
Interval {{ping_interval}}
|
||||
</Plugin>
|
||||
|
@ -56,7 +56,7 @@
|
||||
dest: "{{home_dir}}/undercloudrc"
|
||||
|
||||
- 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
|
||||
|
||||
- name: Add v3 to OS_AUTH_URL in stackrc
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
vars:
|
||||
- ansible_ssh_pipelining: yes
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Playbook to build shaker-image
|
||||
#
|
||||
|
||||
- hosts: browbeat
|
||||
- hosts: Browbeat
|
||||
remote_user: "{{ browbeat_user }}"
|
||||
tasks:
|
||||
- name: Check external connectivity
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "{{host_remote_user}}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
@ -32,7 +32,7 @@
|
||||
- common
|
||||
- fetch-logs
|
||||
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: "{{host_remote_user}}"
|
||||
vars_files:
|
||||
- ../install/group_vars/all.yml
|
||||
|
@ -17,6 +17,6 @@
|
||||
- import_playbook: gather-metadata.yml
|
||||
|
||||
- name: Run Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- browbeat/browbeat-run
|
||||
|
@ -15,7 +15,7 @@
|
||||
- import_playbook: gather-metadata.yml
|
||||
|
||||
- name: Run Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- browbeat/browbeat-run
|
||||
# - browbeat/browbeat-classify
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
|
||||
- name: Validate IPMI and instackenv.json
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- validate-ipmi
|
||||
|
||||
- name: Deploy the undercloud
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- undercloud-deploy
|
||||
@ -17,55 +17,55 @@
|
||||
- import_playbook: undercloud-metrics.yml
|
||||
|
||||
- name: copy over config files
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-config
|
||||
|
||||
- name: Perpare the baremetal overcloud
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- baremetal-prep-overcloud
|
||||
|
||||
- name: Prepare overcloud containers
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-prep-containers, when: containerized_overcloud|bool }
|
||||
|
||||
- name: Prepare the overcloud images for deployment
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-images
|
||||
|
||||
- name: Prepare overcloud flavors
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-flavors
|
||||
|
||||
- name: Prepare the undercloud networks for the overcloud deployment
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-network
|
||||
|
||||
- name: Prepare the SSL Configuration for the overcloud deployment
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-ssl, when: ssl_overcloud|bool }
|
||||
|
||||
- name: Configure Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- browbeat/pre-install-setup
|
||||
- browbeat/oooq-metadata
|
||||
|
||||
- name: Install Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
vars:
|
||||
- results_in_httpd: false
|
||||
roles:
|
||||
@ -74,6 +74,6 @@
|
||||
- browbeat/template-configs
|
||||
|
||||
- name: Run Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- browbeat/browbeat-run
|
||||
|
@ -12,7 +12,7 @@
|
||||
when: enable_minimal_browbeat|default(false)|bool
|
||||
|
||||
- name: Run Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- { role: browbeat/browbeat-run,
|
||||
when: enable_minimal_browbeat|default(false)|bool }
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Configure Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- browbeat/pre-install-setup
|
||||
|
@ -1,12 +1,12 @@
|
||||
---
|
||||
- hosts: compute
|
||||
- hosts: Compute
|
||||
remote_user: "heat_admin"
|
||||
become: true
|
||||
roles:
|
||||
- browbeat-metadata/common
|
||||
- browbeat-metadata/compute
|
||||
|
||||
- hosts: controller
|
||||
- hosts: Controller
|
||||
remote_user: "heat_admin"
|
||||
become: true
|
||||
roles:
|
||||
@ -22,7 +22,7 @@
|
||||
- browbeat-metadata/rabbitmq
|
||||
- browbeat-metadata/glance
|
||||
|
||||
- hosts: undercloud
|
||||
- hosts: Undercloud
|
||||
remote_user: "stack"
|
||||
become: true
|
||||
roles:
|
||||
@ -31,7 +31,7 @@
|
||||
- browbeat-metadata/mistral
|
||||
|
||||
- name: Dump metadata to files
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- browbeat-metadata/dump-facts
|
||||
- browbeat/oooq-metadata
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Install Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
vars:
|
||||
results_in_httpd: false
|
||||
statsd_host: "{{ graphite_host }}"
|
||||
|
@ -13,7 +13,7 @@
|
||||
- import_playbook: gather-metadata.yml
|
||||
|
||||
- name: Run Browbeat
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
roles:
|
||||
- browbeat/browbeat-run
|
||||
- browbeat/browbeat-classify
|
||||
|
@ -10,7 +10,7 @@
|
||||
shell: docker ps | wc -l
|
||||
register: docker_ps
|
||||
delegate_to: overcloud-controller-0
|
||||
when: "'overcloud' in group_names"
|
||||
when: "'Overcloud' in group_names"
|
||||
ignore_errors: True
|
||||
|
||||
- name: Set var for container deployment
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Setup Undercloud Metrics
|
||||
hosts: undercloud
|
||||
hosts: Undercloud
|
||||
vars:
|
||||
- config_type: "{{group_names[0]}}"
|
||||
- statsd_host: "{{ graphite_host }}"
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Tunes overcloud for browbeat/performance
|
||||
#
|
||||
|
||||
- hosts: controller:compute
|
||||
- hosts: Controller:Compute
|
||||
gather_facts: false
|
||||
remote_user: heat-admin
|
||||
roles:
|
||||
|
@ -24,7 +24,7 @@ class Metadata(object):
|
||||
def __init__(self):
|
||||
# These are the only groups from the ansible inventory, that we are
|
||||
# Interested in
|
||||
self._supported_node_types = ['overcloud', 'undercloud']
|
||||
self._supported_node_types = ['Overcloud', 'Undercloud']
|
||||
pass
|
||||
|
||||
def load_file(self, filename):
|
||||
@ -83,7 +83,7 @@ class Metadata(object):
|
||||
def get_version_metadata(self, sys_data):
|
||||
version = {}
|
||||
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:
|
||||
version['rhosp_version'] = dictionary['stockpile_rhosp_version']
|
||||
if 'stockpile_rhosp_major' in dictionary:
|
||||
|
Loading…
x
Reference in New Issue
Block a user