# Build your first site

Source: https://argoctl-docs.pages.dev/docs/guides/first-site

> From racked, powered servers to a verified Kubernetes cluster, one command at a time, with what to check at each step.

This guide takes the example site `dc1` (one control-plane server, two GPU servers) from racked hardware to a qualified Kubernetes cluster. Every command runs on the management server ("mgmt"). Allow about an hour, most of it waiting for installs.

## Before you start

- argoctl is [installed](https://argoctl-docs.pages.dev/docs/installation) on mgmt.
- The [requirements](https://argoctl-docs.pages.dev/docs/requirements) are met: mgmt has addresses on the BMC and provisioning networks; BMCs share one login; the servers boot UEFI.
- You have each server's BMC address and the MAC address of each NIC.

### Write and validate the site file

Write `/etc/argoctl/site.yaml` (see [Site file](https://argoctl-docs.pages.dev/docs/site-file)) and validate it until it passes:

```bash
argoctl site validate /etc/argoctl/site.yaml
```

Keep the BMC password out of the file. For this session, put it in the variable the file names:

```bash
read -rs ARGOCTL_BMC_PASSWORD && export ARGOCTL_BMC_PASSWORD
```

or in a root-only file and use `password_file:` instead.

### Preflight the BMCs

```bash
sudo --preserve-env=ARGOCTL_BMC_PASSWORD argoctl preflight /etc/argoctl/site.yaml
```

Every node must `pass`. Preflight power-cycles each node, boots a test image from virtual media, and confirms it from the node itself, so a pass proves the BMC login, virtual media, boot order, Secure Boot, the node's provisioning MAC and IP, and the network path back to mgmt. Fix failures with the [preflight troubleshooting](https://argoctl-docs.pages.dev/docs/reference/cli/preflight#troubleshooting) table, then re-run just those nodes with `--node`.

### Analyse the hardware

```bash
sudo --preserve-env=ARGOCTL_BMC_PASSWORD argoctl analyse /etc/argoctl/site.yaml
```

Check the inventory matches what you bought: GPU count and model, NVLink/NVSwitch, InfiniBand or RoCE ports, memory and disks. The model table tells you what the site can serve.

### Install Ironic

```bash
sudo argoctl ironic install /etc/argoctl/site.yaml
```

The first run installs Docker if needed and downloads about 2.5 GB. It ends with health checks, all `ok`.

### Provision the nodes

```bash
sudo --preserve-env=ARGOCTL_BMC_PASSWORD argoctl provision /etc/argoctl/site.yaml
```

Each node is enrolled, installed over virtual media with its static addresses, and checked over SSH. Expect 5-15 minutes per node, in parallel. If you're interrupted, run the same command again: it waits for deploys Ironic is still running and carries on.

Log in to a node to look around:

```bash
sudo ssh -i /var/lib/argoctl/ssh/id_ed25519 ubuntu@172.16.1.21 'hostname; ip -br -4 addr'
```

### Create the cluster

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

Host profile, kubeadm, Cilium and the GPU Operator, then the checks. Expect 10-20 minutes on fresh nodes, mostly package and image downloads; on slow links pass a nearby Ubuntu mirror with `--apt-mirror`.

### Verify

```bash
sudo argoctl verify cluster /etc/argoctl/site.yaml
```

All checks `ok` means: every node Ready on its frontend address, DNS and Services work, pods on different nodes reach each other, network policies are enforced, every GPU is usable from a pod, and (where present) Fabric Manager and RDMA are working.

## Keep for later

- The site file: it's the record of the site. Keep a copy in version control (it contains no secrets).
- The admin kubeconfig: `/var/lib/argoctl/cluster/admin.conf` on mgmt.
- Run logs: `/var/log/argoctl/` on mgmt.

## Next

[Deploy inference](https://argoctl-docs.pages.dev/docs/guides/deploy-inference) on the new cluster.
