Skip to content

benceVadasz/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Dotfiles - DevOps Learning Environment

My personal dotfiles for setting up a comprehensive DevOps learning and development environment.

What's Inside

  • Shell Configuration: Zsh with Oh My Zsh and Powerlevel10k theme
  • DevOps Tools: Comprehensive aliases and functions for Docker, Kubernetes, Terraform, AWS, and more
  • Learning Resources: Integrated documentation and sandbox environments
  • CI/CD Helpers: Git workflow automation and GitHub Actions integration
  • Monitoring Tools: System and application monitoring utilities
  • Custom Aliases & Functions: Productivity-focused shortcuts and helpers

Directory Structure

dotfiles/
โ”œโ”€โ”€ zsh/
โ”‚   โ”œโ”€โ”€ .zshrc                    # Main zsh configuration
โ”‚   โ”œโ”€โ”€ aliases.zsh               # General aliases
โ”‚   โ”œโ”€โ”€ functions.zsh             # General functions
โ”‚   โ”œโ”€โ”€ keybindings.zsh          # Custom key bindings
โ”‚   โ”œโ”€โ”€ p10k.zsh                 # Powerlevel10k config
โ”‚   โ”œโ”€โ”€ devops/                  # DevOps-specific configurations
โ”‚   โ”‚   โ”œโ”€โ”€ docker.zsh           # Docker aliases & functions
โ”‚   โ”‚   โ”œโ”€โ”€ kubernetes.zsh       # Kubernetes helpers
โ”‚   โ”‚   โ”œโ”€โ”€ terraform.zsh        # Terraform/IaC tools
โ”‚   โ”‚   โ”œโ”€โ”€ aws.zsh              # AWS & cloud providers
โ”‚   โ”‚   โ”œโ”€โ”€ cicd.zsh             # CI/CD workflows
โ”‚   โ”‚   โ””โ”€โ”€ monitoring.zsh       # Monitoring & observability
โ”‚   โ””โ”€โ”€ plugins/                 # Zsh plugins
โ”‚       โ”œโ”€โ”€ zsh-syntax-highlighting/
โ”‚       โ”œโ”€โ”€ zsh-autosuggestions/
โ”‚       โ””โ”€โ”€ zsh-shift-select/
โ”œโ”€โ”€ git/
โ”‚   โ”œโ”€โ”€ .gitconfig               # Git configuration
โ”‚   โ”œโ”€โ”€ git-aliases.zsh          # Comprehensive git aliases
โ”‚   โ””โ”€โ”€ hooks/                   # Git hooks templates
โ”œโ”€โ”€ configs/                      # Tool configurations
โ”‚   โ”œโ”€โ”€ kubectl/
โ”‚   โ”‚   โ””โ”€โ”€ completion.zsh       # Kubectl autocomplete
โ”‚   โ”œโ”€โ”€ docker/
โ”‚   โ”‚   โ””โ”€โ”€ config.json.example
โ”‚   โ”œโ”€โ”€ terraform/
โ”‚   โ”‚   โ””โ”€โ”€ .terraformrc.example
โ”‚   โ””โ”€โ”€ ansible/
โ”‚       โ””โ”€โ”€ ansible.cfg.example
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ install.sh               # Main installation script
โ”‚   โ”œโ”€โ”€ setup/                   # Setup scripts
โ”‚   โ”‚   โ””โ”€โ”€ devops-tools.sh     # Install DevOps tools
โ”‚   โ””โ”€โ”€ sandbox/                 # Practice environments
โ”‚       โ””โ”€โ”€ k8s-local-cluster.sh # Local K8s cluster
โ”œโ”€โ”€ docs/                        # Learning documentation
โ”‚   โ””โ”€โ”€ COMMANDS.md              # Quick reference guide
โ”œโ”€โ”€ templates/                   # Reusable templates
โ”‚   โ”œโ”€โ”€ kubernetes/
โ”‚   โ”œโ”€โ”€ terraform/
โ”‚   โ””โ”€โ”€ cicd/
โ””โ”€โ”€ README.md

