[Debian Wiki] Update of "BOINC/ServerGuide/AppDeployment" by SteffenMoeller

Debian Wiki debian-www at lists.debian.org
Tue Jan 1 17:25:40 UTC 2013


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.

The "BOINC/ServerGuide/AppDeployment" page has been changed by SteffenMoeller:
http://wiki.debian.org/BOINC/ServerGuide/AppDeployment?action=diff&rev1=36&rev2=37

Comment:
Updated addition of applications to boinc server

  boincplat=$(arch)-pc-linux-gnu # adjust to your architecture, maybe i686-pc-linux-gnu
  echo "I: Application version: $appver"
  echo "I: BOINC platform: $boincplat"
+ if test -z "$appdir" -o -z "$appver" -o -z $boincplat"; then
+    echo "E: Lost onee of the variables appdir, appver or boincplat - please check and try again"
+ else
+    completepath=$appdir/$appver/$boincplat
+    sudo mkdir -p $completepath
- sudo cp $(dpkg -L boinc-app-examples | grep upper_case) $appdir/upper_case_${appver}_${boincplat}
+    sudo cp $(dpkg -L boinc-app-examples | grep upper_case) $completepath/upper_case_${appver}_${boincplat}
+ fi
  }}}
- Upstream lists official BOINC architectures [[http://boinc.berkeley.edu/trac/wiki/BoincPlatforms|here]].
+ Upstream lists official BOINC architectures [[http://boinc.berkeley.edu/trac/wiki/BoincPlatforms|here]]. The hierarchy of directories looks like an overkill at a first sight. But over time, BOINC projects have become increasingly complex and more often than not, one wants to add more than a single binary. And that team of binaries and data files may have version dependencies among themselves.
  
- Please keep the version formatted that simple - or change the BOINC source code.
+ The official description of that format is on the BOINC wiki for [[http://boinc.berkeley.edu/trac/wiki/AppVersionNew|AppVersionNew]] - just slighty hidden.
  
- === Optional: Use the Debian-provided script to install binaries for multiple platforms ===
+ == Optional and outdated: Use the Debian-provided script to install binaries for multiple platforms ==
+ 
+ ''Some volunteer please bring the script up to speed for the new hieararchical directory structure as explained above. Until that is done, please bear with us and prepare those platform directories manually.''
  
  When applications do not have dependencies on non-standard dynamically loaded libraries (test with the tool 'ldd'), then one can use the regular binary from Debian. This should then be functional also for non-Debian/Ubuntu platforms. The boinc-server-maker package provides a shell script that downloads the Debian packages of a given name (the default is the boinc-app-examples package) and unpacks, organizes and signs the binaries readily to be redistributed by the BOINC server.  
  
@@ -125, +133 @@

  
  == Craft the project's project.xml file ==
  
+ The project.xml file informs the BOINC server about what this project is all about, i.e. what platforms we are supporting with what tools (''apps''). You can copy and paste the following BASH shell lines to your local console. It will create the file ''project.xml'' in the project's root directory or bail out if something goes the unexpected way.
- The project.xml file informs the BOINC server about what this
- project is all about, i.e. what platforms we are supporting
- with what tools (''apps''). You can copy and paste the following
- BASH shell lines to your local console. It will create
- the file ''project.xml'' in the project's root directory or
- bail out if something goes the unexpected way.
  
  {{{
  [ -z "$installroot" -o -z "$fileprojectname" ] || . ~/.boinc_test.conf
@@ -145, +148 @@

   </app>
   <platform>
    <name>i686-pc-linux-gnu</name>
-   <user_friendly_name>Linux/x86</user_friendly_name>
+   <user_friendly_name>Linux/x86 32bit</user_friendly_name>
   </platform>
   <platform>
    <name>x86_64-pc-linux-gnu</name>
-   <user_friendly_name>Linux/amd64</user_friendly_name>
+   <user_friendly_name>Linux/amd64 64bit</user_friendly_name>
   </platform>
  </boinc>
  EOPROJECTXML
@@ -157, +160 @@

  fi
  }}}
  
- Please look into standard platform names BOINC follows [[http://boinc.berkeley.edu/trac/wiki/BoincPlatforms|here]] to remove future confusion. 
+ This file feed the xadd tool, which in turn feeds the project's MySQL database. The entries say that those applications should be prepared for to be eventually found. Thus, it is OK if only one of the 32 and 64 bit platforms are covered.  Please look into standard platform names BOINC follows [[http://boinc.berkeley.edu/trac/wiki/BoincPlatforms|here]] to avoid confusion.
+ 
- Change to the '''$projectroot''' {{{
+ Now let us invoke xadd. Change to the '''$projectroot''' {{{
  cd "$installroot"/"$fileprojectname"
  }}}
  and run initiate the addition of the binary found in the directory structure to the local database {{{
@@ -166, +170 @@

  }}}
  
  The local screen output will be similar to {{{
+ $ sudo bin/xadd
- Processing <Platform#None i686-pc-linux-gnu> ...
-   Committed <Platform#3 i686-pc-linux-gnu> ; values:
- {'_dirty': False,
-  '_lazy_lookups': {},
-  'create_time': 1308988632L,
-  'deprecated': 0,
-  'id': 3L,
-  'name': 'i686-pc-linux-gnu',
-  'user_friendly_name': 'Linux running on an Intel x86-compatible CPU'}
- 
  Processing <App#None upper_case> ...
- /var/tmp/boinc/boinctest/py/Boinc/db_base.py:63: Warning: Field 'host_scale_check' doesn't have a default value
-   cursor.execute(command)
-   Committed <App#11 upper_case> ; values:
+   Committed <App#1 upper_case> ; values:
  {'_dirty': False,
   '_lazy_lookups': {},
   'beta': 0,
-  'create_time': 1309737828L,
+  'create_time': 1357056725L,
   'deprecated': 0,
+  'homogeneous_app_version': 0,
   'homogeneous_redundancy': 0,
   'host_scale_check': 0,
-  'id': 11L,
+  'id': 1L,
+  'locality_scheduling': 0L,
   'min_avg_pfc': 1.0,
   'min_version': 0L,
   'name': 'upper_case',
+  'non_cpu_intensive': 0,
   'target_nresults': 0,
   'user_friendly_name': 'upperCASE',
   'weight': 1.0}
+ Processing <Platform#None i686-pc-linux-gnu> ...
+   Committed <Platform#1 i686-pc-linux-gnu> ; values:
+ {'_dirty': False,
+  '_lazy_lookups': {},
+  'create_time': 1357056725L,
+  'deprecated': 0,
+  'id': 1L,
+  'name': 'i686-pc-linux-gnu',
+  'user_friendly_name': 'Linux/x86 32bit'}
+ Processing <Platform#None x86_64-pc-linux-gnu> ...
+   Committed <Platform#2 x86_64-pc-linux-gnu> ; values:
+ {'_dirty': False,
+  '_lazy_lookups': {},
+  'create_time': 1357056725L,
+  'deprecated': 0,
+  'id': 2L,
+  'name': 'x86_64-pc-linux-gnu',
+  'user_friendly_name': 'Linux/amd64 64bit'}
  }}}
- This is the output of xadd parsing a single platform specification and a single application, the actual output is much longer due the increased number of platforms. Also it should be noted that currently xadd has no provision to delete from databases, it always appends the entries to databse, if you want to remove/change existing entries, you should do it manually.
+ 
+ This is the output of xadd parsing two platform specifications and a single application. More platforms with more applications make longer outputs. Also it should be noted that currently xadd has no provision to delete from databases. It always appends the entries to database, if you want to remove/change existing entries, you should do it manually. Please indicate any better solution or send us emails.
  
  And when executing that line again, nothing happens since everything here is already inside database, : {{{
  # bin/xadd 
@@ -207, +222 @@

  
  == Sign the application binary ==
  
- BOINC need to sign the application binaries before dispatch for security reasons.
+ BOINC signs the application binaries for security reasons. This way, the volunteer's client may rest somewhat assured that the application's binary was not modified by someone with evil intentions, say, on the way from the project's server to the local machine.
  
  {{{
  privateKeyfile="./keys/code_sign_private"
@@ -216, +231 @@

  elif [ ! -r "$privateKeyfile" ]; then
     echo 'Have your private key ready as created during setup, expected at $privateKeyfile .'
  else 
-    sudo ./bin/sign_executable apps/upper_case/upper_case_${appver}_${boincplat} "$privateKeyfile" | sudo tee apps/upper_case/upper_case_${appver}_${boincplat}.sig
+    sudo ./bin/sign_executable apps/upper_case/upper_case_${appver}_${boincplat} "$privateKeyfile" > apps/upper_case/upper_case_${appver}_${boincplat}.sig
  fi
  }}}
  
  Update the boinc database,
  {{{
- ./bin/update_versions
+ sudo ./bin/update_versions
  }}}
  
  and prompt yes when asked for confirmation.
  
  Sample output:
  {{{
- Toshiba:/var/tmp/boinc/boinctest# ./bin/update_versions 
-   Found <App#11 upper_case> version 612 for <Platform#2 x86_64-pc-linux-gnu>: upper_case_6.12_x86_64-pc-linux-gnu
- Using signature file /var/tmp/boinc/boinctest/apps/upper_case/upper_case_6.12_x86_64-pc-linux-gnu.sig
+ moeller at twin1a:/var/tmp/boinc-server-test/boinctest $ sudo ./bin/update_versions
+ 
+ Found application version: upper_case 7.042 x86_64-pc-linux-gnu
+ PHP Warning:  Creating default object from empty value in /var/tmp/boinc-server-test/boinctest/bin/update_versions on line 410
+ PHP Warning:  Creating default object from empty value in /var/tmp/boinc-server-test/boinctest/bin/update_versions on line 230
- Copying upper_case_6.12_x86_64-pc-linux-gnu to /var/tmp/boinc/boinctest/download/upper_case_6.12_x86_64-pc-linux-gnu
+ cp apps/upper_case/7.042/x86_64-pc-linux-gnu/upper_case_7.42_x86_64-pc-linux-gnu /var/tmp/boinc-server-test/boinctest/download/upper_case_7.42_x86_64-pc-linux-gnu
+     Files:
+         upper_case_7.42_x86_64-pc-linux-gnu (main program)
+     Do you want to add this application version (y/n)? y
+     Application version added successfully; ID=1
- Ready to commit 1 items:
-     <AppVersion#None upper_case 612 x86_64-pc-linux-gnu>
- Continue [Y/n]  y
- Committed:
-     <AppVersion#1 upper_case 612 x86_64-pc-linux-gnu>
- Touched trigger file to make feeder re-read app_version table from database
- Done
- }}}
  
+ }}}
+ 
- It should be noted that the app directory is just a staging area for the script to parse the structure and put the binaries to respective places. After this, the app directory can be removed safely.
+ It should be noted that the app directory is just a staging area for the script to parse the structure and put the binaries to respective places, i.e. the "download" directory. After this, the app directory can be removed safely.
  
  == Inspection of the database (optional) ==
  
@@ -264, +279 @@

  
  = References =
   * [[http://boinc.berkeley.edu/trac/wiki/XaddTool|xadd]] BOINC Wiki entry
+  * [[http://boinc.berkeley.edu/trac/wiki/AppVersionNew|new app version hierarchy]] BOINC Wiki entry
  
  -----
  Back to [[BOINC/ServerGuide]]



More information about the pkg-boinc-commits mailing list