Creating custom installers

From BOINC
(Redirected from Deploying BOINC on networks)
Jump to: navigation, search

You can customize the BOINC installer in various ways, such as:

Such custom installers are useful for:

  • Mass-deploying the BOINC client on a network of computers;
  • Creating a "branded" installer for a particular project or account manager.

Windows

The BOINC installer uses the Microsoft MSI technology framework. If you are already familiar with using MSI you can skip ahead to Appendix A which contains the relevant parameters used to customize BOINC installs. Appendix B contains examples of launching the installer from the command line and customizing the installer properties.

BOINC supports the administrative install functionality which allows you to unpack the installer package and customize it based on your preferences.

boinc_6.2.14_windows_intelx86.exe /a

You’ll want to choose a path that all computers you are going to deploy to have access too. An example would be:

\\server\appdist\BOINC6214

From here on out we’ll refer to this path as BOINCROOT.

You will want to copy the account_*.xml file for the projects you would like the client software to attach to when started to ‘BOINCROOT\program files\BOINC’.

These are the steps to customize the BOINC client install:

  • Make a backup copy of the original BOINC.msi file.
  • Install Orca.msi. (Note: This file comes with the Microsoft Platform SDK.)
  • Run Orca from the Start menu.
  • Open the backup copy from File->Open... with the Orca tool.
  • Click on the File table.
  • For each account_*.xml you’ll want to make a copy of the boinc.exe row and replace the copied boinc.exe with the name of the account_*.xml file.
  • Click on the Properties table.
  • Modify the INSTALLDIR and DATADIR properties to point to the program directory and data directory.
  • Save the new .msi file.
  • Run the executable MsiTran.exe. (It comes with the Microsoft Platform SDK.)
MsiTran.exe -g "%BOINCROOT%\originalboinc.msi" "%BOINCROOT%\backupboinc.msi" "%BOINCROOT%\boinctransform.mst"

Now you can apply the transform on the command line as follow:

msiexec /i "%BOINCROOT%\boinc.msi" TRANSFORMS="%BOINCROOT%\boinctransform.mst" 

Or it can be applied through the modification tab in the Group Policy using Active Directory.

Installer properties

Version 7.x Properties:

Property Description
ENABLESTARTMENUITEMS Decide whether or not to create the start menu shortcuts. Default: 1. List-add.pngNew in 7.0.45
ENABLEPROTECTEDAPPLICATIONEXECUTION3 Whether to enable application sandboxing for improved security. This option has to be enabled for mass deployments. Default: 0. List-add.pngNew in 7.0.20

Version 6.x Properties:

Property Description
INSTALLDIR The directory to install BOINC too. Example: 'C:\Program Files\BOINC'
DATADIR The directory where the data files should be stored. Example: C:\Documents and Settings\All Users\Application Data\BOINC
ENABLEPROTECTEDAPPLICATIONEXECUTION Whether to enable application sandboxing for improved security. This option has to be enabled for mass deployments. Default: 1. Used with BOINC 6.0 to 6.2.
ENABLEPROTECTEDAPPLICATIONEXECUTION2 Whether to enable application sandboxing for improved security. This option has to be enabled for mass deployments. Default: 0. Used with BOINC 6.4 and above.
ENABLESCREENSAVER Whether to enable the screensaver by default. This option has no effect when enabled for mass deployments. Default: 1
ENABLEUSEBYALLUSERS Whether all the users on the system can manage the BOINC client. Default: 1
BOINC_ADMINS_GROUPNAME The group name to use for managing the BOINC client. Can be a domain group. Default: .\boinc_admins
BOINC_PROJECTS_GROUPNAME The group name to use for using the BOINC client. Can be a domain group. Default: .\boinc_projects
BOINC_USERS_GROUPNAME The group name to use for the BOINC projects to use. Can be a domain group. Default: .\boinc_users
BOINC_MASTER_USERNAME The username to use when executing the client software. Can be a domain account. Default: .\boinc_master
BOINC_MASTER_PASSWORD The password for the BOINC Master account. Default: Randomly generated strong password
BOINC_PROJECT_USERNAME The username to use when executing the project software. Can be a domain account. Default: .\boinc_project
BOINC_PROJECT_PASSWORD The password for the BOINC Project account. Default: Randomly generated strong password
PROJINIT_URL The URL to use when creating the project_init.xml file. (6.10.19+)
PROJINIT_AUTH The optional account_key to use when creating the project_init.xml file. (6.10.19+)
PROJINIT_TEAMNAME The optional team name to use when creating the project_init.xml file. (6.10.46+)

