+
+ <section id="StartupSequence">
+ <title>Understanding the startup sequence</title>
+
+ <para>During service startup described in <xref
+ linkend="QuickStart" />, observe the output of this command for
+ any failures. If no failures occur, you should see output similar
+ to the following:</para>
+
+ <example>
+ <title>A successful MyPLC startup.</title>
+
+ <programlisting><![CDATA[Mounting PLC: [ OK ]
+PLC: Generating network files: [ OK ]
+PLC: Starting system logger: [ OK ]
+PLC: Starting database server: [ OK ]
+PLC: Generating SSL certificates: [ OK ]
+PLC: Configuring the API: [ OK ]
+PLC: Updating GPG keys: [ OK ]
+PLC: Generating SSH keys: [ OK ]
+PLC: Starting web server: [ OK ]
+PLC: Bootstrapping the database: [ OK ]
+PLC: Starting DNS server: [ OK ]
+PLC: Starting crond: [ OK ]
+PLC: Rebuilding Boot CD: [ OK ]
+PLC: Rebuilding Boot Manager: [ OK ]
+PLC: Signing node packages: [ OK ]
+]]></programlisting>
+ </example>
+
+ <para>If <filename>/plc/root</filename> is mounted successfully, a
+ complete log file of the startup process may be found at
+ <filename>/plc/root/var/log/boot.log</filename>. Possible reasons
+ for failure of each step include:</para>
+
+ <itemizedlist>
+ <listitem><para><literal>Mounting PLC</literal>: If this step
+ fails, first ensure that you started MyPLC as root. Check
+ <filename>/etc/sysconfig/plc</filename> to ensure that
+ <envar>PLC_ROOT</envar> and <envar>PLC_DATA</envar> refer to the
+ right locations. You may also have too many existing loopback
+ mounts, or your kernel may not support loopback mounting, bind
+ mounting, or the ext3 filesystem. Try freeing at least one
+ loopback device, or re-compiling your kernel to support loopback
+ mounting, bind mounting, and the ext3 filesystem. If you see an
+ error similar to <literal>Permission denied while trying to open
+ /plc/root.img</literal>, then SELinux may be enabled. See <xref
+ linkend="Requirements" /> above for details.</para></listitem>
+
+ <listitem><para><literal>Starting database server</literal>: If
+ this step fails, check
+ <filename>/plc/root/var/log/pgsql</filename> and
+ <filename>/plc/root/var/log/boot.log</filename>. The most common
+ reason for failure is that the default PostgreSQL port, TCP port
+ 5432, is already in use. Check that you are not running a
+ PostgreSQL server on the host system.</para></listitem>
+
+ <listitem><para><literal>Starting web server</literal>: If this
+ step fails, check
+ <filename>/plc/root/var/log/httpd/error_log</filename> and
+ <filename>/plc/root/var/log/boot.log</filename> for obvious
+ errors. The most common reason for failure is that the default
+ web ports, TCP ports 80 and 443, are already in use. Check that
+ you are not running a web server on the host
+ system.</para></listitem>
+
+ <listitem><para><literal>Bootstrapping the database</literal>:
+ If this step fails, it is likely that the previous step
+ (<literal>Starting web server</literal>) also failed. Another
+ reason that it could fail is if <envar>PLC_API_HOST</envar> (see
+ <xref linkend="Configuration" />) does not resolve to
+ the host on which the API server has been enabled. By default,
+ all services, including the API server, are enabled and run on
+ the same host, so check that <envar>PLC_API_HOST</envar> is
+ either <filename>localhost</filename> or resolves to a local IP
+ address. Also check that <envar>PLC_ROOT_USER</envar> looks like
+ an e-mail address.</para></listitem>
+
+ <listitem><para><literal>Starting crond</literal>: If this step
+ fails, it is likely that the previous steps (<literal>Starting
+ web server</literal> and <literal>Bootstrapping the
+ database</literal>) also failed. If not, check
+ <filename>/plc/root/var/log/boot.log</filename> for obvious
+ errors. This step starts the <command>cron</command> service and
+ generates the initial set of XML files that the Slice Creation
+ Service uses to determine slice state.</para></listitem>
+ </itemizedlist>
+
+ <para>If no failures occur, then MyPLC should be active with a
+ default configuration. Open a web browser on the host system and
+ visit <literal>http://localhost/</literal>, which should bring you
+ to the front page of your PLC installation. The password of the
+ default administrator account
+ <literal>root@localhost.localdomain</literal> (set by
+ <envar>PLC_ROOT_USER</envar>) is <literal>root</literal> (set by
+ <envar>PLC_ROOT_PASSWORD</envar>).</para>
+ </section>
+
+ <section id="FilesInvolvedRuntime"> <title> Files and directories
+ involved in <emphasis>myplc</emphasis></title>
+ <para>MyPLC installs the following files and directories:</para>
+
+ <orderedlist>
+
+ <listitem><para><filename>/plc/root.img</filename>: The main
+ root filesystem of the MyPLC application. This file is an
+ uncompressed ext3 filesystem that is loopback mounted on
+ <filename>/plc/root</filename> when MyPLC starts. This
+ filesystem, even when mounted, should be treated as an opaque
+ binary that can and will be replaced in its entirety by any
+ upgrade of MyPLC.</para></listitem>
+
+ <listitem><para><filename>/plc/root</filename>: The mount point
+ for <filename>/plc/root.img</filename>. Once the root filesystem
+ is mounted, all MyPLC services run in a
+ <command>chroot</command> jail based in this
+ directory.</para></listitem>
+
+ <listitem>
+ <para><filename>/plc/data</filename>: The directory where user
+ data and generated files are stored. This directory is bind
+ mounted onto <filename>/plc/root/data</filename> so that it is
+ accessible as <filename>/data</filename> from within the
+ <command>chroot</command> jail. Files in this directory are
+ marked with <command>%config(noreplace)</command> in the
+ RPM. That is, during an upgrade of MyPLC, if a file has not
+ changed since the last installation or upgrade of MyPLC, it is
+ subject to upgrade and replacement. If the file has changed,
+ the new version of the file will be created with a
+ <filename>.rpmnew</filename> extension. Symlinks within the
+ MyPLC root filesystem ensure that the following directories
+ (relative to <filename>/plc/root</filename>) are stored
+ outside the MyPLC filesystem image:</para>
+
+ <itemizedlist>
+ <listitem><para><filename>/etc/planetlab</filename>: This
+ directory contains the configuration files, keys, and
+ certificates that define your MyPLC
+ installation.</para></listitem>
+
+ <listitem><para><filename>/var/lib/pgsql</filename>: This
+ directory contains PostgreSQL database
+ files.</para></listitem>
+
+ <listitem><para><filename>/var/www/html/alpina-logs</filename>: This
+ directory contains node installation logs.</para></listitem>
+
+ <listitem><para><filename>/var/www/html/boot</filename>: This
+ directory contains the Boot Manager, customized for your MyPLC
+ installation, and its data files.</para></listitem>
+
+ <listitem><para><filename>/var/www/html/download</filename>: This
+ directory contains Boot CD images, customized for your MyPLC
+ installation.</para></listitem>
+
+ <listitem><para><filename>/var/www/html/install-rpms</filename>: This
+ directory is where you should install node package updates,
+ if any. By default, nodes are installed from the tarball
+ located at
+ <filename>/var/www/html/boot/PlanetLab-Bootstrap.tar.bz2</filename>,
+ which is pre-built from the latest PlanetLab Central
+ sources, and installed as part of your MyPLC
+ installation. However, nodes will attempt to install any
+ newer RPMs located in
+ <filename>/var/www/html/install-rpms/planetlab</filename>,
+ after initial installation and periodically thereafter. You
+ must run <command>yum-arch</command> and
+ <command>createrepo</command> to update the
+ <command>yum</command> caches in this directory after
+ installing a new RPM. PlanetLab Central cannot support any
+ changes to this directory.</para></listitem>
+
+ <listitem><para><filename>/var/www/html/xml</filename>: This
+ directory contains various XML files that the Slice Creation
+ Service uses to determine the state of slices. These XML
+ files are refreshed periodically by <command>cron</command>
+ jobs running in the MyPLC root.</para></listitem>
+
+ <listitem><para><filename>/root</filename>: this is the
+ location of the root-user's homedir, and for your
+ convenience is stored under <filename>/data</filename> so
+ that your local customizations survive across
+ updates - this feature is inherited from the
+ <command>myplc-devel</command> package, where it is probably
+ more useful. </para></listitem>
+
+ </itemizedlist>
+ </listitem>
+
+ <listitem id="MyplcInitScripts">
+ <para><filename>/etc/init.d/plc</filename>: This file
+ is a System V init script installed on your host filesystem,
+ that allows you to start up and shut down MyPLC with a single
+ command, as described in <xref linkend="QuickStart" />.</para>
+ </listitem>
+
+ <listitem><para><filename>/etc/sysconfig/plc</filename>: This
+ file is a shell script fragment that defines the variables
+ <envar>PLC_ROOT</envar> and <envar>PLC_DATA</envar>. By default,
+ the values of these variables are <filename>/plc/root</filename>
+ and <filename>/plc/data</filename>, respectively. If you wish,
+ you may move your MyPLC installation to another location on your
+ host filesystem and edit the values of these variables
+ appropriately, but you will break the RPM upgrade
+ process. PlanetLab Central cannot support any changes to this
+ file.</para></listitem>
+
+ <listitem><para><filename>/etc/planetlab</filename>: This
+ symlink to <filename>/plc/data/etc/planetlab</filename> is
+ installed on the host system for convenience.</para></listitem>
+ </orderedlist>
+ </section>