Skip to content

Commit

Permalink
updating docs, adding *very* basic install script and tweaking the st…
Browse files Browse the repository at this point in the history
…artup scripts
  • Loading branch information
hyperthunk committed Mar 30, 2009
1 parent 2e593b0 commit 3e35092
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 22 deletions.
9 changes: 9 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
These instructions assume that you have downloaded a binary distribution from
sourceforge.net (or built one yourself using the maven build).

Standard Installation:

After deflating the distribution archive, you should run the 'install.sh' script
(residing in the top level of the archive), optionally passing the Installation-Target
and Axiom-Home directories as the first and second arguments.

8 changes: 7 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,11 @@ to get to beta status by the end of March 2009.
Getting Started
----------------

For details on how to build and/or install please read the relevant INSTALL document.
For details on how to build and/or install please read the relevant INSTALL and/or
BUILD document(s).

Further information is available from the sourceforge home page (http://axiomcit.sourceforge.net/),
and "axiology", the axiom blog (http://axiology.wordpress.com). The source code for this
project is available at http://github.com/hyperthunk/axiom.


84 changes: 84 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/usr/bin/env sh
#
# install Install script for the Axiom Integration Testing Framework
#
#################################################################################################
#
# Copyright (c) 2009, Tim Watson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of the author nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

ensure_dir() {
if [ ! -d "$1" ]; then
echo "Creating $1 directory."
x=`mkdir -p $1`
# TODO: this (next) approach is horrible - do it a cleaner way when there's time
if [ $x ]; then
echo "Failed to create $1"
fi
fi
}

INSTALL_DIR=/opt/axiom
if [ "$1" ]; then
INSTALL_DIR="$1"
fi
echo "Installing axiom to $INSTALL_DIR."
x=`ensure_dir $INSTALL_DIR`
if [[ $x == *Failed* ]]; then
echo "$x:\nCancelling installation."
exit 1 # TODO: use the correct exit code
fi

AXIOM_HOME=~/.axiom
if [ "$2" ]; then
AXIOM_HOME="$2"
fi
echo "Setting axiom home to $AXIOM_HOME."
x=`ensure_dir "$AXIOM_HOME"`
if [[ $x == *Failed* ]]; then
echo "$x:\nCancelling installation."
rm -drf "$INSTALL_DIR"
exit 1 # TODO: use the correct exit code
fi
ensure_dir "$AXIOM_HOME/conf"
ensure_dir "$AXIOM_HOME/endorsed"
ensure_dir "$AXIOM_HOME/endorsed/lib"

cd ..
for d in 'lib' 'bin'; do
echo "cp -r $d $INSTALL_DIR/"
cp -r "$d" "$INSTALL_DIR/"
done

echo "Installing init.d script to $INIT_DIR"
x=ensure_dir "$INIT_DIR"
if [[ $x = *Failed* ]]; then
echo "Failed to install init.d script. This can be installed manually later on."
echo "Installation complete. You can start the server by running $INSTALL_DIR/bin/startup.sh"
else
echo "Installation complete. You can start the server by running '> $INIT_DIR start'"
fi
2 changes: 1 addition & 1 deletion src/scripts/axiom-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ case "$1" in
fi
exit 0
fi
$SCRIPT
$SCRIPT "$SCRIPT $ARGS...\n"
;;

'stop')
Expand Down
23 changes: 3 additions & 20 deletions src/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,11 @@
###### START LOCAL CONFIGURATION
# You may wish to modify these variables to suit your local configuration

# AXIOM_HOME Location of the Axiom Test Framework home folder
AXIOM_HOME=~/.axiom
#
# Set this AXIOM_HOME value if you want the Axiom Test Framework
# to use a location other than the default ~/.axiom as its home folder
#
# AXIOM_HOME=_AXIOM_HOME_
export AXIOM_HOME

# AXIOM_INSTALL Location into which the Axiom Test Framework was installed
AXIOM_INSTALL=$AXIOM_HOME/dist
#
# Set this AXIOM_INSTALL value if you installed the Axiom Test Framework
# to a location other than the default (symlinkd) ~/.axiom/dist -> /opt/axiom
#
# AXIOM_INSTALL=_AXIOM_INSTALL_
export AXIOM_INSTALL
# TODO: validate that the environment is set up correctly

# ENDORSED_DIR Location of the endorsed folder (not overridable)
ENDORSED_DIR=$AXIOM_HOME/endorsed

# LIB_DIR Location of the lib folder containing dependant jars (not overridable)
LIB_DIR=$AXIOM_INSTALL/lib

# ARGS Command line arguments to this script
ARGS="$@"
Expand All @@ -72,4 +54,5 @@ if [ $DEBUG ] ; then
echo "Command \c"
echo "java $JAVA_OPTIONS org.axiom.HostService $ARGS...\n"
fi
java $JAVA_OPTIONS org.axiom.HostService $ARGS
java $JAVA_OPTIONS org.axiom.HostService $ARGS -Daxiom.home="$AXIOM_HOME"

0 comments on commit 3e35092

Please sign in to comment.