
Show HN: CattlePi automated setup and updates for Raspberry Pi(s) - mirceal
https://cattlepi.com/
======
ivan_ah
From [https://cattlepi.com/flow/](https://cattlepi.com/flow/)

> because of how the root filesystem is built, any changes made to the
> filesystem will reside in the upper layer of the union [fs] and will be lost
> on reboot. This is good, because it means that all the state you have on the
> device is expendable, and you can likely rebuild it after a reboot. If you
> rely on the state of the device, you will have to figure out a state to
> persist it outside of cattlepi.

This seems like a showstopper for me because I want to run a webapp with user
registration, logs, etc. I'd certainly want to keep these things around after
next reboot.

Can the user-writes be persisted on the device? Maybe on another partition?

~~~
mirceal
thank you for the feedback. there are a few things to consider here: the first
one is that the main failure scenario for something like a pi running for a
long time (that I've seen) is the SD card failing (long time here means months
to years depending of your usage pattern); the second thing is that I made
this choice for the first iteration - there isn't any technical reason why you
wouldn't be able to have a 2nd partition that you mount RW. to achieve this
you could hack it directly into a image you would build or you can leverage
the bootcode and/or usercode hooks in the config. (see
[https://github.com/cattlepi/cattlepi/blob/a5ad6b57dc28313819...](https://github.com/cattlepi/cattlepi/blob/a5ad6b57dc2831381980a910204f0c75335cea07/builder/resources/usr/share/initramfs-
tools/scripts/cattlepi-base/helpers#L128) and
[https://github.com/cattlepi/cattlepi/blob/35eccb61029f46076c...](https://github.com/cattlepi/cattlepi/blob/35eccb61029f46076cd5cdca0466bdc5af9c49d8/builder/resources/bin/bootstrap.sh#L26))
Ping me directly or comment on this thread if you want to give this a shot and
you have trouble getting it to work.

------
xellisx
Where is the "What is CattlePi, what does it do and why do I need it?" section
on the page?

~~~
joshu
[https://github.com/cattlepi/cattlepi](https://github.com/cattlepi/cattlepi)
appears to be more instructive.

~~~
xellisx
Yeah - that info should be on that page too. Less clicking!

------
forcemajeure
Could be evolved into an open source competitor to resin.io

~~~
zeckalpha
Isn’t resin.io open source?

~~~
luma
Only technically so. The parts they send you are open source because of the
GPL. A substantial portion of the parts in the cloud (which are 100% required
to use the platform in any manner) are not open source. They've been
suggesting that they will open source enough of the backend to actually run
resin.io on your own (without several features) for 3 years now, most recent
target release was 2017.

Here's the latest update I could find on the topic:
[https://resin.io/blog/open-source-resin-io-progress-and-
next...](https://resin.io/blog/open-source-resin-io-progress-and-next-steps/)

~~~
alexandros
Hey there -- resin.io founder here.

While you are correct that we have not completed our open sourcing promise on
time, and that is our fault, we have (and continue) to release as open source
a lot more of our software than we "have to" because of the GPL. If you look
at our github orgs, there are hundreds of projects, including the entirety of
our operating system, and we did not have to release any of that.

We are taking a long time to release the open source version though, it's hard
to deny. If it helps our case at all, this is because we're trying to do this
in a way that allows us to make the eventual open source offering a first-
class citizen of the ecosystem, receiving updates at the same time as our
online service, out of the same repos, which is a non-trivial development
workflow issue.

The latest version of resinOS even allows devices to de-provision from our
cloud and re-provision onto an open source server (and vice versa). But of
course the use of that won't be apparent until an open source server exists.

------
jccooper
Still need to look into it more, but this link may save me a good amount of
time. I was just about to build something like this.

~~~
mirceal
Really glad to hear this. Please let me know how this goes and if you need
help :)

~~~
jccooper
I will. What's a good way to get in touch?

~~~
mirceal
Email in profile or you can reach me at hello@cattlepi.com thanks!

