GrokTutorial

This page will document my working through the Official Grok Tutorial: http://grok.zope.org/doc/current/tutorial.html

Assumed:

You are working on an Ubuntu machine on which the system administrator has set things up as described in UbuntuGrok.

Procedure

At a bash prompt:

It is possible to make a typo when entering the username and password, which makes it impossible to use the browser based side of grok when it is in development mode and access is limited to administrators. To correct this, rather than deleting the directory, it is possible to enter the directory and modify the file in which the username and password is stored. To do so in the terminal:

  • cd [project name]/ect

  • open the file named "site.zcml" in a text editor
  • look for where it says:

     <principal id="zope.manager"
             title="Manager"
             login="grok"
             password_manager="Plain Text"
             password="grok"
             />

The strings set to equal login and password can be changed to a new string that serves as either the username or password, depending on what is changed, without effecting anything else.

After running bin/sample-ctl I got this:

bin/paster serve /home/jelkner/Sample/etc/deploy.ini
------
2009-02-15T15:56:01 WARNING root Developer mode is enabled: this is a security risk and should NOT be enabled on production servers. Developer mode can be turned off in etc/zope.conf
Starting server in PID 1032.
serving on http://127.0.0.1:8080

I found that connecting to the server from the outside world didn't work. The following process fixes that:

  • cd Sample

  • vi etc/deploy.ini

  • change the host from 127.0.0.1 to 0.0.0.0
  • (note: you may also want to change the port from 8080 to something

  • else if you will be running more than one instance on the machine at a time).

After completing the previous steps and setting the port to 8081, I got this when I restarted the server:

bin/paster serve /home/jelkner/Sample/etc/deploy.ini
------
2009-02-17T16:48:33 WARNING root Developer mode is enabled: this is a security risk and should NOT be enabled on production servers. Developer mode can be turned off in etc/zope.conf
------
2009-02-17T16:48:45 WARNING ZODB.FileStorage Ignoring index for /home/jelkner/Sample/parts/data/Data.fs
Starting server in PID 3716.
serving on 0.0.0.0:8081 view at http://127.0.0.1:8081

and (happy days!) I could connect to it! (note: to connect, use http://[your external server address here]:[your port number here]

Starting up post-install

Much of the code required to install grok has no value after the installation in that it won't be used.

The exception to this is the source line, which enables one to enter the virtualgrok environment. After installation, each time one accesses a "grokproject" folder (which in the first example was titled "Sample") he or she should type:

  • source virtualgrok/bin/activate

In order to recede from the environment:

  • deactivate

GrokTutorial (last edited 2009-03-21 19:18:40 by peterhufford)