[Zodb-checkins] CVS: ZODB3/Doc - zdctl.txt:1.4

Guido van Rossum guido@python.org
Wed, 12 Mar 2003 15:30:33 -0500


Update of /cvs-repository/ZODB3/Doc
In directory cvs.zope.org:/tmp/cvs-serv5149

Modified Files:
	zdctl.txt 
Log Message:
Document the default-to-interactive configuration option.

Document mkzeoinst.py.


=== ZODB3/Doc/zdctl.txt 1.3 => 1.4 ===
--- ZODB3/Doc/zdctl.txt:1.3	Tue Mar 11 17:57:52 2003
+++ ZODB3/Doc/zdctl.txt	Wed Mar 12 15:30:28 2003
@@ -250,11 +250,77 @@
 
 - Command and argument completion using the TAB key.
 
+One final note: some people don't like it that an invocation without
+arguments enters interactive mode.  If this describes you, there's an
+easy way to disable this feature: add a line saying
+
+  default-to-interactive false
+
+to the zeoctl.conf file.  You can still enter interactive mode by
+using the -i option.
+
 
 Using mkzeoinst.py
 ------------------
 
-XXX TBD
+If you still think that all of the above is a lot of typing, you're
+right.  Fortunately, there's a simple utility that help you creating
+and configuring a ZEO server instance.  mkzeoinst.py requires one
+argument, the ZEO server's "home directory".  After that, you can
+optionally specify a service port number; the port defaults to 9999.
+
+mkzeoinst.py creates the server home directory (and its ancestor
+directories if necessary), and then creates the following directory
+substructure:
+
+  bin/ - directory for scripts (zeoctl)
+  etc/ - directory for configuration files (zeo.conf, zeoctl.conf)
+  log/ - directory for log files (zeo.log, zeoctl.log)
+  var/ - directory for data files (Data.fs and friends)
+
+If the server home directory or any of its subdirectories already
+exist, mkzeoinst.py will note this and assume you are rebuilding an
+existing instance.  (In fact, it prints a message for each directory
+it creates but is silent about existing directories.)
+
+It then creates the following files:
+
+  bin/zeoctl      - executable shell script to run zdctl.py
+  etc/zeo.conf    - configuration file for ZEO
+  etc/zeoctl.conf - configuration file for zdrun.py and zdctl.py
+
+If any of the files it wants to create already exists and is
+non-empty, it does not write the file.  (An empty file will be
+overwritten though.)  If the existing contents differ from what it
+would have written if the file didn't exist, it prints a warning
+message; otherwise the skipping is silent.
+
+Other errors (e.g. permission errors creating or reading files or
+directories) cause mkzeoinst.py to bail with an error message; it does
+not clean up the work already done.
+
+The created files contain absolute path references to all of the
+programs, files, directories used.  They also contain default values
+for most configuration settings that one might normally want to
+configure.  Most configured settings are the same as the defaults;
+however, daemon mode is on while the regular default is off.  Log
+files are configured to go into the log directory.  If configures
+separate log files for zdrun.py/zdctl.py (log/zeoctl.log) and for the
+ZEO server itself (log/zeo.log).  Once created, the files are yours;
+feel free to edit them to suit your taste.
+
+The bin/zeoctl script should be invoked with the positional arguments
+(e,g, "start", "stop" or "status") that you would pass to zdctl.py;
+the script hardcodes the configuration file so you don't have to pass
+that.  It can also be invoked without arguments to enter interactive
+mode.
+
+One final detail: if you want the ZEO server to be started
+automatically when the machine is rebooted, and you're lucky enough to
+be using a recent Red Hat (or similar) system, you can copy the
+bin/zeoctl script into the /etc/rc.d/init.d/ directory and use
+chkconfig(8) to create the correct symlinks to it; the bin/zeoctl
+script already has the appropriate magical comments for chkconfig.
 
 
 zdctl reference