# Likwid - Post-Reboot WSL2 & Podman Setup Script # Run this script after rebooting to complete the environment setup Write-Host "=== Likwid Post-Reboot Setup ===" -ForegroundColor Cyan # Step 1: Verify WSL2 is working Write-Host "`n[1/4] Checking WSL2 status..." -ForegroundColor Yellow $wslStatus = wsl --status 2>&1 if ($LASTEXITCODE -ne 0) { Write-Host "WSL2 is not ready. Please ensure virtualization is enabled in BIOS." -ForegroundColor Red Write-Host "Run 'wsl --install --no-distribution' as administrator if needed." -ForegroundColor Red exit 1 } Write-Host "WSL2 is ready!" -ForegroundColor Green # Step 2: Install openSUSE Tumbleweed Write-Host "`n[2/4] Installing openSUSE Tumbleweed..." -ForegroundColor Yellow $distros = wsl --list --quiet 2>&1 if ($distros -match "openSUSE-Tumbleweed") { Write-Host "openSUSE Tumbleweed is already installed." -ForegroundColor Green } else { Write-Host "Installing openSUSE Tumbleweed (this may take a while)..." -ForegroundColor Yellow wsl --install -d openSUSE-Tumbleweed if ($LASTEXITCODE -ne 0) { Write-Host "Failed to install openSUSE Tumbleweed." -ForegroundColor Red exit 1 } Write-Host "openSUSE Tumbleweed installed!" -ForegroundColor Green } # Step 3: Set openSUSE as default Write-Host "`n[3/4] Setting openSUSE Tumbleweed as default WSL distribution..." -ForegroundColor Yellow wsl --set-default openSUSE-Tumbleweed # Step 4: Configure Podman in WSL2 Write-Host "`n[4/4] Configuring Podman in openSUSE Tumbleweed..." -ForegroundColor Yellow wsl -d openSUSE-Tumbleweed -e bash -c " echo 'Installing Podman and podman-compose...' sudo zypper refresh sudo zypper install -y podman podman-compose echo 'Enabling rootless Podman socket...' systemctl --user enable --now podman.socket echo 'Verifying installation...' podman --version podman-compose --version " Write-Host "`n=== Setup Complete ===" -ForegroundColor Cyan Write-Host "Next steps:" -ForegroundColor Yellow Write-Host "1. Open Podman Desktop and configure it to use WSL2 backend" Write-Host "2. Start Podman machine in Podman Desktop" Write-Host "3. Run '.\scripts\dev.ps1' to start development services" Write-Host "4. Run 'cargo run' in backend/ to start the backend" Write-Host "5. Run 'npm run dev' in frontend/ to start the frontend"