Prerequisites

Installation

  1. Clone the repository (with submodules):
git clone --recursive https://github.com/yourusername/dotfiles.git ~/.dotfiles
  1. Run the installation script:
cd ~/.dotfiles
chmod +x scripts/install.sh
./scripts/install.sh

Features

๐Ÿณ Docker Tools

  • 50+ Docker aliases for container management
  • Smart cleanup functions with interactive prompts
  • Container debugging tools (ddebug, dshell, dlogs)
  • Image building with validation (dbuild)
  • Security scanning integration (dscan with trivy)
  • Resource monitoring (dstats, dsize, dtop)

โ˜ธ๏ธ Kubernetes Helpers

  • Comprehensive kubectl aliases (k, kgp, kgs, etc.)
  • Pod debugging suite (kdebug, kshell, klogs)
  • Cluster information tools (kinfo, knodes, knamespaces)
  • Deployment management (kdeploy, krestart, kscale-deploy)
  • Troubleshooting helpers (kcrash, kpending, kerrors)
  • Port forwarding with guidance (kport)
  • Auto-completion for all kubectl commands

๐Ÿ—๏ธ Terraform/IaC

  • Safe apply/destroy workflows with confirmations
  • State management helpers (tfstate-*)
  • Workspace management (tfwork-*)
  • Plan and cost estimation (tfplan, tfcost)
  • Security scanning (tfsec, checkov)
  • Import and debugging tools

โ˜๏ธ Cloud Providers

  • AWS CLI helpers with cost awareness
  • Profile switching (awsswitch)
  • EC2 management (ec2list, ec2start, ec2stop)
  • S3 tools (s3size, s3tree, s3public)
  • Lambda helpers (lambdalist, lambdalogs)
  • CloudFormation tools (cfnstatus, cfnoutputs)
  • Cost tracking (awscosts, awscosts-service)
  • GCP helpers (gcswitch, gcprojects)

๐Ÿ”„ CI/CD Workflows

  • Git workflow automation (feature, hotfix, release)
  • GitHub Actions integration (ghactions, ghrun)
  • Pull request helpers (prcreate, prcheck, prmerge)
  • Local CI testing (citest, cilint, cibuild)
  • Secret scanning (cisecrets)
  • Pipeline validation (cipipe)
  • Branch management (branch-clean, branches)

๐Ÿ“Š Monitoring & Observability

  • System monitoring (sysmon, portcheck, diskmon)
  • Log analysis (logtail, logsearch, logerrors)
  • Application health checks (apphealth, apimetrics)
  • Container monitoring (containerstats, containerhealth)
  • Performance testing (loadtest, benchmark)
  • Network monitoring (netmon, connections)

๐ŸŽฏ General Productivity

  • killport: Kill process on specified port
  • Original aliases preserved: dev, play, migration-gen, etc.
  • Enhanced git aliases: 100+ git shortcuts
  • Custom key bindings for terminal efficiency

๐Ÿ”Œ Plugins

  • zsh-syntax-highlighting - Command highlighting
  • zsh-autosuggestions - Smart suggestions
  • zsh-shift-select - Text selection with shift

Updating

Update dotfiles

cd ~/.dotfiles
git pull

Update plugins

git submodule update --remote

DevOps Learning Path

This environment is designed to accelerate your DevOps learning through daily practice.

Getting Started

  1. Install DevOps Tools

    cd ~/.dotfiles
    chmod +x scripts/setup/devops-tools.sh
    ./scripts/setup/devops-tools.sh
  2. Set Up Local Kubernetes Cluster

    chmod +x scripts/sandbox/k8s-local-cluster.sh
    ./scripts/sandbox/k8s-local-cluster.sh
  3. Explore Available Commands

    dhelp      # Docker commands
    khelp      # Kubernetes commands
    tfhelp     # Terraform commands
    awshelp    # AWS commands
    cihelp     # CI/CD commands
    monhelp    # Monitoring commands
  4. Read Quick Reference

    cat docs/COMMANDS.md
    # or
    open docs/COMMANDS.md

