Live data from Hacker News

Show HN: Welder – set up your Linux server with plain shell scripts

github.com

21–30 of 71 posts

Re: Show HN: Welder – set up your Linux server with plain shell scripts

#22

Author claims all 90% of the time all they need is a single shell script. Then shows an example directory structure that mostly reminds me of Ansible. How is Welder different from Ansible, except bash vs python?

My experience with Ansible is that I have to write a dozen lines of yaml just to ensure permissions on a bunch of files. (But Puppet and Chef scare me even more.)

The tools in this space feel like very thick abstractions on top of commands and configs you have to understand any way, to get the results you want. The console output Ansible produces is also truly horrible.

Instead, I now maintain a single shell script for our servers. It's maybe a couple hundred lines, half of it heredocs containing small config snippets.

I will definitely be looking at this tool later.

Re: Show HN: Welder – set up your Linux server with plain shell scripts

#24

Author claims all 90% of the time all they need is a single shell script. Then shows an example directory structure that mostly reminds me of Ansible. How is Welder different from Ansible, except bash vs python?

It also depends on Ruby and liquid templates. I am not sure how he can still claim it is "plain shell scripts"

Re: Show HN: Welder – set up your Linux server with plain shell scripts

#26
If you don't like all the directories that Ansible playbooks require you can use the simple style of a single YAML file that describes the actions to take. Check out https://serversforhackers.com/an-ansible-tutorial, the first introduction walks you through setting up just 2 files.

Re: Show HN: Welder – set up your Linux server with plain shell scripts

#27
Here is a declarative bash DSL I ran across a few months ago:

https://github.com/mattly/bork

and here is an example from their README:

    ok brew                                       # presence and updatedness of Homebrew
    ok brew git                                   # presence and updatedness of Homebrew git package
    ok directory $HOME/code                       # presence of the ~/code directory
    ok github $HOME/code/dotfiles mattly/dotfiles # presence, drift of git repository in ~/code/dotfiles
    cd $HOME
    for file in $HOME/code/dotfiles/configs/*
    do                                            # for each file in ~/code/dotfiles/configs,
      ok symlink ".$(basename $file)" $file       # presense of a symlink to file in ~ with a leading dot
    done

Re: Show HN: Welder – set up your Linux server with plain shell scripts

#30
post #9

Could you explain what this line of code does? ssh -t user@example.com "$(

It's a weird way of writing

  ssh -t user@example.com /bin/bash 
That is, take the contents of the local file 'my-setup-script.sh' and run them as commands on example.com as the 'user' user (using SSH to authenticate the user & transport the commands).
Post reply on HN