Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

groupserver/gs.recipe.setupgs

Repository files navigation

gs.recipe.setupgs

A zc.buildout recipe for setting up a GroupServer instance

Author: Michael JasonSmith
Contact: Michael JasonSmith <mpj17@onlinegroups.net>
Date: 2014-05-16
Organization: GroupServer.org
Copyright: This document is licensed under a Creative Commons Attribution-Share Alike 4.0 International License by OnlineGroups.net.

Introduction

This product supplies a zc_buildout [1] recipe for installing a GroupServer site in a Zope instance.

Recipe

The recipe installs GroupServer in two stages.

  1. Generates a script based on the configuration.
  2. Runs the script with the correct python environment for Zope (the instancepython).

The reason for this convoluted process is to allow the script to start Zope, and call code within it. The recipe is only run once because of a lock file.

Configuration

The options for this recipe are specified in the confg.cfg file, and are marshalled by the instance.cfg configuration file.

zope_admin_name:
The name of the Zope administrator
instance_id':
The ID of the new GroupServer instance.
instance_title:
The title of the new GroupServer instance.
support_email:
The email address to contact for support.
gs_admin_email:
The email address of the new GroupServer administrator, who is created with the site.
gs_admin_password:
The password for the new GroupServer administrator.
gs_host:
The host-name for the new site.
gs_port:
The port for the new site.
gs_smtp_host:
The host-name for the outgoing SMTP server.
gs_smtp_port:
The port-number for the outgoing SMTP server.
gs_smtp_user:
The user-name for the outgoing SMTP server.
gs_smtp_password:
The password for the outgoing SMTP server.

Script

The script is defined by the template script.py_tmpl in this product. The recipe substitutes the configuration into the script, and then executes the script by calling:

bin/instance run scriptName

This starts the Zope instance, and runs the script within Zope. (The script-name is generated by tempfile.) The script then sets up GroupServer by calling code in Products.GroupServer.create [3].

Lock file

The recipe will not be run if the lock-file setup-gs.cfg is present in the var directory. To run this recipe more than once either delete the lock file, or in the configuration set:

run-once = False

Acknowledgements

Many thanks to the collective.recipe.updateplone [2] authors for inspiring this product.

Resources

[1]See <https://pypi.python.org/pypi/zc.buildout/2.2.1>
[2]See <https://pypi.python.org/pypi/collective.recipe.updateplone/0.3>
[3]See <https://source.iopen.net/groupserver/Products.GroupServer>

About

The buildout recipe to set up the initial GroupServer instance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages