New
[ZOOM-Perl-moved-to-github.git] / archive / test-server
1 *.mf
2 *..LCK
3 zebrasrv.pid
4 $Id: README,v 1.1 2005-12-14 10:03:57 mike Exp $
5
6 This directory contains material that is not to be included in the
7 ZOOM-Perl distribution, but which is useful to the project -- for
8 example, the test-server.* files are to do with running the server
9 that the ZOOM-Perl test-suite runs against.
10
11 README -- this file
12 agreement.doc -- contract with LibLime/
13 update-client -- notes on using update facilities in YAZ.
14 test-server.notes -- notes on running the test server.
15 test-server.init -- script to run the test server from /etc/init.d
16 test-server.cfg -- Zebra configuration file for the test server.
17 test-server.pw -- password file for test server's Zebra configuration.
18
19 # Simple Zebra configuration file
20 # $Id: test-server.cfg,v 1.1 2005-12-14 10:04:57 mike Exp $
21 #
22 # Where the schema files, attribute files, etc are located.
23 profilePath: .:../../tab
24
25 # Files that describe the attribute sets supported.
26 attset: bib1.att
27 attset: gils.att
28 attset: explain.att
29
30 recordtype: grs.sgml
31 isam: b
32
33 # Flags for the non-authenticated user. w=write (allows ES Updates)
34 perm.user: r
35 perm.admin: rw
36 passwd: xs-pwfile
37 someCrappyNonExistentDirectiveThatWillJustBeIgnored: fruit
38
39 #rank: zvrank
40 # Don't use a recordId taken from the record itself: the test-suite
41 # currently supplies its own recordIds. 
42 #recordId: (bib-1,title)
43
44 modulePath: ../../recctrl/.libs
45 #shadow: shadow:100M
46 #register: register:100M
47 #! /bin/sh
48
49 # $Id: test-server.init,v 1.1 2005-12-14 10:04:57 mike Exp $
50 #
51 # This is a startup/shutdown script for the ZOOM-Perl test-server,
52 # suitable for use in a SysV-style init directory such as /etc/init.d
53 # (on Debian systems) and /etc/rc.d/init.d (on Red Hat systems).  This
54 # is configured to run on test.indexdata.com -- if you want to run it
55 # somewhere else, you'll probably need to tweak it to suit your
56 # system's paths.
57
58 PATH=/bin:/usr/bin
59 logfile=/var/log/zoom-perl-test-server
60 pidfile=/var/run/zoom-perl-test-server.pid
61
62 case "$1" in
63   start)
64         if [ -f $pidfile ]; then
65                 echo "ZOOM-Perl test server seems to be already running"
66                 exit 1
67         fi
68         echo "Starting ZOOM-Perl test server"
69         test -f $logfile && mv $logfile $logfile.old
70         ( cd /home/mike/universe/src/ZOOM-Perl/archive
71           ../../../bin/zebrasrv -c test-server.cfg @:2118 \
72                 > $logfile 2>&1 < /dev/null &
73           echo $! > $pidfile
74         )
75         ;;
76   stop)
77         if [ ! -f $pidfile ]; then
78                 echo "ZOOM-Perl test server does not seem to be running"
79                 exit 1
80         fi
81         echo "Stopping ZOOM-Perl test server"
82         kill `cat $pidfile`
83         rm $pidfile
84         ;;
85   restart)
86         $0 stop && $0 start
87         ;;
88   *)
89         echo "Usage: $0 start|stop|restart" >&2
90         ;;
91 esac
92 $Id: test-server.notes,v 1.1 2005-12-14 09:02:08 mike Exp $
93
94 To run the test-suite, this module needs an up-to-date Zebra server
95 (as of Tue Dec 13 17:41:05 GMT 2005) running on test.indexdata.com
96 port 8017, using isam:b and recognising a normal user "user" with
97 password "frog" and an administrator "admin" with password "fish".
98
99 To provide this, I needed to build an up-to-date Zebra in a custom
100 universe, so as not to interfere with the Debian packages used
101 elsewhere on test, and to start the server with appropriate
102 configuration.  Here's how I did it:
103
104         ssh test
105         mkdir -p universe/usr/src
106         cd universe/usr/src
107         cvs -q -d ":pserver:mike@bagel.indexdata.dk:/home/cvsroot" co yaz
108         cvs -q -d ":pserver:mike@bagel.indexdata.dk:/home/cvsroot" co zebra
109         cd yaz
110         ./buildconf.sh
111         LDFLAGS=-L/home/mike/universe/usr/lib CPPFLAGS=-I/home/mike/universe/usr/include ./configure --prefix=/home/mike/universe
112         make
113         make install
114         cd ../zebra
115         ./buildconf.sh
116         LDFLAGS=-L/home/mike/universe/usr/lib CPPFLAGS=-I/home/mike/universe/usr/include ./configure --prefix=/home/mike/universe
117         make
118         make install
119         cd examples/gils
120         make clean
121         ~/universe/bin/zebrasrv -c xs-test.cfg @:8017
122
123 ### Now I need to move the custom Zebra configuration out of the
124 "zebra" CVS module and into this one, and to provide an init.d script
125 for starting the server.
126
127 user:frog
128 admin:fish