Policies in 5GTANGO are considering deployment and operational aspects of network services over programmable infrastructure. Operational or runtime policies regard the runtime adaptation of network service mechanisms in order to optimally support the overall performance achieved.
The Policy Manager is the entity of the service platform responsible for runtime policies enforcement over the deployed network services. Policies enforcement regard mainly elasticity actions (scaling in and out VNFs), events identification and triggering of relevant alerts as well as security actions (e.g. application of a firewall rule). It consists of a set of components supporting the formulation of the policies and their enforcement, including the interfaces for interaction with the 5GTANGO monitoring framework,the message broker for publication and consumption of monitoring data, alerts and suggested actions, the catalogue and repository databases,the gatekeeper and the MANO orchestration mechanisms.
This component is implemented in spring boot framework.boot, 2.0.3.RELEASE
To have it up and running from code, please do the following:
$ git clone https://github.com/sonata-nfv/tng-policy-mngr.git # Clone this repository
$ cd tng-policy-mngr# Go to the newly created folder
$ mvn clean install # Install dependencies
$ java -jar -Dspring.profiles.active=yourProfile target/tng-policy-mngr-1.5.0.jar # use the development profile or create a new one
Note: See the Configuration section below for other environment variables that can be used.
Everything being fine, you'll have a server running on that session, on port 8081. You can access it by using curl, like in:
$ curl <host name>:8081/api/vi
In case you prefer a docker based development, you can run the following commands (bash shell):
$docker-compose up --build -d
With these commands, you:
- Run the MongoDB container within the tango network;
- Run the RabbitMQ container within the tango network;
- Run the tng-policy-mngr container
This setup is ideal in case you want to test and develop the tng-policy-mngr apart from the rest of the sonata components.
To contribute to the development of this 5GTANGO component, you may use the very same development workflow as for any other 5GTANGO Github project. That is, you have to fork the repository and create pull requests.
Have in mind that sample runtime policy descriptors can be found at policy descriptor examples based at policy descriptor schema.
- Sonata Service Platform local installation (recommended) or vpn connection to SP environment
- Docker >= 1.13
- Docker compose version 3
- Java version 1.8 - The programming language used
- Maven - Dependency Management
- Drools version 7.7.0 - Business Rules Management System (BRMS) solution used so as to enforce policies
- Spring boot Framework 2.0.3 RELEASE - Used application framework
Developing this micro-service is straightforward with a low amount of necessary steps:
- Update properly the application.properties file
- Open the project with an Integrated development environment (IDE) that support java (ex.Netbeans)
Changes to the repository can be requested using this repository's issues and pull requests mechanisms.
The most up-to-date version is v5.1. For the versions available, see the link to tags on this repository.
The configuration of the micro-service is done through the following environment variables, defined in the Dockerfile:
- MONGO_DB, which defines the mongo database, where all necessary objects are stored in;
- HOST_BROKER, which defines the pub/sub framework where all asynchronous messages are exchanged;
- ENV CATALOGUE, which defines the Catalogue's URL, where test descriptors are fetched from;
- ENV MONITORING_MANAGER, which defines where the monitoring metrics are stored and how to fech them;
- ENV REPO, which defines the Repository's URL, where NS instances information is fetched from;
- ENV IA, which defines the Infrastracture Adapter where VIM information comes from;
- ENV GATEKEEPER, which defines the secure communication with the other microservices;
Unit tests are automatically executed during the building of the microsevice. Integration and functional tests involving this micro-service are defined in tng-tests repository. Runtime policy integration tests can be found at:
Our style guide is really simple:
- We try to follow a Clean Code philosophy in as much as possible, i.e., classes and methods should do one thing only, have the least number of parameters possible, etc.;
Policy Manager APIs can be found at the central API documentation of the SONATA orchestrator and also at the wiki page of the tng-policy-mngr component
This 5GTANGO component is published under Apache 2.0 license. Please see the LICENSE file for more details.
The following lead developers are responsible for this repository and have admin rights. They can, for example, merge pull requests.
- You may use the mailing list sonata-dev-list
- You may use the GitHub issues to report bugs
- Gitter room