[Grok-dev] Re: Some questions about setup and apps

Martijn Faassen faassen at startifact.com
Tue Apr 1 08:30:11 EDT 2008

Hi there,

Kamon Ayeva wrote:

> * To deploy a Grok environment, you need to install Grok (generally
> using zc.buildout).
> Once the Grok buildout is installed, you can start a project using
> grokproject. 

Actually, to start developing with Grok, you need to install 
grokproject. grokproject in turn will install the buildout that contains 
everything needed for that project.

> This brings the start code for the developer to define an
> Application (with its content and views) to the project.
> Questions: Can I serve several apps on the same Grok server ? I mean
> same machine and same port ?

Yes, you can - you can install a single application multiple times. You 
can also have multiple Applications in a single project. You can also 
include multiple eggs, each supplying their own applications, into a 
buildout, and they all become installable applications as long as the 
ZCML is linked (the ZCML linking will be automatic in Grok 0.12).

> Or do I need to have several servers (which means each on its port)
> and play with Apache virtual hosting ?
> Maybe there is an advanced setup that helps solve this issue ?

Of course Apache virtual hosting is another option and may make more 
sense for some deployments. The disadvantage of deploying multiple 
applications in a single server is that they cannot evolve independently 
- all applications will have to switch to 0.12 at the same time, for 

> * To install dependancies, I install their eggs using the
> install_requires parameter in the setup.py at the root of the buildout
> folder...

Yes, and you run bin/buildout, and if the egg contains ZCML you want to 
load, in 0.11.x you still need to go to your project's configure.zcml 
and 'include' the package there too. That latter requirement is going away.

> * A developer can find sample applications to install here
> http://svn.zope.org/grokapps/
> Questions: Is there a process for releasing Sample Apps as eggs ? Or
> do we need to install them in their contained environment ?

We don't have a mechanism for releasing an egg that will be able to be 
started all by itself. It needs a server environment to run. It would be 
interesting to explore deployment mechanisms there this isn't necessary 
and you can somehow get a webserver from an egg directly.

> If that's
> the case, we come back to my previous question, i.e. can you have 2
> apps served by the same Grok instance ? And can you even mix two apps
> ?

You can do such things, as described above.



More information about the Grok-dev mailing list