36 Commits

Author SHA1 Message Date
Râu Cao
7805182457
Change borg backup default interval to 3 hrs 2023-12-05 18:16:15 +01:00
Râu Cao
769ac4a081
Support node-specific borg repo config 2023-12-05 18:09:44 +01:00
Râu Cao
b1763cd032
Pattern-match node names for VM backup exclusion 2023-12-05 18:04:57 +01:00
Râu Cao
aaae90bc0d
Don't exit VM backup scripts immediately on failures 2023-11-15 13:20:42 +01:00
Râu Cao
9568b7072d
Exclude specified nodes/VMs from image backups 2023-07-25 16:58:16 +02:00
Râu Cao
fc041965f4
Update Ubuntu base image 2023-05-12 17:01:50 +02:00
Râu Cao
6df168f32f
Prune VM backups after every run 2022-11-05 17:43:48 +01:00
Râu Cao
58e6e7de03
Remove ufw logs
Just added them to check the blocking for a while
2022-10-22 13:03:16 +02:00
Râu Cao
1afc3a5de5
Block outgoing traffic to local networks by default
Some software, e.g. go-ipfs, is rather aggressive in scanning local
networks for peers, which can trigger abuse reports and IP locks in the
data center.
2022-10-21 13:37:38 +02:00
Râu Cao
61710aa4a4 Set up systemd service and timer for backups 2022-10-21 10:50:04 +02:00
Râu Cao
95941c830f Remove verbose stats outout from backup script 2022-10-21 10:49:30 +02:00
Râu Cao
a5b2eb5f97 Move borg credentials to a separate file
To be used from a service
2022-10-21 10:49:02 +02:00
Râu Cao
6d765f959d
Fix backup VM name for ldap-3
(and potentially other guests where the name differs from the libvirt
domain name)
2022-10-19 12:51:46 +02:00
Râu Cao
82f50b0caa
Only back up domain-specific XML per archive 2022-10-19 12:24:10 +02:00
Râu Cao
6c8f9055c1
Create directories for KVM host backup files 2022-10-19 12:23:54 +02:00
Râu Cao
2e2ebbcc02
Fix filenames for guest agent sockets 2022-10-19 12:23:17 +02:00
Râu Cao
a3844b7ef6
WIP Add KVM host backup recipe
Add a recipe that configures scripts for live backups of VM images via
libvirt and borg.
2022-10-19 12:08:05 +02:00
Râu Cao
315cd247e5
Enable qemu-guest-agent after install
This is actually automatically done for the service from the apt
package, but I like specifying it explicitly as well.
2022-10-12 15:55:08 +02:00
Râu Cao
e73b8fb01f
Add guest agent device when creating VMs
This is necessary for qemu-guest-agent to actually work
2022-10-12 15:53:00 +02:00
Râu Cao
f17a420a64
Update VM base image 2022-08-22 13:40:07 +01:00
607466b1d2 Merge pull request 'Add KVM Guest role' (#409) from feature/kvm_guest_role into master
Reviewed-on: #409
2022-08-22 11:46:43 +00:00
52d7fe52e5
Fix VM base images being overwritten
The base image is used as backing image for the VM images, so
overwriting it results in corrupt data after VM reboots.
2022-06-11 11:17:42 +02:00
a0b64a709d
Add KVM Guest role
Only installs qemu-guest-agent for now, for improving live VM backups.
2022-05-23 12:41:55 +02:00
ac1414e24e Open alternative SSH port on KVM hosts 2022-03-22 16:24:14 -06:00
ecdc41a54f
Rename postgres cookbook, deploy new replica
fixes #361
closes #330
2021-11-29 13:09:13 -06:00
Greg Karékinian
ab422155e4 Add the ability to pass a disk size to the create_vm script
Defaults to 10GB
2021-01-22 13:49:23 +01:00
fb996e9abf
Join new zerotier network on VM creation 2020-12-11 19:07:11 +01:00
Greg Karékinian
a92205bd65 Fix the VM creation script
Also join the zerotier network
2020-12-09 16:29:15 +01:00
Greg Karékinian
7ceb9af3ed Rename the kosmos_kvm default recipe to host
It makes it clear it is meant for KVM hosts
2020-12-09 11:19:13 +01:00
Greg Karékinian
6c907419aa Set the VM name from the script argument 2020-12-08 17:10:40 +01:00
Greg Karékinian
8f304d00ce Remove unused kitchen.yml files 2020-12-08 16:34:24 +01:00
Greg Karékinian
94a34e4758 Add arguments for RAM and number of CPUs 2020-12-08 16:33:27 +01:00
Greg Karékinian
6f7b493173 Create the base Ubuntu 20.04 cloud image with code 2020-12-08 16:25:32 +01:00
Greg Karékinian
176083497c Install the libvirt-daemon-system package
It creates the libvirt-qemu user
2020-12-08 16:25:04 +01:00
Greg Karékinian
89c8f42a46 Set the description for the kosmos_kvm cookbook 2020-12-08 16:03:18 +01:00
Greg Karékinian
9dbe5bcfcb Deploy a script to create new VMs
It uses `virt-install` with the official Ubuntu 20.04 cloud image as a
starting point, with cloud-init to add our SSH keys to the ubuntu user
and set up Zerotier.

USAGE: create_vm VMNAME

Closes #244
2020-12-04 16:21:52 +01:00