Project

General

Profile

Task #7649

Updated by Nico Schottelius almost 2 years ago

* User wants to have possibility to roll back in time 

 h2. Implementation 

 * We can use ceph snapshots 
 * We might need/want to signal qemu before taking the snapshot 
 ** how? 
 ** Difference between uncloud and opennebula? 

 h2. 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 


 h3. Ideas for an CLI 

 <pre> 
 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> 

 </pre> 


 h2. 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 (?) 

 h3. Per second calculation: SSD 

 <pre> 
 >>> (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 

 </pre> 

 * 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 

 h2. Implementation 

 * We can use ceph snapshots 
 * We might need/want to signal qemu before taking the snapshot 
 ** how? 
 ** Difference between uncloud and opennebula? 

 h2. 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 


 h2. 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 (?) 

 h3. Per second calculation: SSD 

 <pre> 
 >>> (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 

 </pre> 

 * Could offer it for 0.00000014 CHF per GB per second 
 * Monthly would stay the same 


 h3. Per second calculation: HDD 

 <pre> 
 >>> 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 
 </pre> 


 * Could offer for 0.0000000058 per gb per second 
 * However units will be smaller than 100gb packages 

 h2. Testing 

 * Using my private VM 
 * Locating the disk image 

 <pre> 
 [10:43:59] red2.place5:~# rbd -p one ls | grep 10761 
 one-60-10761-0 
 [10:44:14] red2.place5:~#  
 </pre> 

 * Does not show all attached disks -> need to go via opennebula api 


 h3. Per second calculation: HDD 

 <pre> 
 >>> 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' 
 </pre> 



 h2. Testing 

 * Using my private VM 
 * Locating the disk image 

 <pre> 
 [10:43:59] red2.place5:~# rbd -p one ls | grep 10761 
 one-60-10761-0 
 [10:44:14] red2.place5:~#  
 </pre> 

 * Does not show all attached disks -> need to go via opennebula api 


 h2. 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 

Back