News for hackers. Stuff that matters.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by xbryanx on Thursday June 25, 2020 @02:26PM (#23643849)
I'm not sure if I am understanding this (aviary.sh) correctly, but it looks like this requires an agent to run on the configured hosts.

One of the things that I love about Ansible's model is that we never need an agent on the host. Once you configure something with Ansible, there's no artifact of the configuration left on the machine.

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by lloeki on Friday June 26, 2020 @04:10AM (#23649802)
At some point in a previous company we had a lot of individual VPSes set up basically the same way. I was sick of internal documentation that listed step-by-step commands intertwined with descriptions and manual actions, and any attempt at puppet or ansible just blew up because it was something else to learn by the team (believe me, I tried, it just wouldn't stick with anyone).

So I created `apply`[0].

This small bash thing pushes bash scripts called 'units' through ssh to execute through an uploaded 'run' script:

   ./push units/update units/sshd units/ssh_authorized_keys [email protected]
By writing those 'unit' scripts to be idempotent you can just run them again and again. 'units' can be aggregated in 'groups', which can themselves reference 'groups':

   ./push groups/base groups/ruby units/dockerd [email protected]
Finally, you can define 'hosts', which are like 'groups', only they save you some typing, which it could do in sequence or parallel:

   ./apply hosts/foo.example.com hosts/bar.example.com
And since units/, groups/, and hosts/, are just directories and files, autocompletion works immediately and you could get creative with shell expansion for arguments.

It was a deceptively simple experience, immediately accessible, trivially enabled literate coding, and overall extremely useful both to set up and maintain those VPSes as well as creating dev environments, or local VMs to test a e.g one-shot unit performing a change or migration.

[0]: https://gitlab.com/adhoc-gti/apply

[1]: https://github.com/lloeki/apply (personal fork)

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by thr0w3345 on Thursday June 25, 2020 @06:16PM (#23646393)
The agent approach is mostly ok, it tends however to suffer when you have more than a few hundred machines (I’ve found, anyway) that your ansible code rots a bit. Say for that one server, you know the one, the weird etl thing bi uses, was run once and during a prod problem you suddenly have to start fixing the ansible code to rebuild it.

With an agent, it’s applying all the time and this doesn’t happen.

We actually moved to salt from ansible and we’re happy..

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by geofft on Thursday June 25, 2020 @11:09PM (#23648292)
I'm a bit confused - agent vs. agentless isn't obviously correlated to continuous vs. on human action to me. Write a cronjob / systemd timer / scheduled task / Jenkins job / Travis cronjob / GitHub Actions scheduled event / CloudWatch + Lambda / whatever you like to run your Ansible playbook, from one machine/container/whatever, on your entire fleet. (It's certainly no harder than writing a cronjob or whatever to run your config management on every machine - if you can schedule tasks on all your machines, you can certainly schedule them on one.)

That gets you the standard advantages of agentless setups, including not requiring the runtime of your config management tool to be everywhere, being able to reprovision ephemeral + immutable cloud resources, and being able to centrally report errors, without any more risk of configuration drift or bitrot.

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by kapilvt on Thursday June 25, 2020 @07:58PM (#23647207)
while ansible does push more commonly (and checkout mitogen for speed increases there), its also trivial to do pull mode with some loss of multi-node orchestration, and just cron/systemd timer it.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by discordance on Thursday June 25, 2020 @09:38PM (#23647868)
Have also had issues with agents in high security areas.

Machines sitting behind VNets, governed by security review boards makes getting agents approved a bit tricky

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by bovermyer on Friday June 26, 2020 @06:30AM (#23650478)
This behaviour is why I'm using (and liking) Chef these days, where six years ago I absolutely hated Chef.

I still love Ansible, especially for small quick things. As with many tools, though, it's not the only one I reach for any more.

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by nullify88 on Friday June 26, 2020 @02:00AM (#23649150)
Salt agents in particular call out to the master making NAT a non issue. While it does have problems of its own (connection scaling), it made automating servers across 600 physical locations much easier.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by comba on Friday July 03, 2020 @01:35AM (#23721301)
I manage thousands of machines with rrconf
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by pampa on Thursday June 25, 2020 @03:26PM (#23644489)
That is not entirely true. Ansible needs python installed on the target host, and a lot of modules (plugins?) require additional python libraries on the target.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by divbzero on Thursday June 25, 2020 @06:19PM (#23646416)
The av agent that GP refers to is a script that runs periodically on target hosts to pull the latest configuration using Git. Ansible has a Python dependency but no agent running on target hosts, instead relying on SSH to push configuration changes.

Ideally, I’d like to see a configuration tool that uses Ansible’s SSH push model but without the Python dependency.

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by regularfry on Friday June 26, 2020 @06:39AM (#23650520)
Strictly speaking, shouldn't it be possible to bodge ansible to send and execute a static python interpreter to bootstrap a host? I've been bitten by "oh no, that Python's too old" or similar several times now. The idea of bootstrapping from only having a `sh` on the far end seems like it ought to be a thing, but (for instance) mitogen only goes part-way.

There was a pen-test tool designed on these lines once called Mosquito Lisp, which as far as I can see evolved into something called WaspVM: https://github.com/swdunlop/WaspVM I have no idea if it's in use, alive, or even working these days.

Is anyone working on this side of the problem and I've missed it?

Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by cloin on Thursday June 25, 2020 @05:21PM (#23645840)
If python is considered an agent, isn't bash now an agent?
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by soco on Thursday June 25, 2020 @03:51PM (#23644803)
It doesn't need any python. Ansible opens a regular ssh session and can run anything from it - including python if available.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by dfinninger on Thursday June 25, 2020 @04:28PM (#23645300)
Only with the “raw” module... which is what you use to ensure Python is installed on a machine managed by Ansible.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by pnutjam on Thursday June 25, 2020 @03:59PM (#23644912)
you can use the "raw" module without python.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by pnutjam on Thursday June 25, 2020 @03:59PM (#23644908)
Ansible does create a bunch of temp files. I've even had issues where my ansible barfed because my uid changed and the old temp files couldn't be accessed anymore.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by fanf2 on Thursday June 25, 2020 @07:30PM (#23646973)
The key selling points of Ansible for me were --check and --diff which make it much easier to test and debug a playbook
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by thayne on Friday June 26, 2020 @12:12AM (#23648640)
This is more similar to using ansible-pull than the traditional approach.