Manage VM expiration and deletion
Project description
Manage VM expiration and auto-deletion in an Openstack cloud.
This project is an unofficial Openstack project, but follows Openstack projects architecture, with a Horizon plugin and associated services.
Free software: Apache license
Documentation: http://os-vm-expire.readthedocs.io/
Horizon plugin: https://github.com/genouest/os-vm-expire-horizon-plugin
OSC plugin (openstack client): https://github.com/genouest/os-vm-expire-osc-plugin
The Openstack VmExpiration Management service adds an expiration to VMs. After expiration, VM is deleted. User can extend the VM lifetime via API or Horizon. Expiration extend is not limited, user can always extend a VM, but it will be extended only for a configured duration. User cannot extend it more than configured duration. Example:
date A: VM is created, VM will expire at A + N days
some days before expiration user is notified
user extend VM to today + M days (M is configuration based, user cannot specify it)
if user tries to extend VM again, it will be extend again to today + M days
Requirements
Nova notifications need to be enabled to get VM start and end messages.
Software has been tested on Pike and Otaca, and in single and multi domain configuration. It should work from Newton.
Features
On VM creation, add an expiration date
On near-expiration date, send an email to user
Horizon plugin to view VM expiration and extend expiration time
On expiration date, delete the VM and send an email to user
CLI commands to extend a VM or remove expiration from a VM (admin only)
Configuration
Configuration files are expected in directory /etc/os-vm-expire/ :
osvmexpire.conf
policy.json
osvmexpire-api-paste.ini (for wsgi server)
Main configuration file can be specified via environment variable OSVMEXPIRE_CONFIG.
Components
Start API server
For dev (port 8000)
export OSVMEXPIRE_PORT=9411 # optional
osvmexpire-wsgi-api
For prod
uwsgi --master --die-on-term --emperor /etc/os-vm-expire/vassals --logto /var/log/os-vm-expire/osvmexpire-api.log --stats localhost:9314
Start worker
Manage nova notifications on instance creation and deletion to create/delete expiration objects.
osvmexpire-worker --config-file /etc/os-vm-expire/osvmexpire.conf
Start cleaner
Checks expiration time of VMs and sends notifications before expiration to let use extend the VM if necessary. Once expiration is reached (and if user could be notified of expiration), deletes the VM.
osvmexpire-cleaner --config-file /etc/os-vm-expire/osvmexpire.conf
CLI usage
Those command-line tools need access to configuration file, so are dedicated to administer the tool, not for end user.
osvmexpire-manage vm list
osvmexpire-manage vm extend -h
osvmexpire-manage vm remove -h
Credits
Code is mostly inspired (code base coming from) the Barbican Openstack project, code was more or less updated to manage different objects. This project takes the same license and kept original file headers.
This project was developed by the GenOuest core facility, IRISA, France.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file os-vm-expire-0.9.10.tar.gz
.
File metadata
- Download URL: os-vm-expire-0.9.10.tar.gz
- Upload date:
- Size: 92.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2009ca7fb43542b4607aba5b45d2cf9bb3cba4370d21ab5d07fb10dc138053 |
|
MD5 | 29da1942e0a6b15df7a105d263d043f5 |
|
BLAKE2b-256 | ffc20ff69a74eb975988e641a681f755279443818b347410d8fca5bd8c0d9a3b |
File details
Details for the file os_vm_expire-0.9.10-py3-none-any.whl
.
File metadata
- Download URL: os_vm_expire-0.9.10-py3-none-any.whl
- Upload date:
- Size: 81.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b05cd7ba652f837faae15e3f056a62a52f2d973ffd5c0fe3dd2988ef368bcb0 |
|
MD5 | 0cc0b08b02f4f5bb5a1f654ab599e62b |
|
BLAKE2b-256 | 30c154baada541bdb26ef6bcb26c4f9fdc88d35e46530a3342217608153b793c |
File details
Details for the file os_vm_expire-0.9.10-py2-none-any.whl
.
File metadata
- Download URL: os_vm_expire-0.9.10-py2-none-any.whl
- Upload date:
- Size: 81.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d037d8294b5fd5cefdf294c767442f486d72e13cc578adc7c138b03903b3ab7 |
|
MD5 | 53a8c243c84f216ad4e6f9e0ba4a32d0 |
|
BLAKE2b-256 | 3c62484117a387495cf8e14e9b74934074df9927867347bf27d1fa5294051517 |