How do I make an instance?
Installing zopeproject
Once you've put your virtual environment in shape it is time to start to deploy. For this you will need to install zopeproject. zopeproject will download zope, make a directory for your instance and set it up for you. Remember to execute these steps inside your virtual environment after activating it:
$ easy_install zopeproject
Your first instance
Now you can invoke zopeproject and create your first instance:
$ zopeproject myinstance
{introduce the admin login}
{introduce the admin pwasword}
{introduce the path where the zope eggs will be downloaded}
{go for coffe. It coult take a while...}
When zopeproject ask you for the path to save the downloaded eggs, introduce the same path you put in ~/.buildout/default.cfg.
A few minutes latter, zopeproject has downloaded all the packages zope needs to run. It created a folder named myinstance with everything you need to deploy your instance.
Playing with your instance
Now, you can start your instance:
$ cd myinstance
$ bin/myinstance-ctl fg
{your console will be blocked, since zope will be running in the foreground}
And watch the instance in all its glory at http://localhost:8080. What you'll see is the Zope Management Interface or ZMI. In zope 2, you could write entire applications in the ZMI. With zope 3 it is mostly for the site manager. You, as a developer, have little to do in the ZMI, but running a few manual tests.
myinstance/deploy.ini controls the basic webserver parameters: ip address and port. myinstance/site.zcml controls the basic zope configuration: should it have apidoc? should the default admin account be active? You only need to touch these files when you'll change your site from deployment to production.
Deploying your Instance
From all the files inside your instance, there are three you'll need the most while deploying. These are myinstance/buildout.cfg, myinstance/setup.py and myinstance/src/myinstance/configure.zcml.
myinstance/buildout.cfg instruct buildout how to build the application: what packages to download, what initialization to do, etc.
myinstance/setup.py defines this package. Every time you add a dependency to your instance, you must report it here.
myinstance/src/myinstance/configure.zcml is the principal configuration file of zope. Here you register with zope the packages you want to register.
