geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r700239 - in /geronimo/sandbox/failover: README.txt all.sh cycleservers.sh deploy.gsh deploy.sh run.sh servers.sh setup.sh svn-commit.tmp~
Date Mon, 29 Sep 2008 20:26:14 GMT
Author: dblevins
Date: Mon Sep 29 13:26:13 2008
New Revision: 700239

URL: http://svn.apache.org/viewvc?rev=700239&view=rev
Log:
Second rev of the failover setup

Added:
    geronimo/sandbox/failover/all.sh   (with props)
    geronimo/sandbox/failover/deploy.gsh
    geronimo/sandbox/failover/servers.sh   (with props)
    geronimo/sandbox/failover/svn-commit.tmp~
Removed:
    geronimo/sandbox/failover/deploy.sh
    geronimo/sandbox/failover/run.sh
    geronimo/sandbox/failover/setup.sh
Modified:
    geronimo/sandbox/failover/README.txt
    geronimo/sandbox/failover/cycleservers.sh

Modified: geronimo/sandbox/failover/README.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/failover/README.txt?rev=700239&r1=700238&r2=700239&view=diff
==============================================================================
--- geronimo/sandbox/failover/README.txt (original)
+++ geronimo/sandbox/failover/README.txt Mon Sep 29 13:26:13 2008
@@ -54,45 +54,47 @@
 
 Here's what the do:
 
-  setup.sh
-   
-    Unpacks the vanilla
-    geronimo-tomcat6-javaee5-2.2-SNAPSHOT-bin.tar.gz binary then
-    copies it four times and updates the port offset on each of the
-    copies so that they don't conflict.  Note that if you do split
-    these servers onto separate machines, you will need to update the
-    "ServerHostname" property in
-    var/config/config-substitutions.properties to something other than
-    0.0.0.0.  The Geronimo 2.2 snapshot binary image is a build of the
-    current Geronimo 2.2 trunk and is not a customized build.  Anyone
-    who builds Geronimo 2.2 trunk will have the same code.
-
-  deploy.sh
-
-    Copies the load-beans app into the hot deploy directory of each
-    the server copies.  This script is called from setup.sh and does
-    not need to be run unless you feel like experimenting with the
-    sample code and want an easy way to update the app on all the
-    servers.
-
-  run.sh
-
-    Starts each of the server copies giving them a bit of time to
-    start.  The it starts the Grinder Console, waits a bit then starts
-    the Grinder Agent which will connect to the Grinder Console.  Once
-    that is up you can click the little icon at the top left that
-    looks like a "play" button.  This will start hammering on the
-    cluster.  Note that the Grinder Agent and Grinder Console can be
-    run on separate machines which will give you better stats that
-    don't include overhead of the client and console.  Grinder has
-    some pretty cool options, definitely recommended to check them
-    out.
+  all.sh
+    This unpacks and runs everything.
+    - unpacks and starts the farm controller server
+    - runs servers.sh start to unpack and start the farm nodes
+    - runs the deploy.gsh gshell script against the farm controller server
+       to deploy the load-beans app and distribute it to the farm 
+    - starts grinder.  You will need to actually start the run from the console.
+
+  deploy.gsh
+   A gshell script that deploys and distributes the load-beans app.
 
   cycleservers.sh
+    This must be run in the geronimo-plugin-farm-node-2.2-SNAPSHOT directory.
 
     A simple utility that makes the whole repeated killing and
     starting of servers automated so you can let it run for a few
     hours unattended to see how things look over a prolonged period.
-    It kills a server, waits for a minute, starts the server again,
-    waits a minute, then moves on to the next server.  It does this
-    infinitely till the script is killed.
+    It kills a server, waits 10 seconds, starts the server again,
+    waits 10 seconds, then moves on to the next server.  It does this
+    infinitely till the script is killed. (this is slightly different from the previous
+    version, it is adapted to the multiple servers on one installation setup)
+
+-- Servers --
+
+Two servers are included.  
+
+The geronimo-plugin-farm-node is a server that only has the bits needed to 
+install more stuff from the plugin controller.  When the load-beans app is 
+installed, everything needed to run the app is also pulled down and installed 
+from the appropriate geronimo plugin repository, in this case the controller 
+server.  This server is built as part of a normal geronimo build.
+
+The geronimo-tomcat-farm-controller server is a custom assembly that includes:
+-- everything in a normal geronimo-tomcat-javaee5 server
+-- the plugin-farm controller plugin
+-- a customization that makes the plugin farm controller use itself as the plugin repository.
+While its very easy to install these into a standard server its even easier and more
+automated to simply use a custom server assembly.  This one is under 
+https://svn.apache.org/repos/asf/geronimo/sandbox/djencks/assemblies
+
+-- Plugin farming --
+There's a little bit of documentation on the plugin farm stuff under
+http://cwiki.apache.org/confluence/display/GMOxDOC22/Plugin+based+Farming
+

