02 draft

Prérequis & Contexte

OS Cible
Progression 0% 0 / 10

Contexte

Contexte du homelab minfra-v2 + installation outillage poste d'admin (mise, task, terraform, packer, ansible, sops, age, bw).

Actions

10
  • Installer Chocolatey 🪟 windows 1 cmd 1 verify
    $ Commandes
    PS> Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
    ✓ Vérifications
    choco --version
  • Installer WSL Ubuntu 🪟 windows 1 cmd 1 verify
    $ Commandes
    PS> # PowerShell admin wsl --install -d Ubuntu wsl --set-default-version 2
    ✓ Vérifications
    wsl -l -v
  • Installer mise (gestionnaire versions) 2 cmd 1 verify
    $ Commandes
    $ choco install mise -y
    $ curl https://mise.run | sh echo 'eval "$(mise activate bash)"' >> ~/.bashrc source ~/.bashrc
    ✓ Vérifications
    mise --version
  • Installer Task (go-task) 2 cmd 1 verify
    $ Commandes
    $ choco install go-task -y
    $ sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
    ✓ Vérifications
    task --version
  • Installer outils via mise 1 cmd 4 verify
    $ Commandes
    $ cd D:\git\minfra-v2 # Windows cd ~/git/minfra-v2 # Linux/macOS mise trust mise install
    ✓ Vérifications
    mise list
    terraform version
    packer version
    sops --version
  • Installer Ansible 🐧 linux 1 cmd 1 verify
    $ Commandes
    $ sudo apt update && sudo apt install -y python3-pip pip install ansible --break-system-packages
    ✓ Vérifications
    ansible --version
  • Installer Bitwarden CLI 3 cmd 1 verify
    $ Commandes
    $ choco install bitwarden-cli -y
    $ sudo snap install bw
    $ brew install bitwarden-cli
    ✓ Vérifications
    bw --version
  • Installer age + pre-commit 3 cmd 2 verify
    $ Commandes
    $ choco install age.portable -y pip install pre-commit
    $ sudo apt install -y age pip install pre-commit --break-system-packages
    $ brew install age pip install pre-commit
    ✓ Vérifications
    age --version
    pre-commit --version
  • Configurer SOPS + clé age 1 cmd 1 verify
    $ Commandes
    $ # Récupérer la clé age depuis Bitwarden (item "age-key-minfra") bw login bw unlock mkdir -p ~/.config/sops/age bw get notes "age-key-minfra" > ~/.config/sops/age/keys.txt chmod 600 ~/.config/sops/age/keys.txt
    ✓ Vérifications
    sops -d infra/ansible/inventory/secrets/git-tokens.yml | head -1
  • Setup hooks pre-commit 1 cmd 1 verify
    $ Commandes
    $ cd D:\git\minfra-v2 # Windows cd ~/git/minfra-v2 # Linux/macOS pre-commit install pre-commit run --all-files
    ✓ Vérifications
    ls .git/hooks/pre-commit