Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ kubeconfig
*.so
*.dylib
bin/*
hack/bin/
Dockerfile.cross

# Test binary, build with `go test -c`
Expand Down
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,74 @@ README isn't up-to-date.

// TODO(user): Add simple overview of use/purpose

## Building the Project

This project uses [just](https://github.com/casey/just) as a command
runner (similar to `make`). Follow these steps to build the project from
source.

### Prerequisites

- **Go** 1.21 or later
- **just** 1.36.0 or higher command runner - Install with:
```sh
# On macOS or Linux (recommended for specific version)
cargo install just --version 1.36.0

# On macOS (using Homebrew - may install a different version)
brew install just

# Or download from https://github.com/casey/just/releases
```
### Build Steps

1. **Build all binaries**

Run the main build command:
```sh
just build
```

This will:
- Format and vet the Go code
- Generate Kubernetes CRDs and RBAC manifests
- Generate API documentation
- Build all binaries for Linux/amd64:
- `bin/fabric` - Main controller
- `bin/agent` - Agent binary
- `bin/hhfctl` - User-facing CLI tool
- `bin/fabric-boot` - Boot service
- `bin/fabric-dhcpd` - DHCP daemon

2. **View available commands**

See all available build targets:
```sh
just --list
```

### Other Useful Commands

- **Run tests**: `just test`
- **Run linters**: `just lint`
- **Build for multiple platforms**: `just build-multi` (builds hhfctl for Linux and macOS, both amd64 and arm64)
- **Generate code/manifests**: `just gen`

### Building Kubernetes Artifacts

To build Docker images and Helm charts:

```sh
just kube-build
```

Built images:
- `127.0.0.1:30000/githedgehog/fabric/fabric:<version>`
- `127.0.0.1:30000/githedgehog/fabric/fabric-dhcpd:<version>`
- `127.0.0.1:30000/githedgehog/fabric/fabric-boot:<version>`

Where `<version>` is determined by `git describe --tags --always`.

## Description
// TODO(user): An in-depth paragraph about your project and overview of use

Expand Down
Loading