Abra server config, stored in git
Creating server config
We already made our Raspberry Pi available on the internet via a domain name. That public domain name is how we’re going to be referring to it with abra.
Let’s start by creating the server config:
abra server add YOUR_SERVER_DOMAIN
(replace YOUR_SERVER_DOMAIN with the correct domain for your server, eg makerspace.nodes.merri-bek.tech)
If that worked, you should see it in the list of servers that abra is now managing by running:
abra server list
And you should see this server in your list of servers, like:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ NAME ┃ HOST ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ makerspace.nodes.merri-bek.tech ┃ makerspace.nodes.merri-bek.tech ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Server config files
What did abra actually do there? It did check that our server was real, and that it could reach it (it would have returned an error if it couldn’t), but it didn’t actually do anything to the server. Instead it just created a place for configuration files.
Where are these files? They are stored on your dev computer at ~/.abra.
If you have there, you’ll see that there is now a directory created for the server named something like ~/.abra/servers/makerspace.nodes.merri-bek.tech. You can check this with ls ~/.abra/servers.
As we start adding apps to this server, configuration files will start appearing in this directory. In other words, this directory is the definition of how our server is setup. If we loose this directory, perhaps because our dev computer breaks, then we’d have to re-create our server from scratch (which would be quite tricky as it gets more complicated).
Storing config in git
To avoid losing our server config files, and to enable us to record a version history of them, and to share them with others, we’re going to put them in a version control system called git.
Creating our local git repo
Since we want to manage that directory for our new server in git, in a terminal lets change into that directory and then initialise a new git repository.
cd ~/.abra/server/YOUR_SERVER_DOMAIN
git init
That should create the repository for us, but because it’s empty, we can’t create a first commit. Let’s create an empty README file, which we can always use later to document our processes for stewarding this node. Then, we’ll add this to the first commit.
touch README.md
git add .
git commit -m "Added empty README file"
Pushing the repo to a public host
To gain all those collaboration and backup benefits we spoke about, we want to push our repo up to a host that supports those features.
The LoRes recommendation is that your local group could create an organisation of a git platform to support all it’s Node Stewards. Self-hosting is a possibility, but for groups just starting out, perhaps the excellent Codeberg would be a good choice for this.
Within this organisation, create a repository for your new node (using the hostname as the name of the repo), and follow your platform’s instructions to push your changes up there. Codeberg, for example, has instructions for “Pushing an existing repository from the command line”.
As an example, here’s the Codeberg organisation for Merri-bek Tech nodes.