47 lines
999 B
Markdown
47 lines
999 B
Markdown
|
|
# LoopAware Infrastructure CLI
|
||
|
|
|
||
|
|
Professional CLI tooling for managing dynamic infrastructure resources (DNS, DHCP, Ingress, and Port Forwarding).
|
||
|
|
|
||
|
|
## Features
|
||
|
|
- **DNS/DHCP:** Manage `dnsmasq` reservations and custom records on `la-dnsmasq-01`.
|
||
|
|
- **Ingress:** Manage HAProxy subdomains and backend routing.
|
||
|
|
- **Router:** Manage OpenWrt firewall redirects.
|
||
|
|
- **Agent-Friendly:** Designed for use by AI agents and developers.
|
||
|
|
|
||
|
|
## Installation
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd external/dynamic-infra-tooling
|
||
|
|
pip install -e .
|
||
|
|
```
|
||
|
|
|
||
|
|
## Configuration
|
||
|
|
|
||
|
|
Copy `config.yaml.example` to `config.yaml` and update with your infrastructure details.
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cp config.yaml.example config.yaml
|
||
|
|
```
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
Use the `infra` command:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# List DNS entries
|
||
|
|
infra dns list
|
||
|
|
|
||
|
|
# Add an ingress
|
||
|
|
infra ingress add my-app.loopaware.com 10.32.70.50 80
|
||
|
|
|
||
|
|
# Add a port forward (requires ROUTER_PASS env var)
|
||
|
|
export ROUTER_PASS='...'
|
||
|
|
infra router add "My-Service" tcp 5000 10.32.70.50 5000
|
||
|
|
```
|
||
|
|
|
||
|
|
## Testing
|
||
|
|
|
||
|
|
```bash
|
||
|
|
pytest tests/test_cli.py
|
||
|
|
```
|