• getting started with the code

last modified May 9, 2009 by ejucovy


  • Requests from remote IPs are failing to connect to [server ip]:[base port]. The Deliverance server on [base port] is configured by default to only listen to requests from localhost.  You can edit the etc/deliverance/deliverance.ini file and change the second instance of localhost to to tell it to accept connections from the outside world.  Alternatively, you can run a local proxy to that port from Apache, etc.  http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2009/02/1235385736279/forum_view
  • TaskTracker is failing with 302 HTTP codes on closed projects. Make sure admin.txt has the correct username and password for the zope admin user: http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2009/03/1238390715727
  • The ZMI is behaving strangely and keeps redirecting me back to the ZMI root //  rendering the OpenCore user interface instead of ZMI panels // etc.  Most likely you're logged in to the OpenCore site as a standard member, as well as authenticating as an admin with HTTP Basic Auth when you visit the ZMI.  So you're sending multiple credentials to the server and it's getting confused.  Log out of the OpenCore site (using the "logout" link in the standard UI's topnav tab or visiting {BASE_URL}/logout directly) and try again.  http://trac.openplans.org/openplans/ticket/2791
  • I want to allow a different set of <embed>s.  Edit `opencore_embed_whitelist` in etc/build.ini as desired and restart the OpenCore service.  This will only apply for wiki edits; blog posts are a different matter entirely. 
  • New users can't register and/or links to new users on the site go to /people/None/profile.  This is a sporadic bug that we haven't managed to isolate and quash for good, no matter how many times we think we've fixed it.  We'll keep working on it.  In the meantime, learn a workaround for site admins: HOWTO manually confirm pending user accounts

Where the code lives (in a fassembler build):

  • OpenCore code is in opencore/src/opencore and elsewhere in opencore/src.  These are provided as SVN checkouts of eggs.
  • Plone code is in opencore/src/opencore-bundle.  This is where you'll find CMFPlone, TeamSpace, remember, listen, etc.  These are provided as SVN checkouts of eggs in the Products namespace.
  • Zope code is in opencore/lib/zope/lib/python.  This is where you'll find ZPublisher, the zope.* packages, Products.Five, etc.  These are not SVN checkouts, so be careful, if you start modifying files you'll have to keep track of your modifications yourself.  They're not egg-like either -- it's a single namespaced file layout, so zope.i18n is in opencore/lib/zope/lib/python/zope/i18n, and Five is in opencore/lib/zope/lib/python/Products/Five
  • Most everything else is in opencore/lib/python2.4/site-packages.  This is where you'll find lxml, plone.app, etc.  These are the dependencies installed by setuptools and they are not SVN checkouts.

Process management

  • start `{BUILD_DIR}/bin/supervisord` to run processes in the background and have a useful single console for managing all of them.
  • run `{BUILD_DIR}/bin/supervisorctl {start|stop|restart} ${PROCESS_NAME}` to start/stop/restart individual processes.
  • run `{BUILD_DIR}/bin/supervisorctl tail ${PROCESS_NAME}` to view a process's stdout/stderr stream.  Like GNU tail, you can pass a `-f` argument to the command to get a continuous output stream as it happens.
  • For more on supervisor, visit the project's homepage: http://supervisord.org
  • Sometimes you want to run a process in the foreground.  Look in {BUILD_DIR}/etc/supervisor.d/{PROCESS_NAME}.ini to see the supervisor configuration for a process, which you can then follow as deep as you like to see how supervisor invokes the processes.  (For most, the relevant command will end up being something like `cd {BUILD_DIR}/{PROCESS_NAME}; source bin/activate; paster serve {BUILD_DIR}/etc/{PROCESS_NAME}/{PROCESS_NAME}.ini`)
  • To run OpenCore itself in the foreground: first make sure the ZEO server is running (either `supervisorctl start opencore-zeo`, or `./zeo/bin/zeoctl start` from within the opencore environment).  Then, from within the opencore directory, run `./zope/bin/zopectl fg` to start Zope in the foreground.