Lease manager for various Objects
Go to file
Pooja Ghumre 84a8238118 Fix select.epoll() not found AttributeError by changing import order
Change-Id: I17728edece55cfcf0f5682d9eaeecedd8e99cf26
2017-06-09 16:27:06 -07:00
doc/source Adding support for sphinx docs and tox support 2016-08-02 11:48:25 -07:00
etc Preparing for OpenSource of Mors 2016-07-08 12:06:42 -07:00
mors Fix select.epoll() not found AttributeError by changing import order 2017-06-09 16:27:06 -07:00
mors_repo Preparing for OpenSource of Mors 2016-07-08 12:06:42 -07:00
support Removing dependency on pf9app 2016-04-27 17:55:55 +00:00
test Adding support for sphinx docs and tox support 2016-08-02 11:48:25 -07:00
.gitignore Changing the API default for lease expiry from days to minutes 2016-06-01 12:41:25 -07:00
.reviewboardrc First version of Mors - Lease Manager 2016-04-09 13:11:52 -07:00
CONTRIBUTING.rst Adding support for sphinx docs and tox support 2016-08-02 11:48:25 -07:00
LICENSE.md Preparing for OpenSource of Mors 2016-07-08 12:06:42 -07:00
README.md Preparing for OpenSource of Mors 2016-07-08 12:06:42 -07:00
README.rst Adding support for sphinx docs and tox support 2016-08-02 11:48:25 -07:00
build.sh First version of Mors - Lease Manager 2016-04-09 13:11:52 -07:00
setup.cfg Adding support for sphinx docs and tox support 2016-08-02 11:48:25 -07:00
setup.py Fix select.epoll() not found AttributeError by changing import order 2017-06-09 16:27:06 -07:00
test.sh First version of Mors - Lease Manager 2016-04-09 13:11:52 -07:00
tox.ini Adding support for sphinx docs and tox support 2016-08-02 11:48:25 -07:00

README.md

Mors - OpenStack Lease Manager

Mors https://en.wikipedia.org/wiki/Mors_(mythology) is a simple lease manager for OpenStack objects like Instances.

Mors is a useful tool for OpenStack based cloud used for dev, test or lab setups. Typical usage in these scenarios include automatically or manual creation of Instances for demo, test or experiments. In most cases these Instances are forgotten and never deleted eating up valuable resources.

Mors is a simple service that helps enforce a policy per Tenant or Instance and automatically delete Instances after a specified duration.

Details

Mors works by specification of lease policy in a hierarchical fashion, first at a Tenant level and further at individual Instance level.

Tenant Lease Policy

Mors lease policy can be enabled or disabled at Tenant level. If Mors policy is disabled (default for each tenant) no lease policies apply to the instances within that tenant.

At Tenant level, policy is specified in terms of duration . Once Mors policy is enabled, any Instance will be deleted after instance.created_time + tenant.lease duration = instance_expiration

Roles

Tenant leases can be viewed by user with 'member' role and modified by users with 'admin' role

Instance Lease Policy

By default Instance leases are governed by the policies at Instance's Tenant level. As mentioned earlier: instance.created_time + tenant.lease duration = instance_expiration

A member of tenant can change the Instance expiry at any time, but it can never be later than now + tenant.lease duration

max instance lease <= now + tenant.lease duration

A user can always come back at a later point of time and renew the release again.

Roles

Instance leases can be modified by both 'member' and 'admin' roles.

Build & Installation

Support subdirectory contains Makefile to build a RPM, apart from python 2.7, virtualenv it needs fpm, fpm is a simple package build utility that can build both RPM and deb packages. RPM itself is a thin wrapper on top of the virtualenv.

Configuration files are expected to be in /etc/pf9 directory. These are usual OpenStack style config files:

  • pf9-mors.ini: configure the nova section with the user/password that can be used by mors to perform delete operations on nova instances. The user needs to be an administrator.
  • pf9-mors-api-paste.ini: configure the keystone middleware with keystone auth tokens.

The packages comes with an init script that works on RHEL 7 compatible systems