Differences between revisions 2 and 3
Revision 2 as of 2006-06-09 10:29:19
Size: 2914
Comment:
Revision 3 as of 2008-01-03 13:48:04
Size: 2915
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
[:DownloadLiveCd:The ERP5 Live CD] is a user-friendly, upgrade-safe solution [[DownloadLiveCd|The ERP5 Live CD]] is a user-friendly, upgrade-safe solution

How to customize the ERP5 Live CD

Overview

The ERP5 Live CD is a user-friendly, upgrade-safe solution to set up ERP5 systems, covering production systems. The Live CD is fully customizable at runtime without modifying the Live CD itself with the means of config.xml, config.tgz and config.sh.

Also, refer to FaqOnLiveCd.

How to make data persistent

To save a configuration customized for your needs, it is necessary to put such data in a persistent place (i.e. in a disk). The Live CD supports two modes: mounting a loop file in an existing operating system, and using a whole partition of a disk. The latter requires reformatting your hard disk, while it has much better performance and more scalable.

In both modes, the data area is mounted on /mnt/erp5_cd in a running system. Files put under this directory are kept persistent, so not get lost even when the machine suddenly reboots.

How to configure the Live CD

The Live CD supports some special files which should be stored in /mnt/erp5_cd:

config.xml
This file should be present automatically. You can edit this file with a text editor to specify, for example, network information. For security reasons, you must not make this file readable for everybody.
config.tgz

This file does not exist by default. If present, this file must be an archive file created by tar + gzip. When booting the Live CD, this file is automatically extracted from the root directory. Thus, you can modify some files put on the memory, such as /etc/zope.conf.

config.sh

This file does not exist by default. If present, this file must be a shell script executed by /bin/sh. When booting the Live CD, this file is automatically executed from the root directory. Note that this is executed after extracting config.tgz, so you can even patch files by scripting, and start/stop system services arbitrarily.

Examples

Here is a way to tweak the configuration of the zope server. The configuration is stored in /etc/zope.conf. So, first, modify this file, and check if it works well by restarting zope (i.e. service zope restart).

Once you confirm that the configuration is good, you need to make config.tgz, because /etc/zope.conf is on the memory, thus lost after rebooting. You can do the following:

mkdir /tmp/config
cd /tmp/config
mkdir etc
cp -p /etc/zope.conf etc/
tar zcvf /mnt/erp5_cd/config.tgz .

Here is another example. You can create a new zope instance easily. Create a zope instance home, say, /mnt/erp5_cd/zope_new. Then you can start this zope instance automatically by putting a small script in config.sh:

echo /mnt/erp5_cd/zope_new/bin/zopectl start > /mnt/erp5_cd/config.sh

Likewise, it is easy to set up a cluster with ZEO. FIXME: to be written...

HowToCustomizeLiveCD (last edited 2008-01-03 13:48:04 by localhost)