Added: geronimo/sandbox/failover/all.sh
URL: http://svn.apache.org/viewvc/geronimo/sandbox/failover/all.sh?rev=700239&view=auto
==============================================================================
--- geronimo/sandbox/failover/all.sh (added)
+++ geronimo/sandbox/failover/all.sh Mon Sep 29 13:26:13 2008
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+echo unpack controller server
+tar xzf geronimo-tomcat-farm-controller-2.2-SNAPSHOT-bin.tar.gz
+
+echo start controller server in background
+./geronimo-tomcat-farm-controller-2.2-SNAPSHOT/bin/gsh geronimo/start-server >controller.log
&
+
+echo wait 20 seconds for controller to start
+sleep 20
+
+echo unpack and start nodes
+./servers.sh start
+
+
+echo wait 20 seconds for nodes to start
+sleep 20
+
+echo deploy the app, distribute it to the farm
+./geronimo-tomcat-farm-controller-2.2-SNAPSHOT/bin/gsh<deploy.gsh
+
+echo start grinder
+./grinder-3.0.1/bin/console &
+
+sleep 5
+
+./grinder-3.0.1/bin/agent
+
+# you need to start the workers from the grinder console

Propchange: geronimo/sandbox/failover/all.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: geronimo/sandbox/failover/cycleservers.sh
URL: http://svn.apache.org/viewvc/geronimo/sandbox/failover/cycleservers.sh?rev=700239&r1=700238&r2=700239&view=diff
==============================================================================
--- geronimo/sandbox/failover/cycleservers.sh (original)
+++ geronimo/sandbox/failover/cycleservers.sh Mon Sep 29 13:26:13 2008
@@ -1,19 +1,32 @@
 #!/bin/bash
 
+(cd geronimo-plugin-farm-node-2.2-SNAPSHOT
+
 while true; do
 
-  for server in server-*; do
+  for server in server*; do
+
+    pid=$(ps ax | grep "gshell-bootstrap.jar geronimo/start-server -s $server" | grep -v
'grep' | cut -c 1-6)
 
-    echo "Killing $server"
-    kill -9 $(ps ax | grep "javaagent.*$server" | grep -v 'grep' | cut -c 1-6)
+    if [ $pid ] ; then   
+      echo "Killing gshell for $server at pid $pid"
+      kill -9 $pid
+    fi
+    pid=$(ps ax |  grep "javaagent.*$server" | grep -v 'grep' | cut -c 1-6)
 
-    sleep 60
+    if [ $pid ] ; then   
+      echo "Killing $server at pid $pid"
+      kill -9 $pid
+    fi
 
-    echo "Starting $server"
+    sleep 10
 
-    ./$server/bin/startup.sh > /dev/null
+    s=${server/server/}
+    echo "Starting $server id $s"
+    ./bin/gsh geronimo/start-server -s ${server} -G config.substitution.PortOffset=${s}0
>${s}.log &
 
-    sleep 60
+    sleep 10
   done
 
 done
+)
\ No newline at end of file

Added: geronimo/sandbox/failover/deploy.gsh
URL: http://svn.apache.org/viewvc/geronimo/sandbox/failover/deploy.gsh?rev=700239&view=auto
==============================================================================
--- geronimo/sandbox/failover/deploy.gsh (added)
+++ geronimo/sandbox/failover/deploy.gsh Mon Sep 29 13:26:13 2008
@@ -0,0 +1,3 @@
+#gshell script
+deploy/deploy load-beans/target/load-beans-1.0.jar load-beans/plan.xml --username system
--password manager
+deploy/farm add -f cluster1 -l pluginList1 -a  org.superbiz/load-beans/1.0/car 

Added: geronimo/sandbox/failover/servers.sh
URL: http://svn.apache.org/viewvc/geronimo/sandbox/failover/servers.sh?rev=700239&view=auto
==============================================================================
--- geronimo/sandbox/failover/servers.sh (added)
+++ geronimo/sandbox/failover/servers.sh Mon Sep 29 13:26:13 2008
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+BASE=geronimo-plugin-farm-node-2.2-SNAPSHOT
+if  [ "$1" = "stop" ] ; then
+(
+  cd $BASE
+  for server in server*; do
+    pid=$(ps ax | grep "gshell-bootstrap.jar geronimo/start-server -s $server" | grep -v
'grep' | cut -c 1-6)
+
+    if [ $pid ] ; then   
+      echo "Killing gshell for $server at pid $pid"
+      kill -9 $pid
+    fi
+    pid=$(ps ax |  grep "javaagent.*$server" | grep -v 'grep' | cut -c 1-6)
+
+    if [ $pid ] ; then   
+      echo "Killing $server at pid $pid"
+      kill -9 $pid
+    fi
+  done
+)
+fi
+
+rm -rf $BASE
+tar xzf $BASE-bin.tar.gz
+(
+cd $BASE
+
+for s in {1..5}
+do 
+  sn="server${s}"
+  mkdir ${sn}
+  cp -r var ${sn}/
+  if  [ "$1" = "start" ] ; then
+    ./bin/gsh geronimo/start-server -s ${sn} -G config.substitution.PortOffset=${s}0 >${s}.log
&
+  fi
+done
+)
+

Propchange: geronimo/sandbox/failover/servers.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: geronimo/sandbox/failover/svn-commit.tmp~
URL: http://svn.apache.org/viewvc/geronimo/sandbox/failover/svn-commit.tmp%7E?rev=700239&view=auto
==============================================================================
--- geronimo/sandbox/failover/svn-commit.tmp~ (added)
+++ geronimo/sandbox/failover/svn-commit.tmp~ Mon Sep 29 13:26:13 2008
@@ -0,0 +1,12 @@
+
+--This line, and those below, will be ignored--
+
+AM   all.sh
+M    cycleservers.sh
+AM   servers.sh
+D    deploy.sh
+D    setup.sh
+A    svn-commit.tmp~
+M    README.txt
+A    deploy.gsh
+D    run.sh



Mime
View raw message