LearningZope3

Differences between revisions 3 and 43 (spanning 40 versions)
Revision 3 as of 2005-07-24 18:31:16
Size: 1115
Editor: dsl092-236-069
Comment:
Revision 43 as of 2007-04-21 21:15:18
Size: 3258
Editor: 158
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
  Creating zope3 applications is no easy task. This document comes out of a desire to help
  build a zope3 user community in support of SchoolTool and the CanDo competency tracking
  application which is being built on top of SchoolTool.
Creating zope3 applications is no easy task. This document comes out of a desire to help
build a zope3 user community in support of SchoolTool and the CanDo competency tracking
application which is being built on top of SchoolTool.
Line 7: Line 7:
  The goal here is to keep things as simple as possible. Zope3 is extremely complex, and the
  learning curve is steep to say the least. I'm assuming that the aspiring zope3 developer
  here will be using Ubuntu Hoary, and running their zope instance from their home directly
  on port 8080.  I'm using zope3 from the {{{zope3-lib}}} package available with Hoary.
The goal here is to keep things as simple as possible. Zope3 is extremely complex, and the
learning curve is steep to say the least. I'm assuming that the aspiring zope3 developer
here will be using Ubuntu Breezy (or Dapper), and running their zope instance from their home
directly on port 8080.
Line 12: Line 12:
= Installing zope3 on Ubuntu 5.04 =  = Installation =
Line 14: Line 14:
  As root:
    0. {{{apt-get install zope3-lib}}}
    0. {{{cd /usr/lib/zope3x/bin}}}
    0. {{{chmod +x mkzopeinstance}}} (this is needed because it does not come executable)
