chore(terraform): scaffold server provisioning layout
Empty main.tf, dns.tf, variables.tf, outputs.tf and versions.tf matching OKF_CV_Website/architecture/terraform.md. Variables and outputs are written out; resources stay unwritten until the server facts are settled.
This commit is contained in:
commit
f2493767bd
8 files changed
+114
No files matched your search
@@ -0,0 +1,30 @@
|
||||
# Terraform
|
||||
|
||||
Provisions everything outside the cluster on `server0`. Rebuild is
|
||||
`terraform apply` plus `kubectl apply -k deploy/`.
|
||||
|
||||
Layout follows `OKF_CV_Website/architecture/terraform.md`:
|
||||
|
||||
| File | Covers |
|
||||
|---|---|
|
||||
| `main.tf` | packages, 2 GB swap, containerd, `kubeadm init`, Calico, metrics-server, local-path provisioner, Caddy |
|
||||
| `dns.tf` | apex A record at Cloudflare |
|
||||
| `variables.tf` | server IP, SSH key, domain |
|
||||
| `outputs.tf` | server IP, kubeconfig path, proxy URL |
|
||||
| `versions.tf` | provider requirements, pinned after `terraform init` |
|
||||
|
||||
Out of scope: anything inside namespace `cv`. Namespace, quota and workloads
|
||||
are applied once by hand or by CI and then live in `deploy/`.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
cp terraform.tfvars.example terraform.tfvars # fill in
|
||||
export CLOUDFLARE_API_TOKEN=...
|
||||
terraform init
|
||||
terraform plan
|
||||
terraform apply
|
||||
```
|
||||
|
||||
State stays local and out of Git. The kubeconfig this produces stays on this
|
||||
machine.
|
||||
Reference in new issue
Block a user