Version 5 Properties:

Install Type Property Description
Single-user INSTALLDIR The location to install BOINC to. Example: 'C:\BOINC'
SETUPTYPE The type of installation to perform. Valid Values: 'Single'.
ALLUSERS Whether the shortcuts appear for just one user or all users. Valid Values: '0' for Single.
ENABLESCREENSAVER Whether to automatically enable the screensaver. Valid Values: '0' for disabled, '1' for enabled.
ENABLELAUNCHATLOGON Whether to automatically start BOINC when the installing user or all users sign on to the computer. Valid Values: '0' for disabled, '1' for enabled.
LAUNCHPROGRAM Whether to automatically launch BOINC Manager after setup completes. Valid Values: '0' for disabled, '1' for enabled.
Shared install INSTALLDIR The location to install BOINC too. Example: 'C:\BOINC'
SETUPTYPE The type of installation to perform. Valid Values: 'Shared'.
ALLUSERS Whether the shortcuts appear for just one user or all users. Valid Values: '1' for shared.
ENABLESCREENSAVER Whether to automatically enable the screensaver. Valid Values: '0' for disabled, '1' for enabled.
ENABLELAUNCHATLOGON Whether to automatically start BOINC when the installing user or all users sign on to the computer. Valid Values: '0' for disabled, '1' for enabled.
LAUNCHPROGRAM Whether to automatically launch BOINC Manager after setup completes. Valid Values: '0' for disabled, '1' for enabled.
Service Install INSTALLDIR The location to install BOINC too. Example: 'C:\BOINC'
SETUPTYPE The type of installation to perform. Valid Values: 'Service'.
ALLUSERS Whether the shortcuts appear for just one user or all users. Valid Values: '1' for service.
ENABLESCREENSAVER Whether to automatically enable the screensaver. Valid Values: '0' for disabled, '1' for enabled.
ENABLELAUNCHATLOGON Whether to automatically start BOINC when the installing user or all users sign on to the computer. Valid Values: '0' for disabled, '1' for enabled.
LAUNCHPROGRAM Whether to automatically launch BOINC Manager after setup completes. Valid Values: '0' for disabled, '1' for enabled.
SERVICE_DOMAINUSERNAME Which user account should the service use. Valid Values: '"`%ComputerName%\%UserName%`"' `%ComputerName%` can be either the local computer name or a domain name. `%UserName%` should be the username of the user to use.
SERVICE_PASSWORD The password for the account described in the SERVICE_DOMAINUSERNAME property. Valid Values: '"`%Password%`"' `%Password%` the password for the SERVICE_DOMAINUSERNAME user account.
SERVICE_GRANTEXECUTIONRIGHT Grant the above user account the 'Logon as a Service' user right. Valid Values: '0' for disabled, '1' for enabled.

Installer command-line options

You can control certain aspects on the installation process by launching the BOINC installer with certain command line options. For instance to generate a log file during installation you can execute:

boinc_6.2.14_windows_intelx86.exe /v"/l*v c:\boincsetup.log"

To do an unattended install you can execute:

boinc_6.2.14_windows_intelx86.exe /v"/qn INSTALLDIR=”C:\Program Files\BOINC" DATADIR="C:\Documents and Settings\All Users\Application Data\BOINC""

To do a silent install with automated attach you can execute:

