Gump runs in a zone on a solaris machine called helios, with an address of
gump.zones.apache.org
See
http://www.apache.org/dev/solaris-zones.html for basic install information about helios. Besides Solaris and the companion CD we have SVN and Python in /opt. Our own locally built packages go into /export/opt, with sources for them in /export/src.
Create gump user and group and stuff
sudo groupadd gump
sudo useradd -s /usr/bin/bash -d /export/home/gump -g gump gump
sudo mkdir /export/home/gump
sudo chown gump:gump /export/home/gump
sudo useradd -s /usr/bin/bash -d /export/home/gump3 -g gump gump3
sudo mkdir /export/home/gump3
sudo chown gump3:gump /export/home/gump3
sudo nano /etc/auto_home
sudo echo 'general@gump.apache.org' > ~gump/.forward
sudo echo 'general@gump.apache.org' > ~gump3/.forward
sudo echo 'pmc@gump.apache.org' > ~root/.forward
Set up mysql
See
http://dev.mysql.com/doc/mysql/en/installing-binary.html. Mysql is in /usr/sfw. See /etc/sfw/mysql/README.solaris.mysql.
groupadd mysql useradd -g mysql mysql /usr/sfw/bin/mysql_install_db --user=mysql chgrp -R mysql /var/mysql chmod -R 770 installf SUNWmysqlr /var/mysql d 770 root mysql cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf /usr/sfw/sbin/mysqld_safe --user=mysql & ln /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql ln /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql ln /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql ln /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql ln /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql
Secure the root account (
http://dev.mysql.com/doc/mysql/en/default-privileges.html): shell> mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd'); mysql> SET PASSWORD FOR 'root'@'vmgump' = PASSWORD('newpwd');Create a gump database and user
mysql> create database gump_test; mysql> GRANT ALL PRIVILEGES ON gump_test.* to 'gump'@'localhost' identified by 'passwd'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec)
set up tables
cd /export/gump/test/gump/mysql mysql -u gump -p gump_test < gump.sql # enter password here...
Delete default user
mysql> DELETE FROM mysql.user WHERE Host='localhost' AND User=''; mysql> FLUSH PRIVILEGES;
Convenience prereqs
We manage most of these in /export/opt (add /export/opt/bin to path) with tarballs in /export/src:
mkdir /export/src mkdir /export/opt
nano editor
star replacement for "tar"
Other prereqs
We manage most of these in /export/opt with tarballs in /export/src:
mkdir /export/src mkdir /export/opt mkdir /export/opt/__versions__
Java SDK:
cd /export/opt/__versions__/ ln -s /usr/j2se j2sdk-1_4_2_06 bash-3.00# ls j2sdk-1_4_2_06 cd /export/opt ln -s __versions__/j2sdk-1_4_2_06 jdk1.4 cd /export/opt/__versions__/ ln -s /usr/jdk/instances/jdk1.5.0 j2sdk-1_5_0_01-b08 cd /export/opt ln -s __versions__/j2sdk-1_5_0_01-b08 }} * Python 2.4: {{{ cd /export/opt/__versions__/ ln -s /opt/python-2.4.1 cd /export/opt ln -s __versions__/python-2.4.1 python2.4 mkdir -p /export/opt/lib/python2.4/site-packages
Apache Maven:
Download
Maven to /export/opt/src (select .tar.gz format) cd /opt/__versions__
star zxf /opt/src/maven-xxx.tar.gz
create a symbolic link /opt/maven pointing to the installed version
Note: MAVEN_HOME will be exported and added to the PATH in step 5
rdflib
Download
Rdflib to /export/opt/src (select .tgz format) star zxf /opt/src/rdflib-xxx.tgz
cd rdflib-xxx
/export/opt/python2.4/bin/python setup.py install --prefix=/export/opt
Mysqldb
download and extract
Mysqldb apply this patch to setup.py:
--- setup.py Tue Feb 8 01:01:09 2005 +++ setup.py.new Sat Jun 11 13:46:31 2005 @@ -30,7 +30,7 @@ from distutils.core import setup from distutils.extension import Extension -mysqlclient = os.getenv('mysqlclient', 'mysqlclient_r') +mysqlclient = 'mysqlclient' mysqlstatic = eval(os.getenv('mysqlstatic', 'False')) embedded_server = (mysqlclient == 'mysqld') @@ -64,7 +64,7 @@ from os import popen return popen("mysql_config --%s" % what).read().strip().split() - include_dirs = [ i[2:] for i in config('include') ] + include_dirs = [ i[2:] for i in config('cflags') ] if mysqlclient == "mysqlclient": libs = config("libs") @@ -75,6 +75,21 @@ library_dirs = [ i[2:] for i in libs if i.startswith("-L") ] libraries = [ i[2:] for i in libs if i.startswith("-l") ] + # Work around quotes in the results from mysql_config + library_dirs = [ i.replace("'","") for i in library_dirs ] + libraries = [ i.replace("'","") for i in libraries ] + include_dirs = [ i.replace("'","") for i in include_dirs ] + library_dirs = [ i.replace('"',"") for i in library_dirs ] + libraries = [ i.replace('"',"") for i in libraries ] + include_dirs = [ i.replace('"',"") for i in include_dirs ] + # Workaround for a pre-4.1.9 bug if "z" not in libraries: libraries.append("z")
build and install:
-
/export/opt/python2.4/bin/python setup.py install --prefix=/export/opt
-
Optional prereqs
TODO: figure out which packages of the below on brutus is needed
lrwxrwxrwx 1 root root 35 Oct 6 2004 ant -> /opt/__versions__/apache-ant-1.6.2/ lrwxrwxrwx 1 root root 31 Jan 7 11:57 cocoon -> /opt/__versions__/cocoon-trunk/ lrwxrwxrwx 1 root root 32 Jan 7 11:57 forrest -> /opt/__versions__/forrest-trunk/ lrwxrwxrwx 1 root root 29 Jan 24 23:47 jdk1.3 -> /opt/__versions__/jdk1.3.1_14 lrwxrwxrwx 1 root root 27 Oct 6 2004 jdk1.5 -> /opt/__versions__/jdk1.5.0/ lrwxrwxrwx 1 root root 31 Oct 6 2004 jetty -> /opt/__versions__/jetty-4.2.21/ lrwxrwxrwx 1 root root 23 Oct 12 2004 kaffe -> /opt/__versions__/kaffe lrwxrwxrwx 1 root root 29 Oct 6 2004 loader -> /opt/__versions__/loader-1.0/ lrwxrwxrwx 1 root root 49 Oct 6 2004 mysql -> /opt/__versions__/mysql-connector-java-3.0.15-ga/ lrwxrwxrwx 1 root root 31 Oct 6 2004 rdflib -> /opt/__versions__/rdflib-2.0.3/ lrwxrwxrwx 1 root root 30 Oct 6 2004 servlet-api -> /opt/__versions__/servlet-2.4/ lrwxrwxrwx 1 root root 32 Oct 9 2004 webware -> /opt/__versions__/Webware-0.8.1/
Gump Setup
Set up /export/home/gump/[flavour]/..., the first flavour being test:
set CVSROOT per
Gump Getting Started mkdir -p /export/home/gump/test
cd /export/home/gump/test
svn checkout https://svn.apache.org/repos/asf/gump/trunk/ gump (note we're using the "trunk" branch for "test"!)
cd gump
create/edit ./metadata/vmgump.xml (to match `hostname`.xml and supplying the database password)
<workspace name="gumpzones-test" basedir="/export/home/gump/test/workspace" jardir="/export/home/gump/test/jars" pkgdir="/export/home/gump/test/packages" logdir="/export/home/gump/test/results" logurl="http://gump.zones.apache.org/gump/test" version="0.4"> <property name="build.sysclasspath" value="only"/> <sysproperty name="java.awt.headless" value="true"/> <profile href="profile/gump.xml"/> <database database="gump_test" user="gump" passwd="password" /> <!-- additional background threads, over main thread --> <threads updaters="5" builders="0" /> </workspace>sync over packages from vmgump.apache.org:/usr/local/gump/packages [shared, not under 'flavour'].
sync over vmgump.apache.org:~gump/.cvspass (saves typing in a whole bunch of 'public' cvs passwords)
TODO: sync over vmgump.apache.org:~gump/.maven
create/edit /export/home/gump/test/gump/cron/local-env-gump.zones.apache.org.sh:
export JAVA_HOME=/export/opt/jdk1.4 export CLASSPATH=$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH export PYTHON_HOME=/export/opt/python2.4 export PATH=$PYTHON_HOME/bin:$PATH export PYTHONPATH=/export/opt/lib/python2.4/site-packages:/export/home/gump/test/gump/python export LD_LIBRARY_PATH=/usr/sfw/lib/mysql:/usr/sfw/lib export MAVEN_HOME=/export/opt/maven export PATH=$MAVEN_HOME/bin:$PATH
create/edit /home/gump/.bash_profile:
export PATH=/export/opt/bin:/usr/bin:/usr/sfw/bin:/usr/sfw/sbin:/opt/sfw/bin:/opt/sfw/sbin:/opt/SUNWspro/bin:/usr/X/bin:/usr/ucb:/usr/sbin:/usr/ccs/bin:/opt/subversion-1.1.4/bin export TERM=xterm alias tar=star umask 002 . /export/home/gump/test/gump/cron/local-env-gump.zones.apache.org.sh
set up cron for user "gump":
#DISABLED JDK 1.5 - This Gump runs on JDK 1.5 #0 6 * * * cd /export/home/gump/test/gump/cron; /usr/bin/env bash gump.sh all #Test - This Gump runs on JDK 1.4 but uses the latest-and-greatest gump code out of 'trunk' 0 12 * * * cd /export/home/gump/test/gump/cron; /usr/bin/env bash gump.sh all # Clean up older artifacts 0 0 * * * /usr/bin/find /export/home/gump/*/jars -type f -ctime +6 | /usr/bin/xargs -r /bin/rm #Clean up after POI... 0 0 * * * /bin/rm -f /tmp/*.xls
set up apache as detailed at
http://www.apache.org/dev/solaris-zones.html configure /etc/apache2/httpd.conf somewhat like this:
ServerAdmin pmc@gump.apache.org ServerName gump.zones.apache.org DocumentRoot /var/www/gump.zones.apache.org <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/gump.zones.apache.org> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> Alias /gump/test/ /export/home/gump/test/results/ Alias /gump/test-jars/ /export/home/gump/test/jars/ <Directory /export/home/gump/> HeaderName /disclaimer.html Options Indexes MultiViews FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Location /gump/test/workspace_defn.html> Order deny,allow Deny from all </Location>mkdir -p /var/www/gump.zones.apache.org && chown gump:gump /var/www/gump.zones.apache.org
/usr/apache2/bin/apachectl -k start
Basic testing
cd /export/home/gump/test/gump python bin/check.py -w metadata/gump.zones.apache.org.xml all --debug