How to install a BOINC server to test SpeQuloS INRIA - EDGI JRA2 System used : Debian 6.0 "Squeeze" Prepare the system: export BOINC_ADM=boincadm export DB_NAME=boinc_stp_db export DB_USER=$BOINC_ADM export DB_PASS=edgi export WWW_HOST=http://boinc-server.org export PROJECT_NAME=boinc-stp export PROJECT_DIR=/opt/$PROJECT_NAME export SPEQULOS_PLUGIN_DIR=~/spequlos/DG-plugins/BOINC apt-get update apt-get install subversion build-essential apache2 php5 mysql-server php5-gd php5-cli php5-mysql python-mysqldb libtool automake autoconf pkg-config libmysql++-dev libssl-dev addgroup --system $BOINC_ADM adduser www-data $BOINC_ADM Download the BOINC server svn co http://boinc.berkeley.edu/svn/branches/server_stable boinc Apply the SpeQuloS patches cd boinc/ cp $SPEQULOS_PLUGIN_DIR/src/create_work.cpp tools/ #above not essential, but useful for testing with script "create_test_work.pl -assign" cp $SPEQULOS_PLUGIN_DIR/src/sched_assign.cpp sched/ cp $SPEQULOS_PLUGIN_DIR/src/sched_config.cpp sched/ cp $SPEQULOS_PLUGIN_DIR/src/sched_config.h sched/ cp $SPEQULOS_PLUGIN_DIR/src/boinc_db.h db/ Increase max assignment table size as needed: - Increase MAX_ASSISGNMENTS in sched/sched_shmem.h - Set the corresponding variable MAX_TO_ASSIGN in the script $SPEQULOS_PLUGIN_DIR/assign_batch_to_cloud.php to the same value. Build the BOINC server ./_autosetup ./configure --disable-client make Prepare the database mysql -u root -p mysql -e "DROP DATABASE IF EXISTS $DB_NAME; \ CREATE DATABASE IF NOT EXISTS $DB_NAME; \ GRANT ALL PRIVILEGES ON $DB_NAME.* TO $DB_USER@'localhost' IDENTIFIED BY '$DB_PASS';" Create a project cd tools/ ./make_project --url_base "$WWW_HOST" --db_name "$DB_NAME" --db_user $DB_USER --db_passwd "$DB_PASS" --drop_db_first --delete_prev_inst --project_root $PROJECT_DIR --test_app "$PROJECT_NAME" Configure the project cd $PROJECT_DIR chown root:$BOINC_ADM -R . chmod g+w -R . chmod 02770 -R upload html/cache html/inc html/languages html/languages/compiled html/user_profile chmod o+x html/inc chmod -R o+r html/inc chmod o+x html/languages/ chmod o+x html/languages/compiled crontab -e #Add: 0-59/5 * * * * /PATH/TO/PROJECT/DIR/bin/start --cron cp $PROJECT_NAME.httpd.conf /etc/apache2/sites-available/ #vim html/project/project.inc a2ensite $PROJECT_NAME.httpd.conf /etc/init.d/apache2 reload Set the administrator password for the web access: htpasswd -c html/ops/.htpasswd $BOINC_ADM Preconfigure a client that will be used by the SpeQuloS Cloudworkers - Edit $SPEQULOS_PLUGIN_DIR/create_cloud_id.sql and change the first "1" to the cloud user id to use. - Create the client in the database: mysql -u $DB_USER --password="$DB_PASS" $DB_NAME < $SPEQULOS_PLUGIN_DIR/create_cloud_id.sql Add the cloud_user_id to config.xml in the section: ... 1 ... Specify the base project_dir in config.xml, in the section: ... /PATH/TO/PROJECT/DIR ... Enable assignment to SpeQuloS Cloudworkers, by adding the following to config.xml, in the section: ... ... Enable exporting of BOINC statistics (used to export credits information), by adding to config.xml, in the section: db_dump -d 2 -dump_spec ../db_dump_spec.xml db_dump.out 24 hours Create the initial statistics files: bin/db_dump -d 2 -dump_spec ../db_dump_spec.xml Install the SpeQuloS BOINC plugins: cp $SPEQULOS_PLUGIN_DIR/*.php html/ops/ Install the example application bin/xadd bin/update_versions To disable automatic creation of workunit for the example application, comment enclose by the following lines in config.xml: Start the server bin/start To configure the properties of the workunit for the example application, edit the file templates/uc_wu, i.e.: 0 0 in 1e8 -cpu_time 10 You can submit some workunits by using (from within the project directory): $SPEQULOS_PLUGIN_DIR/test/create_test_work.pl You must before edit the CLOUD_USER_ID variable in this file according to your project parameters.