d4e4efc36fa4c44c4c39e44ad616b618d4d303b6
[nepi.git] / doc / user_manual / faq.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 %    NEPI, a framework to manage network experiments
4 %    Copyright (C) 2013 INRIA
5 %
6 %    This program is free software: you can redistribute it and/or modify
7 %    it under the terms of the GNU General Public License version 2 as
8 %    published by the Free Software Foundation;
9 %
10 %    This program is distributed in the hope that it will be useful,
11 %    but WITHOUT ANY WARRANTY; without even the implied warranty of
12 %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 %    GNU General Public License for more details.
14 %
15 %    You should have received a copy of the GNU General Public License
16 %    along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 %
18 % Author: Alina Quereilhac <alina.quereilhac@inria.fr>
19 %
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
22 \section{What is NEPI?}
23
24 NEPI is not a network simulator, nor an emulator or a testbed. 
25 NEPI is a Python library that provides classes to describe and 
26 run network experiments on different experimentation platforms
27 (e.g. Planetlab, OMF wireless testbeds, network simulators, etc).
28
29 Imagine that you want to run an experiment to test a distributed 
30 application you just coded, on the Internet. 
31 You can use NEPI to deploy your application on PlanetLab
32 nodes, run the experiment, and collect result files
33 you might have generated during the
34 experiment (e.g. pcap files from tcpudmps).
35
36 Sure, you could do this by coding your own BASH script, but 
37 it will probably take more time and painful hours of debugging
38 if you want to do it right.
39 NEPI aims at providing a re-usable code base to run network 
40 experiments on target experimentation platforms, so to 
41 decrease the time  you spend in developing platform specific 
42 scripts or programs, and debugging them. 
43
44 In a nut-shell, NEPI is a network experiment 
45 management framework which provides a simple way of 
46 describing network experiments, and the logic to automatically
47 deploy those experiments on the target experimentation environments.
48 It also provides the means to control the resources used in the experiment
49 (e.g. Nodes, applications, switches, virtual machines, routing table entries, 
50 etc ) during experiment execution, and to collect results generated by
51 the experiment to a local repository.
52
53 The experiment deployment and control is done by the
54 Experiment Controller (EC) entity, which is responsible for the 
55 global orchestration of the experiment. 
56 The EC knows nothing about how to manage specific resources 
57 (e.g. how to configure a network interface in a PlanetLab node),
58 instead it delegates those tasks to entities called Resource Manager (RM).
59
60 The RMs are responsible of controlling single resources 
61 (e.g. a Linux host, an Open vSwitched on PlanetLab 
62 nodes, etc). Different types of resources will be controlled by
63 different RMs, specifically adpated to control them.
64 All RMs implement a same external interface, that the EC uses 
65 to control them in a uniform way.
66
67 NEPI is not magical, it can not control all existing resources
68 on all existing experimentation platforms by default.
69 However, potentially any resource could be controlled by 
70 NEPI if the adequate Resource Manager is implemented for it.
71 Fortunately, NEPI already provides several Resource Managers for
72 different resources on a variety of testbeds, and new 
73 Resource Manager classes can be extended from existing ones,
74 to control new types of resources. 
75
76 The idea behind NEPI is to enable runing network experiments on 
77 potentially any experimentation platform, using a single
78 software tool, as opposite to using a dedicated software for 
79 each platform. An additional perk is that you don't have to deal 
80 with a lot of platform-specific gory details of setting up and 
81 configuring the resources (e.g. Creating a TAP device on Planetlab.
82 If you ever had to do that, you know what I mean). Also, 
83 you could combine resources from different platforms in a same
84 experiment, using just one script.
85
86 So, 'One ring to rule them all', sorry I meant, 'One tool to 
87 control them all'... or something like that.
88 We though it was a good idea to abstract platform details
89 behind a common resource management interface, and let 
90 NEPI deal with the details and give you back the results.
91
92 \section{What does a NEPI script look like ?}
93 \label{faq:ping_example}
94
95 Here is a very simple experiment example, which runs a PING
96 to "nepi.inria.fr" from a given host.
97 Note that you will need to replace the hostname, username, and
98 ssh\_key variables va to run the example. 
99
100 \begin{lstlisting}[language=Python]
101 from nepi.execution.ec import ExperimentController
102
103 ec = ExperimentController(exp_id = "myexperiment")
104
105 hostname = # Host that can be accessed with an SSH account
106 username = # SSH user account on host
107 ssh_key = # Path to SSH public key file to access host
108
109 node = ec.register_resource("linux::Node")
110 ec.set(node, "hostname", hostname)
111 ec.set(node, "username", username)
112 ec.set(node, "identity", ssh_key)
113
114 app = ec.register_resource("linux::Application")
115 ec.set(app, "command", "ping -c3 nepi.inria.fr")
116 ec.register_connection(app, node)
117
118 ec.deploy()
119
120 ec.wait_finished(app)
121
122 print ec.trace(app, "stdout")
123
124 ec.shutdown()
125
126 \end{lstlisting}
127
128 \section{What does NEPI stands for?}
129
130 It stands for: Network Experiment Programming Interface.
131
132 \section{Who developed NEPI?}
133
134 NEPI was developed at INRIA, Sophia Antipolis France.
135 A first prototype was implemented in 2010. 
136 Versions 1.0 and 2.0 were released in 2011 and 2012, respectively. 
137 The current version is 3.0, and it was completely redesigned and
138 rewritten to broaden the scope, and to include several  
139 new features, which will be described in detail in this document.
140 The following people has contributed to the project:
141
142 \begin{itemize}
143   \item NEPI version 3.0: Alina Quereilhac, Julien Tribino, Lucia Guevgeozian Odizzio, Alexandros Kouvakas
144   \item NEPI versions 1.0 and 2.0: Alina Quereilhac, Claudio Freire, Martin Ferrari, Mathieu Lacage
145   \item NEPI prototype: Martin Ferrari, Mathieu Lacage
146   \item Other contributors: Dirk Hasselbalch
147 \end{itemize}
148
149 \section{Is it free?}
150
151 Yes, NEPI is free software. It is free to use, free to modify, free to share.
152 NEPI v3.0 is licensed under GPL v3, so you can do whatever you want with it, 
153 as long as you keep the same license. 
154
155 \section{How can I contribute?}
156
157 There are many ways you can contribute to the project. 
158 The first one is using it and reporting bugs. 
159 You can report bugs on the NEPI bugzilla page at: 
160
161 \url{http://nepi.inria.fr/bugzilla} \\
162
163 You can also become a part of the NEPI community and join our mailing lists:
164
165 \begin{itemize}
166     \item To subscribe to the users mailing list at \textit{nepi-users@inria.fr}
167         you can send an email to \textit{sympa@inria.fr} with subject
168         \textit{Subscribe nepi-users <put-your-user-name-here>}
169     \item To subscribe to the developers mailing list at \textit{nepi-developers@inria.fr}
170         you can send an email to \textit{sympa@inria.fr} with subject
171         \textit{Subscribe nepi-developers <put-your-user-name-here>}
172     \end{itemize}
173
174 To contribute with bug fixes and new features, please send your code patch
175 to the \textit{nepi-developers} list.
176
177 \section{How can I report a bug ?}
178
179 To report a bug take a look at the NEPI bugzilla page at :
180
181 \url{http://nepi.inria.fr/bugzilla} \\
182
183 \section{Where can I get more information ?}
184
185 For more information visit NEPI web site at :
186
187 \url{http://nepi.inria.fr} \\
188
189