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:
parent
b219d23cc0
commit
95be69f5a6
17
ansible/browbeat/adjustment-l3.yml
Normal file
17
ansible/browbeat/adjustment-l3.yml
Normal 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
|
23
ansible/browbeat/adjustment-workers.yml
Normal file
23
ansible/browbeat/adjustment-workers.yml
Normal 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
|
@ -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
|
@ -1,2 +1 @@
|
||||
---
|
||||
ansible_become: true
|
||||
|
@ -9,5 +9,7 @@
|
||||
|
||||
- hosts: controller
|
||||
remote_user: heat-admin
|
||||
vars:
|
||||
ansible_become: true
|
||||
roles:
|
||||
- keystone-token
|
||||
|
@ -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
|
||||
|
@ -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 }}" }
|
21
ansible/browbeat/roles/neutron-l3/tasks/main.yml
Normal file
21
ansible/browbeat/roles/neutron-l3/tasks/main.yml
Normal 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
|
31
ansible/browbeat/roles/neutron-workers/handlers/main.yml
Normal file
31
ansible/browbeat/roles/neutron-workers/handlers/main.yml
Normal 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
|
@ -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:
|
@ -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 }}" }
|
Loading…
Reference in New Issue
Block a user