There is a bug in the zope3 package (Bug #24173 in zope3 (Ubuntu): "zope3 mkzopeinstance does not keep user id")
that prevents this from being an easy process.
Line 19: Line 17:
  As the developer from their home directory:
    0. {{{/usr/lib/zope3x/bin/mkzopeinstance}}}
    0. For {{{Directory}}} we will be using {{{zope3}}}
    0. Choose a {{{Username}}} and {{{Password}}} which you will remember
As root:
  0. make sure you have the following packages installed ({{{apt-get install subversion make gcc python-dev libc6-dev}}}):
    * subversion
    * make
    * gcc
    * python-dev
    * libc6-dev
  0. {{{cd /usr/local/src}}}
  0. {{{svn co svn://svn.zope.org/repos/main/Zope3/trunk Zope3}}}
  0. {{{cd Zope3}}}
  0. {{{make}}}
  0. {{{python test.py -v}}} (to run all the tests. note use {{{python test.py -vpf1}}} if a test fails and you want to know which one.)
  0. {{{ln -s /usr/local/src/Zope3/bin/mkzopeinstance /usr/local/bin/mkzopeinstance}}}

As the developer:
  0. {{{cd ~}}} (to get to your home directory)
  0. {{{mkzopeinstance}}}
  0. For {{{Directory:}}} we will be using {{{zope3}}} in the user's home directory ({{{/home/<username>/zope3}}}).
  0. Choose a username for the initial administrator account.
  0. Select a password manager from among: Plain Text, MD5, and SHA1. (Text is least secure, SHA1 is most secure).
  0. Enter your password twice.

You should now have a {{{zope3}}} directory inside your home directory containing an
instance of zope3.

= Starting zope =

As the developer from your home directory, there are two easy ways to start your zope3 instance:
  0. {{{./zope3/bin/runzope}}}
  0. {{{./zope3/bin/zopectl start}}}

'''Note:''' You will need to execute {{{runzope}}} the first time as the root user to get around permission problems. Do the following (assuming {{{zopeuser}}} is the user who installed the zope instance:

As root:
  0. {{{# /home/zopeuser/zope3/bin/runzope}}}
  0. {{{<ctrl>-c }}} (to stop the zope instance).
  0. {{{# chown -R zopeuser:zopeuser /home/zopeuser/zope3}}}

Use should now be able to run your zope intance as {{{zopeuser}}}.

For testing new code use {{{runzope}}}. Messages and debugging information will
applear in the console, and you will be able to see when zope fails to start.
Keep in mind that when using {{{runzope}}} the application server will stop when
you close the terminal from which it is run, so to keep the server running
use {{{zopectl start}}}.

= External Documentation =

 0. http://www.treefernwebservices.co.nz/hello.html
 0. http://zissue.berlios.de/z3/hello.swf
 0. http://www.benjiyork.com/quick_start/
 0. http://zissue.berlios.de/z3/Zope3In30Minutes.html
 0. http://worldcookery.com/files/jeffshell-todo
 0. http://python.taupro.com/Zope3Notes/HowToContentComponent
 0. http://www.ibiblio.org/obp/pyBiblio/zope3

Motivation

Creating zope3 applications is no easy task. This document comes out of a desire to help build a zope3 user community in support of SchoolTool and the CanDo competency tracking application which is being built on top of SchoolTool.

The goal here is to keep things as simple as possible. Zope3 is extremely complex, and the learning curve is steep to say the least. I'm assuming that the aspiring zope3 developer here will be using Ubuntu Breezy (or Dapper), and running their zope instance from their home directly on port 8080.

Installation

There is a bug in the zope3 package (Bug #24173 in zope3 (Ubuntu): "zope3 mkzopeinstance does not keep user id") that prevents this from being an easy process.

As root:

  1. make sure you have the following packages installed (apt-get install subversion make gcc python-dev libc6-dev):

    • subversion
    • make
    • gcc
    • python-dev
    • libc6-dev
  2. cd /usr/local/src

  3. svn co svn://svn.zope.org/repos/main/Zope3/trunk Zope3

  4. cd Zope3

  5. make

  6. python test.py -v (to run all the tests. note use python test.py -vpf1 if a test fails and you want to know which one.)

  7. ln -s /usr/local/src/Zope3/bin/mkzopeinstance /usr/local/bin/mkzopeinstance

As the developer:

  1. cd ~ (to get to your home directory)

  2. mkzopeinstance

  3. For Directory: we will be using zope3 in the user's home directory (/home/<username>/zope3).

  4. Choose a username for the initial administrator account.
  5. Select a password manager from among: Plain Text, MD5, and SHA1. (Text is least secure, SHA1 is most secure).
  6. Enter your password twice.

You should now have a zope3 directory inside your home directory containing an instance of zope3.

Starting zope

As the developer from your home directory, there are two easy ways to start your zope3 instance:

  1. ./zope3/bin/runzope

  2. ./zope3/bin/zopectl start

Note: You will need to execute runzope the first time as the root user to get around permission problems. Do the following (assuming zopeuser is the user who installed the zope instance:

As root:

  1. # /home/zopeuser/zope3/bin/runzope

  2. <ctrl>-c  (to stop the zope instance).

  3. # chown -R zopeuser:zopeuser /home/zopeuser/zope3

Use should now be able to run your zope intance as zopeuser.

For testing new code use runzope. Messages and debugging information will applear in the console, and you will be able to see when zope fails to start. Keep in mind that when using runzope the application server will stop when you close the terminal from which it is run, so to keep the server running use zopectl start.

External Documentation

  1. http://www.treefernwebservices.co.nz/hello.html

  2. http://zissue.berlios.de/z3/hello.swf

  3. http://www.benjiyork.com/quick_start/

  4. http://zissue.berlios.de/z3/Zope3In30Minutes.html

  5. http://worldcookery.com/files/jeffshell-todo

  6. http://python.taupro.com/Zope3Notes/HowToContentComponent

  7. http://www.ibiblio.org/obp/pyBiblio/zope3


CategoryDocumentation

LearningZope3 (last edited 2008-08-06 17:01:05 by localhost)