-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1759 from rjshrjndrn/release-3.0.0
Cassandra backup seriallization
- Loading branch information
Showing
4 changed files
with
81 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
# This task will take snapshot serially for all cassandra nodes | ||
# If we club both taking snapshot and upload the data, then the | ||
# interval of snapshots b/w nodes will be very high; Which might lead | ||
# to data discrepancies | ||
- hosts: cassandra | ||
become: yes | ||
serial: true | ||
tasks: | ||
- name: taking cassandra snapshots | ||
shell: | | ||
nodetool clearsnapshot | ||
nodetool snapshot -t "cassandra-backup-{{ lookup('pipe', 'date +%Y%m%d') }}-{{ ansible_hostname }}" | ||
- name: sleeping 1 min b/w snapshots | ||
pause: | ||
echo: true | ||
minutes: 1 # A positive number of minutes to pause for. | ||
prompt: "Pausing after snapshot" # Optional text to use for the prompt message. | ||
|
||
# Once snaphot is done, | ||
# We can take the snapshot and compress it and upload it | ||
# This will take some cpu and memory in the nodes | ||
# Because of that we're running it serially, so that it won't affect the perfomance | ||
- hosts: cassandra | ||
become: yes | ||
serial: 1 | ||
vars_files: | ||
- ['{{ inventory_dir }}/secrets.yml'] | ||
roles: | ||
- cassandra-backup | ||
- {name: cassandra-backup, vars: [ additional_arguments: "--disablesnapshot"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
- name: install azure cli | ||
shell: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | ||
shell: | ||
which az || curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters