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