Skip to main contentDevops
- On Sunday, Feb 12th, I received a suspcious message about a DHL delivery from hello@namecheap.com. Pretty odd, but I ignored. Later I received notification from NameCheap that there had been a compromise. As of 18:18UTC on 2/13 it’s still being investigated. Below are the emails headers of my message, which appears to be an authenticated message from Sendgrid. I would venture to guess that an API key was leaked. Certainly highlights the need to protect third-party access to such systems.
- Protect your infrastructure - some overlap with secure, so this will focus more on protection from non-security related incidents (buggy code, infrastructure outages, etc)
Backups Restic Kubernetes k8up: Open source k8s backup, allows for custom commands via annotations or generic RWX volume backups Kasten K10: Commercial Kubernetes backup, but up to 10 nodes for free. Velero: Backup both k8s manifests and volumes. Audit Kube Bench - Scan K8S clsuter against CIS best practices.
- Captures ad-hoc scripting and process needs. Also includes resources making these ad-hoc scripts more robust and part of an automation framework.
Shell Minimally Safe Bash Shell Script Template Bash Style Guidelines Bash - Using Loops - Nice example of several looping and conditional structures. Bash - Performance - Reddit post on more advance ways to speed up bash scripts. Debugging Bash Like a Sire: A stacktrace like mechanism for Shell! Gum - Pretty Shellscript Addon Testing Shell Scripts/CLI leveraging Go’s Testing Framework Higher Level Python Shell-like Scripting In Go - Might be a nice bridge when a shell script gets complex enough that you want to use a more robust langauge, but maintain a lot of “shell-like” features Cheatsheet Passing variables to curl bash (Example from coder)
- Tools to verify for development.
Testing Toolsets - Documentation RunMe.dev: Run code from README.md files Testing Toolsets - Kubernetes Kink - Run KinD clusters as a Pod on an existing Kubernetes cluster Testing Toolsets - Infra/Ops TerraTest and Terratest, even without Terraform ServerSpec: Perhaps start for TDD for entire stack.
- Every now and then we do have to use windows. So let’s try to make it as Linux like as possible
Enabling WinRM As Ansible leverages WinRM for managing Windows servers, it’s guide below provides a lot of helpful guidance:
https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html
The TL;DR is to use the following snippet below to run a powershell script that will correctly enable WinRM for the system:
$url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" $file = "$env:temp\ConfigureRemotingForAnsible.ps1" (New-Object -TypeName System.