
Show HN: Decentralized Automation Framework in YAML - mnabozny
https://starsheep.io
======
isusmelj
Could someone give me an example of when I would use it? It seems to me rather
complicated by reading the text even though it promises a simple decentralized
solution.

~~~
mnabozny
Sure, here is simple hello world example:
[https://gitlab.cloudover.io/dinemic/starsheep-
py/blob/master...](https://gitlab.cloudover.io/dinemic/starsheep-
py/blob/master/examples/hello_world/hello_world.yaml)

It creates simple model "Minion" and adds new listener, which is executed each
time when field "name" is changed in any Minion instance. Listener is set to
call bash script with "Hello [minion name]". Second part of yaml just creates
three minions and sets theirs names. That triggers executing listener and
script on each machine with this yaml.

You can play with local copy of that file on two different machines and debug
mode: sudo starsheep --launch --debug ./hello_world.yaml

First machine will create that three original minions. Any attempt of
modification of that minions, made on any other machine will be rejected on
whole cluster as not authorized (not created by owner). Also you could play
with changing minion names, to create new ones.

Another example is here: [https://gitlab.cloudover.io/dinemic/starsheep-
py/tree/master...](https://gitlab.cloudover.io/dinemic/starsheep-
py/tree/master/examples/mjpeg_streamer) It allows to automate deployment of
mjpg_streamer on Raspberry PI, to share camera. It also shows how to split the
application definition (models, listeners, scripts and variables) and data
section. There should be available section for "motion" recorder soon

~~~
eterps
Yes, this gives an example. But when would someone use this? Any use cases
that are a good fit?

~~~
mnabozny
Initially it was designed to manage IT infrastructure and to automate server
management even during "split brains", for each partition individually. It was
intended to be partially a replacement for Ansible and partially as something
more functional, with logics.

Now, when I'm working a bit more with this tools, I think that it could be
applied to anything related to IoT, autonomous cars/robots or wide area
installations, like BTS network and its configuration or management of
home/industrial automation. It should fit good in places, where connectivity
is far away from perfect and we cannot guarantee connection with central
management service (let's say database or LDAP), and regardless the network
damages, all remaining services should be available and functional as much as
possible.

As far as your question is concerned, initially I planned to use that to
manage virtual machines, bare metal servers and my local machines to provision
them regardless the cloud operator, connection type and cloud automation
services. For some reasons Ansible was too complicated to deliver the same
functionality as I needed. Moreover, with Ansible there always be some
"central" service that manages whole infrastructure. For client, who has some
infrastructure in cloud and some in own, local servers, there would always be
a weak point in managing such infrastructure. From the other hand there was a
Kubernetes, but it was too complicated, especially when spanning over local
cluster and public cloud

~~~
eterps
Thank you

------
mdaniel
> No license. All rights reserved

And none of the source files appear to have licensing blocks embedded in them.
Maybe it's an oversight, but right now AIUI this project is just "source
available"

~~~
mnabozny
Updated - now whole python code is MIT, however some parts of C libraries
linked with this code are AGPL. Not sure how it "infects" python code, but if
necessary, I'll update AGPL to something more permissive

------
franky47
Obligatory reminder that YAML can be full of surprises:
[https://noyaml.com/](https://noyaml.com/)

~~~
verdverm
Thanks for sharing, what is with that site and overriding all the click
handlers? Can't go to any of the links because I can't click or select (on
mobile)

[https://cuelang.org](https://cuelang.org) is another existing option

Working on [https://github.com/hofstadter-
io/hof](https://github.com/hofstadter-io/hof)

~~~
thosakwe
It looks like it's based on the Monaco/VSCode editor, where you have
CTRL+click on links (CMD+click on Mac).

