> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ahmadraza.in/llms.txt
> Use this file to discover all available pages before exploring further.

# DevopsMac

# 🚀 DevOps Engineer Mac Setup Documentation

This document captures the full setup we’ve done so far on your macOS system.

***

## 1. 🔧 Core Tools Installed with Homebrew

We used **Homebrew** to install base utilities:

```bash theme={null}
brew install git wget curl jq yq tree htop watch gnu-sed gawk coreutils findutils
```

### Purpose:

* `git` → version control
* `jq` / `yq` → JSON/YAML parsing
* `htop`, `watch` → system/process monitoring
* GNU tools (`sed`, `awk`, etc.) → more powerful versions than macOS defaults

***

## 2. 🐳 Docker Setup

### Problem:

Running `docker ps` gave:

```
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
```

### Solution:

* Installed **Docker Desktop** (daemon + GUI) via Homebrew:

  ```bash theme={null}
  brew install --cask docker
  ```
* Alternative: **Colima** for a lightweight Docker runtime:

  ```bash theme={null}
  brew install colima
  colima start
  ```

***

## 3. 🌐 Browsers & Terminals

Installed additional tools:

```bash theme={null}
brew install --cask arc terminus warp
```

* **Arc Browser** → modern web browser
* **Terminus** → customizable terminal
* **Warp** → AI-powered modern terminal (popular in DevOps)

***

## 4. 🛠 Oh My Zsh & Zsh Customization

### Install Oh My Zsh

```bash theme={null}
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

This sets Zsh as the default shell and installs config in `~/.oh-my-zsh`.

***

## 5. 🎨 Powerlevel10k Theme Setup

The default `robbyrussell` or `agnoster` themes looked boring. We installed **Powerlevel10k**, which is the modern DevOps choice.

### Install Powerlevel10k into Oh My Zsh

```bash theme={null}
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
  ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
```

### Update `~/.zshrc`

```zsh theme={null}
ZSH_THEME="powerlevel10k/powerlevel10k"
```

### Reload Zsh

```bash theme={null}
exec zsh
```

This triggered the **Powerlevel10k configuration wizard**, which saved settings into:

```bash theme={null}
~/.p10k.zsh
```

***

## 6. 🖌 Fonts for Icons/Glyphs

Installed Nerd Fonts for proper icons:

```bash theme={null}
brew install --cask font-meslo-lg-nerd-font
```

This ensures Powerlevel10k glyphs (e.g., git icons, arrows, kube symbols) render correctly.

***

## 7. 📦 Languages & Runtimes

### Node.js (20, 22, 24 via NVM)

```bash theme={null}
brew install nvm
mkdir ~/.nvm
```

Add to `~/.zshrc`:

```zsh theme={null}
export NVM_DIR="$HOME/.nvm"
[ -s "$(brew --prefix nvm)/nvm.sh" ] && \. "$(brew --prefix nvm)/nvm.sh"
```

Then install versions:

```bash theme={null}
nvm install 20
nvm install 22
nvm install 24
nvm alias default 22
```

### Go

```bash theme={null}
brew install go
```

### Python 3.10 (via pyenv)

```bash theme={null}
brew install pyenv
pyenv install 3.10.14
pyenv global 3.10.14
```

***

## 8. 🗄 Database Tools

Installed GUIs:

```bash theme={null}
brew install --cask mysqlworkbench pgadmin4
```

* **MySQL Workbench** → MySQL management
* **pgAdmin4** → PostgreSQL management

***

## 9. ⚡ Verification

* Docker works after running Docker Desktop (or Colima).
* `exec zsh` loads Powerlevel10k prompt.
* Fonts/icons render correctly with Nerd Font.
* Node, Go, Python versions installed and switchable.
* Database GUIs installed.

***

## 🔮 Next Steps

* Add **zsh plugins** for better productivity:

  ```zsh theme={null}
  # In ~/.zshrc
  plugins=(
    git
    zsh-autosuggestions
    zsh-syntax-highlighting
  )
  ```

* Install them via:

  ```bash theme={null}
  brew install zsh-autosuggestions zsh-syntax-highlighting
  ```

* To re-run Powerlevel10k wizard:

  ```bash theme={null}
  p10k configure
  ```

***

👉 Do you want me to extend this doc into a **step-by-step script** (so you can set up a new Mac in one go), or keep it as reference notes?

Got it ✅ — I went through our full conversation from top to bottom and extracted **every tool, language, runtime, and app** we installed (or planned to install). Here’s the consolidated list:

***

# 📦 Installed Tools & Applications (from our setup)

## 🔧 Core Utilities

* **git**
* **wget**
* **curl**
* **jq** (JSON parser)
* **yq** (YAML parser)
* **tree**
* **htop**
* **watch**
* **gnu-sed**
* **gawk**
* **coreutils**
* **findutils**

***

## 🐳 Containers & Orchestration

* **docker** (CLI)
* **Docker Desktop** (daemon + GUI)
* **colima** (lightweight Docker alternative – optional)
* **docker-compose**
* **kubectl**
* **kubectx / kubens**
* **stern**
* **helm**
* **kind**
* **k9s**
* **minikube**

***

## ☁️ Cloud & IaC

* **awscli**
* **azure-cli**
* **google-cloud-sdk**
* **terraform**
* **opentofu**

***

## 🔐 Security & Networking

* **nmap**
* **httpie**
* **curlie**
* **mitmproxy**
* **wireguard-tools**

***

## 🛠 Monitoring & Observability

* **promtool** (Prometheus tool)
* **grafana-loki**

***

## 📦 Package & Language Managers

* **pyenv** (Python versions)
* **pipx**
* **nvm** (Node version manager)
* **nodenv** (alternative Node version manager)
* **goenv** (Go version manager)

***

## 🖥️ Terminals & Shell

* **iterm2**
* **warp**
* **terminus**
* **oh-my-zsh** (framework)
* **powerlevel10k** (theme)
* **MesloLGS Nerd Font** (for icons/glyphs)

***

## ⚡ Zsh Plugins

* **zsh-autosuggestions**
* **zsh-syntax-highlighting**
* **zsh-completions**

***

## 🎨 IDEs & Editors

* **visual-studio-code**
* **cursor** (AI-powered IDE fork of VS Code)

***

## 🌐 Browsers

* **arc**
* **google-chrome**

***

## 📬 Communication

* **slack**
* **microsoft-outlook**
* **thunderbird**

***

## 🎵 Media & Productivity

* **spotify**
* **vlc**
* **google-drive**
* **dropbox**
* **rectangle** (window manager)
* **alfred** (productivity launcher)
* **itsycal** (calendar)
* **notion**
* **zoom**

***

## 🗄️ Database Tools

* **mysqlworkbench**
* **pgadmin4**

***

## 🛠 Languages & Runtimes

* **Node.js** (20, 22, 24 via `nvm`)
* **Go**
* **Python 3.10** (via `pyenv`)

***

👉 This is the **complete list** of everything we’ve installed or configured in this chat.

Do you want me to **turn this into a categorized “Mac DevOps Bootstrap Script”** (one shell script that installs everything in one go)?

***

***

# 🔑 macOS SSH Key Setup (with Keychain)

When connecting to **Bitbucket/GitHub/GitLab via SSH**, you might see:

```
Permission denied (publickey).
```

This happens because your **SSH agent** has no key loaded.

***

## 1. Generate an SSH Key (if you don’t already have one)

```bash theme={null}
ssh-keygen -t ed25519 -C "ahmad.raza@example.com" -f ~/.ssh/ahmad.raza@example.com
```

This creates:

* **Private key** → `~/.ssh/ahmad.raza@example.com`
* **Public key** → `~/.ssh/ahmad.raza@example.com.pub`

***

## 2. Add Key to macOS Keychain

```bash theme={null}
ssh-add --apple-use-keychain ~/.ssh/ahmad.raza@example.com
```

Check if loaded:

```bash theme={null}
ssh-add -l
```

***

## 3. Configure `~/.ssh/config`

Edit (or create) the file:

```bash theme={null}
nano ~/.ssh/config
```

Add:

```ssh theme={null}
Host bitbucket.org
    HostName bitbucket.org
    User git
    IdentityFile ~/.ssh/ahmad.raza@example.com
    UseKeychain yes
    AddKeysToAgent yes
