#random (2021-08)
Non-work banter and water cooler conversation
A place for non-work-related flimflam, faffing, hodge-podge or jibber-jabber you’d prefer to keep out of more focused work-related channels.
Archive: https://archive.sweetops.com/random/
2021-08-09
Just finished my latest blog to help people learn basic linux commands, these are essentials to know for DevOps, Kubernetes etc. https://bradmccoydev.medium.com/kubernetes-journey-basic-linux-commands-you-should-know-da4f95ceca5
If you are starting to get into Kubernetes, and don’t know basic Linux commands yet, you should probably learn how to walk before you can…
I would like to add two more cli commands:
• sed
• jq these two play important roles when updating files or reading json from output command, almost every devops cli tools produce json, and some times you need to read a value
If you are starting to get into Kubernetes, and don’t know basic Linux commands yet, you should probably learn how to walk before you can…
Sadly it’s sooo true
terraform! DevSecOps!
especially important in consulting that we help customers understand we’re not solving fundamental problems of their application
My favorite phrase is “How much will it cost for us to get DevSecOps?”
My latest Zoom background
I’ve had the one on the left for a long time. Just added the one on the right. You inspired me
2021-08-10
2021-08-17
Volkswagen detects when your tests are being run in a CI server, and makes them pass. - GitHub - auchenberg/volkswagen: Volkswagen detects when your tests are being run in a CI server…
2021-08-25
Bashly – Create beautiful bash scripts from simple YAML configuration - https://github.com/DannyBen/bashly
Bash command line framework and CLI generator. Contribute to DannyBen/bashly development by creating an account on GitHub.
heh, ruby that generates YAML, that will be used to generate bash?
Bash command line framework and CLI generator. Contribute to DannyBen/bashly development by creating an account on GitHub.
2021-08-26
You may also be interested in this https://github.com/mumoshu/variant
Wrap up your bash scripts into a modern CLI today. Graduate to a full-blown golang app tomorrow. - GitHub - mumoshu/variant: Wrap up your bash scripts into a modern CLI today. Graduate to a full-bl…
Why not https://github.com/mumoshu/variant2 ?
Turn your bash scripts into a modern, single-executable CLI app today - GitHub - mumoshu/variant2: Turn your bash scripts into a modern, single-executable CLI app today
I did a dive into this reproducing the behavior for terraform deployments that Atmos did.
If you have any programming experience in python, Go, or other language that builds good workflows/CLI tools I’d suggest that variant while promising will be very tedious to rebuild entire workflows in.
Not saying it doesn’t hold value, but for me I found it very inhibiting compared to just adding some Taskfile.yml or in my other case Mage (go based task runner) tasks. Yes, it’s not the same as defining in HCL, but honestly I really don’t want to normalize specialized tools in HCL if I can avoid it. If you are dealing with a ton of contributions from others with different languages and tools, it’s just easier to write the commands in your own task framework IMO.
Hope that is somewhat useful. I did give it a shot, but I think even Cloudposse is moving away from variant for their own Go based runner too, so likely they had a similar experience with just coding vs using another DSL to wrap up tools.
yeah i’d recommend writing go instead of custom hcl/yaml config if you’re keen to learn go
other go-based task runner like mage is also great. i’ve tried that myself. one complaint is that writing a testable magefile was hard for me.
so here’s my next trial: https://github.com/mumoshu/gosh
(Re)write your bash script in Go and make it testable too - GitHub - mumoshu/gosh: (Re)write your bash script in Go and make it testable too
Nice! So I guess the testability is a question for me right now. If I write tests for a bunch of wrappers around shell commands things get crazy trying to test. I’m ok with just returning the error in most cases, which mage provides very simply.
For a more “pure” Go based approached, Goyek is a pretty awesome project as well, that follows the testing interface pattern. it’s more idiomatic Go.
My challenge is that I’ve needed to balance adhoc quick fast tasks with the fact that Go isn’t really meant to be written that way. Mage seems to handle the middle path ok.
I’m been standardizing basic tasks here and able to reuse them. These are not very sophisticated but removed my dependency on most of my taskfiles as a first step.
General tooling helpers for simplifying cross repository automation using Mage - GitHub - sheldonhull/magetools: General tooling helpers for simplifying cross repository automation using Mage
I’m happy with the nice polish it gives folks.
For example, if you forget to use the .env.example
to bootstrap during setup, my mage compose:up
task will actually prompt you and ask you to choose a file to copy to .env
to use as a starting template.
Some of this is hard to test like typical Go code, but it’s still a big improvement over trying to write this in a hamstringed shell interpreter in Task.
I was pretty proud of this simple developer workflow tweak to help reduce head scratching and wasted time in setup.
@mumoshu very cool with Gosh. I starred it and will keep it in mind especially if I see some end to end testing needed in the future. thanks!
2021-08-27
2021-08-31
Auth0 is partly down - https://status.auth0.com/