-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1c5ee45
Showing
26 changed files
with
1,044 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
We assume the installation in the folder /srv/zinstances/site421 | ||
(that can be changed) and on an ubuntu distribution. | ||
Your real username must replace in our commands the string "username". | ||
Each command, specified by the symbol ">", can be executed | ||
(without the symbol >). | ||
|
||
First we become root | ||
> sudo -s | ||
|
||
We install the necessary libraries | ||
> apt-get install build-essential | ||
> apt-get install libreadline5-dev | ||
> apt-get install zlib1g-dev (support zlib) | ||
> apt-get install libjpeg62-dev | ||
> apt-get install subversion | ||
> apt-get install libpq-dev | ||
|
||
We work in the folder /srv | ||
> cd /srv | ||
|
||
We change the owner of the folder to avoid continue working as root | ||
> chown -R username:username . | ||
|
||
We leave the user root. | ||
> exit | ||
|
||
We create some directories | ||
> mkdir install | ||
> mkdir zinstances | ||
> cd install | ||
|
||
We install python2.7 that will be used to run the buildout and zope instance | ||
> wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz | ||
> tar xvzf Python-2.7.3.tgz | ||
> cd Python-2.7.3 | ||
> ./configure --prefix=/srv/python273 | ||
> make | ||
> make install | ||
|
||
We install the python utility easy_install | ||
> cd /srv/install | ||
> wget http://peak.telecommunity.com/dist/ez_setup.py | ||
> /srv/python273/bin/python ez_setup.py | ||
|
||
We install the python utility virtualenv | ||
> /srv/python273/bin/easy_install virtualenv | ||
|
||
We can define a cache for buildout | ||
See http://www.imio.be/support/documentation/tutoriels/utilisation-dun-buildout/definition-dun-cache-pour-buildout/ | ||
|
||
We download the buildout files in our folder | ||
> cd /srv/zinstances | ||
> svn co http://svn.communesplone.org/svn/communesplone/buildout/server.sites/tags/make421/ site421 | ||
> cd site421 | ||
|
||
We modify the Makefile file to indicate the real path of the virtualenv utility. | ||
To do that, you can edit the file in a simple text editor. | ||
It's necessary to replace the line "virtualenv-2.7 --no-site-packages ." by | ||
"/srv/python273/bin/virtualenv --no-site-packages ." | ||
OR | ||
You can create a link to our virtualenv without modifying Makefile | ||
"ln -s /srv/python273/bin/virtualenv /usr/local/bin/virtualenv-2.7" | ||
|
||
we initialize the buildout | ||
> make bootstrap | ||
|
||
1) Use in development (without ZEO, with debug products) | ||
|
||
We execute the buildout after each modification in the buildout.cfg file | ||
> make buildout | ||
OR | ||
> bin/buildout -v | ||
|
||
We start the zope server. | ||
> bin/instance1 fg | ||
OR | ||
> bin/instance1 start | ||
|
||
We can connect the zope server in a browser on the following address http://localhost:8080/manage_main | ||
|
||
We can add a mount point (separate database file, defined in the file zope_add.conf) | ||
=> choose in the list (up right in the browser page) "ZODB Mount Point" | ||
Select a mount point name ("xxx" and click on "Create selected mount points"). | ||
|
||
All objects added in the zope folder "xxx" will be stored in the db file "xxx.fs" | ||
in place of in "Data.fs". | ||
|
||
2) Usage in production (multiple Zope instances for the same database, ZEO mode) | ||
|
||
We can replace in the file buildout.cfg the name dev.cfg by prod.cfg. | ||
|
||
We execute the buildout after each modification in the buildout.cfg file | ||
> make buildout | ||
OR | ||
> bin/buildout -v | ||
|
||
We start the zeo server. | ||
> bin/zeoserver start | ||
|
||
We start each zope server (following instance name section). | ||
> bin/instance1 fg | ||
OR | ||
> bin/instance1 start | ||
|
||
We can connect the zope server in a browser on the following address http://localhost:8080/manage_main | ||
|
||
We can add a mount point (separate database file, defined in the file zeo_add.conf and zope_add_zeo.conf) | ||
=> choose in the list (up right in the browser page) "ZODB Mount Point" | ||
Select a mount point name ("xxx" and click on "Create selected mount points"). | ||
|
||
All objects added in the zope folder "xxx" will be stored in the db file "xxx.fs" | ||
in place of in "Data.fs". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
On suppose l'installation dans un répertoire /srv/zinstances/site421 | ||
(qui peut être changé) et sur une distribution ubuntu. | ||
Le nom de votre utilisateur est remplacé dans nos commandes par "votreuser". | ||
Veuillez utiliser le votre à la place. | ||
Chaque commande, précisée ci-dessous après le symbole ">", peut être exécutée | ||
(sans taper le symbole >). | ||
|
||
On passe d'abord en root | ||
> sudo -s | ||
|
||
On installe des librairies nécessaires | ||
> apt-get install build-essential | ||
> apt-get install libreadline5-dev | ||
> apt-get install zlib1g-dev (support zlib) | ||
> apt-get install libjpeg62-dev | ||
> apt-get install subversion | ||
> apt-get install libpq-dev | ||
|
||
On va travailler dans le dossier /srv | ||
> cd /srv | ||
|
||
On se met propriétaire du dossier pour ne plus devoir travailler en root | ||
> chown -R votreuser:votreuser . | ||
|
||
On quitte l'utilisateur root. | ||
> exit | ||
|
||
On crée maintenant une arborescence de dossiers | ||
> mkdir install | ||
> mkdir zinstances | ||
> cd install | ||
|
||
On va installer un python2.7 qui sera utilisé dans notre buildout | ||
> wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz | ||
> tar xvzf Python-2.7.3.tgz | ||
> cd Python-2.7.3 | ||
> ./configure --prefix=/srv/python273 | ||
> make | ||
> make install | ||
|
||
On installe l'utilitaire python easy_install | ||
> cd /srv/install | ||
> wget http://peak.telecommunity.com/dist/ez_setup.py | ||
> /srv/python273/bin/python ez_setup.py | ||
|
||
On installe l'utilitaire python virtualenv | ||
> /srv/python273/bin/easy_install virtualenv | ||
|
||
On définit un cache pour buildout (si ce n'est déjà fait) | ||
Voir http://www.imio.be/support/documentation/tutoriels/utilisation-dun-buildout/definition-dun-cache-pour-buildout/ | ||
|
||
On télécharge le buildout dans un dossier | ||
> cd /srv/zinstances | ||
> svn co http://svn.communesplone.org/svn/communesplone/buildout/server.sites/tags/make421/ site421 | ||
> cd site421 | ||
|
||
On modifie le fichier Makefile pour indiquer le chemin réel de virtualenv. | ||
Pour cela, on peut ouvrir le fichier avec un éditeur de texte. | ||
Il faut remplacer la ligne "virtualenv-2.7 --no-site-packages ." par | ||
"/srv/python273/bin/virtualenv --no-site-packages ." | ||
OU | ||
On peut créer un lien symbolique vers notre virtualenv sans modifier alors le fichier Makefile | ||
"ln -s /srv/python273/bin/virtualenv /usr/local/bin/virtualenv-2.7" | ||
|
||
On initialise le buildout | ||
> make bootstrap | ||
|
||
1) Utilisation en développement (sans ZEO, avec des outils de debug) | ||
|
||
Le fichier buildout.cfg utilise par défaut dev.cfg. | ||
|
||
On exécute le buildout après chaque modification du fichier buildout.cfg | ||
> make buildout | ||
OU | ||
> bin/buildout -v | ||
|
||
On démarre le serveur zope. | ||
> bin/instance1 fg | ||
OU | ||
> bin/instance1 start | ||
|
||
On peut se connecter à zope dans un navigateur sur l'adresse http://localhost:8080/manage_main | ||
|
||
On peut ajouter un mount point (fichier db séparé à définir dans le fichier zope_add.conf) | ||
=> choisir dans la liste (en haut à droite de la page du navigateur) "ZODB Mount Point" | ||
Sélectionner le nom du mount point désiré ("xxx" et cliquer sur "Create selected mount points"). | ||
|
||
Tout ce qui va être ajouté dans le dossier "xxx" sera maintenant localisé dans le fichier db "xxx.fs" | ||
plutôt que dans "Data.fs". | ||
|
||
2) Utilisation en production (plusieurs instances Zope pour la même database, ZEO) | ||
|
||
Il faut remplacer dans le fichier buildout.cfg l'appel à dev.cfg par prod.cf. | ||
|
||
On exécute le buildout après chaque modification du fichier buildout.cfg | ||
> make buildout | ||
OU | ||
> bin/buildout -v | ||
|
||
On démarre le serveur ZEO. | ||
> bin/zeoserver start | ||
|
||
On démarre chaque instance zope (suivant le nom de la section définie). | ||
> bin/instance1 fg | ||
OU | ||
> bin/instance1 start | ||
|
||
On peut se connecter à zope dans un navigateur sur l'adresse http://localhost:8080/manage_main | ||
|
||
On peut ajouter un mount point (fichier db séparé à définir dans les fichiers zeo_add.conf et zope_add_zeo.conf) | ||
=> choisir dans la liste (en haut à droite de la page du navigateur) "ZODB Mount Point" | ||
Sélectionner le nom du mount point désiré ("xxx" et cliquer sur "Create selected mount points"). | ||
|
||
Tout ce qui va être ajouté dans le dossier "xxx" sera maintenant localisé dans le fichier db "xxx.fs" | ||
plutôt que dans "Data.fs". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/make | ||
# | ||
all: run | ||
|
||
.PHONY: bootstrap | ||
bootstrap: | ||
virtualenv-2.7 --no-site-packages . | ||
./bin/python bootstrap.py | ||
|
||
.PHONY: buildout | ||
buildout: | ||
if ! test -f bin/buildout;then make bootstrap;fi | ||
bin/buildout -v | ||
|
||
.PHONY: standard-config | ||
standard-config: | ||
if ! test -f bin/buildout;then make bootstrap;fi | ||
bin/buildout -vt 5 -c standard-config.cfg | ||
|
||
.PHONY: run | ||
run: | ||
if ! test -f bin/instance1;then make buildout;fi | ||
bin/instance1 fg | ||
|
||
.PHONY: cleanall | ||
cleanall: | ||
rm -fr develop-eggs downloads eggs parts .installed.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
This buildout relates the configuration of the application zope instance of the CommunesPlone central server. | ||
|
||
The main config file is buildout.cfg. | ||
Is is empty by default. | ||
It's necessary to call in it a subconfig file name: dev.cfg, prod.cfg, ... | ||
|
||
The included external products are listed in cfg file: | ||
- section [productdistros] (release form) | ||
- section [svnproducts] (svn form) | ||
- subsection eggs | ||
|
||
The directory 'parts/omelette' contains (as links) all the used products. | ||
|
||
Outside zeo mode (dev.cfg, base.cgf), a "zope_add.conf" extends the generated zope.conf to add mount_points definition. | ||
In zeo mode (prod.cfg), a "zope_add_zeo.conf" and "zeo_add.conf" extend the generated zope.conf and zeo.conf to add mount_points definition. | ||
|
||
The install process is described in the file : INSTALL.txt |
Oops, something went wrong.