marius311 / boinc-server-docker

A Docker multi-container application that runs a BOINC server
MIT License
123 stars 60 forks source link
boinc docker science volunteer-computing

boinc-server-docker

Docker Pulls Docker Stars Docker Cloud Build Status

boinc-server-docker is the easiest way to run your own BOINC server. You can run the server on a Linux machine, in which case the requirements are,

or you can run your server on Windows 7+ or Mac OSX, in which case you should use either,

or, if your Windows/Mac system is too old to support either of those,

There are no other dependencies, as everything else is packaged inside of Docker.

Documentation

For a full tutorial on creating your own server with boinc-server-docker, see the project cookbook.

If you are looking to create a server and are already somewhat familiar with Docker and BOINC, the following short description takes you through creating a server and running your own science application.

Quickstart

To check out this repository and get a test server fully up and running, simply run,

git clone https://github.com/marius311/boinc-server-docker.git
cd boinc-server-docker
docker-compose pull
docker-compose up -d

You can now visit the server webpage and connect clients to the server at http://127.0.0.1/boincserver.

Notes:

  • The first time you run this, it may take a few minutes after invoking the docker-compose up -d command before the server webpage appears.
  • Make sure your user is added to the docker group, otherwise the docker-compose and docker commands in this guide need to be run with sudo.
  • If using Docker Toolbox, replace the final command above with URL_BASE=$(docker-machine ip) docker-compose up -d. The server will be accessible at the IP returned by docker-machine ip rather than at 127.0.0.1.

The server comes pre-configured to immediately run Docker-based science applications. To do so, first create a Docker container which runs your code. As an example, we will use a python:alpine image. Suppose your calculation is run with the following command,

docker run python:alpine python -c "print('Hello BOINC')"

To submit a job on the server which runs this as a BOINC job you would first get a shell inside the server,

docker-compose exec apache bash

Then submit the job by running

bin/boinc2docker_create_work.py python:alpine python -c "print('Hello BOINC')"

Now you can connect a BOINC client the server and run this job. Note that to run these types of Docker-based jobs, the client computer will need 64bit Virtualbox installed and "virtualization" enabled in the BIOS.

If your job has output files, have the container write them in /root/shared/results and they are automatically returned to the server when the job is done.

This is a simple example, but any Docker containers with arbitrary code installed inside of them will work!

To stop the server and delete all server and database files (for example, if you want to start over with a fresh copy), run,

docker-compose down -v

Finally, boinc-server-docker is not just useful to get a simple test server running, its actually meant to run your real server. To learn how to, read the project cookbook, or look at the Cosmology@Home source code as an example (boinc-server-docker was in fact originally developed for Cosmology@Home).

Happy crunching!

Development and Contributing

If you wish to modify and rebuild any of the boinc-server-docker images yourself, you will need this git repository's submodules checked out. To do so, run git submodule update --init --recursive from the repository folder, or clone with git clone --recursive in the first place. Note that building these images is only necessary if you are helping with development of this package; if you wish to build your own project using these base images, follow the instruction in the cookbook instead.

Currently, building the images is only guaranteed to work on Linux. Some users have reported successfully building on Windows or Mac, but this is considered experimental at this point.

Please feel free to contact the maintainers or submit Issues and Pull Requests for this repository if you wish to contribute!

News