Earlier quoted context omitted.
Debian ship's dash for /bin/sh doesn't it?
but also ships bash for interactive use, so #!/bin/bash will just work, which you should be doing anyways in scripts that want bash.
#!/usr/bin/env bash41–50 of 86 posts
Earlier quoted context omitted.
Debian ship's dash for /bin/sh doesn't it?
but also ships bash for interactive use, so #!/bin/bash will just work, which you should be doing anyways in scripts that want bash.
#!/usr/bin/env bashBash should be recognized as the tech equivalent of asbestos.
A fair analogy, given how much money I have made as someone who is willing to deal with metaphorical asbestos.
There's plenty of money to be made in both.
Earlier quoted context omitted.
Idempotency and reusability are what I like about Ansible. YAML is a dependency I could do without. Maybe what we need is a set of CLI commands that mirror Ansible modules in performing idempotent operations through SSH and APIs.
Is ansible really reusible? We had an ansible deploy for bringing up MySQL database. I stopped using the codebase and came back to it months later; and I spent two days trying to get it to work (it was an unholy combination of local and community yaml) and eventually just rewrote the damn thing as a bare sequence on literal MySQL (in 20 minutes I might add) and disabled verification - definitely worst practices - to…
Earlier quoted context omitted.
I'd imagine it's because it's available everywhere (even openwrt routers and those things), and it's easier to get away with not having to use sudo (depending on the task you are doing, of course). With Ansible, you almost always need python installed on the target host. Which, in 95% of cases is not a problem. It's not ideal to install a system package just because you want to do some provisioning (there are ways ar…
In my experience, Perl is available everywhere. Some sort of bourne shell is likely available everywhere, but Perl is a safe bet. (EDIT: actually, some systems have recently started removing Perl from their base I hear... Fedora?)
Bash should be recognized as the tech equivalent of asbestos.
Writing decent code in bash is just as possible as any other language.
I stick to POSIX sh but same difference.
Earlier quoted context omitted.
What's the answer then?
Applications with features for user stories. AWS CLI is a very useful tool, because it can do simple things with AWS. In order to do more complex things, usually you have to "script" multiple commands together or write a Boto script in Python. But if the tool just came with those complex things already pre-designed as a feature, we wouldn't have to script it, it would be more reliable, easier, simpler, and nobody wou…
> But that won't happen, because the IT industry is purposely designed to be unnecessarily inefficient, complex, and expensive.
As a fellow developer, I feel your frustration. There have always been UX problems in AWS across the various pieces of first-party software you use to access them (console, SDK, etc.)
But as a developer at AWS (my opinions are my own), I think I disagree? I'll write out a stream of consciousness, it might be wrong. It comes down to at least a couple things:
1) Good UX is hard, especially for newer services that are still learning customer usage and building foundational features. There's no test I can write to know I did it well now and for the future. 2) We have limited resources and tend to focus on building (hopefully) good APIs and features (and operating the services). Good UX requires investing a lot of time and effort, I think.
I don't think I've ever heard anyone say we shouldn't focus on providing a better UX, but most of the time we want to get through the mountain of features that our customers need. Sometimes an org grows large enough, and has been around long enough to understand their customers, and has the right leadership, that they can invest in building out UX improvements, whether that is console integrations or a custom CLI or whatever else. In the meantime, there are individuals/groups/companies that build abstractions - though I also don't think I've ever heard leadership say we should rely on third parties to make our services usable. Sometimes we adopt improvements, or partner with companies, or commit developer time to help maintain a project.
The tricky thing with first-party software is that once something goes in, it's supported forever-ish and is difficult to deprecate, so you have to be very deliberate. The wrong abstraction ends up being costly. We get a ton of value just by being able to auto-generate the CLI from the same models we use to define our service API, and the AWS CLI is pretty well suited for that. Though some teams do provide custom CLIs bundled in, I think.
Though in a more specific sense, I totally agree that the experience of "I have a Docker image. Run it for me." should be easy and I'm glad we have people doing something about it.
Bash should be recognized as the tech equivalent of asbestos.
Y'all just have bias against the string system. Writing decent code in bash is just as possible as any other language. I stick to POSIX sh but same difference.
Earlier quoted context omitted.
At that point you should at least use something elegant like s-expressions. There are so many things I hate about ansible.
Could you elaborate on how and why s-expression solve address the issues of yaml-based DSL? Thanks
Here's an example of a JSON coded query taken from a PuppetDB tutorial (PuppetDB uses a very lispy query language):
["and",
["=", "type", "User"],
["=", "title", "nick"]]
And the same code as you could write it in native s-expressions: (and
(= :type "user")
(= :title "nick"))
...and one way you could encode it in yaml... - and:
- =:
- type
- user
- title:
- title
- nickPortability is pretty important in the deployment/automation space and it's hard to beat bash in that capacity. It just sucks that bash sucks so much.
I hacked up a simple system, in golang, which uses and SSH connection to run commands and transfer files. Of course I simplified the problem to only really uploading files, running commands, and simple template expansion. For a lot of services where you just need to download a binary and configure a config-file it works well but it's nowhere near as useful as Ansible's module system: