Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Improved readme for cfg of existing boinc account #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,55 @@ For example, to link the container to boincstats:
```sh
docker exec boinc boinccmd --join_acct_mgr http://bam.boincstats.com <username> <password>
```

#### Alternative activation with preconfigured account

_Example for the seti-project, others should work also but you may need to exchange URLs below._

In case you want the container immediately start working (maybe in preparation to run it in a kubernetes environment)
all you need is to take your week account credentials (in case of seti) from https://setiathome.berkeley.edu/weak_auth.php , store the snipplet in a file named:

account_setiathome.berkeley.edu.xml

and place it into containers _/var/lib/boinc-client_ directory.
I do this by deriving from this container with a dockerfile like this:

FROM bcleonard/boinc:latest
ADD ./assets/bonicdata/account_setiathome.berkeley.edu.xml /var/lib/boinc-client
EXPOSE 31416

Once you run this container it will connect to your account and start working.
Recommendation: If you plan to run the container only locally: forget above dockerfile
use docker-compose instead and mount the volume which contains the account xml file.

Example of a suitable docker-compose.yml:

version: '3.7'
services:
boinc:
container_name: seti
# https://hub.docker.com/r/bcleonard/boinc
image: bcleonard/boinc:latest
volumes:
- ./assets/boincdata:/var/lib/boinc-client
networks:
- setinet
networks:
setinet:
driver: bridge

place this file in the same directory where you have also: _assets/boincdata/account_setiathome.berkeley.edu.xml_
and just call:

docker-compose up -d

to see what is happening in the container you may check with

docker logs seti

afterwards.


### Additional Configuration:
Since docker now has the exec command, you can now run commands inside the container. For this container, you can run the boinccmd and use it to configure the boinc_client. The following syntax works:
```sh
Expand All @@ -40,6 +89,13 @@ docker exec boinc boinccmd --get_state
```
### Notes/Caveats/Issues:
1. -h HOSTNAME - I recommend that you use this option (choose your own hostname) so that your host id for boinc is not the container id.
But not in the case you are targetting for kubernetes, in which case you should use a statefullSet deployment kind,
which contains a
hostname: $(statefulset name)-$(ordinal)
2. I have installed the 32 bit binaries so that projects such as climateprediction will run. However, for some reason, the boinc_client doesn't see them, so 32 bit projects won't run. The same libraries work outside of a container, so I'm not sure whats going on. Its low on my list, but if somebody can point me in the right direction, I'd be grateful.
3. No GUI password. By default, I set a blank password. You can change this by prepopulating /data/boinc/gui_rpc_auth.cfg. If somebody asks, I update the script to generate a randon password on initial startup.
4. After starting, I had to manually tell the client to start downloading work. I'm not sure why I had to do that, but I waited almost 8 hours and it still hadn't downloaded any work. After doing that, the work downloaded and it started doing work.
5. Some project have links to you boinc client settings. In case of seti it is: https://setiathome.berkeley.edu/prefs.php?subset=global
These settings influence whether or not your boinc client starts working (e.g. powerplug connected, or running on battery etc.)
So if nothing happens you may need to recheck your settings.