Building a node from scratch on a 32bit system with Ansible

Hello,

I recently set up a storage node on a linux 32bit box. I set it up with some tweaks to make it easier for me to operate it, like configuring logrotate, make a service etc. Of course, It does not use Docker.

I was about to document it, but then I thought why not describe it so that I can recreate it from scratch if one day I will need to. I therefore created an Ansible playbook to do the magic and since when you install from source you have already the instructions to upgrade, I created also a playbook to upgrade Storj to a new version.

I have never used Ansible before, thus this is my study project. I am not a strong admin either, so please forgive me if I haven’t done things right :slight_smile:

The project is called Storjble and is on github.

Comments and feedback to improve it are super welcome!

7 Likes

You’ve made the same mistake I did several years ago: considered Ansible as a general scripting tool, and not just as a deployment/configuration tool. Ansible is just inefficient and unhandy at the former. At this scale it doesn’t look bad, but if you want to try doing it the way bigger deployments are made, try the following.

Run the build process outside of Ansible and only deploy the build results. For the deployment run, take advantage of idempotency—you should be able to re-run the same Ansible script again and again without changing the system state.

2 Likes

Thanks for the valuable feedback

I am trying to make sure that running it multiple times keeps idempotency. It should be like that at the moment.

Another valid point is about building the binaries on a different machine and then move only the binaries, which would scale much better. The reason why I took this solution for now is that while the controller can be a modern machine, the target is a 32bit system, therefore I want to make sure to build directly on the target.

1 Like

I have used an emulator on much more powerful machine (PC) to build 32 bit binaries when I answered your questions how to achieve that, so you can use this approach too. I have posted an exact docker-compose.yaml to build it.

Ah, true! I forgot about it, here the reference.

I wonder however what the benefit would be in this situation as I would have to use docker on the controller machine, which would add additional requirements…
I used a similar approach for testing, but instead of docker I created a VM. Your solution is better though, I’ll take it into account for the future. Thanks!