dummy 1.11 for cathing up with the xml numbering
[myplc.git] / doc / myplc.php
1 <?php
2
3   // DO NOT EDIT. This file was automatically generated from
4   // DocBook XML. See plc_www/doc/README.
5
6   $_title= "MyPLC User's Guide";
7
8   require_once('session.php');
9   require_once('header.php');
10   require_once('nav.php');
11
12   ?><div class="article" lang="en">
13 <div class="titlepage">
14 <div>
15 <div><h1 class="title">
16 <a name="id2795259"></a>MyPLC User's Guide</h1></div>
17 <div><div class="author"><h3 class="author"><span class="firstname">Mark Huang</span></h3></div></div>
18 <div><div class="revhistory"><table border="1" width="100%" summary="Revision history">
19 <tr><th align="left" valign="top" colspan="3"><b>Revision History</b></th></tr>
20 <tr>
21 <td align="left">Revision 1.0</td>
22 <td align="left">April 7, 2006</td>
23 <td align="left">MLH</td>
24 </tr>
25 <tr><td align="left" colspan="3"><p>Initial draft.</p></td></tr>
26 <tr>
27 <td align="left">Revision 1.1</td>
28 <td align="left">July 19, 2006</td>
29 <td align="left">MLH</td>
30 </tr>
31 <tr><td align="left" colspan="3"><p>Add development environment.</p></td></tr>
32 </table></div></div>
33 <div><div class="abstract">
34 <p class="title"><b>Abstract</b></p>
35 <p>This document describes the design, installation, and
36       administration of MyPLC, a complete PlanetLab Central (PLC)
37       portable installation contained within a
38       <span><strong class="command">chroot</strong></span> jail. This document assumes advanced
39       knowledge of the PlanetLab architecture and Linux system
40       administration.</p>
41 </div></div>
42 </div>
43 <hr>
44 </div>
45 <div class="toc">
46 <p><b>Table of Contents</b></p>
47 <dl>
48 <dt><span class="section"><a href="#id2864719">1. Overview</a></span></dt>
49 <dd><dl><dt><span class="section"><a href="#id2842268">1.1.  Purpose of the <span class="emphasis"><em> myplc-devel
50     </em></span> package </a></span></dt></dl></dd>
51 <dt><span class="section"><a href="#Requirements">2.  Requirements </a></span></dt>
52 <dt><span class="section"><a href="#Installation">3. Installating and using MyPLC</a></span></dt>
53 <dd><dl>
54 <dt><span class="section"><a href="#id2841677">3.1. Installing MyPLC.</a></span></dt>
55 <dt><span class="section"><a href="#QuickStart">3.2.  QuickStart </a></span></dt>
56 <dt><span class="section"><a href="#ChangingTheConfiguration">3.3. Changing the configuration</a></span></dt>
57 <dt><span class="section"><a href="#id2842715">3.4. Installing nodes</a></span></dt>
58 <dt><span class="section"><a href="#id2842797">3.5. Administering nodes</a></span></dt>
59 <dt><span class="section"><a href="#id2842898">3.6. Creating a slice</a></span></dt>
60 <dt><span class="section"><a href="#StartupSequence">3.7. Understanding the startup sequence</a></span></dt>
61 <dt><span class="section"><a href="#FilesInvolvedRuntime">3.8.  Files and directories
62     involved in <span class="emphasis"><em>myplc</em></span></a></span></dt>
63 </dl></dd>
64 <dt><span class="section"><a href="#DevelopmentEnvironment">4. Rebuilding and customizing MyPLC</a></span></dt>
65 <dd><dl>
66 <dt><span class="section"><a href="#id2894620">4.1. Installation</a></span></dt>
67 <dt><span class="section"><a href="#FilesInvolvedDevel">4.2.  Files and directories
68     involved in <span class="emphasis"><em>myplc-devl</em></span></a></span></dt>
69 <dt><span class="section"><a href="#id2894876">4.3. Fedora Core 4 mirror requirement</a></span></dt>
70 <dt><span class="section"><a href="#BuildingMyPLC">4.4. Building MyPLC</a></span></dt>
71 <dt><span class="section"><a href="#UpdatingCVS">4.5. Updating CVS</a></span></dt>
72 </dl></dd>
73 <dt><span class="appendix"><a href="#VariablesRuntime">A. Configuration variables (for <span class="emphasis"><em>myplc</em></span>)</a></span></dt>
74 <dt><span class="appendix"><a href="#VariablesDevel">B. Development configuration variables (for <span class="emphasis"><em>myplc-devel</em></span>)</a></span></dt>
75 <dt><span class="bibliography"><a href="#id2898373">Bibliography</a></span></dt>
76 </dl>
77 </div>
78 <div class="section" lang="en">
79 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
80 <a name="id2864719"></a>1. Overview</h2></div></div></div>
81 <p>MyPLC is a complete PlanetLab Central (PLC) portable
82     installation contained within a <span><strong class="command">chroot</strong></span>
83     jail. The default installation consists of a web server, an
84     XML-RPC API server, a boot server, and a database server: the core
85     components of PLC. The installation is customized through an
86     easy-to-use graphical interface. All PLC services are started up
87     and shut down through a single script installed on the host
88     system. The usually complex process of installing and
89     administering the PlanetLab backend is reduced by containing PLC
90     services within a virtual filesystem. By packaging it in such a
91     manner, MyPLC may also be run on any modern Linux distribution,
92     and could conceivably even run in a PlanetLab slice.</p>
93 <div class="figure">
94 <a name="Architecture"></a><p class="title"><b>Figure 1. MyPLC architecture</b></p>
95 <div class="mediaobject" align="center">
96 <img src="architecture.png" align="middle" width="270" alt="MyPLC architecture"><div class="caption"><p>MyPLC should be viewed as a single application that
97           provides multiple functions and can run on any host
98           system.</p></div>
99 </div>
100 </div>
101 <div class="section" lang="en">
102 <div class="titlepage"><div><div><h3 class="title">
103 <a name="id2842268"></a>1.1.  Purpose of the <span class="emphasis"><em> myplc-devel
104     </em></span> package </h3></div></div></div>
105 <p> The <span class="emphasis"><em>myplc</em></span> package comes with all
106     required node software, rebuilt from the public PlanetLab CVS
107     repository. If for any reason you need to implement your own
108     customized version of this software, you can use the
109     <span class="emphasis"><em>myplc-devel</em></span> package instead, for setting up
110     your own development environment, including a local CVS
111     repository; you can then freely manage your changes and rebuild
112     your customized version of <span class="emphasis"><em>myplc</em></span>. We also
113     provide good practices, that will then allow you to resync your local
114     CVS repository with any further evolution on the mainstream public
115     PlanetLab software. </p>
116 </div>
117 </div>
118 <div class="section" lang="en">
119 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
120 <a name="Requirements"></a>2.  Requirements </h2></div></div></div>
121 <p> <span class="emphasis"><em>myplc</em></span> and
122   <span class="emphasis"><em>myplc-devel</em></span> were designed as
123   <span><strong class="command">chroot</strong></span> jails so as to reduce the requirements on
124   your host operating system. So in theory, these distributions should
125   work on virtually any Linux 2.6 based distribution, whether it
126   supports rpm or not. </p>
127 <p> However, things are never that simple and there indeed are
128   some known limitations to this, so here are a couple notes as a
129   recommended reading before you proceed with the installation.</p>
130 <p> As of 9 August 2006 (i.e <span class="emphasis"><em>myplc-0.5</em></span>) :</p>
131 <div class="itemizedlist"><ul type="disc">
132 <li><p> The software is vastly based on <span class="emphasis"><em>Fedora
133   Core 4</em></span>. Please note that the build server at Princeton
134   runs <span class="emphasis"><em>Fedora Core 2</em></span>, togother with a upgraded
135   version of yum. 
136   </p></li>
137 <li>
138 <p> myplc and myplc-devel are known to work on both
139   <span class="emphasis"><em>Fedora Core 2</em></span> and <span class="emphasis"><em>Fedora Core
140   4</em></span>. Please note however that, on fc4 at least, it is
141   highly recommended to use the <span class="application">Security Level
142   Configuration</span> utility and to <span class="emphasis"><em>switch off
143   SElinux</em></span> on your box because : </p>
144 <div class="itemizedlist"><ul type="circle">
145 <li><p>
146   myplc requires you to run SElinux as 'Permissive' at most
147         </p></li>
148 <li><p>
149   myplc-devel requires you to turn SElinux Off.
150         </p></li>
151 </ul></div>
152 </li>
153 <li><p> In addition, as far as myplc is concerned, you
154   need to check your firewall configuration since you need, of course,
155   to open up the <span class="emphasis"><em>http</em></span> and
156   <span class="emphasis"><em>https</em></span> ports, so as to accept connections from
157   the managed nodes and from the users desktops. </p></li>
158 </ul></div>
159 </div>
160 <div class="section" lang="en">
161 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
162 <a name="Installation"></a>3. Installating and using MyPLC</h2></div></div></div>
163 <p>Though internally composed of commodity software
164     subpackages, MyPLC should be treated as a monolithic software
165     application. MyPLC is distributed as single RPM package that has
166     no external dependencies, allowing it to be installed on
167     practically any Linux 2.6 based distribution.</p>
168 <div class="section" lang="en">
169 <div class="titlepage"><div><div><h3 class="title">
170 <a name="id2841677"></a>3.1. Installing MyPLC.</h3></div></div></div>
171 <div class="itemizedlist"><ul type="disc">
172 <li>
173 <p>If your distribution supports RPM:</p>
174 <pre class="programlisting"># rpm -U http://build.planet-lab.org/build/myplc-0_4-rc1/RPMS/i386/myplc-0.4-1.planetlab.i386.rpm</pre>
175 </li>
176 <li>
177 <p>If your distribution does not support RPM:</p>
178 <pre class="programlisting"># cd /tmp
179 # wget http://build.planet-lab.org/build/myplc-0_4-rc1/RPMS/i386/myplc-0.4-1.planetlab.i386.rpm
180 # cd /
181 # rpm2cpio /tmp/myplc-0.4-1.planetlab.i386.rpm | cpio -diu</pre>
182 </li>
183 </ul></div>
184 <p> The <a href="#FilesInvolvedRuntime" title="3.8.  Files and directories
185     involved in myplc">Section 3.8, “ Files and directories
186     involved in <span class="emphasis"><em>myplc</em></span>”</a> below explains in
187     details the installation strategy and the miscellaneous files and
188     directories involved.</p>
189 </div>
190 <div class="section" lang="en">
191 <div class="titlepage"><div><div><h3 class="title">
192 <a name="QuickStart"></a>3.2.  QuickStart </h3></div></div></div>
193 <p> On a Red Hat or Fedora host system, it is customary to use
194     the <span><strong class="command">service</strong></span> command to invoke System V init
195     scripts. As the examples suggest, the service must be started as root:</p>
196 <div class="example">
197 <a name="id2841851"></a><p class="title"><b>Example 1. Starting MyPLC:</b></p>
198 <pre class="programlisting"># service plc start</pre>
199 </div>
200 <div class="example">
201 <a name="id2841863"></a><p class="title"><b>Example 2. Stopping MyPLC:</b></p>
202 <pre class="programlisting"># service plc stop</pre>
203 </div>
204 <p> In <a href="#StartupSequence" title="3.7. Understanding the startup sequence">Section 3.7, “Understanding the startup sequence”</a>, we provide greater
205     details that might be helpful in the case where the service does
206     not seem to take off correctly.</p>
207 <p>Like all other registered System V init services, MyPLC is
208     started and shut down automatically when your host system boots
209     and powers off. You may disable automatic startup by invoking the
210     <span><strong class="command">chkconfig</strong></span> command on a Red Hat or Fedora host
211     system:</p>
212 <div class="example">
213 <a name="id2841901"></a><p class="title"><b>Example 3. Disabling automatic startup of MyPLC.</b></p>
214 <pre class="programlisting"># chkconfig plc off</pre>
215 </div>
216 <div class="example">
217 <a name="id2842528"></a><p class="title"><b>Example 4. Re-enabling automatic startup of MyPLC.</b></p>
218 <pre class="programlisting"># chkconfig plc on</pre>
219 </div>
220 </div>
221 <div class="section" lang="en">
222 <div class="titlepage"><div><div><h3 class="title">
223 <a name="ChangingTheConfiguration"></a>3.3. Changing the configuration</h3></div></div></div>
224 <p>After verifying that MyPLC is working correctly, shut it
225       down and begin changing some of the default variable
226       values. Shut down MyPLC with <span><strong class="command">service plc stop</strong></span>
227       (see <a href="#QuickStart" title="3.2.  QuickStart ">Section 3.2, “ QuickStart ”</a>). With a text
228       editor, open the file
229       <code class="filename">/etc/planetlab/plc_config.xml</code>. This file is
230       a self-documenting configuration file written in XML. Variables
231       are divided into categories. Variable identifiers must be
232       alphanumeric, plus underscore. A variable is referred to
233       canonically as the uppercase concatenation of its category
234       identifier, an underscore, and its variable identifier. Thus, a
235       variable with an <code class="literal">id</code> of
236       <code class="literal">slice_prefix</code> in the <code class="literal">plc</code>
237       category is referred to canonically as
238       <code class="envar">PLC_SLICE_PREFIX</code>.</p>
239 <p>The reason for this convention is that during MyPLC
240       startup, <code class="filename">plc_config.xml</code> is translated into
241       several different languages—shell, PHP, and
242       Python—so that scripts written in each of these languages
243       can refer to the same underlying configuration. Most MyPLC
244       scripts are written in shell, so the convention for shell
245       variables predominates.</p>
246 <p>The variables that you should change immediately are:</p>
247 <div class="itemizedlist"><ul type="disc">
248 <li><p><code class="envar">PLC_NAME</code>: Change this to the
249         name of your PLC installation.</p></li>
250 <li><p><code class="envar">PLC_ROOT_PASSWORD</code>: Change this
251         to a more secure password.</p></li>
252 <li><p><code class="envar">PLC_MAIL_SUPPORT_ADDRESS</code>:
253         Change this to the e-mail address at which you would like to
254         receive support requests.</p></li>
255 <li><p><code class="envar">PLC_DB_HOST</code>,
256         <code class="envar">PLC_DB_IP</code>, <code class="envar">PLC_API_HOST</code>,
257         <code class="envar">PLC_API_IP</code>, <code class="envar">PLC_WWW_HOST</code>,
258         <code class="envar">PLC_WWW_IP</code>, <code class="envar">PLC_BOOT_HOST</code>,
259         <code class="envar">PLC_BOOT_IP</code>: Change all of these to the
260         preferred FQDN and external IP address of your host
261         system.</p></li>
262 </ul></div>
263 <p>The full set of applicable variables is described in <a href="#VariablesDevel" title="B. Development configuration variables (for myplc-devel)">Appendix B, <i>Development configuration variables (for <span class="emphasis"><em>myplc-devel</em></span>)</i></a>. After changing these variables,
264       save the file, then restart MyPLC with <span><strong class="command">service plc
265       start</strong></span>. You should notice that the password of the
266       default administrator account is no longer
267       <code class="literal">root</code>, and that the default site name includes
268       the name of your PLC installation instead of PlanetLab.</p>
269 </div>
270 <div class="section" lang="en">
271 <div class="titlepage"><div><div><h3 class="title">
272 <a name="id2842715"></a>3.4. Installing nodes</h3></div></div></div>
273 <p>Install your first node by clicking <code class="literal">Add
274       Node</code> under the <code class="literal">Nodes</code> tab. Fill in
275       all the appropriate details, then click
276       <code class="literal">Add</code>. Download the node's configuration file
277       by clicking <code class="literal">Download configuration file</code> on
278       the <span class="bold"><strong>Node Details</strong></span> page for the
279       node. Save it to a floppy disk or USB key as detailed in [<a href="#TechsGuide" title="[TechsGuide]">1</a>].</p>
280 <p>Follow the rest of the instructions in [<a href="#TechsGuide" title="[TechsGuide]">1</a>] for creating a Boot CD and installing
281       the node, except download the Boot CD image from the
282       <code class="filename">/download</code> directory of your PLC
283       installation, not from PlanetLab Central. The images located
284       here are customized for your installation. If you change the
285       hostname of your boot server (<code class="envar">PLC_BOOT_HOST</code>), or
286       if the SSL certificate of your boot server expires, MyPLC will
287       regenerate it and rebuild the Boot CD with the new
288       certificate. If this occurs, you must replace all Boot CDs
289       created before the certificate was regenerated.</p>
290 <p>The installation process for a node has significantly
291       improved since PlanetLab 3.3. It should now take only a few
292       seconds for a new node to become ready to create slices.</p>
293 </div>
294 <div class="section" lang="en">
295 <div class="titlepage"><div><div><h3 class="title">
296 <a name="id2842797"></a>3.5. Administering nodes</h3></div></div></div>
297 <p>You may administer nodes as <code class="literal">root</code> by
298       using the SSH key stored in
299       <code class="filename">/etc/planetlab/root_ssh_key.rsa</code>.</p>
300 <div class="example">
301 <a name="id2842820"></a><p class="title"><b>Example 5. Accessing nodes via SSH. Replace
302         <code class="literal">node</code> with the hostname of the node.</b></p>
303 <pre class="programlisting">ssh -i /etc/planetlab/root_ssh_key.rsa root@node</pre>
304 </div>
305 <p>Besides the standard Linux log files located in
306       <code class="filename">/var/log</code>, several other files can give you
307       clues about any problems with active processes:</p>
308 <div class="itemizedlist"><ul type="disc">
309 <li><p><code class="filename">/var/log/pl_nm</code>: The log
310         file for the Node Manager.</p></li>
311 <li><p><code class="filename">/vservers/pl_conf/var/log/pl_conf</code>:
312         The log file for the Slice Creation Service.</p></li>
313 <li><p><code class="filename">/var/log/propd</code>: The log
314         file for Proper, the service which allows certain slices to
315         perform certain privileged operations in the root
316         context.</p></li>
317 <li><p><code class="filename">/vservers/pl_netflow/var/log/netflow.log</code>:
318         The log file for PlanetFlow, the network traffic auditing
319         service.</p></li>
320 </ul></div>
321 </div>
322 <div class="section" lang="en">
323 <div class="titlepage"><div><div><h3 class="title">
324 <a name="id2842898"></a>3.6. Creating a slice</h3></div></div></div>
325 <p>Create a slice by clicking <code class="literal">Create Slice</code>
326       under the <code class="literal">Slices</code> tab. Fill in all the
327       appropriate details, then click <code class="literal">Create</code>. Add
328       nodes to the slice by clicking <code class="literal">Manage Nodes</code>
329       on the <span class="bold"><strong>Slice Details</strong></span> page for
330       the slice.</p>
331 <p>A <span><strong class="command">cron</strong></span> job runs every five minutes and
332       updates the file
333       <code class="filename">/plc/data/var/www/html/xml/slices-0.5.xml</code>
334       with information about current slice state. The Slice Creation
335       Service running on every node polls this file every ten minutes
336       to determine if it needs to create or delete any slices. You may
337       accelerate this process manually if desired.</p>
338 <div class="example">
339 <a name="id2842960"></a><p class="title"><b>Example 6. Forcing slice creation on a node.</b></p>
340 <pre class="programlisting"># Update slices.xml immediately
341 service plc start crond
342
343 # Kick the Slice Creation Service on a particular node.
344 ssh -i /etc/planetlab/root_ssh_key.rsa root@node \
345 vserver pl_conf exec service pl_conf restart</pre>
346 </div>
347 </div>
348 <div class="section" lang="en">
349 <div class="titlepage"><div><div><h3 class="title">
350 <a name="StartupSequence"></a>3.7. Understanding the startup sequence</h3></div></div></div>
351 <p>During service startup described in <a href="#QuickStart" title="3.2.  QuickStart ">Section 3.2, “ QuickStart ”</a>, observe the output of this command for
352     any failures. If no failures occur, you should see output similar
353     to the following:</p>
354 <div class="example">
355 <a name="id2893858"></a><p class="title"><b>Example 7. A successful MyPLC startup.</b></p>
356 <pre class="programlisting">Mounting PLC:                                              [  OK  ]
357 PLC: Generating network files:                             [  OK  ]
358 PLC: Starting system logger:                               [  OK  ]
359 PLC: Starting database server:                             [  OK  ]
360 PLC: Generating SSL certificates:                          [  OK  ]
361 PLC: Configuring the API:                                  [  OK  ]
362 PLC: Updating GPG keys:                                    [  OK  ]
363 PLC: Generating SSH keys:                                  [  OK  ]
364 PLC: Starting web server:                                  [  OK  ]
365 PLC: Bootstrapping the database:                           [  OK  ]
366 PLC: Starting DNS server:                                  [  OK  ]
367 PLC: Starting crond:                                       [  OK  ]
368 PLC: Rebuilding Boot CD:                                   [  OK  ]
369 PLC: Rebuilding Boot Manager:                              [  OK  ]
370 PLC: Signing node packages:                                [  OK  ]
371 </pre>
372 </div>
373 <p>If <code class="filename">/plc/root</code> is mounted successfully, a
374     complete log file of the startup process may be found at
375     <code class="filename">/plc/root/var/log/boot.log</code>. Possible reasons
376     for failure of each step include:</p>
377 <div class="itemizedlist"><ul type="disc">
378 <li><p><code class="literal">Mounting PLC</code>: If this step
379       fails, first ensure that you started MyPLC as root. Check
380       <code class="filename">/etc/sysconfig/plc</code> to ensure that
381       <code class="envar">PLC_ROOT</code> and <code class="envar">PLC_DATA</code> refer to the
382       right locations. You may also have too many existing loopback
383       mounts, or your kernel may not support loopback mounting, bind
384       mounting, or the ext3 filesystem. Try freeing at least one
385       loopback device, or re-compiling your kernel to support loopback
386       mounting, bind mounting, and the ext3 filesystem. If you see an
387       error similar to <code class="literal">Permission denied while trying to open
388       /plc/root.img</code>, then SELinux may be enabled. See <a href="#Requirements" title="2.  Requirements ">Section 2, “ Requirements ”</a> above for details.</p></li>
389 <li><p><code class="literal">Starting database server</code>: If
390       this step fails, check
391       <code class="filename">/plc/root/var/log/pgsql</code> and
392       <code class="filename">/plc/root/var/log/boot.log</code>. The most common
393       reason for failure is that the default PostgreSQL port, TCP port
394       5432, is already in use. Check that you are not running a
395       PostgreSQL server on the host system.</p></li>
396 <li><p><code class="literal">Starting web server</code>: If this
397       step fails, check
398       <code class="filename">/plc/root/var/log/httpd/error_log</code> and
399       <code class="filename">/plc/root/var/log/boot.log</code> for obvious
400       errors. The most common reason for failure is that the default
401       web ports, TCP ports 80 and 443, are already in use. Check that
402       you are not running a web server on the host
403       system.</p></li>
404 <li><p><code class="literal">Bootstrapping the database</code>:
405       If this step fails, it is likely that the previous step
406       (<code class="literal">Starting web server</code>) also failed. Another
407       reason that it could fail is if <code class="envar">PLC_API_HOST</code> (see
408       <a href="#ChangingTheConfiguration" title="3.3. Changing the configuration">Section 3.3, “Changing the configuration”</a>) does not resolve to
409       the host on which the API server has been enabled. By default,
410       all services, including the API server, are enabled and run on
411       the same host, so check that <code class="envar">PLC_API_HOST</code> is
412       either <code class="filename">localhost</code> or resolves to a local IP
413       address.</p></li>
414 <li><p><code class="literal">Starting crond</code>: If this step
415       fails, it is likely that the previous steps (<code class="literal">Starting
416       web server</code> and <code class="literal">Bootstrapping the
417       database</code>) also failed. If not, check
418       <code class="filename">/plc/root/var/log/boot.log</code> for obvious
419       errors. This step starts the <span><strong class="command">cron</strong></span> service and
420       generates the initial set of XML files that the Slice Creation
421       Service uses to determine slice state.</p></li>
422 </ul></div>
423 <p>If no failures occur, then MyPLC should be active with a
424     default configuration. Open a web browser on the host system and
425     visit <code class="literal">http://localhost/</code>, which should bring you
426     to the front page of your PLC installation. The password of the
427     default administrator account
428     <code class="literal">root@localhost.localdomain</code> (set by
429     <code class="envar">PLC_ROOT_USER</code>) is <code class="literal">root</code> (set by
430     <code class="envar">PLC_ROOT_PASSWORD</code>).</p>
431 </div>
432 <div class="section" lang="en">
433 <div class="titlepage"><div><div><h3 class="title">
434 <a name="FilesInvolvedRuntime"></a>3.8.  Files and directories
435     involved in <span class="emphasis"><em>myplc</em></span></h3></div></div></div>
436 <p>MyPLC installs the following files and directories:</p>
437 <div class="orderedlist"><ol type="1">
438 <li><p><code class="filename">/plc/root.img</code>: The main
439       root filesystem of the MyPLC application. This file is an
440       uncompressed ext3 filesystem that is loopback mounted on
441       <code class="filename">/plc/root</code> when MyPLC starts. This
442       filesystem, even when mounted, should be treated as an opaque
443       binary that can and will be replaced in its entirety by any
444       upgrade of MyPLC.</p></li>
445 <li><p><code class="filename">/plc/root</code>: The mount point
446       for <code class="filename">/plc/root.img</code>. Once the root filesystem
447       is mounted, all MyPLC services run in a
448       <span><strong class="command">chroot</strong></span> jail based in this
449       directory.</p></li>
450 <li>
451 <p><code class="filename">/plc/data</code>: The directory where user
452         data and generated files are stored. This directory is bind
453         mounted onto <code class="filename">/plc/root/data</code> so that it is
454         accessible as <code class="filename">/data</code> from within the
455         <span><strong class="command">chroot</strong></span> jail. Files in this directory are
456         marked with <span><strong class="command">%config(noreplace)</strong></span> in the
457         RPM. That is, during an upgrade of MyPLC, if a file has not
458         changed since the last installation or upgrade of MyPLC, it is
459         subject to upgrade and replacement. If the file has changed,
460         the new version of the file will be created with a
461         <code class="filename">.rpmnew</code> extension. Symlinks within the
462         MyPLC root filesystem ensure that the following directories
463         (relative to <code class="filename">/plc/root</code>) are stored
464         outside the MyPLC filesystem image:</p>
465 <div class="itemizedlist"><ul type="disc">
466 <li><p><code class="filename">/etc/planetlab</code>: This
467           directory contains the configuration files, keys, and
468           certificates that define your MyPLC
469           installation.</p></li>
470 <li><p><code class="filename">/var/lib/pgsql</code>: This
471           directory contains PostgreSQL database
472           files.</p></li>
473 <li><p><code class="filename">/var/www/html/alpina-logs</code>: This
474           directory contains node installation logs.</p></li>
475 <li><p><code class="filename">/var/www/html/boot</code>: This
476           directory contains the Boot Manager, customized for your MyPLC
477           installation, and its data files.</p></li>
478 <li><p><code class="filename">/var/www/html/download</code>: This
479           directory contains Boot CD images, customized for your MyPLC
480           installation.</p></li>
481 <li><p><code class="filename">/var/www/html/install-rpms</code>: This
482           directory is where you should install node package updates,
483           if any. By default, nodes are installed from the tarball
484           located at
485           <code class="filename">/var/www/html/boot/PlanetLab-Bootstrap.tar.bz2</code>,
486           which is pre-built from the latest PlanetLab Central
487           sources, and installed as part of your MyPLC
488           installation. However, nodes will attempt to install any
489           newer RPMs located in
490           <code class="filename">/var/www/html/install-rpms/planetlab</code>,
491           after initial installation and periodically thereafter. You
492           must run <span><strong class="command">yum-arch</strong></span> and
493           <span><strong class="command">createrepo</strong></span> to update the
494           <span><strong class="command">yum</strong></span> caches in this directory after
495           installing a new RPM. PlanetLab Central cannot support any
496           changes to this directory.</p></li>
497 <li><p><code class="filename">/var/www/html/xml</code>: This
498           directory contains various XML files that the Slice Creation
499           Service uses to determine the state of slices. These XML
500           files are refreshed periodically by <span><strong class="command">cron</strong></span>
501           jobs running in the MyPLC root.</p></li>
502 </ul></div>
503 </li>
504 <li><p><a name="MyplcInitScripts"></a><code class="filename">/etc/init.d/plc</code>: This file
505         is a System V init script installed on your host filesystem,
506         that allows you to start up and shut down MyPLC with a single
507         command, as described in <a href="#QuickStart" title="3.2.  QuickStart ">Section 3.2, “ QuickStart ”</a>.</p></li>
508 <li><p><code class="filename">/etc/sysconfig/plc</code>: This
509       file is a shell script fragment that defines the variables
510       <code class="envar">PLC_ROOT</code> and <code class="envar">PLC_DATA</code>. By default,
511       the values of these variables are <code class="filename">/plc/root</code>
512       and <code class="filename">/plc/data</code>, respectively. If you wish,
513       you may move your MyPLC installation to another location on your
514       host filesystem and edit the values of these variables
515       appropriately, but you will break the RPM upgrade
516       process. PlanetLab Central cannot support any changes to this
517       file.</p></li>
518 <li><p><code class="filename">/etc/planetlab</code>: This
519       symlink to <code class="filename">/plc/data/etc/planetlab</code> is
520       installed on the host system for convenience.</p></li>
521 </ol></div>
522 </div>
523 </div>
524 <div class="section" lang="en">
525 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
526 <a name="DevelopmentEnvironment"></a>4. Rebuilding and customizing MyPLC</h2></div></div></div>
527 <p>The MyPLC package, though distributed as an RPM, is not a
528     traditional package that can be easily rebuilt from SRPM. The
529     requisite build environment is quite extensive and numerous
530     assumptions are made throughout the PlanetLab source code base,
531     that the build environment is based on Fedora Core 4 and that
532     access to a complete Fedora Core 4 mirror is available.</p>
533 <p>For this reason, it is recommended that you only rebuild
534     MyPLC (or any of its components) from within the MyPLC development
535     environment. The MyPLC development environment is similar to MyPLC
536     itself in that it is a portable filesystem contained within a
537     <span><strong class="command">chroot</strong></span> jail. The filesystem contains all the
538     necessary tools required to rebuild MyPLC, as well as a snapshot
539     of the PlanetLab source code base in the form of a local CVS
540     repository.</p>
541 <div class="section" lang="en">
542 <div class="titlepage"><div><div><h3 class="title">
543 <a name="id2894620"></a>4.1. Installation</h3></div></div></div>
544 <p>Install the MyPLC development environment similarly to how
545       you would install MyPLC. You may install both packages on the same
546       host system if you wish. As with MyPLC, the MyPLC development
547       environment should be treated as a monolithic software
548       application, and any files present in the
549       <span><strong class="command">chroot</strong></span> jail should not be modified directly, as
550       they are subject to upgrade.</p>
551 <div class="itemizedlist"><ul type="disc">
552 <li>
553 <p>If your distribution supports RPM:</p>
554 <pre class="programlisting"># rpm -U http://build.planet-lab.org/build/myplc-0_4-rc2/RPMS/i386/myplc-devel-0.4-2.planetlab.i386.rpm</pre>
555 </li>
556 <li>
557 <p>If your distribution does not support RPM:</p>
558 <pre class="programlisting"># cd /tmp
559 # wget http://build.planet-lab.org/build/myplc-0_4-rc2/RPMS/i386/myplc-devel-0.4-2.planetlab.i386.rpm
560 # cd /
561 # rpm2cpio /tmp/myplc-devel-0.4-2.planetlab.i386.rpm | cpio -diu</pre>
562 </li>
563 </ul></div>
564 </div>
565 <div class="section" lang="en">
566 <div class="titlepage"><div><div><h3 class="title">
567 <a name="FilesInvolvedDevel"></a>4.2.  Files and directories
568     involved in <span class="emphasis"><em>myplc-devl</em></span></h3></div></div></div>
569 <p>The MyPLC development environment installs the following
570       files and directories:</p>
571 <div class="itemizedlist"><ul type="disc">
572 <li><p><code class="filename">/plc/devel/root.img</code>: The
573         main root filesystem of the MyPLC development environment. This
574         file is an uncompressed ext3 filesystem that is loopback mounted
575         on <code class="filename">/plc/devel/root</code> when the MyPLC
576         development environment is initialized. This filesystem, even
577         when mounted, should be treated as an opaque binary that can and
578         will be replaced in its entirety by any upgrade of the MyPLC
579         development environment.</p></li>
580 <li><p><code class="filename">/plc/devel/root</code>: The mount
581         point for
582         <code class="filename">/plc/devel/root.img</code>.</p></li>
583 <li>
584 <p><code class="filename">/plc/devel/data</code>: The directory
585           where user data and generated files are stored. This directory
586           is bind mounted onto <code class="filename">/plc/devel/root/data</code>
587           so that it is accessible as <code class="filename">/data</code> from
588           within the <span><strong class="command">chroot</strong></span> jail. Files in this
589           directory are marked with
590           <span><strong class="command">%config(noreplace)</strong></span> in the RPM. Symlinks
591           ensure that the following directories (relative to
592           <code class="filename">/plc/devel/root</code>) are stored outside the
593           root filesystem image:</p>
594 <div class="itemizedlist"><ul type="circle">
595 <li><p><code class="filename">/etc/planetlab</code>: This
596             directory contains the configuration files that define your
597             MyPLC development environment.</p></li>
598 <li><p><code class="filename">/cvs</code>: A
599             snapshot of the PlanetLab source code is stored as a CVS
600             repository in this directory. Files in this directory will
601             <span class="bold"><strong>not</strong></span> be updated by an upgrade of
602             <code class="filename">myplc-devel</code>. See <a href="#UpdatingCVS" title="4.5. Updating CVS">Section 4.5, “Updating CVS”</a> for more information about updating
603             PlanetLab source code.</p></li>
604 <li><p><code class="filename">/build</code>:
605             Builds are stored in this directory. This directory is bind
606             mounted onto <code class="filename">/plc/devel/root/build</code> so that
607             it is accessible as <code class="filename">/build</code> from within the
608             <span><strong class="command">chroot</strong></span> jail. The build scripts in this
609             directory are themselves source controlled; see <a href="#BuildingMyPLC" title="4.4. Building MyPLC">Section 4.4, “Building MyPLC”</a> for more information about executing
610             builds.</p></li>
611 </ul></div>
612 </li>
613 <li><p><code class="filename">/etc/init.d/plc-devel</code>: This file is
614           a System V init script installed on your host filesystem, that
615           allows you to start up and shut down the MyPLC development
616           environment with a single command.</p></li>
617 </ul></div>
618 </div>
619 <div class="section" lang="en">
620 <div class="titlepage"><div><div><h3 class="title">
621 <a name="id2894876"></a>4.3. Fedora Core 4 mirror requirement</h3></div></div></div>
622 <p>The MyPLC development environment requires access to a
623       complete Fedora Core 4 i386 RPM repository, because several
624       different filesystems based upon Fedora Core 4 are constructed
625       during the process of building MyPLC. You may configure the
626       location of this repository via the
627       <code class="envar">PLC_DEVEL_FEDORA_URL</code> variable in
628       <code class="filename">/plc/devel/data/etc/planetlab/plc_config.xml</code>. The
629       value of the variable should be a URL that points to the top
630       level of a Fedora mirror that provides the
631       <code class="filename">base</code>, <code class="filename">updates</code>, and
632       <code class="filename">extras</code> repositories, e.g.,</p>
633 <div class="itemizedlist"><ul type="disc">
634 <li><p><code class="filename">file:///data/fedora</code></p></li>
635 <li><p><code class="filename">http://coblitz.planet-lab.org/pub/fedora</code></p></li>
636 <li><p><code class="filename">ftp://mirror.cs.princeton.edu/pub/mirrors/fedora</code></p></li>
637 <li><p><code class="filename">ftp://mirror.stanford.edu/pub/mirrors/fedora</code></p></li>
638 <li><p><code class="filename">http://rpmfind.net/linux/fedora</code></p></li>
639 </ul></div>
640 <p>As implied by the list, the repository may be located on
641       the local filesystem, or it may be located on a remote FTP or
642       HTTP server. URLs beginning with <code class="filename">file://</code>
643       should exist at the specified location relative to the root of
644       the <span><strong class="command">chroot</strong></span> jail. For optimum performance and
645       reproducibility, specify
646       <code class="envar">PLC_DEVEL_FEDORA_URL=file:///data/fedora</code> and
647       download all Fedora Core 4 RPMS into
648       <code class="filename">/plc/devel/data/fedora</code> on the host system
649       after installing <code class="filename">myplc-devel</code>. Use a tool
650       such as <span><strong class="command">wget</strong></span> or <span><strong class="command">rsync</strong></span> to
651       download the RPMS from a public mirror:</p>
652 <div class="example">
653 <a name="id2895018"></a><p class="title"><b>Example 8. Setting up a local Fedora Core 4 repository.</b></p>
654 <pre class="programlisting"># mkdir -p /plc/devel/data/fedora
655 # cd /plc/devel/data/fedora
656
657 # for repo in core/4/i386/os core/updates/4/i386 extras/4/i386 ; do
658 &gt;     wget -m -nH --cut-dirs=3 http://coblitz.planet-lab.org/pub/fedora/linux/$repo
659 &gt; done</pre>
660 </div>
661 <p>Change the repository URI and <span><strong class="command">--cut-dirs</strong></span>
662       level as needed to produce a hierarchy that resembles:</p>
663 <pre class="programlisting">/plc/devel/data/fedora/core/4/i386/os
664 /plc/devel/data/fedora/core/updates/4/i386
665 /plc/devel/data/fedora/extras/4/i386</pre>
666 <p>A list of additional Fedora Core 4 mirrors is available at
667       <a href="http://fedora.redhat.com/Download/mirrors.html" target="_top">http://fedora.redhat.com/Download/mirrors.html</a>.</p>
668 </div>
669 <div class="section" lang="en">
670 <div class="titlepage"><div><div><h3 class="title">
671 <a name="BuildingMyPLC"></a>4.4. Building MyPLC</h3></div></div></div>
672 <p>All PlanetLab source code modules are built and installed
673       as RPMS. A set of build scripts, checked into the
674       <code class="filename">build/</code> directory of the PlanetLab CVS
675       repository, eases the task of rebuilding PlanetLab source
676       code.</p>
677 <p> Before you try building MyPLC, you might check the
678       configuration, in a file named
679       <span class="emphasis"><em>plc_config.xml</em></span> that relies on a very
680       similar model as MyPLC, located in
681       <span class="emphasis"><em>/etc/planetlab</em></span> within the chroot jail, or
682       in <span class="emphasis"><em>/plc/devel/data/etc/planetlab</em></span> from the
683       root context. The set of applicable variables is described in
684       <a href="#VariablesDevel" title="B. Development configuration variables (for myplc-devel)">Appendix B, <i>Development configuration variables (for <span class="emphasis"><em>myplc-devel</em></span>)</i></a>. </p>
685 <p>To build MyPLC, or any PlanetLab source code module, from
686       within the MyPLC development environment, execute the following
687       commands as root:</p>
688 <div class="example">
689 <a name="id2895119"></a><p class="title"><b>Example 9. Building MyPLC.</b></p>
690 <pre class="programlisting"># Initialize MyPLC development environment
691 service plc-devel start
692
693 # Enter development environment
694 chroot /plc/devel/root su -
695
696 # Check out build scripts into a directory named after the current
697 # date. This is simply a convention, it need not be followed
698 # exactly. See build/build.sh for an example of a build script that
699 # names build directories after CVS tags.
700 DATE=$(date +%Y.%m.%d)
701 cd /build
702 cvs -d /cvs checkout -d $DATE build
703
704 # Build everything
705 make -C $DATE</pre>
706 </div>
707 <p>If the build succeeds, a set of binary RPMS will be
708       installed under
709       <code class="filename">/plc/devel/data/build/$DATE/RPMS/</code> that you
710       may copy to the
711       <code class="filename">/var/www/html/install-rpms/planetlab</code>
712       directory of your MyPLC installation (see <a href="#Installation" title="3. Installating and using MyPLC">Section 3, “Installating and using MyPLC”</a>).</p>
713 </div>
714 <div class="section" lang="en">
715 <div class="titlepage"><div><div><h3 class="title">
716 <a name="UpdatingCVS"></a>4.5. Updating CVS</h3></div></div></div>
717 <p>A complete snapshot of the PlanetLab source code is included
718       with the MyPLC development environment as a CVS repository in
719       <code class="filename">/plc/devel/data/cvs</code>. This CVS repository may
720       be accessed like any other CVS repository. It may be accessed
721       using an interface such as <a href="http://www.freebsd.org/projects/cvsweb.html" target="_top">CVSweb</a>,
722       and file permissions may be altered to allow for fine-grained
723       access control. Although the files are included with the
724       <code class="filename">myplc-devel</code> RPM, they are <span class="bold"><strong>not</strong></span> subject to upgrade once installed. New
725       versions of the <code class="filename">myplc-devel</code> RPM will install
726       updated snapshot repositories in
727       <code class="filename">/plc/devel/data/cvs-%{version}-%{release}</code>,
728       where <code class="literal">%{version}-%{release}</code> is replaced with
729       the version number of the RPM.</p>
730 <p>Because the CVS repository is not automatically upgraded,
731       if you wish to keep your local repository synchronized with the
732       public PlanetLab repository, it is highly recommended that you
733       use CVS's support for <a href="http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Tracking_third-party_sources" target="_top">vendor
734       branches</a> to track changes. Vendor branches ease the task
735       of merging upstream changes with your local modifications. To
736       import a new snapshot into your local repository (for example,
737       if you have just upgraded from
738       <code class="filename">myplc-devel-0.4-2</code> to
739       <code class="filename">myplc-devel-0.4-3</code> and you notice the new
740       repository in <code class="filename">/plc/devel/data/cvs-0.4-3</code>),
741       execute the following commands as root from within the MyPLC
742       development environment:</p>
743 <div class="example">
744 <a name="id2895270"></a><p class="title"><b>Example 10. Updating /data/cvs from /data/cvs-0.4-3.</b></p>
745 <p><span class="bold"><strong>Warning</strong></span>: This may cause
746         severe, irreversible changes to be made to your local
747         repository. Always tag your local repository before
748         importing.</p>
749 <pre class="programlisting"># Initialize MyPLC development environment
750 service plc-devel start
751
752 # Enter development environment
753 chroot /plc/devel/root su -
754
755 # Tag current state
756 cvs -d /cvs rtag before-myplc-0_4-3-merge
757
758 # Export snapshot
759 TMP=$(mktemp -d /data/export.XXXXXX)
760 pushd $TMP
761 cvs -d /data/cvs-0.4-3 export -r HEAD .
762 cvs -d /cvs import -m "PlanetLab sources from myplc-0.4-3" -ko -I ! . planetlab myplc-0_4-3
763 popd
764 rm -rf $TMP</pre>
765 </div>
766 <p>If there any merge conflicts, use the command suggested by
767       CVS to help the merge. Explaining how to fix merge conflicts is
768       beyond the scope of this document; consult the CVS documentation
769       for more information on how to use CVS.</p>
770 </div>
771 </div>
772 <div class="appendix" lang="en">
773 <h2 class="title" style="clear: both">
774 <a name="VariablesRuntime"></a>A. Configuration variables (for <span class="emphasis"><em>myplc</em></span>)</h2>
775 <p>Listed below is the set of standard configuration variables
776     and their default values, defined in the template
777     <code class="filename">/etc/planetlab/default_config.xml</code>. Additional
778     variables and their defaults may be defined in site-specific XML
779     templates that should be placed in
780     <code class="filename">/etc/planetlab/configs/</code>.</p>
781 <div class="variablelist"><dl>
782 <dt><span class="term">PLC_NAME</span></dt>
783 <dd>
784 <p>
785                   Type: string</p>
786 <p>
787                   Default: PlanetLab Test</p>
788 <p>The name of this PLC installation. It is used in
789           the name of the default system site (e.g., PlanetLab Central)
790           and in the names of various administrative entities (e.g.,
791           PlanetLab Support).</p>
792 </dd>
793 <dt><span class="term">PLC_SLICE_PREFIX</span></dt>
794 <dd>
795 <p>
796                   Type: string</p>
797 <p>
798                   Default: pl</p>
799 <p>The abbreviated name of this PLC
800           installation. It is used as the prefix for system slices
801           (e.g., pl_conf). Warning: Currently, this variable should
802           not be changed.</p>
803 </dd>
804 <dt><span class="term">PLC_ROOT_USER</span></dt>
805 <dd>
806 <p>
807                   Type: email</p>
808 <p>
809                   Default: root@localhost.localdomain</p>
810 <p>The name of the initial administrative
811           account. We recommend that this account be used only to create
812           additional accounts associated with real
813           administrators, then disabled.</p>
814 </dd>
815 <dt><span class="term">PLC_ROOT_PASSWORD</span></dt>
816 <dd>
817 <p>
818                   Type: password</p>
819 <p>
820                   Default: root</p>
821 <p>The password of the initial administrative
822           account. Also the password of the root account on the Boot
823           CD.</p>
824 </dd>
825 <dt><span class="term">PLC_ROOT_SSH_KEY_PUB</span></dt>
826 <dd>
827 <p>
828                   Type: file</p>
829 <p>
830                   Default: /etc/planetlab/root_ssh_key.pub</p>
831 <p>The SSH public key used to access the root
832           account on your nodes.</p>
833 </dd>
834 <dt><span class="term">PLC_ROOT_SSH_KEY</span></dt>
835 <dd>
836 <p>
837                   Type: file</p>
838 <p>
839                   Default: /etc/planetlab/root_ssh_key.rsa</p>
840 <p>The SSH private key used to access the root
841           account on your nodes.</p>
842 </dd>
843 <dt><span class="term">PLC_DEBUG_SSH_KEY_PUB</span></dt>
844 <dd>
845 <p>
846                   Type: file</p>
847 <p>
848                   Default: /etc/planetlab/debug_ssh_key.pub</p>
849 <p>The SSH public key used to access the root
850           account on your nodes when they are in Debug mode.</p>
851 </dd>
852 <dt><span class="term">PLC_DEBUG_SSH_KEY</span></dt>
853 <dd>
854 <p>
855                   Type: file</p>
856 <p>
857                   Default: /etc/planetlab/debug_ssh_key.rsa</p>
858 <p>The SSH private key used to access the root
859           account on your nodes when they are in Debug mode.</p>
860 </dd>
861 <dt><span class="term">PLC_ROOT_GPG_KEY_PUB</span></dt>
862 <dd>
863 <p>
864                   Type: file</p>
865 <p>
866                   Default: /etc/planetlab/pubring.gpg</p>
867 <p>The GPG public keyring used to sign the Boot
868           Manager and all node packages.</p>
869 </dd>
870 <dt><span class="term">PLC_ROOT_GPG_KEY</span></dt>
871 <dd>
872 <p>
873                   Type: file</p>
874 <p>
875                   Default: /etc/planetlab/secring.gpg</p>
876 <p>The SSH private key used to access the root
877           account on your nodes.</p>
878 </dd>
879 <dt><span class="term">PLC_MA_SA_NAMESPACE</span></dt>
880 <dd>
881 <p>
882                   Type: ip</p>
883 <p>
884                   Default: test</p>
885 <p>The namespace of your MA/SA. This should be a
886           globally unique value assigned by PlanetLab
887           Central.</p>
888 </dd>
889 <dt><span class="term">PLC_MA_SA_SSL_KEY</span></dt>
890 <dd>
891 <p>
892                   Type: file</p>
893 <p>
894                   Default: /etc/planetlab/ma_sa_ssl.key</p>
895 <p>The SSL private key used for signing documents
896           with the signature of your MA/SA. If non-existent, one will
897           be generated.</p>
898 </dd>
899 <dt><span class="term">PLC_MA_SA_SSL_CRT</span></dt>
900 <dd>
901 <p>
902                   Type: file</p>
903 <p>
904                   Default: /etc/planetlab/ma_sa_ssl.crt</p>
905 <p>The corresponding SSL public certificate. By
906           default, this certificate is self-signed. You may replace
907           the certificate later with one signed by the PLC root
908           CA.</p>
909 </dd>
910 <dt><span class="term">PLC_MA_SA_CA_SSL_CRT</span></dt>
911 <dd>
912 <p>
913                   Type: file</p>
914 <p>
915                   Default: /etc/planetlab/ma_sa_ca_ssl.crt</p>
916 <p>If applicable, the certificate of the PLC root
917           CA. If your MA/SA certificate is self-signed, then this file
918           is the same as your MA/SA certificate.</p>
919 </dd>
920 <dt><span class="term">PLC_MA_SA_CA_SSL_KEY_PUB</span></dt>
921 <dd>
922 <p>
923                   Type: file</p>
924 <p>
925                   Default: /etc/planetlab/ma_sa_ca_ssl.pub</p>
926 <p>If applicable, the public key of the PLC root
927           CA. If your MA/SA certificate is self-signed, then this file
928           is the same as your MA/SA public key.</p>
929 </dd>
930 <dt><span class="term">PLC_MA_SA_API_CRT</span></dt>
931 <dd>
932 <p>
933                   Type: file</p>
934 <p>
935                   Default: /etc/planetlab/ma_sa_api.xml</p>
936 <p>The API Certificate is your MA/SA public key
937           embedded in a digitally signed XML document. By default,
938           this document is self-signed. You may replace this
939           certificate later with one signed by the PLC root
940           CA.</p>
941 </dd>
942 <dt><span class="term">PLC_NET_DNS1</span></dt>
943 <dd>
944 <p>
945                   Type: ip</p>
946 <p>
947                   Default: 127.0.0.1</p>
948 <p>Primary DNS server address.</p>
949 </dd>
950 <dt><span class="term">PLC_NET_DNS2</span></dt>
951 <dd>
952 <p>
953                   Type: ip</p>
954 <p>
955                   Default: </p>
956 <p>Secondary DNS server address.</p>
957 </dd>
958 <dt><span class="term">PLC_DNS_ENABLED</span></dt>
959 <dd>
960 <p>
961                   Type: boolean</p>
962 <p>
963                   Default: true</p>
964 <p>Enable the internal DNS server. The server does
965           not provide reverse resolution and is not a production
966           quality or scalable DNS solution. Use the internal DNS
967           server only for small deployments or for
968           testing.</p>
969 </dd>
970 <dt><span class="term">PLC_MAIL_ENABLED</span></dt>
971 <dd>
972 <p>
973                   Type: boolean</p>
974 <p>
975                   Default: false</p>
976 <p>Set to false to suppress all e-mail notifications
977           and warnings.</p>
978 </dd>
979 <dt><span class="term">PLC_MAIL_SUPPORT_ADDRESS</span></dt>
980 <dd>
981 <p>
982                   Type: email</p>
983 <p>
984                   Default: root+support@localhost.localdomain</p>
985 <p>This address is used for support
986           requests. Support requests may include traffic complaints,
987           security incident reporting, web site malfunctions, and
988           general requests for information. We recommend that the
989           address be aliased to a ticketing system such as Request
990           Tracker.</p>
991 </dd>
992 <dt><span class="term">PLC_MAIL_BOOT_ADDRESS</span></dt>
993 <dd>
994 <p>
995                   Type: email</p>
996 <p>
997                   Default: root+install-msgs@localhost.localdomain</p>
998 <p>The API will notify this address when a problem
999           occurs during node installation or boot.</p>
1000 </dd>
1001 <dt><span class="term">PLC_MAIL_SLICE_ADDRESS</span></dt>
1002 <dd>
1003 <p>
1004                   Type: email</p>
1005 <p>
1006                   Default: root+SLICE@localhost.localdomain</p>
1007 <p>This address template is used for sending
1008           e-mail notifications to slices. SLICE will be replaced with
1009           the name of the slice.</p>
1010 </dd>
1011 <dt><span class="term">PLC_DB_ENABLED</span></dt>
1012 <dd>
1013 <p>
1014                   Type: boolean</p>
1015 <p>
1016                   Default: true</p>
1017 <p>Enable the database server on this
1018           machine.</p>
1019 </dd>
1020 <dt><span class="term">PLC_DB_TYPE</span></dt>
1021 <dd>
1022 <p>
1023                   Type: string</p>
1024 <p>
1025                   Default: postgresql</p>
1026 <p>The type of database server. Currently, only
1027           postgresql is supported.</p>
1028 </dd>
1029 <dt><span class="term">PLC_DB_HOST</span></dt>
1030 <dd>
1031 <p>
1032                   Type: hostname</p>
1033 <p>
1034                   Default: localhost.localdomain</p>
1035 <p>The fully qualified hostname of the database
1036           server.</p>
1037 </dd>
1038 <dt><span class="term">PLC_DB_IP</span></dt>
1039 <dd>
1040 <p>
1041                   Type: ip</p>
1042 <p>
1043                   Default: 127.0.0.1</p>
1044 <p>The IP address of the database server, if not
1045           resolvable by the configured DNS servers.</p>
1046 </dd>
1047 <dt><span class="term">PLC_DB_PORT</span></dt>
1048 <dd>
1049 <p>
1050                   Type: int</p>
1051 <p>
1052                   Default: 5432</p>
1053 <p>The TCP port number through which the database
1054           server should be accessed.</p>
1055 </dd>
1056 <dt><span class="term">PLC_DB_NAME</span></dt>
1057 <dd>
1058 <p>
1059                   Type: string</p>
1060 <p>
1061                   Default: planetlab3</p>
1062 <p>The name of the database to access.</p>
1063 </dd>
1064 <dt><span class="term">PLC_DB_USER</span></dt>
1065 <dd>
1066 <p>
1067                   Type: string</p>
1068 <p>
1069                   Default: pgsqluser</p>
1070 <p>The username to use when accessing the
1071           database.</p>
1072 </dd>
1073 <dt><span class="term">PLC_DB_PASSWORD</span></dt>
1074 <dd>
1075 <p>
1076                   Type: password</p>
1077 <p>
1078                   Default: </p>
1079 <p>The password to use when accessing the
1080           database. If left blank, one will be
1081           generated.</p>
1082 </dd>
1083 <dt><span class="term">PLC_API_ENABLED</span></dt>
1084 <dd>
1085 <p>
1086                   Type: boolean</p>
1087 <p>
1088                   Default: true</p>
1089 <p>Enable the API server on this
1090           machine.</p>
1091 </dd>
1092 <dt><span class="term">PLC_API_DEBUG</span></dt>
1093 <dd>
1094 <p>
1095                   Type: boolean</p>
1096 <p>
1097                   Default: false</p>
1098 <p>Enable verbose API debugging. Do not enable on
1099           a production system!</p>
1100 </dd>
1101 <dt><span class="term">PLC_API_HOST</span></dt>
1102 <dd>
1103 <p>
1104                   Type: hostname</p>
1105 <p>
1106                   Default: localhost.localdomain</p>
1107 <p>The fully qualified hostname of the API
1108           server.</p>
1109 </dd>
1110 <dt><span class="term">PLC_API_IP</span></dt>
1111 <dd>
1112 <p>
1113                   Type: ip</p>
1114 <p>
1115                   Default: 127.0.0.1</p>
1116 <p>The IP address of the API server, if not
1117           resolvable by the configured DNS servers.</p>
1118 </dd>
1119 <dt><span class="term">PLC_API_PORT</span></dt>
1120 <dd>
1121 <p>
1122                   Type: int</p>
1123 <p>
1124                   Default: 80</p>
1125 <p>The TCP port number through which the API
1126           should be accessed. Warning: SSL (port 443) access is not
1127           fully supported by the website code yet. We recommend that
1128           port 80 be used for now and that the API server either run
1129           on the same machine as the web server, or that they both be
1130           on a secure wired network.</p>
1131 </dd>
1132 <dt><span class="term">PLC_API_PATH</span></dt>
1133 <dd>
1134 <p>
1135                   Type: string</p>
1136 <p>
1137                   Default: /PLCAPI/</p>
1138 <p>The base path of the API URL.</p>
1139 </dd>
1140 <dt><span class="term">PLC_API_MAINTENANCE_USER</span></dt>
1141 <dd>
1142 <p>
1143                   Type: string</p>
1144 <p>
1145                   Default: maint@localhost.localdomain</p>
1146 <p>The username of the maintenance account. This
1147           account is used by local scripts that perform automated
1148           tasks, and cannot be used for normal logins.</p>
1149 </dd>
1150 <dt><span class="term">PLC_API_MAINTENANCE_PASSWORD</span></dt>
1151 <dd>
1152 <p>
1153                   Type: password</p>
1154 <p>
1155                   Default: </p>
1156 <p>The password of the maintenance account. If
1157           left blank, one will be generated. We recommend that the
1158           password be changed periodically.</p>
1159 </dd>
1160 <dt><span class="term">PLC_API_MAINTENANCE_SOURCES</span></dt>
1161 <dd>
1162 <p>
1163                   Type: hostname</p>
1164 <p>
1165                   Default: </p>
1166 <p>A space-separated list of IP addresses allowed
1167           to access the API through the maintenance account. The value
1168           of this variable is set automatically to allow only the API,
1169           web, and boot servers, and should not be
1170           changed.</p>
1171 </dd>
1172 <dt><span class="term">PLC_API_SSL_KEY</span></dt>
1173 <dd>
1174 <p>
1175                   Type: file</p>
1176 <p>
1177                   Default: /etc/planetlab/api_ssl.key</p>
1178 <p>The SSL private key to use for encrypting HTTPS
1179           traffic. If non-existent, one will be
1180           generated.</p>
1181 </dd>
1182 <dt><span class="term">PLC_API_SSL_CRT</span></dt>
1183 <dd>
1184 <p>
1185                   Type: file</p>
1186 <p>
1187                   Default: /etc/planetlab/api_ssl.crt</p>
1188 <p>The corresponding SSL public certificate. By
1189           default, this certificate is self-signed. You may replace
1190           the certificate later with one signed by a root
1191           CA.</p>
1192 </dd>
1193 <dt><span class="term">PLC_API_CA_SSL_CRT</span></dt>
1194 <dd>
1195 <p>
1196                   Type: file</p>
1197 <p>
1198                   Default: /etc/planetlab/api_ca_ssl.crt</p>
1199 <p>The certificate of the root CA, if any, that
1200           signed your server certificate. If your server certificate is
1201           self-signed, then this file is the same as your server
1202           certificate.</p>
1203 </dd>
1204 <dt><span class="term">PLC_WWW_ENABLED</span></dt>
1205 <dd>
1206 <p>
1207                   Type: boolean</p>
1208 <p>
1209                   Default: true</p>
1210 <p>Enable the web server on this
1211           machine.</p>
1212 </dd>
1213 <dt><span class="term">PLC_WWW_DEBUG</span></dt>
1214 <dd>
1215 <p>
1216                   Type: boolean</p>
1217 <p>
1218                   Default: false</p>
1219 <p>Enable debugging output on web pages. Do not
1220           enable on a production system!</p>
1221 </dd>
1222 <dt><span class="term">PLC_WWW_HOST</span></dt>
1223 <dd>
1224 <p>
1225                   Type: hostname</p>
1226 <p>
1227                   Default: localhost.localdomain</p>
1228 <p>The fully qualified hostname of the web
1229           server.</p>
1230 </dd>
1231 <dt><span class="term">PLC_WWW_IP</span></dt>
1232 <dd>
1233 <p>
1234                   Type: ip</p>
1235 <p>
1236                   Default: 127.0.0.1</p>
1237 <p>The IP address of the web server, if not
1238           resolvable by the configured DNS servers.</p>
1239 </dd>
1240 <dt><span class="term">PLC_WWW_PORT</span></dt>
1241 <dd>
1242 <p>
1243                   Type: int</p>
1244 <p>
1245                   Default: 80</p>
1246 <p>The TCP port number through which the
1247           unprotected portions of the web site should be
1248           accessed.</p>
1249 </dd>
1250 <dt><span class="term">PLC_WWW_SSL_PORT</span></dt>
1251 <dd>
1252 <p>
1253                   Type: int</p>
1254 <p>
1255                   Default: 443</p>
1256 <p>The TCP port number through which the protected
1257           portions of the web site should be accessed.</p>
1258 </dd>
1259 <dt><span class="term">PLC_WWW_SSL_KEY</span></dt>
1260 <dd>
1261 <p>
1262                   Type: file</p>
1263 <p>
1264                   Default: /etc/planetlab/www_ssl.key</p>
1265 <p>The SSL private key to use for encrypting HTTPS
1266           traffic. If non-existent, one will be
1267           generated.</p>
1268 </dd>
1269 <dt><span class="term">PLC_WWW_SSL_CRT</span></dt>
1270 <dd>
1271 <p>
1272                   Type: file</p>
1273 <p>
1274                   Default: /etc/planetlab/www_ssl.crt</p>
1275 <p>The corresponding SSL public certificate for
1276           the HTTP server. By default, this certificate is
1277           self-signed. You may replace the certificate later with one
1278           signed by a root CA.</p>
1279 </dd>
1280 <dt><span class="term">PLC_WWW_CA_SSL_CRT</span></dt>
1281 <dd>
1282 <p>
1283                   Type: file</p>
1284 <p>
1285                   Default: /etc/planetlab/www_ca_ssl.crt</p>
1286 <p>The certificate of the root CA, if any, that
1287           signed your server certificate. If your server certificate is
1288           self-signed, then this file is the same as your server
1289           certificate.</p>
1290 </dd>
1291 <dt><span class="term">PLC_BOOT_ENABLED</span></dt>
1292 <dd>
1293 <p>
1294                   Type: boolean</p>
1295 <p>
1296                   Default: true</p>
1297 <p>Enable the boot server on this
1298           machine.</p>
1299 </dd>
1300 <dt><span class="term">PLC_BOOT_HOST</span></dt>
1301 <dd>
1302 <p>
1303                   Type: hostname</p>
1304 <p>
1305                   Default: localhost.localdomain</p>
1306 <p>The fully qualified hostname of the boot
1307           server.</p>
1308 </dd>
1309 <dt><span class="term">PLC_BOOT_IP</span></dt>
1310 <dd>
1311 <p>
1312                   Type: ip</p>
1313 <p>
1314                   Default: 127.0.0.1</p>
1315 <p>The IP address of the boot server, if not
1316           resolvable by the configured DNS servers.</p>
1317 </dd>
1318 <dt><span class="term">PLC_BOOT_PORT</span></dt>
1319 <dd>
1320 <p>
1321                   Type: int</p>
1322 <p>
1323                   Default: 80</p>
1324 <p>The TCP port number through which the
1325           unprotected portions of the boot server should be
1326           accessed.</p>
1327 </dd>
1328 <dt><span class="term">PLC_BOOT_SSL_PORT</span></dt>
1329 <dd>
1330 <p>
1331                   Type: int</p>
1332 <p>
1333                   Default: 443</p>
1334 <p>The TCP port number through which the protected
1335           portions of the boot server should be
1336           accessed.</p>
1337 </dd>
1338 <dt><span class="term">PLC_BOOT_SSL_KEY</span></dt>
1339 <dd>
1340 <p>
1341                   Type: file</p>
1342 <p>
1343                   Default: /etc/planetlab/boot_ssl.key</p>
1344 <p>The SSL private key to use for encrypting HTTPS
1345           traffic.</p>
1346 </dd>
1347 <dt><span class="term">PLC_BOOT_SSL_CRT</span></dt>
1348 <dd>
1349 <p>
1350                   Type: file</p>
1351 <p>
1352                   Default: /etc/planetlab/boot_ssl.crt</p>
1353 <p>The corresponding SSL public certificate for
1354           the HTTP server. By default, this certificate is
1355           self-signed. You may replace the certificate later with one
1356           signed by a root CA.</p>
1357 </dd>
1358 <dt><span class="term">PLC_BOOT_CA_SSL_CRT</span></dt>
1359 <dd>
1360 <p>
1361                   Type: file</p>
1362 <p>
1363                   Default: /etc/planetlab/boot_ca_ssl.crt</p>
1364 <p>The certificate of the root CA, if any, that
1365           signed your server certificate. If your server certificate is
1366           self-signed, then this file is the same as your server
1367           certificate.</p>
1368 </dd>
1369 </dl></div>
1370 </div>
1371 <div class="appendix" lang="en">
1372 <h2 class="title" style="clear: both">
1373 <a name="VariablesDevel"></a>B. Development configuration variables (for <span class="emphasis"><em>myplc-devel</em></span>)</h2>
1374 <div class="variablelist"><dl>
1375 <dt><span class="term">PLC_DEVEL_FEDORA_RELEASE</span></dt>
1376 <dd>
1377 <p>
1378                   Type: string</p>
1379 <p>
1380                   Default: 4</p>
1381 <p>Version number of Fedora Core upon which to
1382           base the build environment. Warning: Currently, only Fedora
1383           Core 4 is supported.</p>
1384 </dd>
1385 <dt><span class="term">PLC_DEVEL_FEDORA_ARCH</span></dt>
1386 <dd>
1387 <p>
1388                   Type: string</p>
1389 <p>
1390                   Default: i386</p>
1391 <p>Base architecture of the build
1392           environment. Warning: Currently, only i386 is
1393           supported.</p>
1394 </dd>
1395 <dt><span class="term">PLC_DEVEL_FEDORA_URL</span></dt>
1396 <dd>
1397 <p>
1398                   Type: string</p>
1399 <p>
1400                   Default: file:///usr/share/mirrors/fedora</p>
1401 <p>Fedora Core mirror from which to install
1402           filesystems.</p>
1403 </dd>
1404 <dt><span class="term">PLC_DEVEL_CVSROOT</span></dt>
1405 <dd>
1406 <p>
1407                   Type: string</p>
1408 <p>
1409                   Default: /cvs</p>
1410 <p>CVSROOT to use when checking out code.</p>
1411 </dd>
1412 <dt><span class="term">PLC_DEVEL_BOOTSTRAP</span></dt>
1413 <dd>
1414 <p>
1415                   Type: boolean</p>
1416 <p>
1417                   Default: false</p>
1418 <p>Controls whether MyPLC should be built inside
1419           of its own development environment.</p>
1420 </dd>
1421 </dl></div>
1422 </div>
1423 <div class="bibliography">
1424 <div class="titlepage"><div><div><h2 class="title">
1425 <a name="id2898373"></a>Bibliography</h2></div></div></div>
1426 <div class="biblioentry">
1427 <a name="TechsGuide"></a><p>[1] <span class="author"><span class="firstname">Mark</span> <span class="surname">Huang</span>. </span><span class="title"><i><a href="http://www.planet-lab.org/doc/TechsGuide.php" target="_top">PlanetLab
1428       Technical Contact's Guide</a></i>. </span></p>
1429 </div>
1430 </div>
1431 </div><?php require('footer.php'); ?>
1432 dummy 1.11 for cathing up with the xml numbering