docs: add Dragon Ball Online VM deployment guide
Some checks failed
Deploy Multi-VM / Deploy VM Web (push) Has been cancelled
Deploy Multi-VM / Deploy VM Auth (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.fusionfall.yml, VM_FUSIONFALL_HOST, VM_FUSIONFALL_SSH_KEY, VM_FUSIONFALL_USER, fusionfall) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.maple2.yml, VM_MAPLE2_HOST, VM_MAPLE2_SSH_KEY, VM_MAPLE2_USER, maple2) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.minecraft.yml, VM_MINECRAFT_HOST, VM_MINECRAFT_SSH_KEY, VM_MINECRAFT_USER, minecraft) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.retro.yml, VM_RETRO_HOST, VM_RETRO_SSH_KEY, VM_RETRO_USER, retro) (push) Has been cancelled
Some checks failed
Deploy Multi-VM / Deploy VM Web (push) Has been cancelled
Deploy Multi-VM / Deploy VM Auth (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.fusionfall.yml, VM_FUSIONFALL_HOST, VM_FUSIONFALL_SSH_KEY, VM_FUSIONFALL_USER, fusionfall) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.maple2.yml, VM_MAPLE2_HOST, VM_MAPLE2_SSH_KEY, VM_MAPLE2_USER, maple2) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.minecraft.yml, VM_MINECRAFT_HOST, VM_MINECRAFT_SSH_KEY, VM_MINECRAFT_USER, minecraft) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.retro.yml, VM_RETRO_HOST, VM_RETRO_SSH_KEY, VM_RETRO_USER, retro) (push) Has been cancelled
- Document Windows Server 2022 setup for vm-dbo (192.168.10.109) - Include Kimi CLI installation steps for Windows Server - Add DBO Global compilation guide with Visual Studio Build Tools - Add MariaDB, firewall, and service configuration (nssm) - Add client connection and backup instructions
This commit is contained in:
284
docs/dbo-vm-guide.md
Normal file
284
docs/dbo-vm-guide.md
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
# Guía de Despliegue — Dragon Ball Online Server
|
||||||
|
|
||||||
|
**VM:** `vm-dbo`
|
||||||
|
**IP:** `192.168.10.109`
|
||||||
|
**Dominio futuro:** `play.consultoria-as.com` (NO configurado todavía)
|
||||||
|
**OS:** Windows Server 2022 (Desktop Experience recomendado)
|
||||||
|
**Puertos:** `22000-22010/tcp`
|
||||||
|
**RAM:** 4-6 GB
|
||||||
|
**Disco:** 30 GB SSD
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚠️ Decisión de arquitectura
|
||||||
|
|
||||||
|
DBO Global está escrito en C++ con **MFC** (Microsoft Foundation Classes), lo cual requiere Windows y Visual Studio para compilar. Por esta razón, esta VM usa **Windows Server** en lugar de Ubuntu.
|
||||||
|
|
||||||
|
| Opción | Estado |
|
||||||
|
|--------|--------|
|
||||||
|
| Ubuntu + Wine | Descartado — MFC no es estable bajo Wine para producción |
|
||||||
|
| Windows Server Core | Posible, pero riesgoso — MFC asume componentes gráficos |
|
||||||
|
| **Windows Server 2022 Desktop** | **Recomendado** — Compilación nativa, más estable |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Instalación de Windows Server 2022
|
||||||
|
|
||||||
|
### ISO
|
||||||
|
Descargar **Windows Server 2022 Evaluation** desde Microsoft:
|
||||||
|
https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022
|
||||||
|
|
||||||
|
### Durante la instalación
|
||||||
|
- **Edición:** Windows Server 2022 Standard Evaluation (Desktop Experience)
|
||||||
|
- **Tipo de instalación:** Custom (limpio)
|
||||||
|
- **Disco:** Usar todo el disco disponible (30 GB)
|
||||||
|
|
||||||
|
### Post-instalación
|
||||||
|
1. Cambiar nombre del equipo: `vm-dbo`
|
||||||
|
2. Configurar IP estática:
|
||||||
|
- IP: `192.168.10.109`
|
||||||
|
- Máscara: `255.255.255.0`
|
||||||
|
- Gateway: `192.168.10.1` (ajustar según tu red)
|
||||||
|
- DNS: `1.1.1.1`, `8.8.8.8`
|
||||||
|
3. Habilitar Remote Desktop:
|
||||||
|
```powershell
|
||||||
|
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name "fDenyTSConnections" -Value 0
|
||||||
|
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
|
||||||
|
```
|
||||||
|
4. Actualizar Windows:
|
||||||
|
```powershell
|
||||||
|
sconfig
|
||||||
|
# Opción 6: Download and Install Updates
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Instalación de Kimi Code CLI
|
||||||
|
|
||||||
|
Kimi se usará para administrar y configurar el servidor desde la terminal.
|
||||||
|
|
||||||
|
### Requisitos previos
|
||||||
|
- PowerShell 5.1+ (viene con Server 2022)
|
||||||
|
- Conexión a Internet
|
||||||
|
|
||||||
|
### Pasos
|
||||||
|
|
||||||
|
Abrir **PowerShell como Administrador**:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# 1. Habilitar ejecución de scripts
|
||||||
|
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
||||||
|
|
||||||
|
# 2. Instalar Kimi CLI (instala uv + Python 3.13 + kimi-cli automáticamente)
|
||||||
|
Invoke-RestMethod https://code.kimi.com/install.ps1 | Invoke-Expression
|
||||||
|
|
||||||
|
# 3. Verificar
|
||||||
|
kimi --version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Autenticación
|
||||||
|
```powershell
|
||||||
|
kimi
|
||||||
|
```
|
||||||
|
Dentro del CLI:
|
||||||
|
```
|
||||||
|
/login
|
||||||
|
```
|
||||||
|
Seguir las instrucciones (abrir URL en navegador, copiar código de verificación).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Instalación de dependencias del servidor
|
||||||
|
|
||||||
|
### Visual Studio 2022 Build Tools
|
||||||
|
Descargar desde: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022
|
||||||
|
|
||||||
|
Durante la instalación, seleccionar:
|
||||||
|
- [x] **Desktop development with C++**
|
||||||
|
- [x] **MFC/ATL support** (bajo C++ Desktop, opciones individuales)
|
||||||
|
- [x] **Windows 11 SDK** (o Windows 10 SDK si 11 no está disponible)
|
||||||
|
|
||||||
|
### MariaDB para Windows
|
||||||
|
1. Descargar desde: https://mariadb.org/download/
|
||||||
|
2. Instalar con configuración por defecto
|
||||||
|
3. Recordar la contraseña de root que configures
|
||||||
|
4. Asegurar que el servicio MariaDB esté corriendo:
|
||||||
|
```powershell
|
||||||
|
Get-Service MariaDB
|
||||||
|
```
|
||||||
|
|
||||||
|
### Git
|
||||||
|
```powershell
|
||||||
|
winget install --id Git.Git -e --source winget
|
||||||
|
# O descargar desde https://git-scm.com/download/win
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Compilación de DBO Global
|
||||||
|
|
||||||
|
### Clonar el repositorio
|
||||||
|
```powershell
|
||||||
|
mkdir C:\dbo
|
||||||
|
cd C:\dbo
|
||||||
|
git clone https://github.com/dboglobal/DBOGLOBAL.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compilar
|
||||||
|
1. Abrir **Developer Command Prompt for VS 2022** (viene con Build Tools)
|
||||||
|
2. Navegar a `C:\dbo\DBOGLOBAL`
|
||||||
|
3. Abrir `DBOGLOBAL.sln` con MSBuild:
|
||||||
|
```cmd
|
||||||
|
msbuild DBOGLOBAL.sln /p:Configuration=Release /p:Platform=x64
|
||||||
|
```
|
||||||
|
4. Los binarios se generarán en `Release\` o `x64\Release\`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Configuración de la base de datos
|
||||||
|
|
||||||
|
### Crear base de datos
|
||||||
|
Abrir ** HeidiSQL** (incluido con MariaDB installer) o usar mysql client:
|
||||||
|
```powershell
|
||||||
|
# Ejecutar scripts SQL que vienen en el repo DBOGLOBAL
|
||||||
|
cd C:\dbo\DBOGLOBAL\sql
|
||||||
|
Get-ChildItem *.sql | ForEach-Object { mysql -u root -p < $_.FullName }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configurar credenciales
|
||||||
|
Editar archivos de configuración del servidor DBO (`.ini` o `.conf` en `Release\`):
|
||||||
|
```ini
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_USER=root
|
||||||
|
DB_PASSWORD=tu_password_aqui
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Firewall de Windows
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# Ver perfil actual
|
||||||
|
Get-NetFirewallProfile
|
||||||
|
|
||||||
|
# Permitir puertos del juego (22000-22010 TCP)
|
||||||
|
New-NetFirewallRule -DisplayName "DBO Game Ports" -Direction Inbound -Protocol TCP -LocalPort 22000-22010 -Action Allow
|
||||||
|
|
||||||
|
# Permitir RDP solo desde red privada (opcional pero recomendado)
|
||||||
|
Set-NetFirewallRule -DisplayGroup "Remote Desktop" -Enabled True
|
||||||
|
# Si se quiere restringir por IP, usar: -RemoteAddress 10.0.0.0/24,192.168.10.0/24
|
||||||
|
|
||||||
|
# Permitir MariaDB solo local (si no se accede desde otra VM)
|
||||||
|
New-NetFirewallRule -DisplayName "MariaDB Local" -Direction Inbound -Protocol TCP -LocalPort 3306 -RemoteAddress 127.0.0.1 -Action Allow
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Ejecución del servidor
|
||||||
|
|
||||||
|
Los servidores de DBO Global típicamente son múltiples ejecutables:
|
||||||
|
|
||||||
|
| Ejecutable | Puerto | Descripción |
|
||||||
|
|------------|--------|-------------|
|
||||||
|
| `AuthServer.exe` | 22000 | Autenticación |
|
||||||
|
| `CharServer.exe` | 22001 | Selección de personaje |
|
||||||
|
| `ChatServer.exe` | 22002 | Chat |
|
||||||
|
| `GameServer.exe` | 22003+ | Canales de juego |
|
||||||
|
|
||||||
|
### Opción A: Ventanas individuales (desarrollo/pruebas)
|
||||||
|
```powershell
|
||||||
|
cd C:\dbo\DBOGLOBAL\Release
|
||||||
|
Start-Process .\AuthServer.exe
|
||||||
|
Start-Process .\CharServer.exe
|
||||||
|
Start-Process .\ChatServer.exe
|
||||||
|
Start-Process .\GameServer.exe
|
||||||
|
```
|
||||||
|
|
||||||
|
### Opción B: Servicio de Windows (producción)
|
||||||
|
Crear un servicio para cada componente usando `nssm` (Non-Sucking Service Manager):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# Instalar nssm
|
||||||
|
winget install --id NSSM.NSSM -e --source winget
|
||||||
|
|
||||||
|
# Crear servicios
|
||||||
|
nssm install DBO-Auth "C:\dbo\DBOGLOBAL\Release\AuthServer.exe"
|
||||||
|
nssm install DBO-Char "C:\dbo\DBOGLOBAL\Release\CharServer.exe"
|
||||||
|
nssm install DBO-Chat "C:\dbo\DBOGLOBAL\Release\ChatServer.exe"
|
||||||
|
nssm install DBO-Game "C:\dbo\DBOGLOBAL\Release\GameServer.exe"
|
||||||
|
|
||||||
|
# Iniciar
|
||||||
|
Start-Service DBO-Auth
|
||||||
|
Start-Service DBO-Char
|
||||||
|
Start-Service DBO-Chat
|
||||||
|
Start-Service DBO-Game
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Verificación
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# Ver procesos corriendo
|
||||||
|
Get-Process | Where-Object { $_.ProcessName -like "*Server*" }
|
||||||
|
|
||||||
|
# Ver puertos escuchando
|
||||||
|
Get-NetTCPConnection -LocalPort 22000,22001,22002,22003 | Select-Object LocalPort, State, OwningProcess
|
||||||
|
|
||||||
|
# Ver logs
|
||||||
|
# Los logs usualmente están en C:\dbo\DBOGLOBAL\Release\logs\ o salen por consola
|
||||||
|
```
|
||||||
|
|
||||||
|
Prueba desde otra máquina en la red:
|
||||||
|
```powershell
|
||||||
|
# En otra PC con PowerShell:
|
||||||
|
Test-NetConnection -ComputerName 192.168.10.109 -Port 22000
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. Conexión de clientes
|
||||||
|
|
||||||
|
1. Descargar el cliente DBO Global
|
||||||
|
2. Configurar el launcher para apuntar a:
|
||||||
|
```
|
||||||
|
192.168.10.109:22000
|
||||||
|
```
|
||||||
|
3. Crear cuenta (o usar cuenta por defecto si existe)
|
||||||
|
|
||||||
|
Cuando se configure `play.consultoria-as.com`, actualizar el launcher al dominio.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. Backup de la base de datos
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# Backup diario con mysqldump
|
||||||
|
$fecha = Get-Date -Format "yyyyMMdd-HHmm"
|
||||||
|
mysqldump -u root -p --all-databases > "C:\dbo\backups\db-$fecha.sql"
|
||||||
|
```
|
||||||
|
|
||||||
|
Programar con Task Scheduler para que corra todos los días.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notas para Kimi en esta VM
|
||||||
|
|
||||||
|
Cuando uses Kimi para administrar esta VM:
|
||||||
|
- Kimi tiene acceso a PowerShell, cmd, y puede editar archivos
|
||||||
|
- No todos los comandos de Linux funcionan — usar equivalentes de PowerShell
|
||||||
|
- Para editar archivos `.ini` o `.sql`, Kimi puede usar `Set-Content` o `notepad`
|
||||||
|
- Los binarios compilados de DBO no deben subirse a Git
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
| Problema | Solución |
|
||||||
|
|----------|----------|
|
||||||
|
| "No compila en VS Build Tools" | Verificar que esté instalado **Desktop development with C++** y **MFC/ATL** |
|
||||||
|
| "MariaDB no conecta" | Verificar que el servicio esté corriendo: `Get-Service MariaDB` |
|
||||||
|
| "Cliente no se conecta" | Verificar firewall de Windows y que todos los puertos 22000-22010 estén abiertos |
|
||||||
|
| "Kimi no se instala" | Verificar `Set-ExecutionPolicy` y conexión a Internet |
|
||||||
|
| "Faltan DLLs al ejecutar" | Instalar **Visual C++ Redistributable** (x64) desde Microsoft |
|
||||||
Reference in New Issue
Block a user