Soft Patch Panel
 help / color / mirror / Atom feed
From: oda@valinux.co.jp
To: spp@dpdk.org
Subject: [spp] [PATCH v3 01/13] docs: add overview of spp-ctl
Date: Fri,  5 Oct 2018 10:37:43 +0900	[thread overview]
Message-ID: <20181005013755.19838-2-oda@valinux.co.jp> (raw)
In-Reply-To: <20181005013755.19838-1-oda@valinux.co.jp>

From: Itsuro Oda <oda@valinux.co.jp>

Add overview section of spp-ctl.

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
---
 docs/guides/spp-ctl/overview.rst | 119 +++++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)
 create mode 100644 docs/guides/spp-ctl/overview.rst

diff --git a/docs/guides/spp-ctl/overview.rst b/docs/guides/spp-ctl/overview.rst
new file mode 100644
index 0000000..4c7181c
--- /dev/null
+++ b/docs/guides/spp-ctl/overview.rst
@@ -0,0 +1,119 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2018 Nippon Telegraph and Telephone Corporation
+
+.. _spp_ctl_overview:
+
+spp-ctl
+=======
+
+Overview
+--------
+
+``spp-ctl`` is an alternative SPP controller which provides a REST-like
+APIs.
+
+It maintains connections between SPP processes for managing them
+via the REST-like APIs for users or other processes.
+
+Background and Motivation
+-------------------------
+
+``spp-ctl`` is designed for supporting to manage SPP from several
+controllers.
+
+There are some usecases where SPP is managed from other
+process without user inputs.
+For example, you need a intermediate process if you think of using SPP
+from a framework, such as OpenStack.
+`networking-spp
+<https://github.com/openstack/networking-spp>`_
+is a Neutron ML2 plugin for SPP and `spp-agent` works as a
+SPP controller.
+
+It is a problem to prepare several controllers for each of usages for
+CLI, OpenStack or others because it would be hard to maintain for
+updates.
+
+Spp-ctl is designed to solve the problem of several controllers with
+application-independent REST APIs.
+You can manage SPP by requesting via this APIs.
+
+Architecture
+------------
+
+The design goal of spp-ctl is to be as simple as possible.
+It is stateless.
+Basically, spp-ctl only converts API requests into commands of SPP
+processes and throws request, thouth it does syntax and lexical check
+for API requests.
+
+``spp-ctl`` adopts
+`bottle
+<https://bottlepy.org/docs/dev/>`_
+which is simple and well known as a web framework and
+`eventlet
+<http://eventlet.net/>`_
+for parallel processing.
+``spp-ctl`` accepts multiple requests at the same time and serializes them
+internally.
+
+
+Setup
+=====
+
+You are required to install Python3 and packages described in
+``requirements.txt`` via ``pip3`` for launching ``spp-ctl``.
+You might need to run ``pip3`` with ``sudo``.
+
+.. code-block:: console
+
+    $ sudo apt update
+    $ sudo apt install python3
+    $ sudo apt install python3-pip
+    $ pip3 install -r requirements.txt
+
+Usage
+-----
+
+.. code-block:: console
+
+    usage: spp-ctl [-p PRI_PORT] [-s SEC_PORT] [-a API_PORT]
+
+    optional arguments:
+      -p PRI_PORT  primary port. default is 5555.
+      -s SEC_PORT  secondary port. default is 6666.
+      -a API_PORT  web api port. default is 7777.
+
+Using systemd
+-------------
+
+`spp-ctl` is assumed to be launched as a daemon process, or managed
+by `systemd`.
+Here is a simple example of service file for systemd.
+
+::
+
+    [Unit]
+    Description = SPP Controller
+
+    [Service]
+    ExecStart = /usr/bin/python3 /path/to/spp/src/spp-ctl/spp-ctl
+    User = root
+
+
+REST APIs
+=========
+
+You can try to call ``spp-ctl`` APIs with ``curl`` command as following.
+
+.. code-block:: console
+
+    $ curl http://localhost:7777/v1/processes
+    [{"type": "primary"}, ..., {"client-id": 2, "type": "vf"}]
+    $ curl http://localhost:7777/v1/vfs/1
+    ... snip
+    $ curl -X POST http://localhost:7777/v1/vfs/1/components \
+      -d '{"core": 2, "name": "forward_0_tx", "type": "forward"}'
+
+For more details, see
+:ref:`API Reference<spp_ctl_api_ref>`.
-- 
2.17.1

  reply	other threads:[~2018-10-05  1:37 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 23:25 [spp] [PATCH] spp-ctl: SPP controller with Web API Itsuro ODA
2018-09-18 10:00 ` Yasufumi Ogawa
2018-09-18 21:40   ` Itsuro ODA
2018-10-05  1:37 ` [spp] [PATCH v3 00/13] " oda
2018-10-05  1:37   ` oda [this message]
2018-10-05  1:37   ` [spp] [PATCH v3 02/13] docs: add API reference of spp-ctl oda
2018-10-05  1:37   ` [spp] [PATCH v3 03/13] docs: add index " oda
2018-10-05  1:37   ` [spp] [PATCH v3 04/13] project: add requirements.txt for spp-ctl oda
2018-10-05  1:37   ` [spp] [PATCH v3 05/13] docs: add spp-ctl to index of doc root oda
2018-10-05  1:37   ` [spp] [PATCH v3 06/13] spp-ctl: add entry point oda
2018-10-05  1:37   ` [spp] [PATCH v3 07/13] spp-ctl: add Controller class oda
2018-10-05  1:37   ` [spp] [PATCH v3 08/13] spp-ctl: add web API handler oda
2018-10-05  1:37   ` [spp] [PATCH v3 09/13] spp-ctl: add spp command interfaces oda
2018-10-05  1:37   ` [spp] [PATCH v3 10/13] spp-ctl: update parsing spp_nfv status oda
2018-10-05  1:37   ` [spp] [PATCH v3 11/13] docs: add request examples of spp-ctl oda
2018-10-05  1:37   ` [spp] [PATCH v3 12/13] docs: correct directives " oda
2018-10-05  1:37   ` [spp] [PATCH v3 13/13] docs: add labels and captions for tables oda
2018-10-05  3:57 ` [spp] [PATCH v4 00/14] spp-ctl: SPP controller with Web API oda
2018-10-05  3:57   ` [spp] [PATCH v4 01/14] docs: add overview of spp-ctl oda
2018-10-05  3:57   ` [spp] [PATCH v4 02/14] docs: add API reference " oda
2018-10-05  3:57   ` [spp] [PATCH v4 03/14] docs: add index " oda
2018-10-05  3:57   ` [spp] [PATCH v4 04/14] project: add requirements.txt for spp-ctl oda
2018-10-05  3:57   ` [spp] [PATCH v4 05/14] docs: add spp-ctl to index of doc root oda
2018-10-05  3:57   ` [spp] [PATCH v4 06/14] spp-ctl: add entry point oda
2018-10-05  3:57   ` [spp] [PATCH v4 07/14] spp-ctl: add Controller class oda
2018-10-05  3:57   ` [spp] [PATCH v4 08/14] spp-ctl: add web API handler oda
2018-10-05  3:57   ` [spp] [PATCH v4 09/14] spp-ctl: add spp command interfaces oda
2018-10-05  3:57   ` [spp] [PATCH v4 10/14] spp-ctl: update parsing spp_nfv status oda
2018-10-05  3:57   ` [spp] [PATCH v4 11/14] docs: add request examples of spp-ctl oda
2018-10-05  3:57   ` [spp] [PATCH v4 12/14] docs: correct directives " oda
2018-10-05  3:57   ` [spp] [PATCH v4 13/14] docs: add labels and captions for tables oda
2018-10-05  3:57   ` [spp] [PATCH v4 14/14] spp-ctl: fix incorrect URL oda
2018-10-09  2:01   ` [spp] [PATCH v4 00/14] spp-ctl: SPP controller with Web API Yasufumi Ogawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181005013755.19838-2-oda@valinux.co.jp \
    --to=oda@valinux.co.jp \
    --cc=spp@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).