feat: refactor 30+ skills to Anthropic progressive disclosure pattern
- All SKILL.md files now <500 lines (avg reduction 69%) - Detailed content extracted to references/ subdirectories - Frontmatter standardised: only name + description (Anthropic standard) - New skills: brand-guidelines, spec-coauthor, report-templates, skill-creator - Design skills: anti-slop guidelines, premium-proposals reference - Removed non-standard frontmatter fields (triggers, version, author, category) Plugins affected: infraestrutura, marketing, dev-tools, crm-ops, gestao, core-tools, negocio, perfex-dev, wordpress, design-media Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
# installimage e ZFS - Proxmox Hetzner
|
||||
|
||||
Detalhes de instalacao via installimage e configuracao ZFS.
|
||||
|
||||
---
|
||||
|
||||
## Template installimage
|
||||
|
||||
Template base para 2x NVMe 1TB + HDD 16TB:
|
||||
|
||||
```bash
|
||||
DRIVE1 /dev/nvme0n1
|
||||
DRIVE2 /dev/nvme1n1
|
||||
SWRAID 0
|
||||
SWRAIDLEVEL 0
|
||||
BOOTLOADER grub
|
||||
HOSTNAME HOSTNAME_PLACEHOLDER
|
||||
PART /boot ext3 1024M
|
||||
PART lvm vg0 all
|
||||
|
||||
LV vg0 root / ext4 50G
|
||||
LV vg0 swap swap swap 16G
|
||||
LV vg0 tmp /tmp ext4 10G
|
||||
LV vg0 home /home ext4 20G
|
||||
|
||||
IMAGE /root/images/Debian-bookworm-latest-amd64-base.tar.gz
|
||||
```
|
||||
|
||||
## Executar installimage
|
||||
|
||||
```bash
|
||||
# No Rescue Mode
|
||||
installimage
|
||||
|
||||
# Seleccionar Debian 12 (Bookworm)
|
||||
# Copiar template acima
|
||||
# Salvar e confirmar
|
||||
# Reboot automatico
|
||||
```
|
||||
|
||||
## Conversao para ZFS (Pos-Install)
|
||||
|
||||
**IMPORTANTE:** installimage nao suporta ZFS directamente. Workflow:
|
||||
1. Instalar Debian 12 com LVM (installimage)
|
||||
2. Boot em Debian
|
||||
3. Instalar ZFS + Proxmox
|
||||
4. Migrar para ZFS pool (ou aceitar LVM para root, ZFS para VMs)
|
||||
|
||||
### Opcao A: ZFS para VMs apenas (RECOMENDADO para Hetzner)
|
||||
|
||||
```bash
|
||||
# Criar ZFS pool em NVMe para VMs
|
||||
zpool create -f \
|
||||
-o ashift=12 \
|
||||
-o compression=lz4 \
|
||||
-o atime=off \
|
||||
rpool mirror /dev/nvme0n1p3 /dev/nvme1n1p3
|
||||
|
||||
# Criar datasets
|
||||
zfs create rpool/vm-disks
|
||||
zfs create rpool/ct-volumes
|
||||
```
|
||||
|
||||
### Opcao B: ZFS root (AVANCADO - requer reinstall manual)
|
||||
|
||||
- Nao suportado por installimage
|
||||
- Requer particionamento manual + debootstrap
|
||||
- Consultar: https://pve.proxmox.com/wiki/ZFS_on_Linux
|
||||
|
||||
**Recomendacao para Cluster Descomplicar:** Opcao A (LVM root, ZFS para VMs)
|
||||
|
||||
---
|
||||
|
||||
## ZFS Tuning (128GB RAM)
|
||||
|
||||
### Configurar ARC Limits
|
||||
|
||||
```bash
|
||||
# ARC max 16GB (deixa 110GB para VMs)
|
||||
# ARC min 4GB
|
||||
echo "options zfs zfs_arc_max=17179869184" >> /etc/modprobe.d/zfs.conf
|
||||
echo "options zfs zfs_arc_min=4294967296" >> /etc/modprobe.d/zfs.conf
|
||||
|
||||
# Aplicar
|
||||
update-initramfs -u -k all
|
||||
```
|
||||
|
||||
### Optimizar ZFS para NVMe
|
||||
|
||||
```bash
|
||||
# Verificar ashift (deve ser 12 para NVMe 4K sectors)
|
||||
zdb -C rpool | grep ashift
|
||||
|
||||
# Activar compression LZ4 (se ainda nao)
|
||||
zfs set compression=lz4 rpool
|
||||
|
||||
# Disable atime (performance)
|
||||
zfs set atime=off rpool
|
||||
|
||||
# Snapshot visibility
|
||||
zfs set snapdir=hidden rpool
|
||||
```
|
||||
|
||||
### Criar ZFS Datasets para PBS (se HDD 16TB)
|
||||
|
||||
```bash
|
||||
# Dataset para PBS datastore
|
||||
zfs create rpool/pbs-datastore
|
||||
zfs set mountpoint=/mnt/pbs-datastore rpool/pbs-datastore
|
||||
zfs set compression=lz4 rpool/pbs-datastore
|
||||
zfs set dedup=off rpool/pbs-datastore
|
||||
```
|
||||
120
infraestrutura/skills/proxmox-setup/references/networking-nat.md
Normal file
120
infraestrutura/skills/proxmox-setup/references/networking-nat.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# Networking NAT e vSwitch - Proxmox Hetzner
|
||||
|
||||
Configuracao de rede NAT single-IP e vSwitch para Proxmox em Hetzner.
|
||||
|
||||
---
|
||||
|
||||
## Networking NAT (Single-IP Hetzner)
|
||||
|
||||
### Configurar /etc/network/interfaces
|
||||
|
||||
Template para Single-IP NAT:
|
||||
|
||||
```bash
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# Interface fisica (verificar nome com 'ip a')
|
||||
auto eno1
|
||||
iface eno1 inet static
|
||||
address SERVER_IP/32
|
||||
gateway GATEWAY_IP
|
||||
pointopoint GATEWAY_IP
|
||||
|
||||
# Bridge interna para VMs (NAT)
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
address 10.10.10.1/24
|
||||
bridge-ports none
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
|
||||
# NAT masquerading
|
||||
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
|
||||
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
|
||||
```
|
||||
|
||||
**CRITICAL Hetzner Gotchas:**
|
||||
- Gateway /32 point-to-point (nao /24 ou /26)
|
||||
- IP e gateway podem estar em subnets diferentes
|
||||
- Verificar IP real e gateway no Hetzner Robot
|
||||
|
||||
### Aplicar Networking
|
||||
|
||||
```bash
|
||||
# Test config
|
||||
ifup --no-act vmbr0
|
||||
|
||||
# Apply
|
||||
systemctl restart networking
|
||||
|
||||
# Verificar
|
||||
ip a
|
||||
ping -c 3 8.8.8.8
|
||||
```
|
||||
|
||||
### Port Forwarding (Opcional - para expor VMs)
|
||||
|
||||
```bash
|
||||
# Exemplo: Redirecionar porta 8080 host -> porta 80 VM 10.10.10.100
|
||||
iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 8080 -j DNAT --to 10.10.10.100:80
|
||||
|
||||
# Persistir com iptables-persistent
|
||||
apt install iptables-persistent
|
||||
iptables-save > /etc/iptables/rules.v4
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## vSwitch Configuration
|
||||
|
||||
### Configurar VLAN no Robot Panel
|
||||
|
||||
- Hetzner Robot -> vSwitch -> Create VLAN
|
||||
- Anotar VLAN ID (ex: 4000)
|
||||
|
||||
### Adicionar ao /etc/network/interfaces
|
||||
|
||||
```bash
|
||||
# vSwitch interface (MTU 1400 OBRIGATORIO)
|
||||
auto enp7s0.4000
|
||||
iface enp7s0.4000 inet manual
|
||||
mtu 1400
|
||||
|
||||
# Bridge vSwitch
|
||||
auto vmbr1
|
||||
iface vmbr1 inet static
|
||||
address 10.0.0.1/24
|
||||
bridge-ports enp7s0.4000
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
mtu 1400
|
||||
```
|
||||
|
||||
**CRITICAL:** MTU 1400 nao negociavel para vSwitch Hetzner.
|
||||
|
||||
---
|
||||
|
||||
## Hetzner-Specific Gotchas (CRITICAL)
|
||||
|
||||
### 1. MAC Filtering
|
||||
**Problema:** Bridged networking com MAC nao registado = bloqueado
|
||||
**Solucao aplicada:** NAT masquerading (bypass MAC filtering)
|
||||
**Alternativa:** Pedir virtual MAC no Robot panel (gratis)
|
||||
|
||||
### 2. Gateway Point-to-Point
|
||||
**Problema:** Gateway fora da subnet do IP principal
|
||||
**Solucao:** `address IP/32` + `pointopoint GATEWAY` (nao /24 ou /26)
|
||||
|
||||
### 3. vSwitch MTU 1400
|
||||
**Problema:** vSwitch Hetzner requer MTU 1400 (nao 1500 standard)
|
||||
**Solucao:** Forcar `mtu 1400` em vmbr1 e enp7s0.4000
|
||||
|
||||
### 4. ZFS vs LVM Trade-off
|
||||
**Problema:** installimage nao suporta ZFS root directo
|
||||
**Solucao:** LVM para root (compatibilidade), ZFS para VMs (performance)
|
||||
|
||||
### 5. Kernel PVE vs Debian
|
||||
**Problema:** Kernel stock Debian nao optimizado para virtualizacao
|
||||
**Solucao:** Instalar proxmox-ve + remover kernel Debian
|
||||
Reference in New Issue
Block a user