feature request - ansible playbooks

90 views
Skip to first unread message

Mark S.

unread,
Jan 17, 2023, 11:22:09 PM1/17/23
to ClusterHAT
Hi Chris,

I was wondering if you have considered converting the https://github.com/burtyb/clusterhat-image script into an ansible playbook? I can imagine it could make support easier and possibly make the  ClusterHAT  open to more Pi OSes.

* You'd no longer need to host OS images. No more 64 & 32 images. And it would save the users on their data caps and personal storage. The instructions would be as easy and same for every Raspberry Pi OS:
  • image SD card with your OS and set up like usual:
    Users can get their own RPi OS Lite, Desktop, etc.
  • install git if not installed already.
  • install ansible-core # provide instructions
  • `git clone https://github.com/burtyb/clusterhat-image-playbook` # as not to stomp on existing repo
  • `cd clusterhat-image-playbook`
  • `ansible-playbook --extra-vars="type=cnat" clusterhat-install.yml`
    # the inventory could be defined as localhost while "type=" could be cnat, cbridge, p1-6.
* A future feature could be an actual script to assist those folks needing the ansible-core & deps in a directory for an offline install.

* Support-wise, folks who might alter settings that break it can just re-run the playbook command for the specific Pi's role and it's restored to your default. If then need to change from a CNAT to a CBRIDGE, just rerun the playbook on the host -- no re-image required.

* You could have a similar that's tuned role for those wishing to NFS boot their Pi Zero's. Maybe after they are comfortable with using SD Cards, they could run the nfs-boot playbook on the host and that's it. nfs-boot not working, re-run to remove nfs-boot on the host (or just use a SD Card on the Pi Zeros.)

* And of course, a playbook that creates a troubleshooting report in json for forum posts -- something like an "sosreport-extralite" just for ClusterHAT

I'm confident the community would contribute. I've thought about starting it but am unfamiliar with all the clusterhat-image files and how they interact with each other.

Personally, I've really grown to enjoy using Alpine - which works for Pi 3's and above (like RPi Zero 2, 3b, & 4b) but doesn't use systemd (golf clap) -- kind of overkill for lean-linux distros. It has all the cluster & container hotness folks want to play with in an uncomplicated way (& without the bloat).

Having a clusterhat-image playbook, it would make it much easier to port the ClusterHAT file to other Raspberry Pi OS flavors (Apline, Arch, Fedora, etc.) as well.

Just some food for thought. Thanks for a great device. 

Cheers. M.

Chris Burton

unread,
Jan 28, 2023, 3:00:02 AM1/28/23
to ClusterHAT
Hi, 
I was wondering if you have considered converting the https://github.com/burtyb/clusterhat-image script into an ansible playbook? I can imagine it could make support easier and possibly make the  ClusterHAT  open to more Pi OSes.

As I've never used ansible it's not something I've considered I'm afraid.

Chris.

Miles Raymond

unread,
Feb 6, 2023, 1:30:15 AM2/6/23
to ClusterHAT
This is something I am very interested in also, perhaps contributing to as well.

Ideally I would like to see a way to take any generic linux install and run the necessary script/playbook to get it up and running as a host with clusterctrl along with generating usbboot/nfs to run the zeros from.

Mark S.

unread,
Feb 6, 2023, 11:52:13 PM2/6/23
to ClusterHAT
There are seven playbooks of various complexity & thoroughness on GitHiub https://github.com/search?q=clusterhat+ansible . Plus more in the wild via a Google Search.

Converting https://8086.support/content/13/120/en/how-do-i-manually-install-clusterctrl.html to a simple Raspberry OS playbook is easy enough. Making some of the other details from the custerhat-image repo is a smidge of effort.

Where I hoping to occur is a semi-official Ansible collection that would be listed in https://galaxy.ansible.com folks could use for the basic ClusterHAT setup for the Host or Pi Zeros. Galaxy already has some re-usable collection modules for doing things like raspi-config. 

Having a published ClusterHAT collection could likely help the community with a simple, standardized, reliable setup (without having gigs of IMG files.). Over time, the community could submit pull requests so the base collection would improve and likely support other Pi & Pi Zero friendly OSes.


For my own use-case, I'll likely start with the manual ClusterHAT instructions to make a basic Alpine Linux ClusterHAT playbook. 
* Alpine for Raspberry Pi offers armhf, armv7, and aarch64 -- so ALL Pi's are supported including the OG.
* Does not have crazy systemd but does have eudev for an "init system agnostic fork of systemd-udev" if absolutely needed
* has docker (version 23.0.0-r0) available
* has wiringpi available
and so much more.

For those curious, AlpineLinux for Raspberry Pi is only a 100MB download. Remember, *all* Pis models have support. You can install X11 and a lightweight WM like IceWM. Not having systemd, you cannot use Cockpit (but could use Webmin). The install is not as "friendly" for the less experienced but with some github help, you can dip your toes in the water. Myself, I'll be doing a full SYS install just like my laptop.

Cheers, Mark S.

Ted Serreyn

unread,
Feb 7, 2023, 7:21:13 AM2/7/23
to clust...@googlegroups.com
I like this idea, but does docker deploy and work on alpine or is this just a problem with docker?  Can’t seem to get a good docker swarm working with raspberry pi zero W(not zero 2).


Sent from my iPhone

On Feb 6, 2023, at 22:52, Mark S. <marks...@gmail.com> wrote:

There are seven playbooks of various complexity & thoroughness on GitHiub https://github.com/search?q=clusterhat+ansible . Plus more in the wild via a Google Search.
--
You received this message because you are subscribed to the Google Groups "ClusterHAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clusterhat+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/clusterhat/b11bc537-c516-4e4b-9b9b-4e6e8c100563n%40googlegroups.com.

Chris Burton

unread,
Feb 18, 2023, 6:43:26 AM2/18/23
to ClusterHAT
Hi, 
Converting https://8086.support/content/13/120/en/how-do-i-manually-install-clusterctrl.html to a simple Raspberry OS playbook is easy enough. Making some of the other details from the custerhat-image repo is a smidge of effort.

 If you give it a go and get stuck on anything or want to ask why I do something in the scripts then feel free to pop onto Discord ( https://discord.gg/QZdxhgsArW ) as that's probably going to be quicker.

Chris. 
Reply all
Reply to author
Forward
0 new messages