Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for dalishot backup #569

Merged
merged 7 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/picashot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Runtime
name: Picasso and Dali Snapshot
on:
workflow_dispatch:
schedule:
Expand All @@ -19,9 +19,8 @@ jobs:
docker system prune --force --all --volumes

- name: Run ansible playbook
working-directory: "./.maintain/playbooks"
run: |
ansible-playbook -l _mainnet_collator_yes picashot.yml -i picasso-gcp.yaml --user root -e 'ansible_python_interpreter=/usr/bin/python3'
ansible-playbook -l _mainnet_collator_yes /opt/ansible/inventory/picashot.yml -i /opt/ansible/inventory/picasso-gcp.yaml --user root -e 'ansible_python_interpreter=/usr/bin/python3'

dalishot:
runs-on:
Expand All @@ -38,6 +37,5 @@ jobs:
docker system prune --force --all --volumes

- name: Run ansible playbook
working-directory: "./.maintain/playbooks"
run: |
ansible-playbook -l _collator_node_yes picashot.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3'
ansible-playbook -l _collator_node_yes /opt/ansible/inventory/dalishot.yml -i /opt/ansible/inventory/gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3'
19 changes: 19 additions & 0 deletions .maintain/playbooks/dalishot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Create Backup for Picasso nodes
hosts: all
become: root
tasks:
- name: Run Backup Script
become: true
shell: |
#!/bin/bash
DATE=$(date +'%m-%d-%Y')
HOST=$(echo $HOSTNAME)
FILENAME=$HOST-$DATE.zip
BACKUP_DIR="/var/lib/composable-data/chains"
GS_BUCKET="dali-chachacha-data-store"
sudo zip -r $FILENAME $BACKUP_DIR
sudo gsutil mv $FILENAME gs://$GS_BUCKET/
args:
executable: /bin/bash
register: stdout
Loading