Changes between Version 33 and Version 34 of VboxApps


Ignore:
Timestamp:
Feb 17, 2012, 9:04:15 AM (13 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VboxApps

    v33 v34  
    138138  '''vbox_port_forward.xml''' in the slot directory.
    139139
    140 == Requirements of the VM ==
     140== Creating jobs for VM apps ==
     141
     142The input and output files of a VM app must
     143
     144 * Have logical names starting with '''shared/'''.
     145 * Have the '''copy_file''' attribute.
     146
     147This causes the BOINC client to copy them to and from the '''slot/x/shared/''' directory.
     148
     149== Premade vboxwrapper executables ==
     150
     151Windows:
     152
     153x86: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_windows_intelx86.zip vboxwrapper_24259_windows_intelx86.zip]
     154
     155x64: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_windows_x86_64.zip vboxwrapper_24259_windows_x86_64.zip]
     156
     157Mac OS X:
     158
     159Linux:
     160
     161x86: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_i686-pc-linux-gnu.zip vboxwrapper_24259_i686-pc-linux-gnu.zip]
     162
     163x64: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_x86_64-pc-linux-gnu.zip vboxwrapper_24259_x86_64-pc-linux-gnu.zip]
     164
     165== Premade Linux VM Images ==
     166
     167These VM images were built using the above instructions for creating VM images.
     168They contain Debian 4.0, without GCC or any build tools installed.
     169They contain the example startup script.
     170
     171x86: [http://boinc.berkeley.edu/dl/vmimage_debian40_x86.zip vmimage_debian40_x86.zip]
     172
     173x64: [http://boinc.berkeley.edu/dl/vmimage_debian40_x64.zip vmimage_debian40_x64.zip]
     174
     175In most cases, you can use these VM images with no modifications.
     176If your application uses libraries not on the VM images,
     177you can add them as follows:
     178
     179 * Run !VirtualBox, and open the VM image
     180 * Hit CTRL-C when see "BOINC VM starting" in the console window
     181 * Install whatever you want (can use '''apt-get install''' to
     182   install Debian packages).
     183 * when you're done, type
     184{{{
     185shutdown -hP 0
     186}}}
     187
     188The VM image now has the additional libraries.
     189Rename it to avoid confusion with the original version.
     190
     191== Creating your own VM images ==
     192=== Requirements of the VM ===
    141193
    142194The VM, when booted, must do the following:
     
    168220You can use the a single VM image for many applications.
    169221
    170 == Creating jobs for VM apps ==
    171 
    172 The input and output files of a VM app must
    173 
    174  * Have logical names starting with '''shared/'''.
    175  * Have the '''copy_file''' attribute.
    176 
    177 This causes the BOINC client to copy them to and from the '''slot/x/shared/''' directory.
    178 
    179 == How it works: example ==
     222
     223
     224=== Example startup script ===
     225
     226The example startup script follows.
     227You can deploy it by appending to '''/root/.bashrc''' in the VM image.
     228{{{
     229echo --- BOINC VM starting
     230sleep 5
     231}}}
     232
     233The "sleep 5" gives you time to break into a console session via CTRL-C
     234if you need to make changes to the VM in the future.
     235
     236{{{
     237echo --- Mounting shared directory
     238mount -t vboxsf shared /root/shared
     239if [ $? -ne 0 ]; then
     240    echo --- Failed to mount shared directory
     241    sleep 5
     242    shutdown -hP 0
     243fi
     244
     245echo -- Launching boinc_app
     246if [ -f /root/shared/boinc_app ]; then
     247    cd /root/shared
     248    ./boinc_app
     249    shutdown -hP 0
     250else
     251    echo --- Failed to launch script
     252    sleep 5
     253fi
     254shutdown -hP 0
     255}}}
     256
     257=== How it works ===
    180258
    181259Using the example startup script, the steps in running a vboxwrapper app are:
     
    199277  * copy output files from slot/0/shared to project directory
    200278
    201 == Example startup script ==
    202 
    203 The example startup script follows.
    204 You can deploy it by appending to '''/root/.bashrc''' in the VM image.
    205 {{{
    206 echo --- BOINC VM starting
    207 sleep 5
    208 }}}
    209 
    210 The "sleep 5" gives you time to break into a console session via CTRL-C
    211 if you need to make changes to the VM in the future.
    212 
    213 {{{
    214 echo --- Mounting shared directory
    215 mount -t vboxsf shared /root/shared
    216 if [ $? -ne 0 ]; then
    217     echo --- Failed to mount shared directory
    218     sleep 5
    219     shutdown -hP 0
    220 fi
    221 
    222 echo -- Launching boinc_app
    223 if [ -f /root/shared/boinc_app ]; then
    224     cd /root/shared
    225     ./boinc_app
    226     shutdown -hP 0
    227 else
    228     echo --- Failed to launch script
    229     sleep 5
    230 fi
    231 shutdown -hP 0
    232 }}}
    233 
    234 == Creating VM images ==
     279=== Creating base VM images ===
    235280
    236281The VM image that you distribute need contain only the
     
    254299If you use these VM images, you can skip the rest of this section.'''
    255300
    256 === Role Selection ===
     301==== Role Selection ====
    257302
    258303During install you'll be asked what role should this Linux machine be configured for.
    259304Make sure all roles are unselected before continuing.
    260305
    261 === Updating Grub ===
     306==== Updating Grub ====
    262307
    263308If you want to speed up the boot process,
     
    272317}}}
    273318
    274 === Updating Inittab ===
     319==== Updating Inittab ====
    275320
    276321To configure Linux for automatic login you'll need to install
     
    294339}}}
    295340
    296 == Premade vboxwrapper executables ==
    297 
    298 Windows:
    299 
    300 x86: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_windows_intelx86.zip vboxwrapper_24259_windows_intelx86.zip]
    301 
    302 x64: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_windows_x86_64.zip vboxwrapper_24259_windows_x86_64.zip]
    303 
    304 Mac OS X:
    305 
    306 Linux:
    307 
    308 x86: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_i686-pc-linux-gnu.zip vboxwrapper_24259_i686-pc-linux-gnu.zip]
    309 
    310 x64: [http://boinc.berkeley.edu/dl/vboxwrapper_24259_x86_64-pc-linux-gnu.zip vboxwrapper_24259_x86_64-pc-linux-gnu.zip]
    311 
    312 == Premade Linux VM Images ==
    313 
    314 These VM images were built using the above instructions for creating VM images.
    315 They contain Debian 4.0, without GCC or any build tools installed.
    316 They contain the example startup script.
    317 
    318 x86: [http://boinc.berkeley.edu/dl/vmimage_debian40_x86.zip vmimage_debian40_x86.zip]
    319 
    320 x64: [http://boinc.berkeley.edu/dl/vmimage_debian40_x64.zip vmimage_debian40_x64.zip]
    321 
    322 In most cases, you can use these VM images with no modifications.
    323 If your application uses libraries not on the VM images,
    324 you can add them as follows:
    325 
    326  * Run !VirtualBox, and open the VM image
    327  * Hit CTRL-C when see "BOINC VM starting" in the console window
    328  * Install whatever you want (can use '''apt-get install''' to
    329    install Debian packages).
    330  * when you're done, type
    331 {{{
    332 shutdown -hP 0
    333 }}}
    334 
    335 The VM image now has the additional libraries.
    336 Rename it to avoid confusion with the original version.