mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-24 01:36:10 +07:00
docs: use new configure script
This commit is contained in:
parent
55c625559f
commit
ce5e188654
@ -33,7 +33,7 @@ domain = str(input(f"Enter your domain ({domain}): ") or domain)
|
||||
os.system(f"./scripts/replace-domain {domain}")
|
||||
|
||||
# change hardware info
|
||||
os.system(f"{editor} 'metal/inventories/prod.yml'")
|
||||
os.system(f"{editor} 'metal/inventories/prod.yml'") # TODO use var for inventory
|
||||
|
||||
# TODO change Terraform workspace
|
||||
|
||||
|
@ -2,39 +2,37 @@
|
||||
|
||||
## Fork this repository
|
||||
|
||||
Because this repository applies GitOps practices, this git repository is the source of truth for my homelab, so you'll need to folk it to make it yours.
|
||||
Because this repository ([khuedoan/homelab](https://github.com/khuedoan/homelab)) applies GitOps practices,
|
||||
it's the source of truth for my homelab, so you'll need to folk it to make it yours.
|
||||
|
||||
After forking it, clone and replace the reference to my repository with yours (without `https://`):
|
||||
## Run the configure script
|
||||
|
||||
Run the following script to configure the homelab:
|
||||
|
||||
```sh
|
||||
./scripts/replace-gitops-repo "github.com/yourname/homelab"
|
||||
./configure.py
|
||||
```
|
||||
|
||||
Then commit and push the changes.
|
||||
Example input:
|
||||
|
||||
## Server list and hardware info
|
||||
<!-- TODO update example input -->
|
||||
|
||||
Edit the following file and replace the hardware information with the one on your servers:
|
||||
```
|
||||
$ ./configure.py
|
||||
Text editor (nvim):
|
||||
Enter seed repo (github.com/khuedoan/homelab): github.com/example/homelab
|
||||
Enter your domain (khuedoan.com): example.com
|
||||
```
|
||||
|
||||
> Use `dev.yml` instead of `prod.yml` if you're trying out the dev VM
|
||||
It will prompt you to edit the inventory, for example:
|
||||
|
||||
> - The IP addresses are the desired ones, not the current one, since your servers have no operating system installed yet.
|
||||
> - Disk: based on `/dev/$DISK`, in my case it's `sda`, but yours can be `sdb`, `nvme0n1`...
|
||||
> - Network interface: usually it's `eth0`, mine is `eno1`
|
||||
|
||||
```yaml
|
||||
# metal/inventories/prod.yml
|
||||
{{#include ../../../metal/inventories/prod.yml:3:}}
|
||||
```
|
||||
|
||||
- The IP addresses are the desired ones, not the current one, since your servers have no operating system installed yet.
|
||||
- Disk: based on `/dev/$DISK`, in my case it's `sda`, but yours can be `sdb`, `nvme0n1`...
|
||||
- Network interface: usually it's `eth0`, mine is `eno1`
|
||||
|
||||
## Update Ingresses to point to your domain
|
||||
|
||||
> Use [`home.arpa`](https://datatracker.ietf.org/doc/html/rfc8375) if you don't have a domain
|
||||
|
||||
My domain is `khuedoan.com`, run the following command to replace it with yours:
|
||||
|
||||
```sh
|
||||
./scripts/replace-domain "yourdomain.com"
|
||||
```
|
||||
|
||||
Commit and push the changes.
|
||||
At the end it will show what has changed. After examining the diff, commit and push the changes.
|
||||
|
Loading…
Reference in New Issue
Block a user