%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%    NEPI, a framework to manage network experiments
%    Copyright (C) 2013 INRIA
%
%    This program is free software: you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation, either version 3 of the License, or
%    (at your option) any later version.
%
%    This program is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with this program.  If not, see <http://www.gnu.org/licenses/>.
%
% Author: Alina Quereilhac <alina.quereilhac@inria.fr>
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{What is NEPI?}

NEPI is not a network simulator, nor an emulator or a testbed. 
NEPI is a Python library that provides classes to describe and 
run network experiments on different experimentation platforms
(e.g. Planetlab, OMF wireless testbeds, network simulators, etc).

Imagine that you want to run an experiment to test a distributed 
application you just coded, on the Internet. 
You can use NEPI to deploy your application on PlanetLab
nodes, run the experiment, and collect result files
you might have generated during the
experiment (e.g. pcap files from tcpudmps).

Sure, you could do this by coding your own BASH script, but 
it will probably take more time and painful hours of debugging
if you want to do it right.
NEPI aims at providing a re-usable code base to run network 
experiments on target experimentation platforms, so to 
decrease the time  you spend in developing platform specific 
scripts or programs, and debugging them. 

In a nut-shell, NEPI is a network experiment 
management framework which provides a simple way of 
describing network experiments, and the logic to automatically
deploy those experiments on the target experimentation environments.
It also provides the means to control the resources used in the experiment
(e.g. Nodes, applications, switches, virtual machines, routing table entries, 
etc ) during experiment execution, and to collect results generated by
the experiment to a local repository.

The experiment deployment and control is done by the
Experiment Controller (EC) entity, which is responsible for the 
global orchestration of the experiment. 
The EC knows nothing about how to manage specific resources 
(e.g. how to configure a network interface in a PlanetLab node),
instead it delegates those tasks to entities called Resource Manager (RM).

The RMs are responsible of controlling single resources 
(e.g. a Linux host, an Open vSwitched on PlanetLab 
nodes, etc). Different types of resources will be controlled by
different RMs, specifically adpated to control them.
All RMs implement a same external interface, that the EC uses 
to control them in a uniform way.

NEPI is not magical, it can not control all existing resources
on all existing experimentation platforms by default.
However, potentially any resource could be controlled by 
NEPI if the adequate Resource Manager is implemented for it.
Fortunately, NEPI already provides several Resource Managers for
different resources on a variety of testbeds, and new 
Resource Manager classes can be extended from existing ones,
to control new types of resources. 

The idea behind NEPI is to enable runing network experiments on 
potentially any experimentation platform, using a single
software tool, as opposite to using a dedicated software for 
each platform. An additional perk is that you don't have to deal 
with a lot of platform-specific gory details of setting up and 
configuring the resources (e.g. Creating a TAP device on Planetlab.
If you ever had to do that, you know what I mean). Also, 
you could combine resources from different platforms in a same
experiment, using just one script.

So, 'One ring to rule them all', sorry I meant, 'One tool to 
control them all'... or something like that.
We though it was a good ide to abstract platform details
behind a common resource management interface, and let 
NEPI deal with the details and give you back the results.

\section{What does a NEPI script look like ?}
\label{faq:ping_example}

Here is a very simple experiment example, which runs a PING
to "nepi.inria.fr" from a given host.
Note that you will need to replace the hostname, username, and
ssh\_key variables va to run the example. 

\begin{lstlisting}[language=Python]
from nepi.execution.ec import ExperimentController

ec = ExperimentController(exp_id = "myexperiment")

hostname = # Host that can be accessed with an SSH account
username = # SSH user account on host
ssh_key = # Path to SSH public key file to access host

node = ec.register_resource("LinuxNode")
ec.set(node, "hostname", host)
ec.set(node, "username", user)
ec.set(node, "identity", ssh_key)

app = ec.register_resource("LinuxApplication")
ec.set(app, "command", "ping -c3 nepi.inria.fr")
ec.register_connection(app, node)

ec.deploy()

ec.wait_finished(app)

print ec.trace(app, "stdout")

ec.shutdown()

\end{lstlisting}

\section{What does NEPI stands for?}

It stands for: Network Experiment Programming Interface.

\section{Who developed NEPI?}

NEPI was developed at INRIA, Sophia Antipolis France.
A first prototype was implemented in 2010. 
Versions 1.0 and 2.0 were released in 2011 and 2012, respectively. 
The current version is 3.0, and it was completely redesigned and
rewritten to broaden the scope, and to include several cool 
new features, which will be described in detail in this document.
The following people has contributed to the project:

\begin{itemize}
  \item NEPI version 3.0: Alina Quereilhac, Julien Tribino, Lucia Guevgeozian Odizzio, Alexandros Kouvakas
  \item NEPI versions 1.0 and 2.0: Alina Quereilhac, Claudio Freire, Martin Ferrari, Mathieu Lacage
  \item NEPI prototype: Martin Ferrari, Mathieu Lacage
  \item Other contributors: Dirk Hasselbalch
\end{itemize}

\section{Is it free?}

Yes, NEPI is free software. It is free to use, free to to modify, free to share.
NEPI v3.0 is licensed under GPL v3, so you can do whatever you want with it, 
as long as you keep the same license. 

\section{How can I contribute?}

There are many ways you can contribute to the project. 
The first one is using it and reporting bugs. 
You can report bugs on the NEPI bugzilla page 
(\textbf{not yet set-up, so for now send the bugs by email to the users list}): \\

\url{https://nepi.inria.fr/bugzilla/} \\

You can also become a part of the NEPI community and join our mailing lists:

\begin{itemize}
    \item To subscribe to the users mailing list at \textit{nepi-users@inria.fr}
        you can send an email to \textit{sympa@inria.fr} with subject
        \textit{Subscribe nepi-users <put-your-user-name-here>}
    \item To subscribe to the developers mailing list at \textit{nepi-developers@inria.fr}
        you can send an email to \textit{sympa@inria.fr} with subject
        \textit{Subscribe nepi-developers <put-your-user-name-here>}
    \end{itemize}

To contribute with bug fixes and new features, please send your code patch
to the \textit{nepi-developers} list.

\section{How can I report a bug ?}

To report a bug take a look at the NEPI bugzilla page at:

\url{https://nepi.inria.fr/bugzilla/} \\

\section{Where can I get more information ?}

For more information visit NEPI web site at

\url{https://nepi.inria.fr} \\


