Skip to content

mehraghdam/son-mano-framework

 
 

Repository files navigation

Build Status

son-mano-framework

SONATA's MANO framework is the core of SONATA's service platform and builds a flexible orchestration system. It consists of a set of loosely coupled components (micro services) that use a message broker to communicate. These components are called MANO plugins and can easily be replaced to customize the orchestration functionalities of the platform.

The main orchestration functionalities are currently implemented in the service lifecycle management plugin (SLM) which receives instantiation requests from the gatekeeper and instructs the infrastructure adapter to deploy a service. The SLM is also responsible to create the service and function records in the repositories once a service is instantiated and to inform the Monitoring Manager which metrics to monitor and on which triggers to send an alarm.

More details about the service platform's architecture are available on SONATA's website:

Development

SONATA's MANO framework is organized as micro services. The following micro services are currently implemented:

  1. son-mano-base: not a standalone service but a collection of base classes that are used by the other MANO plugins, also contains a message abstraction layer that encapsulates the RabbitMQ related communication code
  2. son-mano-pluginmanager: every MANO plugin registers to this service, the PM provides a CLI to control and monitor active plugins
  3. plugins/son-mano-service-lifecycle-management: main orchestration component, gets service and function descriptors, instructs the infrastructure adapter to start service components in the infrastructure, stores records on services and functions once instantiated, informs Monitoring Manager
  4. plugins/son-mano-test-plugin: the most simple implementation of a MANO plugin, used for integration tests and as an example for plugin developers

Each of these components is entirely implemented in Python.

Other MANO plugins (e.g. a placement and scaling plugin) will appear during the course of the project.)

Building

Each micro service of the framework is executed in its own Docker container. So 'building' the framework becomes building all the containers. The build steps for this are described in a Dockerfile that is placed in the folder of each micro service.

  1. docker build -t registry.sonata-nfv.eu:5000/pluginmanager -f son-mano-pluginmanager/Dockerfile .
  2. docker build -t registry.sonata-nfv.eu:5000/testplugin -f plugins/son-mano-test-plugin/Dockerfile .
  3. docker build -t registry.sonata-nfv.eu:5000/servicelifecyclemanagement -f plugins/son-mano-service-lifecycle-management/Dockerfile .

Dependencies

Son-mano-framework expects the following environment:

Son-mano-framework has the following dependencies:

Contributing

Contributing to the son-mano-framework is really easy. You must:

  1. Clone this repository;
  2. Work on your proposed changes, preferably through submiting issues;
  3. Submit a Pull Request;
  4. Follow/answer related issues (see Feedback-Chanel, below).

Installation

If you do not want to execute the components within a Docker container, you can also install them on a normal machine. Each micro service contains a setup.py file so that you can follow the standard Python installation procedure by doing:

python setup.py install

or

python setup.py develop

Usage

To run all components of the MANO framework you have to start their containers. Additionally, a container that runs RabbitMQ and a container that runs MongoDB has to be started.

  1. docker run -d -p 5672:5672 --name broker rabbitmq:3
  2. docker run -d -p 27017:27017 --name mongo mongo
  3. docker run -it --rm --link broker:broker --link mongo:mongo --name pluginmanager registry.sonata-nfv.eu:5000/pluginmanager
  4. docker run -it --rm --link broker:broker --name slm registry.sonata-nfv.eu:5000/servicelifecyclemanagement

Unit tests

Container-based unit tests

This is how the Jenkins CI runs the unit tests:

  • ./run_tests.sh

This script builds all required containers, starts them, and executes the unit tests within them.

Manual unit tests

Runs unit tests on a local installation.

  • NOTICE: The tests need a running RabbitMQ broker to test the messaging subsystem! Without this, tests will fail.
  • cd son-mano-framework
  • py.test -v son-mano-base/

License

Son-mano-framework is published under Apache 2.0 license. Please see the LICENSE file for more details.

Useful Links


Lead Developers

The following lead developers are responsible for this repository and have admin rights. They can, for example, merge pull requests.

Feedback-Chanel

About

SONATA's Service Platform MANO Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 93.9%
  • Shell 6.1%