Commit inicial - estructura base del proyecto
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Runbook: Conexion
|
||||
|
||||
## 1. Cargar entorno
|
||||
|
||||
Usa un archivo privado `.env.local.ps1` con estos valores:
|
||||
|
||||
```powershell
|
||||
$env:PROXMOX_HOST = "192.168.0.200"
|
||||
$env:PROXMOX_NODE = "thinkcentre"
|
||||
$env:PROXMOX_USER = "root"
|
||||
$env:PROXMOX_SSH_KEY = "C:\Users\Uriel Jareth\.openclaw\workspace\proxmox_key_win"
|
||||
$env:PROXMOX_API_BASE_URL = "https://192.168.0.200:8006/api2/json"
|
||||
$env:PROXMOX_API_TOKEN_ID = "root@pam!openclaw"
|
||||
$env:PROXMOX_API_TOKEN_SECRET = "REPLACE_WITH_TOKEN_SECRET"
|
||||
$env:PROXMOX_COOLIFY_LXC = "102"
|
||||
```
|
||||
|
||||
Luego:
|
||||
|
||||
```powershell
|
||||
. .\.env.local.ps1
|
||||
```
|
||||
|
||||
## 2. Probar conexion
|
||||
|
||||
```powershell
|
||||
.\scripts\Test-ProxmoxConnection.ps1
|
||||
```
|
||||
|
||||
Resultados esperados:
|
||||
|
||||
- `config`: `PASS`
|
||||
- `ssh-read`: `PASS`
|
||||
- `docker-lxc-102`: `PASS`
|
||||
- `api-auth`: `PASS` si el token esta cargado, `SKIP` si no lo esta
|
||||
|
||||
## 3. Comandos base
|
||||
|
||||
```powershell
|
||||
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "hostname && pveversion"
|
||||
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct list && qm list"
|
||||
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"
|
||||
```
|
||||
|
||||
## 4. API REST
|
||||
|
||||
Desde PowerShell:
|
||||
|
||||
```powershell
|
||||
. .\scripts\ProxmoxAgent.ps1
|
||||
Invoke-ProxmoxApi -Path "/version"
|
||||
Invoke-ProxmoxApi -Path "/nodes"
|
||||
Invoke-ProxmoxApi -Path "/cluster/resources"
|
||||
```
|
||||
Reference in New Issue
Block a user