Browse Source

Run daily backups of nodepool zk image data

This does local backups of the nodepool zk image image data to
/var/log/nodepool on the nodepool-builders. These hosts don't get
offsite backups but we run mutliple redundant servers. This data isn't
critical as we can start from scratch, but may be useful if we don't
want to go through all that trouble.

Change-Id: I7d150df9c0d9566ef2d32167cea535e29822cfa2
changes/83/809483/1
Clark Boylan 8 months ago
parent
commit
a1cf5b3f6f
  1. 9
      playbooks/roles/nodepool-builder/tasks/main.yaml

9
playbooks/roles/nodepool-builder/tasks/main.yaml

@ -41,3 +41,12 @@
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f
- name: Backup nodepool zk image data daily
cron:
name: Backup nodepool zk image data
minute: '{{ 59 | random(seed=inventory_hostname) }}'
hour: '{{ 23 | random(seed=inventory_hostname) }}'
# Note we backup to /var/log/nodepool because that is what we have bind
# mounted in the container and we are operating relative to that context
job: docker exec nodepool-builder-compose_nodepool-builder_1 nodepool export-image-data /var/log/nodepool/nodepool-image-backup.json

Loading…
Cancel
Save