```

💡 This ensures:

* The key auto-loads into Keychain.
* Git automatically uses this key for Bitbucket.

***

## 4. Upload Public Key to Bitbucket

Copy your key:

```bash theme={null}
cat ~/.ssh/ahmad.raza@example.com.pub
```

Go to **Bitbucket → Personal Settings → SSH Keys → Add Key** → paste it.

***

## 5. Test Connection

```bash theme={null}
ssh -T git@bitbucket.org
```

Expected output:

```
authenticated via ssh key.
You can use git to connect to Bitbucket!
```

***

## 6. (Optional) Linux Setup

If using Linux, add this to `~/.bashrc` or `~/.zshrc`:

```bash theme={null}
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/ahmad.raza@example.com
```

***

## ✅ Executive Summary

* **Problem:** SSH agent had no key → “Permission denied”.
* **Fix:** Load key with `ssh-add` and persist via Keychain.
* **Best Practice:** Use `~/.ssh/config` + Keychain → no more manual `ssh-add`.

## Butbucket Setup Mac : (If SSH Key is not working)

It worked because before, your SSH agent had no key loaded, so when git tried to connect to [git@bitbucket.org](mailto:git@bitbucket.org), it sent zero valid identities → Bitbucket rejected with Permission denied (publickey).

When you ran:

ssh-add \~/.ssh/ahmad.[raza@org-name.co.in](mailto:raza@org-name.co.in)

you explicitly loaded that private key into the running ssh-agent.

Now:

ssh-agent remembers the key in memory.

When git makes an SSH connection, the agent presents the key to Bitbucket.

Bitbucket checks the public half of that key against what you uploaded to your account, matches it, and lets you in. ✅

Why you needed ssh-add

On macOS (and Linux if not configured), SSH keys aren’t auto-loaded into the agent at login.

That’s why ssh-add -l was empty at first.

Once you added the key, it worked fine.

How to avoid running ssh-add every time

macOS Keychain (recommended)

ssh-add --apple-use-keychain \~/.ssh/ahmad.[raza@org-name.co.in](mailto:raza@org-name.co.in)

And in \~/.ssh/config:

Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile \~/.ssh/ahmad.[raza@org-name.co.in](mailto:raza@org-name.co.in)
UseKeychain yes
AddKeysToAgent yes

Linux (persistent agent)
Add this to \~/.bashrc or \~/.zshrc:

eval "\$(ssh-agent -s)"
ssh-add \~/.ssh/ahmad.[raza@org-name.co.in](mailto:raza@org-name.co.in)

That way, your key loads automatically on login and you won’t hit this issue again.

👉 Do you want me to give you the exact \~/.ssh/config setup so you’ll never have to ssh-add manually again on your Mac?
