Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-sb-devops
Commits
d05879a4
Commit
d05879a4
authored
5 years ago
by
rjshrjndrn
Committed by
S M Y
5 years ago
Browse files
Options
Download
Patches
Plain Diff
Issue #000 feat: fix linting error
parent
ce96155d
sunbird-monitoring-release-3.5.0_RC1
sunbird-monitoring-release-3.3.0_RC1
sunbird-monitoring-release-2.6.0
sunbird-monitoring-release-2.6.0_RC6
sunbird-monitoring-release-2.6.0_RC5
sunbird-monitoring-release-2.6.0_RC4
sunbird-monitoring-release-2.6.0_RC3
sunbird-monitoring-release-2.6.0_RC2
sunbird-monitoring-release-2.6.0_RC1
sunbird-monitoring-release-2.5.0_484f884
sunbird-monitoring-release-2.5.0
sunbird-monitoring-release-2.5.0_RC3
sunbird-monitoring-release-2.5.0_RC2
sunbird-monitoring-release-2.5.0_RC1
sunbird-monitoring-release-2.3.0_9009005
sunbird-monitoring-release-2.3.0
sunbird-monitoring-release-2.3.0_RC4
sunbird-monitoring-release-2.3.0_RC3
sunbird-monitoring-release-2.3.0_RC2
sunbird-monitoring-release-2.3.0_RC1
secor-lag
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/cassandra-backup.yml
+1
-1
ansible/cassandra-backup.yml
ansible/roles/cassandra-backup/tasks/main.yml
+9
-9
ansible/roles/cassandra-backup/tasks/main.yml
with
10 additions
and
10 deletions
+10
-10
ansible/cassandra-backup.yml
+
1
−
1
View file @
d05879a4
-
hosts
:
cassandra
become
:
yes
vars_files
:
-
[
'
{{inventory_dir}}/secrets.yml'
]
-
[
'
{{
inventory_dir
}}/secrets.yml'
]
roles
:
-
cassandra-backup
run_once
:
true
This diff is collapsed.
Click to expand it.
ansible/roles/cassandra-backup/tasks/main.yml
+
9
−
9
View file @
d05879a4
-
name
:
Create the directory
become
:
yes
file
:
path=/data/cassandra/backup state=directory recurse=yes
-
name
:
copy the backup script
-
name
:
copy the backup script
become
:
yes
template
:
src=cassandra_backup.j2 dest=/data/cassandra/backup/cassandra_backup.py mode=0755
template
:
src=cassandra_backup.j2 dest=/data/cassandra/backup/cassandra_backup.py mode=0755
-
set_fact
:
cassandra_backup_gzip_file_name
:
"
cassandra-backup-{{
lookup('pipe',
'date
+%Y%m%d')
}}"
-
set_fact
:
cassandra_backup_gzip_file_path
:
"
{{
cassandra_backup_dir
}}/{{
cassandra_backup_gzip_file_name
}}.tar.gz"
...
...
@@ -19,22 +19,22 @@
chdir
:
/data/cassandra/backup
async
:
7200
poll
:
30
-
name
:
Check doc_root path
shell
:
ls -all /data/cassandra/backup/
register
:
doc_data
-
name
:
print doc_root to console
debug
:
var
:
doc_data
var
:
doc_data
-
name
:
Ensure azure blob storage container exists
command
:
az storage container create --name {{ cassandra_backup_azure_container_name }}
ignore_errors
:
true
environment
:
AZURE_STORAGE_ACCOUNT
:
"
{{
backup_azure_storage_account_name
}}"
AZURE_STORAGE_KEY
:
"
{{
backup_azure_storage_access_key
}}"
-
name
:
Upload to azure blob storage
command
:
az storage blob upload --name "{{ cassandra_backup_gzip_file_name }}".tar.gz --file {{ cassandra_backup_gzip_file_path }} --container-name {{ cassandra_backup_azure_container_name }}
environment
:
...
...
@@ -42,6 +42,6 @@
AZURE_STORAGE_KEY
:
"
{{
backup_azure_storage_access_key
}}"
async
:
3600
poll
:
10
-
name
:
clean up backup dir after upload
file
:
path="{{ cassandra_backup_dir }}" state=absent
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets