blob: 76c4bf183b7d697b699b0adf050b57410a2e8bc1 [file] [log] [blame]
---
- name: Update the ansible cache
hosts: planet
gather_facts: no
tags: ['cache']
vars_files:
- ~/.apigee/credentials.yml
roles:
- apigee-opdk-setup-default-settings
- name: Create backup prior to doing any work
include: backup.yml
tags:
- 'backup'
- name: Set message processor consistencylevel=TWO
hosts: rmp
gather_facts: no
serial: 1
tags: ['rmp-cl-two']
roles:
- { role: apigee-opdk-cassandra-consistencylevel-modifier, consistency_level: 'TWO', property_file: 'message-processor' }
- name: Set management server consistencylevel=TWO
hosts: ms
gather_facts: no
serial: 1
tags: ['ms-cl-two']
roles:
- { role: apigee-opdk-cassandra-consistencylevel-modifier, consistency_level: 'TWO', property_file: 'management-server' }
- name: Rolling restart of Cassandra, RMP and MS with consistencylevel=TWO
hosts: ds,rmp,ms
gather_facts: no
serial: 1
roles:
- { role: apigee-opdk-stop-components, tags: ['pre_restart', 'pre_stop', 'stop', 'restart'] }
- { role: apigee-opdk-start-components, tags: ['pre_restart', 'pre_start','start', 'restart'], component_start_delay: '{{ start_delay | default(0) }}' }
- name: Execute nodetool repair on Cassandra nodes after updating
hosts: ds
gather_facts: no
serial: 1
roles:
- { role: apigee-opdk-cassandra-repair, tags: ['repair'] }
- name: Change cassandra replication factor
gather_facts: no
hosts: ds[0]
serial: 1
vars:
cassandra_keyspaces:
- auth
- cache
- devconnect
- user_settings
- apprepo
- kms
- scheduler
- ax_custom_report_model
- audit
- aries
- apimodel
- edgenotification
- analytics
- keyvaluemap
- counter
roles:
- { role: apigee-opdk-cassandra-change-replication-factor, tags: ['update'], keyspaces: '{{ cassandra_keyspaces }}' }
- name: Execute nodetool repair on Cassandra nodes
hosts: ds
gather_facts: no
serial: 1
roles:
- { role: apigee-opdk-cassandra-repair, tags: ['repair'] }
- name: Rolling restart of Cassandra, RMPs and MS
hosts: ds,rmp,ms
gather_facts: no
serial: 1
roles:
- { role: apigee-opdk-stop-components, }
- { role: apigee-opdk-start-components, component_start_delay: '{{ start_delay | default(0) }}' }
- name: Set message processor consistencylevel=LOCAL_QUORUM
hosts: rmp
gather_facts: no
serial: 1
tags: ['rmp-cl-local']
roles:
- { role: apigee-opdk-cassandra-consistencylevel-modifier, consistency_level: 'LOCAL_QUORUM', property_file: 'message-processor' }
- name: Set management server consistencylevel=LOCAL_QUORUM
hosts: ms
gather_facts: no
serial: 1
tags: ['ms-cl-local']
roles:
- { role: apigee-opdk-cassandra-consistencylevel-modifier, consistency_level: 'LOCAL_QUORUM', property_file: 'management-server' }
- name: Rolling restart of Cassandra, RMP and MS with consistencylevel=LOCAL_QUORUM
hosts: ds,rmp,ms
gather_facts: no
serial: 1
roles:
- { role: apigee-opdk-stop-components, }
- { role: apigee-opdk-start-components, component_start_delay: '{{ start_delay | default(0) }}' }
- name: Download logs and configs from dc-1-ds
include: opdk-setup-log-files.yml
vars:
hosts: dc-1-ds
tags:
- logs
- name: Download logs and configs from dc-1-ms
include: opdk-setup-log-files.yml
vars:
hosts: dc-1-ms
tags:
- logs
- name: Download logs and configs from dc-1-rmp
include: opdk-setup-log-files.yml
vars:
hosts: dc-1-rmp
tags:
- logs
- name: Download logs and configs from dc-2-ds
include: opdk-setup-log-files.yml
vars:
hosts: dc-2-ds
tags:
- logs
- name: Download logs and configs from dc-2-ms
include: opdk-setup-log-files.yml
vars:
hosts: dc-2-ms
tags:
- logs
- name: Download logs and configs from dc-2-rmp
include: opdk-setup-log-files.yml
vars:
hosts: dc-2-rmp
tags:
- logs