This repository contains the orchestration core (the flexible MANO framework) and all its components (broker, plugins, ...).
The following lead developers are responsible for this repository and have admin rights. They can, for example, merge pull requests.
- Sharon Mendel-Brin (smendel)
- Manuel Peuster (mpeuster)
- Felipe Vicens (felipevicens)
- Python 3.4
- MongoDB
- mongoengine
- Docker
- docker-compose
- RabbitMQ
- pika
- pytest
- pytest-runner
- Flask
- flask-restful
libs/contains any supporting librariesplugins/contains MANO plugin implementationsson-mano-base/abstract base classes for plugins, messaging supportson-mano-pluginmanager/the plugin manager componenttest/entry points (bash scripts) to trigger tests of sub-components (e.g., for CI/CD)utils/helper functionality, scripts, tools
(see below for simpler Docker Compose based execution)
-
Requires a locally running RabbitMQ instance
-
Requires a locally running MongoDB instance for the pluginmanager
-
Do a
python setup.py developfor each component -
Terminal 1: Run the plugin manager component
-
cd son-mano-pluginmanager/sonmanopluginmanager/ -
python __main__.py -
Terminal 2: Run the example plugin
-
cd plugins/son-mano-example-plugin-1/sonmanoexampleplugin1/ -
python __main__.py
What will happen? The example plugin will ...
- connect to the broker
- register itself to the plugin manager
- periodically send heartbeat messages to the plugin manager
- plugin manager will broadcast plugin status information whenever it changes
- de-register and stop itself after a few seconds
docker build -t pluginmanager -f son-mano-pluginmanager/Dockerfile .docker build -t exampleplugin -f plugins/son-mano-example-plugin-1/Dockerfile .
We need to run a default RabbitMQ and a default MonoDB container before we can run our own components.
docker run -d -p 5672:5672 --name broker rabbitmq:3docker run -d -p 27017:27017 --name mongo mongodocker run -it --link broker:broker --link mongo:mongo --name pluginmanager pluginmanagerdocker run -it --link broker:broker --name exampleplugin exampleplugin
Using Docker Compose allows us to deploy all components of the MANO framework in individual containers with a single command.
docker-compose build
docker-compose up
docker-compose down
./run_tests.sh
- Run tests using the following steps:
- NOTICE: The tests need a running RabbitMQ broker to test the messaging subsystem! Without this, tests will fail.
cd son-mano-frameworkpy.test -v son-mano-base/
These tests are used by our CI/CD system and are fully automated. They spin up required support functions, e.g., the RabbitMQ broker in separated Docker containers and remove them after each test run.
- Test entrypoint scripts are located in: test/
- Trigger test execution from Jenkins:
for i in `find ${WORKSPACE} -name test_*.sh -type f`; do $i; if [ $? -ne 0 ]; then exit 1; fi; done - Trigger test execution locally by hand (does the same like Jenkins does):
./run_tests.sh - This will start all components in independent Docker containers, run the tests, and cleanup everything
- Exitcode of each script is either 0 = test OK or 1 = test FAIL