Actions
Task #7649
closedSketch a VM backup & restore
Start date:
01/27/2020
Due date:
% Done:
100%
Estimated time:
(Total: 0.00 h)
PM Check date:
Description
- User wants to have possibility to roll back in time
Implementation¶
- We can use ceph snapshots
- We might need/want to signal qemu before taking the snapshot
- how?
- Difference between uncloud and opennebula?
User facing API / CLI¶
- User can set a maximum amount of snapshots (?)
- Useful for auto rotate
- User can configure a snapshot
- User can list all snapshots
- User can delete snapshots
Ideas for an CLI¶
ungleich-cli --username xx --password yy list-vms ungleich-cli --username xx --password yy vm-snaphot-create <vmid> ungleich-cli --username xx --password yy vm-snaphot-list <vmid> ungleich-cli --username xx --password yy vm-snaphot-restore <vmid> <snapshot> ungleich-cli --username xx --password yy vm-snaphot-delete <vmid> <snapshot>
Billing¶
Regular pricing - it's the same usage
- SSD storage 10GB/month@3.5CHF
- HDD storage 100GB/month@1.5CHF
Billed per gigabyte per second (?) basis (?)
Per second calculation: SSD¶
>>> (3.5/10.)/30/24/3600 1.3503086419753083e-07 >>> per_gb_per_second=((3.5/10.)/30/24/3600) >>> 1.36*10**(-7) * 10 * 86400 * 30 3.5251200000000003 >>> "{:0.9f}".format(1.36*10**(-7)) '0.000000136' >>> 1.4*10**(-7) * 10 * 86400 * 30 3.628799999999999
- Could offer it for 0.00000014 CHF per GB per second
- Monthly would stay the same
- User wants to have possibility to roll back in time
Implementation¶
- We can use ceph snapshots
- We might need/want to signal qemu before taking the snapshot
- how?
- Difference between uncloud and opennebula?
User facing API / CLI¶
- User can set a maximum amount of snapshots (?)
- Useful for auto rotate
- User can configure a snapshot
- User can list all snapshots
- User can delete snapshots
Billing¶
Regular pricing - it's the same usage
- SSD storage 10GB/month@3.5CHF
- HDD storage 100GB/month@1.5CHF
Billed per gigabyte per second (?) basis (?)
Per second calculation: SSD¶
>>> (3.5/10.)/30/24/3600 1.3503086419753083e-07 >>> per_gb_per_second=((3.5/10.)/30/24/3600) >>> 1.36*10**(-7) * 10 * 86400 * 30 3.5251200000000003 >>> "{:0.9f}".format(1.36*10**(-7)) '0.000000136' >>> 1.4*10**(-7) * 10 * 86400 * 30 3.628799999999999
- Could offer it for 0.00000014 CHF per GB per second
- Monthly would stay the same
Per second calculation: HDD¶
>>> per_gb_per_second=((1.5/100.)/30/24/3600) >>> per_gb_per_second 5.787037037037037e-09 >>> >>> "{:0.10f}".format(per_gb_per_second) '0.0000000058' >>> 0.0000000058* 100 * 86400 * 30 1.5033599999999998
- Could offer for 0.0000000058 per gb per second
- However units will be smaller than 100gb packages
Testing¶
- Using my private VM
- Locating the disk image
[10:43:59] red2.place5:~# rbd -p one ls | grep 10761 one-60-10761-0 [10:44:14] red2.place5:~#
- Does not show all attached disks -> need to go via opennebula api
Per second calculation: HDD¶
>>> per_gb_per_second=((1.5/100.)/30/24/3600) >>> per_gb_per_second 5.787037037037037e-09 >>> >>> "{:0.10f}".format(per_gb_per_second) '0.0000000058'
Testing¶
- Using my private VM
- Locating the disk image
[10:43:59] red2.place5:~# rbd -p one ls | grep 10761 one-60-10761-0 [10:44:14] red2.place5:~#
- Does not show all attached disks -> need to go via opennebula api
Steps¶
- Create a PoC for some VMs
- record creation and deletion time is needed for billing later
- Implement a CLI to be used by staff (i.e. no customer auth)
- Integrate it into billing
Actions