Merge branch 'master' of https://github.com/jtaleric/browbeat
This commit is contained in:
commit
cc94e730a1
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
- hosts : director
|
||||
roles:
|
||||
- director
|
||||
|
|
|
@ -21,6 +21,8 @@ while read line; do
|
|||
fi
|
||||
done < <(nova list | grep over)
|
||||
|
||||
truncate -s 0 ${file}
|
||||
|
||||
if [[ ${#compute} -gt 0 ]]; then
|
||||
echo "[computes]">> $file
|
||||
for c in ${compute[@]}; do
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
ansible_sudo: yes
|
||||
|
||||
tuned_profile: virtual-host
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
|
||||
ansible_sudo: yes
|
||||
|
||||
#
|
||||
|
@ -17,6 +16,7 @@ connmon_host: 192.0.2.1
|
|||
|
||||
dns_server: 8.8.8.8
|
||||
|
||||
tuned_profile: throughput-performance
|
||||
rabbitmq_fd: 2048
|
||||
mariadb_max_connections: 4096
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
---
|
||||
ansible_sudo: yes
|
||||
ansible_sudo: yes
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
---
|
||||
#
|
||||
# Tests common to Controller/Compute/Director
|
||||
#
|
||||
|
||||
- name: test to see if selinux is running
|
||||
- name: Get selinux mode
|
||||
command: getenforce
|
||||
changed_when: no
|
||||
register: sestatus
|
||||
|
||||
- name: Check tuned profile on controllers
|
||||
- name: Check tuned running on host
|
||||
command: tuned-adm active
|
||||
register: tuned_result
|
||||
changed_when: no
|
||||
failed_when: tuned_result.rc == -1
|
||||
ignore_errors: True
|
||||
|
||||
- name: Check max_connections
|
||||
shell: mysql -e "show variables like 'max_connections';" | grep max_connections | awk '{print $2}'
|
||||
register: max_connections_result
|
||||
- name: Check tuned for correct profile on host
|
||||
command: tuned-adm active
|
||||
register: tuned_result
|
||||
changed_when: no
|
||||
- fail: "The database does not have max_connections set properly"
|
||||
failed_when: max_connections_result.stdout|int < mariadb_max_connections
|
||||
|
||||
- name : Check rabbitmq file descriptors
|
||||
shell: rabbitmqctl status | grep file_descriptors | awk -F',' '{print $3}' | sed 's/.$//'
|
||||
register: rabbitmq_fd_result
|
||||
changed_when: no
|
||||
- fail: "RabbitMQ does not have fd setup proerply"
|
||||
failed_when: rabbitmq_fd_result.stdout|int < rabbitmq_fd
|
||||
failed_when: "'{{ tuned_profile }}' not in '{{ tuned_result.stdout }}'"
|
||||
ignore_errors: True
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
#
|
||||
# Tests specific to compute hosts
|
||||
#
|
||||
|
||||
- name: Check if swap device exists
|
||||
command: swapon -s
|
||||
register: swap_result
|
||||
changed_when: no
|
||||
failed_when: "'dev' not in '{{ swap_result.stdout }}'"
|
||||
ignore_errors: True
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
#
|
||||
# Tests specific to controller hosts
|
||||
#
|
||||
|
||||
- name: Check max_connections
|
||||
shell: mysql -e "show variables like 'max_connections';" | grep max_connections | awk '{print $2}'
|
||||
register: max_connections_result
|
||||
changed_when: no
|
||||
- fail: "The database does not have max_connections set properly"
|
||||
failed_when: max_connections_result.stdout|int < mariadb_max_connections
|
||||
|
||||
- name : Check rabbitmq file descriptors
|
||||
shell: rabbitmqctl status | grep file_descriptors | awk -F',' '{print $3}' | sed 's/.$//'
|
||||
register: rabbitmq_fd_result
|
||||
changed_when: no
|
||||
- fail: "RabbitMQ does not have fd setup proerply"
|
||||
failed_when: rabbitmq_fd_result.stdout|int < rabbitmq_fd
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- name: Ensure keystone.conf is properly configured
|
||||
ini_file:
|
||||
dest: /etc/keystone/keystone.conf
|
||||
mode: 0640
|
||||
section: "{{ item.section }}"
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
backup: yes
|
||||
with_items:
|
||||
- { section: DEFAULT, option: verbose, value: False }
|
||||
- { section: DEFAULT, option: debug, value: False }
|
||||
- { section: DEFAULT, option: public_workers, value: "{{ num_workers }}" }
|
||||
- { section: DEFAULT, option: admin_workers, value: "{{ num_workers }}" }
|
||||
|
||||
- name: Unmanage Keystone Service from pacemaker
|
||||
shell : pcs resource unmanage {{ item }}
|
||||
with_items:
|
||||
- openstack-keystone
|
||||
|
||||
- name: Restart Keystone services
|
||||
service: name={{ item }} state=restarted
|
||||
with_items:
|
||||
- openstack-keystone
|
||||
|
||||
- name: Manage Keystone Service from pacemaker
|
||||
shell : pcs resource manage {{ item }}
|
||||
with_items:
|
||||
- openstack-keystone
|
|
@ -6,8 +6,8 @@
|
|||
ignore_errors: true
|
||||
changed_when: no
|
||||
|
||||
- name : Enable Connmon in nova.conf
|
||||
shell : sed -i 's/mysql:/mysq+connmon:/g' /etc/nova/nova.conf
|
||||
- name : Enable Connmon in nova.conf
|
||||
shell : sed -i 's/mysql:/mysql+connmon:/g' /etc/nova/nova.conf
|
||||
when: connmon and nova_mysql.rc == 0
|
||||
|
||||
- name: Check for connmon_service in nova.conf
|
||||
|
@ -17,7 +17,7 @@
|
|||
register : nova_connmon_service
|
||||
changed_when: no
|
||||
|
||||
- name : Enable Connmon in nova.conf
|
||||
- name : Enable Connmon in nova.conf
|
||||
shell : sed -i '/connection = mysql/s/$/?connmon_service=default/' /etc/nova/nova.conf
|
||||
when: connmon and nova_connmon_service.rc == 1
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
#
|
||||
# Playbook to change number of workers for nova and keystone services
|
||||
#
|
||||
|
||||
- hosts : controllers
|
||||
remote_user: heat-admin
|
||||
roles:
|
||||
- nova
|
||||
- keystone
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
#
|
||||
# Playbook to check OSP install for common performance tuning issues
|
||||
#
|
||||
|
||||
- hosts : controllers
|
||||
remote_user: heat-admin
|
||||
roles:
|
||||
- common
|
||||
- controller
|
||||
|
||||
- hosts : computes
|
||||
remote_user: heat-admin
|
||||
roles:
|
||||
- common
|
||||
- compute
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
#
|
||||
# Playbook to install connmon and pbench on director/overcloud
|
||||
#
|
||||
#
|
||||
|
||||
- hosts : controllers
|
||||
remote_user: heat-admin
|
||||
roles:
|
||||
- common
|
||||
- connmon
|
||||
- nova
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
- include: director.yml
|
||||
- include: overcloud.yml
|
Loading…
Reference in New Issue