Unverified Commit de831ae2 authored by Ioannis Tsafaras's avatar Ioannis Tsafaras Committed by Avraam Tsantekidis

LAM-40 Update readme

parent b57303ae
# Core python library
## Description
The libraries contained in the core package are responsible for creating a cluster of VMs and installing all the required packages and configs to have a complete lambda instance. A description of the libraries follows:
### provisioner
The library is responsible for creating a VM cluster, using the Kamaki python API. It reads the authentication info from the .kamakirc, and accepts the cluster specs as arguments.
### ansible_manager
The library is responsible for managing the ansible, that will run on the cluster. Its tasks are:
* It reads a dictionary, containing the necessary info about the cluster and its nodes
* It creates an ansible inventory object, using the dictionary
* It creates the necessary group and host vars, required for ansible to run on all the nodes and configure them properly
* It sets some ansible constants, required eg for SSH tunnelling through the master node
* It runs ansible playbooks using the previously mentioned inventory and constants
### cluster_creator
The script is responsible for creating the entire lambda instance.
* It sets the provisioner arguments (cluster specs), then calls the provisioner to create the cluster.
* After that, it gets the output dictionary of the provisioner and adds some more values to it, which are obtained using the provisioner, after the cluster creation.
* It calls the ansible_manager, to create the inventory, using the dictionary as input.
* Finally, it uses the created manager object (containing the inventory and constants), to run the required playbooks in the correct order, to create the lambda instance.
## Instalation
- Install required packages `pip install -r requirements.txt`
- Install package using `python setup.py install`
## Usage
To create a lambda instance, one must edit the cluster_creator script, to set the requested cluster specs. Then, one must run `python cluster_creator.py`, and the lambda instance will be created automatically
## Testing
To test the library we use `tox`. In order to run the tests:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment