Adjusting organization of ansible playbooks for browbeat. Added keystone eventlet change number of workers plays.

This commit is contained in:
Alex Krzos 2015-11-18 13:40:29 -05:00
parent 4e79375eb4
commit 73e907e38d
14 changed files with 111 additions and 25 deletions

View File

@ -1,6 +1,8 @@
---
#
#
#
- hosts : director
roles:
- director

View File

@ -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

View File

@ -0,0 +1,4 @@
---
ansible_sudo: yes
tuned_profile: virtual-host

View File

@ -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

View File

@ -1,2 +1,2 @@
---
ansible_sudo: yes
ansible_sudo: yes

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,10 @@
---
#
# Playbook to change number of workers for nova and keystone services
#
- hosts : controllers
remote_user: heat-admin
roles:
- nova
- keystone

16
ansible/site-check.yml Normal file
View File

@ -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

View File

@ -1,9 +1,9 @@
---
#
# Playbook to install connmon and pbench on director/overcloud
#
#
- hosts : controllers
remote_user: heat-admin
roles:
- common
- connmon
- nova

View File

@ -1,3 +0,0 @@
---
- include: director.yml
- include: overcloud.yml