Practice Workflows

Docker Practice

# Build and run a container
drun ubuntu:latest
dshell <container>
dlogs <container>
dcleanup  # Clean up when done

Kubernetes Practice

# Set up local cluster (if not done already)
./scripts/sandbox/k8s-local-cluster.sh

# Practice commands
kgp                          # List pods
kubectl create deployment nginx --image=nginx
kdeploy nginx                # View deployment details
kshell <pod-name>            # Open shell in pod

Terraform Practice

# Create a simple config
mkdir tf-test && cd tf-test
# ... create main.tf ...
tfinit
tfvalidate-all
tfplan
tfapply

CI/CD Practice

# Create a feature branch
feature user-authentication

# Make changes...
git add .
git commit -m "Add user auth"
git push

# Create PR
prcreate "Add user authentication"

# Check CI status
prcheck

Learning Resources

  • docs/COMMANDS.md - Complete command reference
  • configs/ - Example configurations for various tools
  • templates/ - Starter templates for common tasks
  • Inline help: Every function has --help or shows usage examples

Customization

Adding new aliases

Add them to zsh/aliases.zsh for general aliases, or to the appropriate file in zsh/devops/ for DevOps-specific aliases.

Adding new functions

Add them to zsh/functions.zsh for general functions, or create domain-specific functions in zsh/devops/.

Adding new key bindings

Add them to zsh/keybindings.zsh

Modifying DevOps helpers

Each DevOps tool has its own file in zsh/devops/:

  • docker.zsh - Docker commands
  • kubernetes.zsh - Kubernetes commands
  • terraform.zsh - Terraform/IaC commands
  • aws.zsh - Cloud provider commands
  • cicd.zsh - CI/CD workflows
  • monitoring.zsh - Monitoring tools

Supported Tools

This environment includes helpers and configurations for:

Container & Orchestration

  • Docker & Docker Compose
  • Kubernetes (kubectl, kind, k9s)
  • Helm

Infrastructure as Code

  • Terraform
  • CloudFormation
  • Ansible (basic support)

Cloud Providers

  • AWS (EC2, S3, Lambda, CloudFormation, IAM, etc.)
  • Google Cloud Platform (GCP/gcloud)
  • Azure (basic aliases)

CI/CD

  • GitHub Actions
  • GitLab CI
  • GitHub CLI (gh)
  • Git workflows (feature branches, releases, etc.)

Monitoring & Observability

  • System monitoring (CPU, memory, disk, network)
  • Log analysis
  • Application health checks
  • Container monitoring
  • Performance testing

Security & Compliance

  • Trivy (container scanning)
  • tfsec (Terraform security)
  • Checkov (IaC compliance)
  • Secret detection
  • Hadolint (Dockerfile linting)

Utilities

  • jq, yq (JSON/YAML processing)
  • HTTPie (better curl)
  • bat (better cat)
  • fzf (fuzzy finder)
  • stern (K8s log tailing)

Troubleshooting

Commands not found after installation

source ~/.zshrc
# or restart your terminal

DevOps commands not loading

Check that DevOps configs are being sourced:

grep -A 5 "Load DevOps configurations" ~/.dotfiles/zsh/.zshrc

Permission denied on scripts

chmod +x ~/.dotfiles/scripts/**/*.sh

Kubectl completion not working

source ~/.dotfiles/configs/kubectl/completion.zsh

Contributing

Feel free to fork and customize for your own use! Suggestions and improvements are welcome.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Oh My Zsh - Framework
  • Powerlevel10k - Theme
  • All plugin authors
  • DevOps community for best practices and inspiration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors