49 lines
1.1 KiB
Markdown
49 lines
1.1 KiB
Markdown
# Tooling
|
|
|
|
All commands assume PowerShell from the project root.
|
|
|
|
## Environment
|
|
|
|
```powershell
|
|
. .\.env.local.ps1
|
|
```
|
|
|
|
If no private env file is loaded, SSH still uses the local defaults from
|
|
`scripts/ProxmoxAgent.ps1`. API calls require token env vars.
|
|
|
|
## Smoke test
|
|
|
|
```powershell
|
|
.\scripts\Test-ProxmoxConnection.ps1
|
|
```
|
|
|
|
## Inventory
|
|
|
|
```powershell
|
|
.\scripts\Get-ProxmoxInventory.ps1
|
|
```
|
|
|
|
## SSH wrapper
|
|
|
|
```powershell
|
|
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct list"
|
|
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "qm list"
|
|
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- docker ps -a"
|
|
```
|
|
|
|
## API from a PowerShell session
|
|
|
|
```powershell
|
|
. .\scripts\ProxmoxAgent.ps1
|
|
Invoke-ProxmoxApi -Path "/version"
|
|
Invoke-ProxmoxApi -Path "/nodes"
|
|
Invoke-ProxmoxApi -Path "/cluster/resources"
|
|
```
|
|
|
|
## Commands that require confirmation
|
|
|
|
- `pct start`, `pct shutdown`, `pct reboot`, `pct stop`, `pct destroy`
|
|
- `qm start`, `qm shutdown`, `qm reboot`, `qm stop`, `qm destroy`
|
|
- `docker restart`, `docker stop`, `docker rm`, `docker compose up/down`
|
|
- package updates, firewall edits, network edits, storage edits
|