-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdse_upgrade.yml
56 lines (51 loc) · 1.24 KB
/
dse_upgrade.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
# Get the current timestamp and register datastx debian packages
- hosts: dse
any_errors_fatal: true
become: true
become_method: sudo
tasks:
- name: Get the current timestamp
shell: 'date +%Y%m%d%H%M%S'
register: current_timestamp
roles:
- { role: datastax_pkg }
##########################
## Execute the followin steps in rolling fashion mode
## - serial: 1
## Upgrade from DSE version:
# - stop service
# - remove the old package
# - install the new package
# - update configuration file
# - start service
# - upgrade SSTables
#
- hosts: dse
any_errors_fatal: true
become: true
become_method: sudo
serial: 1
vars:
srvc_name: dse
srvc_pid_path: /var/run/dse/dse.pid
roles:
- { role: stop_srvc }
- { role: dse_common }
- { role: dse_upgbin }
- { role: dse_updcfg }
- { role: start_srvc }
tasks:
- name: Upgrade SSTable
command: "nodetool upgradesstables"
# Check DSE version and C* version
- hosts: dse
tasks:
- name: Check Cassandra version
command: "nodetool version"
register: _cassandra_ver
- name: Check DSE version
command: "dse -v"
register: _dse_ver
- debug:
msg: "DSE Version: {{ _dse_ver.stdout }}; Cassandra Version: {{ _cassandra_ver.stdout }}"