Skip to content

Instantly share code, notes, and snippets.

@meleu
Created April 26, 2022 20:16
Show Gist options
  • Save meleu/2ffae46f5a29bf36e9ca0d89768cf93b to your computer and use it in GitHub Desktop.
Save meleu/2ffae46f5a29bf36e9ca0d89768cf93b to your computer and use it in GitHub Desktop.
5 DevOps tips to speed up your workflow

5 DevOps tips to speed up your workflow

1. Learn to live in the terminal.

In the terminal you can quickly parse/manipulate/transform data.

The Linux terminal has tons of awesome tools to make your life easier. Specially when you need to handle a big amount of data and/or files.

Recommended resource: https://github.com/jlevy/the-art-of-command-line

2. Learn bash. But be minimally aware of the "best practices"

Since you're living in the terminal, let's learn a programatic way to interact with it. That's where bash comes in.

Bash is a really powerful tool. Knowing how to use it will surely speed up your workflow.

Even if you're comfortable with another language, knowing the basics of bash will help you to save time. Specially when you need to glue different applications together.

Bash is tricky, though. For historical reasons it has some obsolete/deprecated syntax that you should be aware.

As the entry barrier to start coding with bash is low, it's easy to see a lot of messy bash scripts out there. So, in order to save yourself from doing the same, consider following a well known bash coding style.

I strongly recommend that you also use shellcheck as linter (you can easily integrate it with VSCode, for example). It will keep you away from the most known problems. Just use it!

3. Learn Docker

As a DevOps Engineer, having a solid knowledge of Docker can massively reduce the time you spend with troubleshooting.

Thanks to Docker we can quickly replicate issues on a local machine and quickly find the root cause.

Recommended resource: https://github.com/docker/getting-started

4. Learn YAML

No, this is not a joke. YAML is a really simple thing, but it's common to see people struggling with it.

As a DevOps you'll most likely need to handle kubernetes manifest files written in YAML. Although YAML is very simple, kubernetes is not a trivial topic.

Being able to find issues in the YAML file at a quick glance will surely save you time.

Recommended video: https://www.youtube.com/watch?v=1uFVr15xDGg

Pro tip: always use --validate and --dry-run before actually applying something with kubectl. Example:

kubectl apply --validate=true --dry-run=client -f file.yml

5. Learn tmux

tmux is a "Terminal Multiplexer". As you want to live in the terminal, having a efficient way to manage all your open sessions is very handy.

I must say that tmux has learning curve, but the effort is really worth it.

Recommended resource: https://thoughtbot.com/upcase/tmux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment