[open-ils-commits] r651 - in ESI-Examples/trunk: . tools tools/eg_dev_lenny_installer (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 4 11:51:11 EDT 2009


Author: erickson
Date: 2009-09-04 11:51:08 -0400 (Fri, 04 Sep 2009)
New Revision: 651

Added:
   ESI-Examples/trunk/tools/
   ESI-Examples/trunk/tools/eg_dev_lenny_installer/
   ESI-Examples/trunk/tools/eg_dev_lenny_installer/CPAN_Config.pm.EG.patch
   ESI-Examples/trunk/tools/eg_dev_lenny_installer/README
   ESI-Examples/trunk/tools/eg_dev_lenny_installer/eg_dev_lenny_installer.sh
   ESI-Examples/trunk/tools/eg_dev_lenny_installer/ejabberd.lenny.EG.patch
Log:
added lenny install tools

Added: ESI-Examples/trunk/tools/eg_dev_lenny_installer/CPAN_Config.pm.EG.patch
===================================================================
--- ESI-Examples/trunk/tools/eg_dev_lenny_installer/CPAN_Config.pm.EG.patch	                        (rev 0)
+++ ESI-Examples/trunk/tools/eg_dev_lenny_installer/CPAN_Config.pm.EG.patch	2009-09-04 15:51:08 UTC (rev 651)
@@ -0,0 +1,20 @@
+--- Config.pm	2009-09-04 09:37:13.000000000 -0400
++++ Config.pm.new	2009-09-04 09:36:54.000000000 -0400
+@@ -48,7 +48,7 @@
+   'patch' => q[/usr/bin/patch],
+   'prefer_installer' => q[MB],
+   'prefs_dir' => q[/root/.cpan/prefs],
+-  'prerequisites_policy' => q[ask],
++  'prerequisites_policy' => q[follow],
+   'scan_cache' => q[atstart],
+   'shell' => q[/bin/bash],
+   'show_unparsable_versions' => q[0],
+@@ -60,7 +60,7 @@
+   'term_ornaments' => q[1],
+   'test_report' => q[0],
+   'unzip' => q[],
+-  'urllist' => [],
++  'urllist' => [q[ftp://mirror.datapipe.net/pub/CPAN/]],
+   'use_sqlite' => q[0],
+   'wget' => q[/usr/bin/wget],
+   'yaml_load_code' => q[0],

Added: ESI-Examples/trunk/tools/eg_dev_lenny_installer/README
===================================================================
--- ESI-Examples/trunk/tools/eg_dev_lenny_installer/README	                        (rev 0)
+++ ESI-Examples/trunk/tools/eg_dev_lenny_installer/README	2009-09-04 15:51:08 UTC (rev 651)
@@ -0,0 +1,29 @@
+
+Mostly automated "trunk" install of OpenSRF and Evergreen on Debian Lenny.
+
+WARNING: This is for development and evaluation purposes only.  This 
+script makes a lot of assumptions and does stuff you won't like.  
+Use at own risk.
+
+Steps:
+1. Install Debian Lenny
+2. Put these files on the server
+3. Run this script and do what it says
+
+----------------------------------------------------------
+
+Author: Bill Erickson (erickson at esilibrary.com)
+Copyright: (C) 2009  Equinox Software Inc.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+ 
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+
+

Added: ESI-Examples/trunk/tools/eg_dev_lenny_installer/eg_dev_lenny_installer.sh
===================================================================
--- ESI-Examples/trunk/tools/eg_dev_lenny_installer/eg_dev_lenny_installer.sh	                        (rev 0)
+++ ESI-Examples/trunk/tools/eg_dev_lenny_installer/eg_dev_lenny_installer.sh	2009-09-04 15:51:08 UTC (rev 651)
@@ -0,0 +1,169 @@
+#!/bin/bash
+# -----------------------------------------------------------------------
+# Copyright (C) 2009  Equinox Software Inc.
+# Bill Erickson <erickson at esilibrary.com>
+# 
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# -----------------------------------------------------------------------
+
+DOJO='dojo-release-1.3.2';
+JABBER_PASSWORD='password'
+BASE_DIR=$PWD
+
+
+# And they're off...
+
+# Install some essential tools
+apt-get update; 
+apt-get dist-upgrade;
+apt-get -yq install vim build-essential syslog-ng psmisc automake ntpdate subversion; 
+ntpdate pool.ntp.org 
+
+# Update ldconfig
+if [ ! "$(grep openils /etc/ld.so.conf)" ]; then 
+    echo -e "/openils/lib\n/usr/local/lib\n/usr/local/lib/dbd" >> /etc/ld.so.conf
+    ldconfig
+fi;
+
+# Create opensrf user and set up environment
+if [ ! "$(grep ^opensrf: /etc/passwd)" ]; then
+    useradd -m -s /bin/bash opensrf
+    echo '
+    export PERL5LIB=/openils/lib/perl5:$PERL5LIB
+    export PATH=/openils/bin:$PATH
+    export LD_LIBRARY_PATH=/openils/lib:/usr/local/lib:/usr/local/lib/dbd:$LD_LIBRARY_PATH
+    export PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\]% \[\033[00m\]";
+    export EDITOR="vim";
+    alias ls="ls --color=auto"
+    ' >> /home/opensrf/.bashrc
+fi;
+
+
+# Force cpan config 
+if [ ! "$(grep datapipe /etc/perl/CPAN/Config.pm)" ]; then
+    cpan foo
+    cd /etc/perl/CPAN/;
+    patch -p0 < $BASE_DIR/CPAN_Config.pm.EG.patch
+fi;
+
+# Install pre-reqs
+mkdir -p /usr/src/evergreen; 
+cd /usr/src/evergreen;
+wget 'http://svn.open-ils.org/trac/OpenSRF/export/HEAD/trunk/src/extras/Makefile.install' -O Makefile.install.osrf
+wget 'http://svn.open-ils.org/trac/ILS/export/HEAD/trunk/Open-ILS/src/extras/Makefile.install' -O Makefile.install.ils
+make -f Makefile.install.osrf debian-lenny
+make -f Makefile.install.ils debian-lenny
+make -f Makefile.install.ils install_pgsql_server_debs_83
+
+
+# Patch Ejabberd and register users
+if [ ! "$(grep 'public.localhost' /etc/ejabberd/ejabberd.cfg)" ]; then
+    cd /etc/ejabberd/
+    /etc/init.d/ejabberd stop;
+    killall beam epmd; # just in case
+    cp ejabberd.cfg /root/ejabberd.cfg.orig
+    patch -p0 < $BASE_DIR/ejabberd.lenny.EG.patch
+    chown ejabberd:ejabberd ejabberd.cfg
+    /etc/init.d/ejabberd start
+    sleep 2;
+    ejabberdctl register router private.localhost $JABBER_PASSWORD
+    ejabberdctl register opensrf private.localhost $JABBER_PASSWORD
+    ejabberdctl register router public.localhost $JABBER_PASSWORD
+    ejabberdctl register opensrf public.localhost $JABBER_PASSWORD
+fi;
+
+
+# Build and install OpenSRF
+OSRF_COMMAND='
+mkdir /home/opensrf/OpenSRF;
+mkdir /home/opensrf/ILS;
+svn co svn://svn.open-ils.org/OpenSRF/trunk /home/opensrf/OpenSRF/trunk;
+svn co svn://svn.open-ils.org/ILS/trunk /home/opensrf/ILS/trunk;
+cd /home/opensrf/OpenSRF/trunk;
+./autogen.sh;
+./configure --prefix=/openils --sysconfdir=/openils/conf;
+make;'
+
+su - opensrf sh -c "$OSRF_COMMAND"
+cd /home/opensrf/OpenSRF/trunk
+make install
+
+# Build and install the ILS
+OSRF_COMMAND='
+cd /home/opensrf/ILS/trunk;
+./autogen.sh;
+./configure --prefix=/openils --sysconfdir=/openils/conf;
+make;'
+
+su - opensrf sh -c "$OSRF_COMMAND"
+cd /home/opensrf/ILS/trunk;
+make install
+cp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xml
+cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml
+cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml
+
+# fetch and install Dojo
+cd /tmp;
+wget "http://download.dojotoolkit.org/$DOJO/$DOJO.tar.gz";
+tar -zxf $DOJO.tar.gz;
+cp -r $DOJO/* /openils/var/web/js/dojo/;
+
+# give it all to opensrf
+chown -R opensrf:opensrf /openils
+
+# copy srfsh config into place
+su - opensrf sh -c "cp /openils/conf/srfsh.xml.example /home/opensrf/.srfsh.xml";
+
+# Create the DB
+PG_COMMAND='
+createdb -E UNICODE evergreen;
+createlang plperl evergreen;
+createlang plperlu evergreen;
+createlang plpgsql evergreen;
+psql -f /usr/share/postgresql/8.3/contrib/tablefunc.sql evergreen;
+psql -f /usr/share/postgresql/8.3/contrib/tsearch2.sql evergreen;
+psql -f /usr/share/postgresql/8.3/contrib/pgxml.sql evergreen;
+createuser -P -s evergreen;'
+echo -e "\n\nBe prepared to enter a password for the evergreen DB user.  If you don't want to edit configs, use 'evergreen'\n"
+su - postgres sh -c "$PG_COMMAND"
+
+# Apply the DB schema
+cd /home/opensrf/ILS/trunk;
+perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \
+    --service all --create-schema --create-bootstrap --create-offline \
+    --user evergreen --password evergreen --hostname localhost --database evergreen
+
+# Copy apache configs into place and create SSL cert
+cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/
+cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/
+cp Open-ILS/examples/apache/startup.pl /etc/apache2/
+mkdir /etc/apache2/ssl
+cd /etc/apache2/ssl
+echo -e "\nConfiguring a temporary SSL certificate....\n";
+openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key
+a2enmod ssl  
+a2enmod rewrite
+a2enmod expires 
+
+
+cat <<EOF
+
+Now do this, and then some other stuff:
+
+* Add to /etc/hosts
+
+127.0.1.2   public.localhost    public
+127.0.1.3   private.localhost   private
+
+* Finish configuring Apache
+
+EOF
+


Property changes on: ESI-Examples/trunk/tools/eg_dev_lenny_installer/eg_dev_lenny_installer.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: ESI-Examples/trunk/tools/eg_dev_lenny_installer/ejabberd.lenny.EG.patch
===================================================================
--- ESI-Examples/trunk/tools/eg_dev_lenny_installer/ejabberd.lenny.EG.patch	                        (rev 0)
+++ ESI-Examples/trunk/tools/eg_dev_lenny_installer/ejabberd.lenny.EG.patch	2009-09-04 15:51:08 UTC (rev 651)
@@ -0,0 +1,69 @@
+--- /etc/ejabberd/ejabberd.cfg	2009-09-04 09:00:04.000000000 -0400
++++ ejabberd.lenny.cfg	2009-09-04 08:58:05.000000000 -0400
+@@ -33,7 +33,7 @@
+ {acl, admin, {user, "", "localhost"}}.
+ 
+ %% Hostname
+-{hosts, ["localhost"]}.
++{hosts, ["public.localhost", "private.localhost"]}.
+ 
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ 
+@@ -115,7 +115,7 @@
+   {5222, ejabberd_c2s, [
+ 			{access, c2s},
+ 			{shaper, c2s_shaper},
+-			{max_stanza_size, 65536},
++			{max_stanza_size, 200000},
+ 			starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
+ 		       ]},
+ 
+@@ -125,13 +125,13 @@
+   %%{5223, ejabberd_c2s, [
+   %%			{access, c2s},
+   %%			{shaper, c2s_shaper},
+-  %%			{max_stanza_size, 65536},
++  %%			{max_stanza_size, 200000},
+   %%			tls, {certfile, "/etc/ejabberd/ejabberd.pem"}
+   %%		       ]},
+ 
+   {5269, ejabberd_s2s_in, [
+ 			   {shaper, s2s_shaper},
+-			   {max_stanza_size, 131072}
++			   {max_stanza_size, 200000}
+ 			  ]},
+ 
+   %% External MUC jabber-muc (but internal mod_muc is better :))
+@@ -350,12 +350,12 @@
+ %%
+ %% The "normal" shaper limits traffic speed to 1.000 B/s
+ %%
+-{shaper, normal, {maxrate, 1000}}.
++{shaper, normal, {maxrate, 500000}}.
+ 
+ %%
+ %% The "fast" shaper limits traffic speed to 50.000 B/s
+ %%
+-{shaper, fast, {maxrate, 50000}}.
++{shaper, fast, {maxrate, 500000}}.
+ 
+ 
+ %%%   ====================
+@@ -392,7 +392,7 @@
+ %%%   ACCESS RULES
+ 
+ %% Define the maximum number of time a single user is allowed to connect:
+-{access, max_user_sessions, [{10, all}]}.
++{access, max_user_sessions, [{5000, all}]}.
+ 
+ %% This rule allows access only for local users:
+ {access, local, [{allow, local}]}.
+@@ -466,7 +466,7 @@
+ 		  {max_users, 500}
+ 		 ]},
+   %%{mod_muc_log,[]},
+-  {mod_offline,  []},
++  %%{mod_offline,  []},
+   {mod_privacy,  []},
+   {mod_private,  []},
+   {mod_proxy65,  [



More information about the open-ils-commits mailing list