Soft Patch Panel
 help / color / mirror / Atom feed
From: Itsuro ODA <oda@valinux.co.jp>
To: spp@dpdk.org
Subject: [spp] [PATCH v2 1/9] docs: overview
Date: Sun, 23 Sep 2018 11:25:39 +0900	[thread overview]
Message-ID: <20180923112539.2D75.277DD91C@valinux.co.jp> (raw)
In-Reply-To: <20180923112233.2D71.277DD91C@valinux.co.jp>

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

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
---
 docs/guides/spp-ctl/overview.rst | 102 +++++++++++++++++++++++++++++++
 1 file changed, 102 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..847b9dc
--- /dev/null
+++ b/docs/guides/spp-ctl/overview.rst
@@ -0,0 +1,102 @@
+====================================
+spp-ctl: SPP controller with Web API
+====================================
+
+Overview
+========
+
+spp-ctl is a SPP controller with a REST like web API.
+
+spp-ctl maintains the connections from the SPP processes and at the same
+time exposes the API for the user to request for the SPP processes.
+
+Background and motivation
+-------------------------
+
+Current CLI (spp.py/spp_vf.py) can be used by intaractive only.
+Therefore, spp-agent, a component of networking-spp which make SPP
+available on OpenStack environment, implements SPP controller in
+itself. (see. https://github.com/openstack/networking-spp )
+
+Either CLI or spp-agent, there is a problem that other people can not
+request to SPP processes while using. spp-ctl is invented to solve this
+problem.
+
+Both CLI and spp-agent can be used spp-ctl to request SPP processes
+instead of owning contoroller itself. In that case, multiple people
+can request to SPP processes at the same time.
+Note that spp-agent has a plan to change to use spp-ctl.
+It is also available not using CLI but requesting spp-ctl directly.
+
+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 (it is simple and well known) as a web framework
+and eventlet for parallel processing. spp-ctl can process multiple APIs
+at the same time, however, requests for per SPP process are serialized
+internally.
+
+
+Setup
+=====
+
+spp-ctl is a simple program written in python3. Installation of related
+packages is as follows (assume ubuntu).
+
+::
+
+  $ sudo apt update
+  $ sudo apt install python3
+  $ sudo apt install python3-pip
+  $ sudo pip3 install -r requirements.txt
+
+Usage
+-----
+
+::
+
+  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
+-------------
+
+Although spp-ctl runs as a daemon process normaly, it assumes to the
+use of systemd and does not daemonize itself.
+
+The service file for systemd is simple as shown below::
+
+  [Unit]
+  Description = SPP Controller
+
+  [Service]
+  ExecStart = {SPP install path}/spp_ctl/spp-ctl -p 5555 -s 6666 -a 7777
+  User = root
+
+API Usage
+=========
+
+For API details, see API-reference_.
+
+.. _API-reference: ./api-reference.rst
+
+Since spp-ctl provides the web API, for example, you can use curl to execute
+requests as follows::
+
+  $ curl http://localhost:7777/v1/processes
+  [{"type": "primary"}, {"client-id": 1, "type": "vf"}, {"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"}'
+  $
+
-- 
2.17.0
-- 
Itsuro ODA <oda@valinux.co.jp>

  reply	other threads:[~2018-09-23  2:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-23  2:22 [spp] [PATCH v2 0/9] spp-ctl: SPP controller with Web API Itsuro ODA
2018-09-23  2:25 ` Itsuro ODA [this message]
2018-10-02  3:29   ` [spp] [PATCH v2 1/9] docs: overview Yasufumi Ogawa
2018-09-23  2:28 ` [spp] [PATCH v2 2/9] docs: api reference Itsuro ODA
2018-10-02  3:42   ` Yasufumi Ogawa
2018-10-02  4:10     ` Yasufumi Ogawa
2018-09-23  2:30 ` [spp] [PATCH v2 3/9] docs: index Itsuro ODA
2018-09-23  2:32 ` [spp] [PATCH v2 4/9] docs: top index Itsuro ODA
2018-09-23  2:33 ` [spp] PATCH v2 5/9] add requirements.txt Itsuro ODA
2018-09-23  2:35 ` [spp] [PATCH v2 6/9] spp-ctl: executable Itsuro ODA
2018-10-02  5:47   ` Yasufumi Ogawa
2018-09-23  2:36 ` [spp] [PATCH v2 7/9] spp-ctl: SPP controller with Web API Itsuro ODA
2018-09-23  2:44   ` Itsuro ODA
2018-09-25  2:01     ` Yasufumi Ogawa
2018-09-23  2:38 ` [spp] [PATCH v2 8/9] spp-ctl: web api handler Itsuro ODA
2018-10-02  4:03   ` Yasufumi Ogawa
2018-09-23  2:39 ` [spp] [PATCH v2 9/9] spp-ctl: spp command interface Itsuro ODA

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=20180923112539.2D75.277DD91C@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).