Run Plone off CD-Rom
This How-to applies to:
Any version.
This How-to is intended for:
Server Administrators
The instructions given on Jens Vagelpohl's How To describes how to create a "Demo" Zope installation. It appears to be a little outdated as it targets Zope 2.1.2/3/4 and 2.3.x.
Sebastien Georget has published instructions for Zope 2.7. You should follow his outline if you have installed Plone as a product into Zope.
This How-to takes their instructions a tiny bit further to a plain Plone 2.0.3 installation as obtained by using the installer for Windows XP. Take note that you need at least to gloss over the abovementioned instructions. Also note that sessioning functionality cannot be supported on a read-only medium.
zope.conf
The default configuration file must be modified to be system-independent.
The file in question was C:\Program Files\Plone 2\Data\etc\zope.conf
- Remove the drive letters and
\Program Filesprefix:%define INSTANCE C:\Program Files\Plone 2\Data %define ZOPE C:\Program Files\Plone 2\Zope becomes: %define INSTANCE \Plone 2\Data %define ZOPE \Plone 2\Zope
- Cause ZODB to be opened in read-only mode so no information is written to the CD-Rom:
read-only-database on
- Inhibit the creation of log files and pid files:
zserver-read-only-mode on
- Disable the "event" logger and "access" logger:
<eventlog> ... </eventlog> becomes: #<eventlog> # ... #</eventlog>
- Undo the definition of the temporary zodb-db used for sessioning:
<zodb_db temporary> ... </zodb_db> becomes: #<zodb_db temporary> # ... #</zodb_db>
runzope.bat
The batch file that defines environment variables and issues the start up command needs changes, too.
The file involved was C:\Program Files\Plone 2\Data\bin\runzope.bat
The changes constitute of simply stripping the leading C:\Program Files from the definitions of
- PYTHON
- ZOPE_HOME
- INSTANCE_HOME
- SOFTWARE_HOME
- CONFIG_FILE
Finally
Burn the CD-Rom with Plone 2 as the root folder.
Watch out for Windows 98
I used Roxio to burn the CD-Rom and got a warning about having a very deep sub-folder level, which I ignored. Doubleclicking the file \Plone 2\Data\bin\runzope.bat gave me an accessible Plone site on Windows XP. However, on Windows 98 I got errors regarding "Not enough environment space available". Plone did get started on that system by typing in the environment variables definitions and command after a DOS-prompt.
Demo storage
Note that Zope 2.7 has a demo storage for this purpose. It can mount a file storage, but lives in memory. It was designed for use cases like live CD-Roms intended for demonstration purposes. You can publish and edit documents, but they'll disappear when you stop the Plone site.
Serving static files off the CD
If you have other content on the CD that you also want to make available through Plone, look at products such as ExternalStorage or LocalFS.
You could, but it would take some doing.
What you would have to do is to formulate the instructions in this how-to as a script that you could run automatically. Pop a CD in the drive, run the script, and get a fresh current version of your Plone on CD. If you had to do it manually, thought, it would be too much work.
Demo Storage
You can make a live CD based in Demo storage. In this scenario file storage is mount in memory, where you can publish and edit documents, but they'll disappear when you stop the Plone site. Edit zope.conf in zodb_db main surround tags filestorage with tags demostorage and add ‘read-only on’ inside filestorage (tested with Plone 2.1.3).
Plone version 2.5.1
2.5.2 with demo storage
Product Installation
# enable-product-installation off
to be:
enable-product-installation off
as stated in zope.conf: "NOTE: If your main storage is mounted read-only, you must set this directive to 'off'."
Does this mean?
Does the above mean that I can have a "Live CD" version of a Plone site? Essentially what I am trying to have is a live website for personnel with the latest information, but also the ability to create CDs to be distributed on a semi-regular basis for in-field work. I've not found any other DMS that has this feature, but if Plone does, I'm sold!