git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
user manual
[nepi.git]
/
doc
/
user_manual
/
getting_started.tex
diff --git
a/doc/user_manual/getting_started.tex
b/doc/user_manual/getting_started.tex
index
4456ad7
..
c9e667f
100644
(file)
--- a/
doc/user_manual/getting_started.tex
+++ b/
doc/user_manual/getting_started.tex
@@
-1,12
+1,11
@@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
% NEPI, a framework to manage network experiments
% Copyright (C) 2013 INRIA
%
% This program is free software: you can redistribute it and/or modify
%
% 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.
+% it under the terms of the GNU General Public License version 2 as
+% published by the Free Software Foundation;
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-87,7
+86,7
@@
then you can install Python and the rest of the dependencies as follows:
\endgroup
\endgroup
-To use Python you will need to set the PATH environmen
tal
variable as:
+To use Python you will need to set the PATH environmen variable as:
\begingroup
\fontsize{10pt}{12pt}\selectfont
\begingroup
\fontsize{10pt}{12pt}\selectfont
@@
-126,7
+125,7
@@
control system. The Mercurial NEPI repo can also be browsed online at: \\
\fontsize{10pt}{12pt}\selectfont
\begin{verbatim}
\fontsize{10pt}{12pt}\selectfont
\begin{verbatim}
-$ hg clone http://nepi.inria.fr/code/nepi -r nepi-3
-dev
+$ hg clone http://nepi.inria.fr/code/nepi -r nepi-3
.2.0
\end{verbatim}
\endgroup
\end{verbatim}
\endgroup
@@
-290,8
+289,8
@@
ec = ExperimentController(exp_id = "<your-exp-id>")
\end{lstlisting}
Next we will define two Python functions: \emph{add\_node} and \emph{add\_app}.
\end{lstlisting}
Next we will define two Python functions: \emph{add\_node} and \emph{add\_app}.
-The first one to register
\textit{LinuxNodes}
resources and the second one to
-register
LinuxApplications
resources.
+The first one to register
linux::Node
resources and the second one to
+register
linux::Application
resources.
\begin{lstlisting}[language=Python]
\begin{lstlisting}[language=Python]
@@
-301,7
+300,7
@@
def add_node(ec, hostname, username, ssh_key):
ec.set(node, "hostname", hostname)
ec.set(node, "username", username)
ec.set(node, "identity", ssh_key)
ec.set(node, "hostname", hostname)
ec.set(node, "username", username)
ec.set(node, "identity", ssh_key)
- ec.set(node, "clean
Home
", True)
+ ec.set(node, "clean
Experiment
", True)
ec.set(node, "cleanProcesses", True)
return node
ec.set(node, "cleanProcesses", True)
return node
@@
-322,7
+321,7
@@
than informing the EC about the resources that will be used during the experimen
The actual deployment of the experiment requires the method \textit{deploy} to
be invoked.
The actual deployment of the experiment requires the method \textit{deploy} to
be invoked.
-The
\textit{LinuxNode}
resource exposes the hostname, username and identity
+The
linux::Node
resource exposes the hostname, username and identity
attributes. This attributes provide information about the SSH credentials
needed to log in to the Linux host.
The \textit{hostname} is the one that identifies the physical host you want
attributes. This attributes provide information about the SSH credentials
needed to log in to the Linux host.
The \textit{hostname} is the one that identifies the physical host you want
@@
-331,13
+330,13
@@
valid account on that host, and the \textit{identity} attribute is the
'absolute' path to the SSH private key in your local computer that allows you
to log in to the host.
'absolute' path to the SSH private key in your local computer that allows you
to log in to the host.
-The \textit{command} attribute of the
\textit{LinuxApplication}
resource
+The \textit{command} attribute of the
linux::Application
resource
expects a BASH command line string to be executed in the remote host.
expects a BASH command line string to be executed in the remote host.
-Apart from the \emph{command} attribute, the
\emph{LinuxApplication}
+Apart from the \emph{command} attribute, the
linux::Application
resource exposes several other attributes that allow to upload,
compile and install arbitrary sources.
resource exposes several other attributes that allow to upload,
compile and install arbitrary sources.
-The add\_app function registers a connection between a
\textit{LinuxNode}
and a
-
\textit{LinuxApplication}
.
+The add\_app function registers a connection between a
linux::Node
and a
+
linux::Application
.
Lets now use these functions to describe a simple experiment.
Choose a host where you have an account, and can access using SSH
Lets now use these functions to describe a simple experiment.
Choose a host where you have an account, and can access using SSH
@@
-345,9
+344,9
@@
key authentication.
\begin{lstlisting}[language=Python]
\begin{lstlisting}[language=Python]
-hostname =
"<the-hostname>"
-username =
"<my-username>"
-identity =
"</home/myuser/.ssh/id_rsa>"
+hostname =
<the-hostname>
+username =
<my-username>
+identity =
</home/myuser/.ssh/id_rsa>
node = add_node(ec, hostname, username, ssh_key)
app = add_app(ec, "ping -c3 nepi.inria.fr", node)
node = add_node(ec, hostname, username, ssh_key)
app = add_app(ec, "ping -c3 nepi.inria.fr", node)
@@
-396,7
+395,7
@@
the <exp-id> assigned to your EC, and inside that directory you should find
one directory named node-1 which will contain the files (e.g. result traces)
associated to the LinuxNode reosurce you just deployed.
In fact for every resource deployed associated to that host (e.g. each
one directory named node-1 which will contain the files (e.g. result traces)
associated to the LinuxNode reosurce you just deployed.
In fact for every resource deployed associated to that host (e.g. each
-
Linux
Application), NEPI will create a directory to place files related to it.
+
linux::
Application), NEPI will create a directory to place files related to it.
The name of the directory identifies the type of resources (e.g. 'node',
'app', etc) and it is followed by the global unique identifier (guid).
The name of the directory identifies the type of resources (e.g. 'node',
'app', etc) and it is followed by the global unique identifier (guid).
@@
-408,7
+407,7
@@
ec.state(app, hr=True)
\end{lstlisting}
\end{lstlisting}
-Once a
\textit{LinuxApplication}
has reached the state 'STARTED',
+Once a
linux::Application
has reached the state 'STARTED',
we can retrieve the 'stdout' trace, which should contain the output
of the PING command.
we can retrieve the 'stdout' trace, which should contain the output
of the PING command.