likwid/scripts/post-reboot-setup.ps1
Marco Allegretti 910a6465f2 Initial commit: Likwid governance platform
- Backend: Rust/Axum with PostgreSQL, plugin architecture
- Frontend: Astro with polished UI
- Voting methods: Approval, Ranked Choice, Schulze, STAR, Quadratic
- Features: Liquid delegation, transparent moderation, structured deliberation
- Documentation: User and admin guides in /docs
- Deployment: Docker/Podman compose files for production and demo
- Demo: Seeded data with 3 communities, 13 users, 7 proposals

License: AGPLv3
2026-01-27 17:21:58 +01:00

56 lines
2.3 KiB
PowerShell

# 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"