From 14c2062f38451719d91643261bc64caea6cc758a Mon Sep 17 00:00:00 2001 From: Stefan Janssen Date: Fri, 4 Aug 2017 16:14:46 -0700 Subject: [PATCH 1/3] creating grid in Travis --- .travis.yml | 5 +++++ travis/host_template | 9 ++++++++ travis/install_sge.sh | 29 +++++++++++++++++++++++++ travis/queue_template | 50 +++++++++++++++++++++++++++++++++++++++++++ travis/smp_template | 11 ++++++++++ travis/user_template | 5 +++++ 6 files changed, 109 insertions(+) create mode 100644 travis/host_template create mode 100644 travis/install_sge.sh create mode 100644 travis/queue_template create mode 100644 travis/smp_template create mode 100644 travis/user_template diff --git a/.travis.yml b/.travis.yml index 1a76079..52aa8e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,11 @@ before_install: - conda update -q conda # Useful for debugging any issues with conda - conda info -a + # install a grid system in Travis + - travis/install_sge.sh + - export SGE_ROOT=/var/lib/gridengine + - export SGE_CELL=default + - export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0 install: # - conda create -n qiime_env python=2.7 qiime matplotlib=1.4.3 mock nose -c bioconda - conda create -n test_env python=$PYVERSION --file ci/conda_requirements.txt diff --git a/travis/host_template b/travis/host_template new file mode 100644 index 0000000..ef94a43 --- /dev/null +++ b/travis/host_template @@ -0,0 +1,9 @@ +hostname localhost +load_scaling NONE +complex_values NONE +user_lists arusers +xuser_lists NONE +projects NONE +xprojects NONE +usage_scaling NONE +report_variables NONE \ No newline at end of file diff --git a/travis/install_sge.sh b/travis/install_sge.sh new file mode 100644 index 0000000..d308bb6 --- /dev/null +++ b/travis/install_sge.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# This script installs and configures a Sun Grid Engine installation for use +# on a Travis instance. +# +# Written by Dan Blanchard (dblanchard@ets.org), September 2013 + +cd travis +sudo sed -i -r "s/^(127.0.0.1\s)(localhost\.localdomain\slocalhost)/\1localhost localhost.localdomain $(hostname) /" /etc/hosts +sudo apt-get update -qq +echo "gridengine-master shared/gridenginemaster string localhost" | sudo debconf-set-selections +echo "gridengine-master shared/gridenginecell string default" | sudo debconf-set-selections +echo "gridengine-master shared/gridengineconfig boolean true" | sudo debconf-set-selections +sudo apt-get install gridengine-common gridengine-master +# Do this in a separate step to give master time to start +sudo apt-get install libdrmaa1.0 gridengine-client gridengine-exec +export CORES=$(grep -c '^processor' /proc/cpuinfo) +sed -i -r "s/template/$USER/" user_template +sudo qconf -Auser user_template +sudo qconf -au $USER arusers +sudo qconf -as localhost +export LOCALHOST_IN_SEL=$(qconf -sel | grep -c 'localhost') +if [ $LOCALHOST_IN_SEL != "1" ]; then sudo qconf -Ae host_template; else sudo qconf -Me host_template; fi +sed -i -r "s/UNDEFINED/$CORES/" queue_template +sudo qconf -Ap smp_template +sudo qconf -Aq queue_template +echo "Printing queue info to verify that things are working correctly." +qstat -f -q all.q -explain a +echo "You should see sge_execd and sge_qmaster running below:" +ps aux | grep "sge" diff --git a/travis/queue_template b/travis/queue_template new file mode 100644 index 0000000..7ca5fe8 --- /dev/null +++ b/travis/queue_template @@ -0,0 +1,50 @@ +qname all.q +hostlist localhost +seq_no 0 +load_thresholds np_load_avg=1.75 +suspend_thresholds NONE +nsuspend 1 +suspend_interval 00:05:00 +priority 0 +min_cpu_interval 00:05:00 +processors UNDEFINED +qtype BATCH INTERACTIVE +ckpt_list NONE +pe_list make smp +rerun FALSE +slots UNDEFINED +tmpdir /tmp +shell /bin/bash +prolog NONE +epilog NONE +shell_start_mode posix_compliant +starter_method NONE +suspend_method NONE +resume_method NONE +terminate_method NONE +notify 00:00:60 +owner_list NONE +user_lists arusers +xuser_lists NONE +subordinate_list NONE +complex_values NONE +projects NONE +xprojects NONE +calendar NONE +initial_state default +s_rt INFINITY +h_rt INFINITY +s_cpu INFINITY +h_cpu INFINITY +s_fsize INFINITY +h_fsize INFINITY +s_data INFINITY +h_data INFINITY +s_stack INFINITY +h_stack INFINITY +s_core INFINITY +h_core INFINITY +s_rss INFINITY +h_rss INFINITY +s_vmem INFINITY +h_vmem INFINITY \ No newline at end of file diff --git a/travis/smp_template b/travis/smp_template new file mode 100644 index 0000000..204b700 --- /dev/null +++ b/travis/smp_template @@ -0,0 +1,11 @@ +pe_name smp +slots 999 +user_lists NONE +xuser_lists NONE +start_proc_args /bin/true +stop_proc_args /bin/true +allocation_rule $pe_slots +control_slaves FALSE +job_is_first_task TRUE +urgency_slots min +accounting_summary FALSE diff --git a/travis/user_template b/travis/user_template new file mode 100644 index 0000000..6618ec2 --- /dev/null +++ b/travis/user_template @@ -0,0 +1,5 @@ +name template +oticket 0 +fshare 0 +delete_time 0 +default_project NONE \ No newline at end of file From 5a474c21a1acada5662fbe86f1387cedd64bda75 Mon Sep 17 00:00:00 2001 From: Stefan Janssen Date: Fri, 4 Aug 2017 16:18:11 -0700 Subject: [PATCH 2/3] changed permissions --- travis/install_sge.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 travis/install_sge.sh diff --git a/travis/install_sge.sh b/travis/install_sge.sh old mode 100644 new mode 100755 From fdd7c9bee879219679c482ad647ed0d7a083ff1b Mon Sep 17 00:00:00 2001 From: Stefan Janssen Date: Fri, 4 Aug 2017 16:23:35 -0700 Subject: [PATCH 3/3] I require sudo to setup SGE --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 52aa8e5..73d19fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ # Check on http://lint.travis-ci.org/ after modifying it! -sudo: false +sudo: required language: c os: - linux