How to install a BOINC server to test SpeQuloS INRIA - EDGI JRA2 System used : Debian 6.0 "Squeeze" New BOINC system ================ To start installing a new BOINC system from scratch, you can do the following: 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 cd boinc Ensure that sched/target_batch.cpp exists, as this is the component that SpeQuloS uses. Increase max assignment table size as needed: - Increase MAX_ASSIGNMENTS in sched/sched_shmem.h - Set the corresponding variable MAX_TO_ASSIGN in the file sched/target_batch.cpp to the same value. Set dedicated (cloud) user id in sched/target_batch.cpp via the DEDICATED_USER_ID constant. 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 chosen DEDICATED_USER_ID. - Create the client in the database: mysql -u $DB_USER --password="$DB_PASS" $DB_NAME < $SPEQULOS_PLUGIN_DIR/create_cloud_id.sql Specify the base project_dir in config.xml, in the section: ... /PATH/TO/PROJECT/DIR ... Install the SpeQuloS BOINC plugins: cp $SPEQULOS_PLUGIN_DIR/*.php html/ops/ 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 target_batch from the compiled source dir to your project cgi-bin: cp $BOINC_SRC/sched/target_batch $PROJECT_DIR/cgi-bin/ An input parameter of the form batch=[id] can be passed to target_batch via url or commmand line. See more details in target_batch.cpp. Depending on your web server settings, you may have to inform your web server to allow target_batch be called externally as a cgi script. 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 Beforehand, you must edit the DEDICATED_USER_ID variable in this file according to your project parameters. Then, for example, to create a batch of low-priority tasks with the BOINC default example_app, run: ./create_test_work.pl -appname example_app -numwu 10 -batch 0 -label "lowpri" -db $DB_NAMEs -password $PASSWORD -wu "templates/example_app_in.xml" -result "templates/example_app_out.xml" Existing BOINC system ===================== If you have an existing system, you can simple update your BOINC source from svn to revision: 25582 or later. You will get a file sched/target_batch.cpp, which is used by SpeQuloS to target a batch of uncompleted wus to dedicated hosts. See the documentation above to : - increase the assignment table - configure the DEDICATED_USER_ID - enable the assignment feature in your project configuration file - copy the target_batch file to cgi-bin directory. Then, you can upgrade your project via: cd $BOINC_SRC/source/tools ./upgrade $PROJECT_NAME