Skip to content

stevenvanrossem/son-editor-backend

 
 

Repository files navigation

Build Status

son-editor-backend

This is the backend of SONATA's web-based service and function descriptor editor. It serves as the data storage for the editor and interacts with all other services that are needed to create, update and release SONATA Service and VNF descriptors. It is designed to be used with the son-editor-frontend but because all interaction and communication is taking place through a RESTful API, it is possible to be used with other user interfaces.

son-editor screenshot

Installation

The editor (frontend and backend) can be installed and deployed as single Docker container and a docker-compose script.

  1. Since the editor uses OAuth to authenticate its users, a OAuth application token is required to run it. To retrieve such a token (from GitHub), go to GitHub Settings > OAuth applications and 'Register a new application'.
    • Chose an application name: SONATA Editor
    • Configure the URL of your installation: http://localhost/ or http://your-domain.com
    • Configure the authentication callback URL: http://localhost/backend/login or http://your-domain.com/backend/login
    • Save and collect the generated ClientID and ClientSecretnt for step 4
  2. Clone this repository:
    • git clone https://github.com/sonata-nfv/son-editor-backend
  3. Switch to build-docker folder:
    • cd son-editor-backend/build-docker/
  4. Add GitHub OAuth ClientID and ClientSecret to config.yaml
    • vim config.yaml
  5. Build and run container:
    • docker-compose up

Open your web browser and point to your server / local machine, e.g., http://127.0.0.1/ and login to the editor using your GitHub account.

Development

Python environment

We recommend using venv. If you have setup your Python 3 environment, open a shell in your virtual environment and install son-cli:v2.

  • pip install git+https://github.com/sonata-nfv/son-cli.git@v2.0
  • python setup.py install
  • python setup.py develop

To re-build the container:

  • Do docker-compose build --no-cache in build-docker/

Testing

  • Configuration file used during tests: src/son_editor/config.yaml
  • Run tests: python setup.py test

Continuous Integration

All SONATA projects are automatically tested with SONATA's Jenkins CI environment. But this editor is an exception to this and uses a Travis CI job that is configured in .travis.

Dependencies

Contributing

Contributing to the son-editor 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).

Further Documentation

You can find the editor's manual here.

The server code is documented using sphinx: documentation.

License

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

Lead Developers

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

Contributors

Feedback-Channel

About

The backend of SONATA's web-based service and function descriptor editor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Other 0.7%