SONATA SDK command line interface tools
SONATA SDK command line interface tools
This set of command line tools are meant to aid the SONATA service developers on their tasks. The tools are briefly described as follows.
son-workspace
creates, configures and manages development workspaces and projects.son-package
packages a project, containing services and functions, to be instantiated in the SONATA Service Platform. All project components are syntatically validated and external dependencies are retrieved to produce a complete service package.son-validate
can be used to validate the syntax, integrity and topology of SONATA service packages, projects, services and functions. Son-validate can be used through the CLI or as a micro-service running inside a docker container.son-access
enables authenticating users to the Service Platform and integrates features to push and pull resources from the Service Platform Catalogues. It is used to upload the service package to the SDK emulator or the Service Platform Gatekeeper, so the service can be deployed in the respective environment.son-monitor
provides tools to easily monitor/generate metrics for debugging and analyzing service performance.son-profile
supports network service developers to automatically profile their network services and network functions.To build the son-cli tools it is recommended the use of a virtual environment to avoid polluting your system and to offer isolation from the installed libraries on the host.
Prerequisites:
mkvirtualenv -p /usr/bin/python34 sonata
activate the virtualenv for the project workon sonata
then clone the project and bootstrap and run buildout. This will download all the dependencies and creante the development environment.
git clone git@github.com:sonata-nfv/son-cli.git
cd son-cli
python bootstrap.py
bin/buildout
If you are using pycharm, the IDE has support both for buildout and for virtualenvs,
please read their fine documentation on the subject before proceeding.
The buildout generates the binaries for the tools son-workspace
, son-package
, son-validate
, son-validate-api
, son-access
, son-profile
and son-monitor
. Information on how to use the tools is detailed in the wiki documentation.
The son-cli tools have the following dependencies:
All dependencies can be installed via a provided Ansible script:
sudo apt-get install ansible git aptitude
sudo vim /etc/ansible/hosts
Add: localhost ansible_connection=local
cd son-cli/ansible
sudo ansible-playbook install.yml
To contribute to son-cli the following sequence of steps should be followed:
To install the SONATA CLI toolset in Ubuntu follow these steps:
Add the new GPG key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8EC0731023C1F15B
Add a source entry for your Ubuntu OS.
For now, supported distributions are supported:
Ubuntu Trusty 14.04 (LTS)
echo "deb http://repo.sonata-nfv.eu ubuntu-trusty main" | sudo tee -a /etc/apt/sources.list
Ubuntu Xenial 16.04 (LTS)
echo "deb http://repo.sonata-nfv.eu ubuntu-xenial main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install sonata-cli
yum install epel-release
/etc/yum.repos.d/sonata.repo
with the following content:Note: currently the repository is not GPG signed (future work)
[sonata-repo]
name=SONATA Repository
baseurl=http://rpmrepo.sonata-nfv.eu/repo/
enabled=1
gpgcheck=0
yum install sonata-cli
The SONATA CLI toolset can also be installed via the Python setup script:
cd son-cli
python3 setup.py install
Test if its working by invoking:
$ son-workspace -h
$ son-package -h
$ son-publish -h
$ son-push -h
$ son-monitor -h
For usage and detailed description of each tool, please refer to the wiki documentation.
The son-cli 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.