Update Adjustments

Allow adjustments to do more than just workers. Also implement tags to
break tasks up, or chain them.

+ Adding L3 Adjustments
+ Removing tags...
+ Removing Debug & Verbose logging - break out into different commit
+ Remove become from group_vars/all

Change-Id: Ic50094345f44284e267a5e48b1f60c04b568a520
This commit is contained in:
Joe Talerico 2016-02-03 16:46:47 -05:00 committed by Joe
parent b219d23cc0
commit 95be69f5a6
18 changed files with 94 additions and 30 deletions

View File

@ -0,0 +1,17 @@
---
#
# Playbook to change number of Neutron l3 agents
#
# Change l3 agents Example:
# ansible-playbook -i hosts browbeat/adjustment-l3.yml -e "max_l3_agents=3 min_l3_agents=3"
#
- hosts: controller
remote_user: heat-admin
gather_facts: false
vars:
ansible_become: true
max_l3_agents: 3
min_l3_agents: 2
roles:
- neutron-l3

View File

@ -0,0 +1,23 @@
---
#
# Playbook to change number of workers for nova,cinder and keystone services
#
# Change Workers Example:
# ansible-playbook -i hosts browbeat/adjustment-workers.yml -e "workers=12"
#
# Change Workers and Keystone Deployment Example:
# ansible-playbook -i hosts browbeat/adjustment-workers.yml -e "workers=12 keystone_deployment=httpd"
#
- hosts: controller
remote_user: heat-admin
gather_facts: false
vars:
ansible_become: true
workers: 24
threads: 6
roles:
- nova-workers
- neutron-workers
- keystone-workers
- cinder-workers

View File

@ -1,21 +0,0 @@
---
#
# Playbook to change number of workers for nova and keystone services
#
# Change Workers Example:
# ansible-playbook -i hosts browbeat/adjustment.yml -e "workers=12"
#
# Change Workers and Keystone Deployment Example:
# ansible-playbook -i hosts browbeat/adjustment.yml -e "workers=12 keystone_deployment=httpd"
#
- hosts: controller
remote_user: heat-admin
gather_facts: false
vars:
workers: 24
threads: 6
roles:
- nova
- neutron
- keystone

View File

@ -1,2 +1 @@
---
ansible_become: true

View File

@ -9,5 +9,7 @@
- hosts: controller
remote_user: heat-admin
vars:
ansible_become: true
roles:
- keystone-token

View File

@ -14,10 +14,8 @@
backup: yes
with_items:
- { section: DEFAULT, option: osapi_volume_workers, value: "{{ workers }}" }
- { section: DEFAULT, option: debug, value: False }
notify:
- unmanage cinder services
- restart cinder services
- manage cinder services
- cleanup cinder services

View File

@ -43,8 +43,6 @@
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: "{{ workers }}" }
- { section: DEFAULT, option: admin_workers, value: "{{ workers }}" }
- { section: eventlet_server, option: public_workers, value: "{{ workers }}" }

View File

@ -0,0 +1,21 @@
---
#
# Neutron tasks for Browbeat
#
- name: Configure min_l3_agents
ini_file:
dest: /etc/neutron/neutron.conf
mode: 0640
section: "{{ item.section }}"
option: "{{ item.option }}"
value: "{{ item.value }}"
backup: yes
with_items:
- { section: DEFAULT, option: max_l3_agents_per_router, value: "{{ max_l3_agents }}" }
- { section: DEFAULT, option: min_l3_agents_per_router, value: "{{ min_l3_agents }}" }
notify:
- unmanage neutron services
- restart neutron services
- manage neutron services
- cleanup neutron services

View File

@ -0,0 +1,31 @@
---
#
# Neutron handlers for browbeat adjustment
#
- name: unmanage neutron services
command: pcs resource unmanage {{ item }}
with_items:
- neutron-server
- neutron-metadata-agent
ignore_errors: true
- name: restart neutron services
service: name={{ item }} state=restarted
with_items:
- neutron-server
- neutron-metadata-agent
- name: manage neutron services
command: pcs resource manage {{ item }}
with_items:
- neutron-server
- neutron-metadata-agent
ignore_errors: true
- name: cleanup neutron services
command: pcs resource cleanup {{ item }}
with_items:
- neutron-server
- neutron-metadata-agent
ignore_errors: true

View File

@ -13,8 +13,6 @@
value: "{{ item.value }}"
backup: yes
with_items:
- { section: DEFAULT, option: verbose, value: False }
- { section: DEFAULT, option: debug, value: False }
- { section: DEFAULT, option: api_workers, value: "{{ workers }}" }
- { section: DEFAULT, option: rpc_workers, value: "{{ workers }}" }
notify:

View File

@ -13,8 +13,6 @@
value: "{{ item.value }}"
backup: yes
with_items:
- { section: DEFAULT, option: verbose, value: False }
- { section: DEFAULT, option: debug, value: False }
- { section: DEFAULT, option: ec2_workers, value: "{{ workers }}" }
- { section: DEFAULT, option: osapi_compute_workers, value: "{{ workers }}" }
- { section: DEFAULT, option: metadata_workers, value: "{{ workers }}" }