BOINC on cloud service free tiers: help the world for free

You probably have an Amazon account. Who doesn’t? But there’s a problem. Despite being a remarkably good source of products from basically every category of thing they’re also arseholes for a variety of reasons. I think I’ve come up with a low-effort (but admittedly low return) way to get something for nothing out of them - other than committing light fraud as your package magically disappears and doesn’t arrive (don’t do that).

One of the things people don’t realise is that anyone can sign up for a free one year trial period for Amazon Web Services - their massive successful cloud computing service. If you already have an Amazon account then it’s even easier - a whole step skipped! You do have a give some credit or debit card details, but don’t worry. You won’t get charged unless you’re an idiot or very generous.

If you read my last blog on running the BOINC distributed software on my Raspberry Pi 3 you’ll remember that I was a bit pissed off at how slow my Pi was at completing tasks. I expected it: it’s a Raspberry Pi. But I wished I could do more. And then I remembered that you can get a virtual server from AWS’s EC2 cloud computing service. I’d used one last year for a cybersecurity CTF game and remembered that we had another account in the family that we could use for another free year.

I wondered how fast their free t2.micro instances could complete BOINC project tasks, and I also was being greedy and thinking about improving my sweet stats as well. And the best part was that it doesn’t break any of their terms of service! Awesome. How will it go? Strap in and we’ll find out, as well as getting the chance to hear me attempt the lamest call to action ever in an attempt to help the world.

So, pop along to AWS and get yourself signed up.

Configuring and starting our instance

After getting all of your confirmation emails we’ll need to actually create our free tier t2.micro instance. Change your desired server location first up top if you want. Then click on Services on the top bar and then click on EC2. You’ll see it says that you have ”0 Running Instances”. Click on that text and we’ll be taken to the place where we can change that. We’ll create a server and choose an OS. I’m going for Ubuntu - if you don’t like that you can adjust the instructions yourself, ugh.

Click on Launch Instance and a wizard will open. You’ll get the chance to select your instance (t2.micro - do double check before moving on) and it’s OS (select free tier compatible, then Ubuntu). Then you can just accept the defaults pretty much. Everything that is on this free server is pre-selected. If you want extra you’ll have to pay for it. After you complete the wizard you’ll need to download the ssh key for your server and get connected to it with the ssh client of your choice. Here’s some guides for that:

Your server will then be booted, so use your ssh key and connect with your ssh client. Time to install some software.

Installing the software

After this the instructions for getting this running are very similar to the guide for the Raspberry Pi. One problem, however, is that EC2 servers are relatively bare when it comes to useful tools being installed from the outset. The software repositories are also a few versions back when it comes to the available software. If you don’t care you go ahead and follow that blog post for the rest of this. If you’d like a more up-to-date installation you can continue with this blog post where we’ll compile things from source. Specifically we’ll have to install a few more dependencies to get BOINC client and boinctui running from source.

First of all we need to install some basic compilation tools.

sudo apt-get install autoconf gcc g++ make

Installing and compiling BOINC

Why reinvent the wheel? You can find a great (official) guide here - having said that pretty much everyone recommends that you stick with the package for your Linux distribution instead.

Installing boinctui dependencies

sudo apt-get install libncursesw5-dev libexpat1-dev libssl-dev

Compiling and running boinctui

Easy peasy:

git clone https://github.com/suleman1971/boinctui
cd boinctui
autoconf
./configure
make
sudo make install
boinctui

Configuring everything

From this point onwards you can again follow the guide for the Raspberry Pi. It’s literally the same.

Performance

“Hoooly shit” for some projects (compared to the RPi, at least), “WTF?” for others - although this could be explained by the fact that different architectures can have different app versions for each project. Older versions may be less optimised. Obviously that’s down to a project’s developers and we can do nothing about it. Also the RPi was so slow at Asteroids that it has only done 4 tasks in a month - sharing time with other projects. It’s also not even anywhere close to a fair test as the RPi (I’ve literally only just remembered this) is only running at 45% CPU time for cooling reasons. Woops.

Conclusion

So, really worth doing, frankly. It wasn’t that much effort to set up if you don’t care about having the latest versions of everything. 15-20 minutes at most. I really do reckon that anybody who has even the most basic Linux skills should do this. All this free computing power from a large multinational should not go to waste. We should immediately set it to work solving the greatest mathematical and scientific projects that need all the help they can get. We could change the world! Maybe. But it’s fun to try, and it’s pretty low effort.

With that in mind I wanted to maximise my contribution to all these projects. A friend told me that Google also has a cloud computing platform and they also do freebies! A third host was set up in about 20 minutes. Then I found out that Microsoft’s Azure platform does a free year-long trial period with a server too. And then I realised that Google are also giving away an extremely slow server for free... forever. So now I have five hosts including the RPi. Just like that, an extra four computers providing help to BOINC projects worldwide. Finally a way to take these corporate swines for all they’re worth!

Bonus tip: if you do set up multiple servers you could add them all to one boinctui view and cycle through them. You’ll need to make the BOINC remote control port open to the internet though. Should be ok, the client software is pretty mature (16 years old, incredibly). The default port is TCP 31416. Look for the firewall options on your cloud provider’s configuration pages.

Happy crunching!

Comments