<commit_before># openstack-lease-it
OpenStack lease-it add some useful feature to monitor a OpenStack instances
 * Display the list of flavor and display the number of instance we can create with this
 flavor
 * Add a **lease** feature to OpenStack that force user to renew a lease to keep instance
  running. If a lease expire, the instance is killed

## Installation
#### Installation dependencies (CentOS 7.x)
```shell
box# easy_install pip
box# yum install gcc python-devel openldap-devel memcached httpd mod_wsgi mod_ssl git
box# systemctl enable memcached httpd
box# systemctl start memcached httpd
```

#### Install openstack-lease-it and dependencies with pip
```shell
box# cd /opt
box# git clone https://github.com/LAL/openstack-lease-it.git
box# cd openstack-lease-it
box# pip install -r requirements.txt
```

#### Configuration file and test
```shell
box# mkdir -p /etc/openstack-lease-it
box# cp openstack-lease-it/lease-it.cfg.example /etc/openstack-lease-it/config.ini
```
Modify `/etc/openstack-lease-it/config.ini to match your configuration. You must also need to disabled selinux to
allow apache to read /etc/openstack-lease-it/config.ini or configure it to allow that.

You must modify `/opt/openstack-lease-it/openstack_lease_it/openstack_lease_it/settings.py` to change
```ini
ALLOWED_HOSTS = [ '*' ]<commit_msg>Add -y on yum install command<commit_after># openstack-lease-it
OpenStack lease-it add some useful feature to monitor a OpenStack instances
 * Display the list of flavor and display the number of instance we can create with this
 flavor
 * Add a **lease** feature to OpenStack that force user to renew a lease to keep instance
  running. If a lease expire, the instance is killed

## Installation
#### Installation dependencies (CentOS 7.x)
```shell
box# easy_install pip
box# yum install -y gcc python-devel openldap-devel memcached httpd mod_wsgi mod_ssl git
box# systemctl enable memcached httpd
box# systemctl start memcached httpd
```

#### Install openstack-lease-it and dependencies with pip
```shell
box# cd /opt
box# git clone https://github.com/LAL/openstack-lease-it.git
box# cd openstack-lease-it
box# pip install -r requirements.txt
```

#### Configuration file and test
```shell
box# mkdir -p /etc/openstack-lease-it
box# cp openstack-lease-it/lease-it.cfg.example /etc/openstack-lease-it/config.ini
```
Modify `/etc/openstack-lease-it/config.ini to match your configuration. You must also need to disabled selinux to
allow apache to read /etc/openstack-lease-it/config.ini or configure it to allow that.

You must modify `/opt/openstack-lease-it/openstack_lease_it/openstack_lease_it/settings.py` to change
```ini
ALLOWED_HOSTS = [ '*' ]
{'fraction_non_alphanumeric': 0.09683426443202979, 'fraction_numerical': 0.0007448789571694599, 'mean_word_length': 4.607515657620041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3761750', 'n_tokens_mistral': 830, 'n_tokens_neox': 797, 'n_words': 312}