When to use mender vs apt-get update?

Hi all,
I’m researching what type of update system to use for a piece of software I’m working on that runs on a version of debian running on a raspberry pi 3.

I’m thinking of using apt-get update for our users to update the software on the pi when needed. Through a web interface, they will be able to see an update is available, and if they click update, then in the background apt-get update will be used to update all packages to the latest version.

I’m trying to understand when tools like Mender or swupdate are necessary – is it just if I want to be able to ‘push’ updates? Rather than having the user ‘pull’ the updates?

If anyone could explain more in what types of projects Mender is really useful, it would be appreciated. Or when apt-get, or some small python wrapper around apt-get, will be insufficient.

Ps. the project I’m working on is http://docs.peachcloud.org/, a scuttlebutt pub hosted on a raspberry pi, in some ways similar to a project like home assistant or yunohost.

Hi @notplants,

It’s a question of simplicity and scale. On target package managers typically do not have good rollback capability and atomic updates so it can be difficult to know exactly what set of packages and versions is on each device. For a small number of devices, where you can physically access them you can make due with an apt-get solution. But as the number of devices grows and the ability to access them becomes more expensive, a solution like Mender, with fully atomic updates and automatic rollback helps to ensure your devices are all running the exact binaries you expect and have tested in your lab.

Additionally Mender provides tooling to create your own custom artifact types so if you don’t want to mess with the complexity of generate deb files you don’t need to.

@eystein can probably provide some other benefits as well.

Drew

1 Like

Indeed. I would say here are some factors to take into account:

  • Cost of failure
  • Scale
  • Remote management

If your users manually update a single device (e.g. a button triggers apt-get update) and they reasonably know how to fix problems such as conflict resolution, partial installations due to power/network loss then what you propose may be good enough.

Mender is more useful once you have dozens of devices you centrally want to update or enforce an update policy for, and where it would be problematic if the devices are not consistent (have the same software for the right device group) or fail to update properly (robustness) or securely.

1 Like

Thanks so much, this makes sense and is just the information I needed :slight_smile: