# Site file

Source: https://argoctl-docs.pages.dev/docs/site-file

> One YAML file describes a site's networks, management server, BMC login, OS image and nodes. Every argoctl command reads it.

Everything argoCTL needs to know about a site lives in one YAML file, conventionally `/etc/argoctl/site.yaml` on the management server. Every command takes its path as the first argument:

```bash
argoctl site validate /etc/argoctl/site.yaml
sudo argoctl create cluster /etc/argoctl/site.yaml
```

## A complete example

One control-plane server and two GPU servers, on three networks:

```yaml title="/etc/argoctl/site.yaml"
# argoCTL site file: one control-plane node and two 8-GPU servers.
# Check it with: argoctl site validate /etc/argoctl/site.yaml
version: 1
name: dc1

networks:
  # BMCs (Redfish). Usually no gateway or DNS.
  oob:
    cidr: 172.16.0.0/24
  # mgmt <-> nodes: OS installation and SSH.
  provisioning:
    cidr: 172.16.1.0/24
    gateway: 172.16.1.1
    dns: [172.16.1.53]
  # Customer-facing network: Kubernetes and inference traffic. Optional.
  frontend:
    cidr: 172.16.2.0/24
    gateway: 172.16.2.1
    dns: [172.16.1.53]
    # Addresses for LoadBalancer Services: free addresses your network team reserves.
    lb_pool: 172.16.2.200-172.16.2.220

# The management server argoCTL runs on.
mgmt:
  provisioning_ip: 172.16.1.10
  oob_ip: 172.16.0.10

# One BMC login for every node. Never the password itself: the name of an
# environment variable (password_env) or an absolute path (password_file).
bmc:
  username: admin
  password_env: ARGOCTL_BMC_PASSWORD

# Installed on every node over Redfish virtual media.
os_image:
  url: https://cloud-images.ubuntu.com/releases/noble/release-20261017/ubuntu-24.04-server-cloudimg-amd64.img
  checksum: sha256:04e8f2461a16a44e78a370284471f29616cdd9baf1893df25807b71f985b6c94

# Extra keys allowed to log in to every node as `ubuntu` (mgmt's key is always added).
ssh_authorized_keys:
  - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3pY0j0Cw0bJ3ZyQ2mGk5c1Yh4q0n7Q2s9xM8a1b2c3 ops@example

kubernetes:
  control_plane: cp1

nodes:
  - name: cp1
    bmc:
      address: https://172.16.0.11
      verify_tls: false        # BMC with a self-signed certificate
    nics:
      provisioning: { mac: "3c:ec:ef:10:00:01", ip: 172.16.1.11 }
      frontend: { mac: "3c:ec:ef:20:00:01", ip: 172.16.2.11 }
  - name: gpu1
    bmc:
      address: https://172.16.0.21
      verify_tls: false
    nics:
      provisioning: { mac: "3c:ec:ef:10:00:21", ip: 172.16.1.21 }
      frontend: { mac: "3c:ec:ef:20:00:21", ip: 172.16.2.21 }
  - name: gpu2
    bmc:
      address: https://172.16.0.22
      verify_tls: false
    nics:
      provisioning: { mac: "3c:ec:ef:10:00:22", ip: 172.16.1.22 }
      frontend: { mac: "3c:ec:ef:20:00:22", ip: 172.16.2.22 }
```

## What goes in it

| Section | Describes |
|---|---|
| `version`, `name` | The file format (`1`) and the site's name. |
| `networks` | The BMC network (`oob`), the `provisioning` network and the optional `frontend` network: CIDR, gateway, DNS, extra routes, and the frontend's pool of addresses for `LoadBalancer` Services. |
| `mgmt` | The management server's addresses on the provisioning and BMC networks. |
| `bmc` | One BMC login for every node, with the password given by reference. |
| `os_image` | The Ubuntu 24.04 cloud image to install, and its checksum. |
| `ssh_authorized_keys` | Extra public keys allowed to log in to every node. |
| `kubernetes` | The control-plane node and the pod and Service ranges. |
| `nodes` | Each server: its BMC URL and the MAC and static IP of each NIC. |

See the [site file reference](https://argoctl-docs.pages.dev/docs/site-file/reference) for every field.

## Writing one

1. **Networks.** Ask your network team for the CIDRs, gateways and DNS servers of the BMC, provisioning and (optional) frontend networks, and for a range of free frontend addresses to reserve for `LoadBalancer` Services (`lb_pool`). Networks must not overlap.
2. **mgmt.** Find the management server's addresses with `ip -br addr`.
3. **BMC login.** Choose where the password lives on mgmt: an environment variable (`password_env`) or a root-only file (`password_file`).
4. **OS image.** Use the Ubuntu 24.04 cloud image URL and the `sha256:` checksum from the image's `SHA256SUMS` file.
5. **Nodes.** For each server: its BMC URL, and the MAC address and chosen static IP of the NIC on each network. The BMC's web UI shows the MACs, as does Redfish: `curl -k -u admin https://<bmc>/redfish/v1/Systems/<id>/EthernetInterfaces`. A wrong MAC is caught by `preflight` and `provision`, which list the MACs the BMC reports.
6. **Validate**, and fix until it passes.

## Validate it

`argoctl site validate` parses the file, checks every rule, and either prints a summary of the site or every problem at once, each with its `file:line:column` and the fix:

```text
$ argoctl site validate site.yaml
✗ site.yaml has 3 problems
  site.yaml:11:11  networks.provisioning.cidr: 172.16.1.5/24 has host bits set; write 172.16.1.0/24
  site.yaml:27:5   bmc.password: passwords can't be written in the site file (value not shown)
                   To fix: use password_env: <VARIABLE> or password_file: /absolute/path
  site.yaml:52:44  nodes[1].nics.provisioning.ip: 172.16.1.11 is already used by nodes[0] (cp1)
```

It exits `0` if the file is valid, `1` if it isn't. It never reads the BMC password: the summary only says whether the variable or file it points to exists on the machine. See [`argoctl site validate`](https://argoctl-docs.pages.dev/docs/reference/cli/site-validate).

## Changing a site file

Edit the file and re-run the command for the part you changed. argoCTL compares the site with the file:

- **New nodes** are enrolled and installed by `provision`, and joined by `create cluster`.
- **Changed node settings** (addresses, keys, image) mark installed nodes **out of date**. Reinstalling wipes the disk, so it only happens with `argoctl provision --reimage --node <name>`.
- **BMC settings** (address, System) are corrected in Ironic on the next `provision`.
