Skip to content

Instantly share code, notes, and snippets.

View HariSekhon's full-sized avatar
🏠
100% Remote - Digital Nomad

Hari Sekhon HariSekhon

🏠
100% Remote - Digital Nomad
View GitHub Profile
@HariSekhon
HariSekhon / atlantis.md
Created July 17, 2024 09:16
atlantis.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

Atlantis

https://www.runatlantis.io/

Terraform pull request automation on GitHub using GitHub Actions.

  • interaction is through pull request comments
  • Atlantis comments on the PR with command prompts of what to type in comments (and even corrects you if you comment terraform instead of atlantis command)
  • runs the Terraform / Terragrunt plan automatically upon creation / commit changes to
@HariSekhon
HariSekhon / tgswitch.md
Last active July 15, 2024 00:12
tgswitch.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base
@HariSekhon
HariSekhon / tfenv.md
Last active July 18, 2024 00:52
tfenv.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

tfenv

Installs multiple versions of Terraform to ~/.tfenv in order to maintain compatibility with different Terraform code bases.

Otherwise using a newer globally installed version of Terraform will upgrade the terraform.tfstate file and break other clients who will be forced to upgrade to the same version in order to run again.

On Mac, install tfenv:

@HariSekhon
HariSekhon / eks.md
Created July 14, 2024 23:18
eks.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

AWS EKS - Elastic Kubernetes Service

EKS Kubectl Access

First install AWS CLI as per the AWS page.

Then run the eks_kube_creds.sh script from the DevOps-Bash-tools repo's aws/ directory.

This will find and configure kube config for all your kubernetes clusters in the current AWS account.

@HariSekhon
HariSekhon / direnv.md
Created July 14, 2024 23:18
direnv.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

direnv - .envrc

direnv reads .envrc files and auto-loads useful environment variables upon switching directories that allow you to quickly switch between AWS profiles, EKS clusters, Terraform & Terragrunt versions or any number of other software versions or profiles.

Install direnv

On Mac just:

@HariSekhon
HariSekhon / helm-vs-kustomize.md
Created July 11, 2024 14:58
helm-vs-kustomize.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

Helm vs Kustomize

Helm is better for publishing Kubernetes configuration for official apps.

Kustomize is better for internal team managed apps, or for wrapping / extending / patching Helm generated k8s yaml.

Helm requires you to plan up front all configuration parameters. This is quite hard to do unless you want to spend a huge amount of time trying to think about all possible variations.

@HariSekhon
HariSekhon / helm.md
Last active July 11, 2024 16:09
helm.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

Helm

Package Manager for Kubernetes.

Helm is the original Kubernetes app manager before the rise of Kustomize and still the primary mechanism of deploying public Kubernetes applications.

  • templated Kubernetes YAML manifests
  • release is a deployed combination of Chart bundle + your custom values.yaml variables
  • stores release info in k8s secret in same namespace as the release, no DB needed
@HariSekhon
HariSekhon / vertica.md
Last active July 9, 2024 21:31
vertica.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

HP Vertica

Proprietary MPP SQL OLAP database with a free community edition.

  • OLAP - online analytic processing (batch analytics, not real time)
  • columnar database
    • high compression because columns of same data type compress better
    • enhanced query performance for well targeted sequential queries due to column read skipping at the expense of single record retrieval
  • MPP - massively parallel processing architecture allows to scale horizontally across independent servers
  • segmentation into sub-clusters - on any integer column / expression - shards to nodes
@HariSekhon
HariSekhon / vault.md
Last active July 11, 2024 14:58
vault.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

Hashicorp Vault

https://developer.hashicorp.com/vault

The leading open source secrets manager.

  • stores credentials / secrets / keys / passwords / certificates / API keys
  • detailed audit log
  • key rolling
  • encrypts before writing to disk / consul
@HariSekhon
HariSekhon / dockerfile.md
Created July 2, 2024 17:37
dockerfile.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base