1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Whats the best way to Install Boinc as a service

Discussion in 'TOSAH Archive' started by Garrett, 30 Sep 2004.

  1. Garrett

    Soldato

    Joined: 9 Jan 2003

    Posts: 6,352

    Location: Winchester

    Whats the best way to Install Boinc as a service to multiple machines?

    Got a 'few' here I might get boincing, seeing as I've had few rigs running it stabily for a few days now.

    Has to be hidden from the user to.
     
  2. Biffa

    Man of Honour

    Joined: 30 Oct 2002

    Posts: 15,567

    Location: Surrey

    My Boinc Remote script here might be helpful :)

    Its not completely transparent in that it does install a service called BOINC and it does put in into a folder called boinc in program files, however you can modify the batch file to change the path and name of the service.

    Then you can roll it out to all the machines you are allowed to from your workstation, and then if you need to run it only at certain times you just setup a schedule on your computer to do the requisite commands at the time you require. Then all you have to do is make sure the machine with the scheduler on it is on at the times it needs to run the schedule.

    For example you could set two scheduled tasks say called "morning" and "evening", create two batch files in the Boinc Remote directory called morning.cmd and evening.cmd.

    So say your Boinc Remote directory is called c:\br here are the morning and evening cmd files

    Morning.cmd:
    @echo off
    c:
    cd\br
    br stop
    exit

    Evening.cmd
    @echo off
    c:
    cd\br
    br start
    exit

    This would allow boinc to run overnight and stop in the morning :)
     
  3. Garrett

    Soldato

    Joined: 9 Jan 2003

    Posts: 6,352

    Location: Winchester

    Hmm, almost got that working, but I get an error:

    The file remote_hosts.cfg is missing. It must be in the directory

    Where do I find this little beauty?
     
  4. Biffa

    Man of Honour

    Joined: 30 Oct 2002

    Posts: 15,567

    Location: Surrey

    You have to create it, basically its just a file with the IP address or addresses of the machine (yours probably) that will run Boincview

    It tells boinc that that machine is allowed to connect via RPC
     
  5. Garrett

    Soldato

    Joined: 9 Jan 2003

    Posts: 6,352

    Location: Winchester

    Cool, working now :)
     
  6. Link2Adrenaline

    Associate

    Joined: 31 Jul 2004

    Posts: 74

    Location: ** Oregon, USA

    I stole a couple of commands out of your script to make a quick and dirty update file. I run CLI on all machines and when there is an upgrade (say 4.09 to 4.11) it stops the remote service, copies the CLI executable and restarts the service on all of the remote machines. Just make sure that you have the updated CLI executable in the same directory as the batch file. :)

    *** Begin file

    @echo OFF

    echo Parsing pcnames.txt

    for /f %%i in (pcnames.txt) do call :COPYFILE %%i


    :COPYFILE

    echo Stopping BOINC service on computer %1

    sc \\%1 stop BOINC > nul

    echo Copying files to computer %1

    copy %~d0%~p0boinc_cli.exe \\%1\c$\progra~1\boinc\ /y

    echo Re-starting service on computer %1

    sc \\%1 start BOINC > nul

    goto END

    :END
    endlocal
    goto ENDOFFILE

    :ENDOFFILE

    *** End file
     
  7. Biffa

    Man of Honour

    Joined: 30 Oct 2002

    Posts: 15,567

    Location: Surrey

    Nice one, mind if I put it in the package?
     
  8. Link2Adrenaline

    Associate

    Joined: 31 Jul 2004

    Posts: 74

    Location: ** Oregon, USA

    Absolutely! You may want to create another sub-section to distribute the project information so that it can be automated for a new project as well. I've just been changing the "copy" line as needed. Isn't it amazing how much work we will go through to be lazy? :)
     
  9. Biffa

    Man of Honour

    Joined: 30 Oct 2002

    Posts: 15,567

    Location: Surrey

    LOL I just add the new project using BoincView.

    Not sure I want to do much more than add extra batch files with descriptions in the readme for additional utils, I was going to write one to distrib the new client but as you say.. lazy :D

    Its a tricky one to automate, perhaps an "update" command in the original batch could check the project files in the folder against what is installed on the machines and copy over the missing project files. But tbh I'm busy enough as it is at the moment without going all out at it. :D

    You can always set the new projects up on the default machine and then just remove/install to refresh all the others. Naughty but effective :D
     
  10. Link2Adrenaline

    Associate

    Joined: 31 Jul 2004

    Posts: 74

    Location: ** Oregon, USA

    What I have been doing for new projects is installing the project on the controlling machine with the Add Project command, taking the client_<project>.xml file from that install and distributing it to the clients. Then just restart the service on the clients and the software takes care of the rest. Simple.

    The only thing that is in that file is the URL, Authenticator, Project Name and a couple of very basic preferences so it can be copied cross-platform with no problem at all.
     
  11. Garrett

    Soldato

    Joined: 9 Jan 2003

    Posts: 6,352

    Location: Winchester

    Righty ho, another problemo, rolled out boinc as a service to a few machines, on friday, but for some reason the machines aren't getting any credit, see the bottom few on this list

    Any ideas what could be causing all this slackness?
     
  12. dunc

    Mobster

    Joined: 23 Oct 2003

    Posts: 2,755

    Location: Selma, Alabama

    The validator had been off since thursday I beleive :(

    Dunc
     
  13. Garrett

    Soldato

    Joined: 9 Jan 2003

    Posts: 6,352

    Location: Winchester

    :rolleyes: I'll leave em all running then, hopefully they'll get some work when borkley sort it out
     
  14. Cooper Nic

    Associate

    Joined: 1 Nov 2004

    Posts: 1

    I have used this Boinc Remote script but could not succeed to start the Boinc activity. It installs the service and starts it but the Boinc client does nothing. When I check the Boinc folder I realized that it has created only two files (client_state.xml and lockfile) other than the copied ones. There is also projects\setiathome.berkeley.edu folder but it is empty. I tried to remove everything and install it again but nothing changed. I have verified also that the server status is ok in Berkeley.

    The computers I use are XP Pro with SP1. Does anybody have any guess what could be wrong with me? Or how can I detect the real problem?
     
  15. MGP

    Mobster

    Joined: 24 Oct 2004

    Posts: 2,576

    Location: Surrey

    Before trying to use the script, had you sucessfully got Boinc running on at least one of your PCs? That would establish whether it is an issue with the script processor it's configuration, or elsewhere, perhaps on your network.