README.txt 4 KB
Newer Older
1
=============
2 3 4
ERP5 buildout
=============

Łukasz Nowak's avatar
Łukasz Nowak committed
5
Introduction
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
============

ERP5 Buildout is providing a way to build and manage ERP5 software components
with all needed dependencies.

ERP5 Buildout is also providing a way to manage instances of software
(whenever provided by ERP5 Buildout or externally).


Software
========

Software part shall be system independent. In perfect world it shall depend
only on:

 * C compiler
 * standard C and C++ library
 * operating system kernel

As world is not perfect some additional build time requirements are added,
please look below for a way to acquire list of dependencies and system helpers.
27 28 29 30 31

How to run
----------

Checkout: https://svn.erp5.org/repos/public/erp5/trunk/buildout/
32 33 34 35 36 37 38 39
For example:

  svn co https://svn.erp5.org/repos/public/erp5/trunk/buildout/ ~/erp5.buildout

Run make inside:

  cd ~/erp5.buildout
  make
40 41 42 43 44 45 46

It will install required software and configure it locally, up to ERP5 site
with some Business Templates. By default it will use local python, MySQL,
Zope, etc.

Choosing and modifying proper profile allows to control how much software will
be build in place.
47

48 49 50 51 52 53 54 55 56
Minimal requirements
--------------------

To start buildout it is required to have:

 * any python with header files (file similar to
   /usr/lib*/python*/config/Makefile have to be delivered by system package)
 * svn client (to checkout buildout)

57 58 59 60 61 62 63 64 65
After build check
-----------------

After software is build invoke:

  make assert

To be sure that all components are available (corretly build and linked).

66 67 68 69 70 71
Distribution helpers
--------------------

In profiles directory there are profiles to help with preparation of used
distributions.

Łukasz Nowak's avatar
Łukasz Nowak committed
72
To prepare Mandriva 2010.0 please type, having root privileges:
73

Łukasz Nowak's avatar
Łukasz Nowak committed
74
  helpers/mandriva2010.0.sh
75

76
There are more helpers available, please refer to helpers directory.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102

Instances
=========

Note: Instance generation is still work in progress.

After software is generated it is time to have instances running.
The easiest way to generate instance is of course to reuse generated software.
If software is available in ~/erp5.buildout, such scenario work:

$ svn co https://svn.erp5.org/repos/public/erp5/trunk/buildout/ ~/instances
$ cd instances
$ cat > my_instances.cfg
[buildout]
extends = profiles/development.cfg

parts =
  software-links
  mysql-instance
  oood-instance
  supervisor-instance

[software_definition]
software_home = /home/MYUSER/erp5.buildout
^D
$ ~/erp5.buildout/bin/python2.4 bootstrap/bootstrap.py -c my_instances.cfg
103
$ ~/erp5.buildout/bin/python2.4 -S bin/buildout -c my_instances.cfg
104 105
$ var/bin/supervisord # it will start supervisor and configured software
$ $EDITOR my_instances.cfg
Łukasz Nowak's avatar
Łukasz Nowak committed
106
# add "runUnitTest" and "development-site" to parts
107
$ ~/erp5.buildout/bin/python2.4 -S bin/buildout -c my_instances.cfg
108

109
Fully configured development instance will be available in var/development-site.
110 111 112 113 114 115 116 117 118 119 120 121 122

Network based invocation
========================

Buildout profile can extend other ones from network. It is possible to play
with ERP5 buildout that way.

What to do:

$ mkdir software
$ cd software
$ echo '[buildout]' >> buildout.cfg
$ echo 'extends = https://svn.erp5.org/repos/public/erp5/trunk/buildout/buildout.cfg' >> buildout.cfg
123
$ wget -qO - http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py | python -S - -d
124
$ python -S bin/buildout
125

126 127 128
Note on -S: this switch is overridden by PYTHON_PATH environment variable. In
doubt, unset it before invoking that command.

129 130 131
After some time everything shall be locally available.

Disclaimer: That way is still in early stage of development.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151

Troubleshooting
===============

In various Linux distributions python is heavily patched and user related
environment variables are set system wide. This affects behaviour of python
and introduces various problem with running buildout.

In case of such issues consider resetting some python environment variables
before running buildout:

 * PYTHONPATH
 * PYTHONSTARTUP
 * PYTHONDONTWRITEBYTECODE

Example:

$ unset PYTHONPATH PYTHONSTARTUP PYTHONDONTWRITEBYTECODE
$ make
$ # other buildout related commands