boinc_6.10.36_windows_intelx86.exe /S /v"/qn PROJINIT_URL=https://www.worldcommunitygrid.org PROJINIT_AUTH=abcdef1234567890abcdef012345678"

Note - at this time the manager doesn't launch at the end automatically but it should after a reboot.

Macintosh

We asked Charlie Fenton for help.

After speaking with Charlie, we have come up with a strategy to deploy Boinc across many computers and also a similar strategy to do so using Condor to control Boinc execution. Information on Condor can be found here.

These deployments were done via Apple Remote Desktop. If you are simply adding Boinc to an image to be deployed, this can all be done on a single master image machine. Command-line instructions are written assuming they will be sent over Apple Remote Desktop, but should work with your management tool of choice.

General Deployment

Install Boinc Manager and attach to World Community Grid project (or any project you support) and do any configuration that you want

Quit Boinc Manager after ensuring your account credentials are accepted and a job starts

Move /Applications/BoincManager.app/Contents/Resources/boinc to /Library/Application Support/BOINC Data

Download Mac_SA_Secure.sh from Tools_for_Mac_OS_X

Move Mac_SA_Secure.sh to /Library/Application Support/BOINC Data and run the script

Move client_state.xml out of the BOINC Data folder (to desktop or similar) to prevent transferring the same tasks to the remote computers

Copy /Library/Application Support/BOINC Data folder to all target computers

Run Mac_SA_Secure.sh to create the boinc_master and boinc_project users and groups and to set all file permissions.

Decide how to launch Boinc using Tools_for_Mac_OS_X

When you are done deploying to the network, restore your client_state.xml back into the BOINC Data folder

Deployment for Condor Backfill

Install Boinc Manager and attach to World Community Grid project (or any project you support)

Quit Boinc Manager after ensuring your account credentials are accepted and a job starts

Move /Applications/Boinc.app/Contents/Resources/boinc to /Library/Application Support/BOINC Data

Download Mac_SA_Insecure.sh from Tools_for_Mac_OS_X

sudo mv /Library/Application Support/BOINC Data /opt/BOINC

Move Mac_SA_Insecure.sh to /opt/BOINC

cd /opt/BOINC
chmod 755 Mac_SA_Insecure.sh
sudo ./Mac_SA_Insecure.sh condor condor

Move client_state.xml out of the BOINC Data folder (to desktop or similar) to prevent transferring the same tasks to the remote computers

Copy /opt/BOINC folder to all target computers

Run Mac_SA_Insecure.sh on all target computers to ensure permissions

sudo chmod 755 /opt/BOINC/Mac_SA_Insecure.sh
cd /opt/BOINC
sudo ./Mac_SA_Insecure.sh condor wheel

For this, I customized the Mac_SA_Insecure script to be non-interactive

Add these lines to condor_config.local (you may want to change these values to fit your specific environment and may want to tweak the HighLoad variable as well, depending on performance)

echo "ENABLE_BACKFILL = TRUE" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BACKFILL_SYSTEM = BOINC" |sudo tee -a /opt/condor/etc/condor_config.local
echo "START_BACKFILL = \$(StateTimer) > (3 * \$(MINUTE))" |sudo tee -a /opt/condor/etc/condor_config.local
echo "EVICT_BACKFILL = \$(MachineBusy)" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BOINC_Executable = /opt/BOINC/boinc" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BOINC_InitialDir = /opt/BOINC/" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BOINC_Universe = vanilla" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BOINC_Owner = condor" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BOINC_Arguments = -insecure" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BOINC_Output = /opt/BOINC/boinc.out" |sudo tee -a /opt/condor/etc/condor_config.local
echo "BOINC_Error = /opt/BOINC/boinc.err" |sudo tee -a /opt/condor/etc/condor_config.local

Reconfigure Condor. Some machines required a reboot before backfilling.

sudo /opt/condor/sbin/condor_reconfig

When you are done deploying to the network, restore your client_state.xml back into the BOINC Data folder

Unix

Modify the Makefile that generates self-extracting archives. Should be easy to do yourself.