Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Lease manager for various Objects
Python Shell Makefile
Branch: master
Clone or download
poojaghumre and kphatak Fix select.epoll() not found AttributeError by changing import order
Change-Id: I17728edece55cfcf0f5682d9eaeecedd8e99cf26
Latest commit 84a8238 Feb 1, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc/source Adding support for sphinx docs and tox support Aug 2, 2016
etc Preparing for OpenSource of Mors Jul 8, 2016
mors Fix select.epoll() not found AttributeError by changing import order Jun 9, 2017
mors_repo Preparing for OpenSource of Mors Jul 8, 2016
support Removing dependency on pf9app Apr 27, 2016
test Adding support for sphinx docs and tox support Aug 2, 2016
.gitignore Changing the API default for lease expiry from days to minutes Jun 1, 2016
.reviewboardrc First version of Mors - Lease Manager Apr 9, 2016
CONTRIBUTING.rst Adding support for sphinx docs and tox support Aug 2, 2016
LICENSE.md Preparing for OpenSource of Mors Jul 8, 2016
README.md Preparing for OpenSource of Mors Jul 8, 2016
README.rst Adding support for sphinx docs and tox support Aug 2, 2016
build.sh First version of Mors - Lease Manager Apr 9, 2016
setup.cfg Adding support for sphinx docs and tox support Aug 2, 2016
setup.py Fix select.epoll() not found AttributeError by changing import order Jun 9, 2017
test.sh First version of Mors - Lease Manager Apr 9, 2016
tox.ini

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

You can’t perform that action at this time.