-
Notifications
You must be signed in to change notification settings - Fork 0
Running the Plone 5 EDRN Portal in Development
This document describes how to get the Plone-5–based portal for the Early Detection Research Network working in your local development environment. Currently, the portal is now based on Plone 5.1.5 and is kept in a separate Github repository due to the fact that the Plone-4–based portal uses plone.app.ldap, which cannot be uninstalled (and we therefore have to start with a clean, empty Zope database).
Your development environment will need the following tools and libraries pre-installed (if a choice is offered by your operating system, choose the "development" version of a package so that you'll have development-compatible libraries and headers):
- OpenSSL
- libjpeg
- libz
- Poppler PDF-to-HTML tools
- wvWare tools
- SASL
- OpenLDAP
- C/C++ compiler, make, and other development tools
In addition, these instructions assume a Unix-compatible environment such as macOS, Linux, FreeBSD, and so forth.
To save time between builds, you may want to prepare your ~/.buildout directory in order to cache Python eggs, downloads, and Buildout extensions between builds. To do so:
- mkdir ~/.buildout
- mkdir ~/.buildout/{eggs,downloads,extends}
Then create ~/.buildout/default.cfg with the following contents:
[buildout] eggs-directory = /home/NAME/.buildout/eggs download-cache = /home/NAME/.buildout/downloads extends-cache = /home/NAME/.buildout/extends
Substitute the path to your home directory as needed.
You may also need an installation of Python 2.7. Many operating systems come with Python 2 pre-installed. The one supplied in the latest version of macOS may work; if not, consider using the Python@2 package provided by Brew.
Regardless of which Python you use, you may need to install a slightly older version of setuptools in a virtualenv in order to avoid issues by running:
pip install setuptools==38.5.1
This may not be necessary as of the time of this writing as pip releases occur rapidly and frequently and the issue experienced by this writer may be resolved by now. (Do not do this to your system Python! Use a virtualenv.)
For those familiar with the Plone 2-, 3-, and 4-versions of the EDRN Portal, you are no doubt familiar with a single Buildout which then used separate Python components as either downloaded eggs or development eggs in the "src" directory. This required a Git repository for each egg plus the unifying Buildout which brought them all together and was needlessly complex, especially given the power of Git to do sophisticated branches.
With Plone 5, a single Git repository holds the Buildout along with all of the component eggs. Clone this buildout from Github using either the SSH or HTTPS addresses provided at that site.
To then build the Plone-5–based EDRN portal in your local development environment, do the following:
- Clone the Github repository as mentioned above and make P5 the current working directory.
- Use the Python with the "pip" installation described above to bootstrap by running: python2.7 bootstrap.py -c dev.cfg
- Build out by running: bin/buildout -c dev.cfg
You can then start the portal by running bin/zope-debug fg and visit http://localhost:6468 with a browser. Once there, click "Advanced" and check the box by "edrnsite.policy" then click "Create Plone Site". You can then visit http://localhost:6468/edrn to see the new EDRN portal.
If you ever need to start over, simply stop "bin/zope-debug" (usually with CTRL+C) and erase all files in var/filestorage, then re-buildout and re-run "bin/zope-debug fg".
Copyright © 2019–2021 California Institute of Technology.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.