docs: added fast path documentation
This commit is contained in:
@@ -4,6 +4,33 @@ This guide explains **where you declare servers**, **how Terraform uses that dec
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Fast Path: Using the Helper Script
|
||||
|
||||
Instead of manually editing `inventory/servers.yaml` and running `make tf-apply`, you can use the convenience script [`scripts/hcloud_new_server.sh`](../scripts/hcloud_new_server.sh).
|
||||
This script will:
|
||||
|
||||
1. Add the new host entry to `inventory/servers.yaml`
|
||||
2. Decrypt your Hetzner API token with SOPS
|
||||
3. Run Terraform (`init/plan/apply`) to provision the server
|
||||
4. Print the IPv4 address and a ready-to-use SSH command
|
||||
|
||||
**Example:**
|
||||
|
||||
```bash
|
||||
scripts/hcloud_new_server.sh core-01 --type cpx11 --region nbg1 --role core
|
||||
```
|
||||
|
||||
This will create a small cpx11 instance in the Nuremberg (nbg1) region, tagged with the role core.
|
||||
You can then connect directly:
|
||||
|
||||
```bash
|
||||
ssh admin@<printed-ip>
|
||||
```
|
||||
|
||||
👉 The script is optional. You can always manage servers by editing inventory/servers.yaml and running make tf-apply instead.
|
||||
|
||||
|
||||
|
||||
## 1) Where you define servers
|
||||
|
||||
All desired hosts live in **`inventory/servers.yaml`**. Each entry is a simple YAML object with the required attributes:
|
||||
|
||||
Reference in New Issue
Block a user