Skip to content

Commit 0c8a506

Browse files
authored
Merge pull request #9 from netfoundry/feature/update_readme
update build/readme
2 parents 4f620d6 + f9e35ac commit 0c8a506

3 files changed

Lines changed: 91 additions & 48 deletions

File tree

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,21 @@ The Ziti network enforces who can reach which machines; `sshd` on each machine o
2626

2727
- An operational OpenZiti network (controller + at least one edge router). See the [OpenZiti quickstart](https://openziti.io/docs/learn/quickstarts/) if you do not have one yet.
2828
- **On user machines:** `ziti-ssh` installed (from this repo) and a Ziti identity enrolled.
29-
- **On the CA host:** Go 1.22 or later (to build from source), or the pre-built `ziti-ssh-ca` binary.
30-
- **On each SSH target host:** Go 1.22 or later (to build from source), or the pre-built `ziti-ssh-host` binary. Ubuntu 22.04 or later (or any distro with OpenSSH 8.2+ and systemd).
29+
- **On each SSH target host:** Ubuntu 22.04 or later (or any distro with OpenSSH 8.2+ and systemd).
3130

3231
---
3332

3433
## Building
3534

36-
```sh
37-
git clone https://github.com/netfoundry/ziti-ssh.git
38-
cd ziti-ssh
39-
go build -o ziti-ssh-ca ./cmd/ziti-ssh-ca
40-
go build -o ziti-ssh-host ./cmd/ziti-ssh-host
41-
go build -o ziti-ssh ./cmd/ziti-ssh
42-
go build -o ziti-scp ./cmd/ziti-scp
43-
```
44-
45-
All binaries are statically linked (no CGO). Copy each binary to the machine where it will run. `ziti-ssh` and `ziti-scp` belong on user machines; `ziti-ssh-ca` and `ziti-ssh-host` are server-side components.
35+
See [docs/building.md](docs/building.md) for all installation and build options.
4636

4737
---
4838

4939
## Documentation
5040

5141
| File | Purpose |
5242
|---|---|
43+
| [docs/building.md](docs/building.md) | Getting binaries: download, Docker build, local build |
5344
| [docs/provisioning.md](docs/provisioning.md) | Ziti network setup, per-component installation |
5445
| [docs/usage.md](docs/usage.md) | End-user guide: certs, connecting, file copy, MFA |
5546
| [docs/configuration.md](docs/configuration.md) | Full flag/env/config reference for all binaries |

docs/building.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Getting binaries
2+
3+
Four options are available, from simplest to most hands-on.
4+
5+
---
6+
7+
## Download pre-built binaries (recommended)
8+
9+
Pre-built `.tar.gz` archives for linux/amd64 and linux/arm64 are published on the [GitHub releases page](https://github.com/netfoundry/ziti-ssh/releases). No Go toolchain or Docker installation required.
10+
11+
Download the archive for the component you need and extract it to a directory on your `PATH`.
12+
13+
---
14+
15+
## Build .deb packages with Docker
16+
17+
`scripts/docker-build-deb.sh` builds all four `.deb` packages inside a Docker container. Docker is the only prerequisite — no Go toolchain is needed on the host.
18+
19+
```sh
20+
# Default version (0.1.0):
21+
./scripts/docker-build-deb.sh
22+
23+
# Explicit version:
24+
VERSION=1.2.3 ./scripts/docker-build-deb.sh
25+
```
26+
27+
Output lands in `dist/`:
28+
29+
```
30+
dist/ziti-ssh-ca_<version>_amd64.deb
31+
dist/ziti-ssh-host_<version>_amd64.deb
32+
dist/ziti-ssh_<version>_amd64.deb
33+
dist/ziti-scp_<version>_amd64.deb
34+
```
35+
36+
The script also copies the raw binaries to the repository root for local testing.
37+
38+
---
39+
40+
## Build .deb packages locally
41+
42+
`scripts/build-deb.sh` builds all four `.deb` packages directly on the host.
43+
44+
**Prerequisites:** Go 1.22 or later, `dpkg-deb` (included in the `dpkg` package on Debian/Ubuntu).
45+
46+
```sh
47+
# Default version (0.1.0):
48+
./scripts/build-deb.sh
49+
50+
# Explicit version:
51+
VERSION=1.2.3 ./scripts/build-deb.sh
52+
```
53+
54+
Output lands in `dist/`:
55+
56+
```
57+
dist/ziti-ssh-ca_<version>_amd64.deb
58+
dist/ziti-ssh-host_<version>_amd64.deb
59+
dist/ziti-ssh_<version>_amd64.deb
60+
dist/ziti-scp_<version>_amd64.deb
61+
```
62+
63+
The script also copies the raw binaries to the repository root for local testing.
64+
65+
Copy each `.deb` to its target machine:
66+
67+
| Package | Destination |
68+
|---|---|
69+
| `ziti-ssh-ca_<version>_amd64.deb` | Ziti controller host |
70+
| `ziti-ssh-host_<version>_amd64.deb` | Each target SSH host |
71+
| `ziti-ssh_<version>_amd64.deb` | Each user's machine |
72+
| `ziti-scp_<version>_amd64.deb` | Each user's machine (optional) |
73+
74+
---
75+
76+
## Build individual binaries (development)
77+
78+
For one-off builds or development work, build individual binaries directly with `go build`:
79+
80+
```sh
81+
go build -o ziti-ssh-ca ./cmd/ziti-ssh-ca
82+
go build -o ziti-ssh-host ./cmd/ziti-ssh-host
83+
go build -o ziti-ssh ./cmd/ziti-ssh
84+
go build -o ziti-scp ./cmd/ziti-scp
85+
```
86+
87+
All binaries are statically linked (no CGO). Copy each binary to the machine where it will run.

docs/provisioning.md

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,7 @@ For end-user usage see [usage.md](usage.md). For a full flag and config referenc
66

77
---
88

9-
## Building the packages
10-
11-
The deb packages are not yet published to an apt repository. Build them locally from source.
12-
13-
**Prerequisites:**
14-
15-
- `go` 1.21 or later
16-
- `dpkg-deb` (included in the `dpkg` package on Debian/Ubuntu)
17-
18-
**Build:**
19-
20-
```sh
21-
# Default version (0.1.0):
22-
./scripts/build-deb.sh
23-
24-
# Explicit version:
25-
VERSION=1.2.0 ./scripts/build-deb.sh
26-
```
27-
28-
Output lands in `dist/`:
29-
30-
```
31-
dist/ziti-ssh-ca_<version>_amd64.deb
32-
dist/ziti-ssh-host_<version>_amd64.deb
33-
dist/ziti-ssh_<version>_amd64.deb
34-
dist/ziti-scp_<version>_amd64.deb
35-
```
36-
37-
Each component has its own installation section below. Copy the packages to their target machines as directed:
38-
39-
| Package | Destination |
40-
|---|---|
41-
| `ziti-ssh-ca_<version>_amd64.deb` | Ziti controller host |
42-
| `ziti-ssh-host_<version>_amd64.deb` | Each target SSH host |
43-
| `ziti-ssh_<version>_amd64.deb` | Each user's machine |
44-
| `ziti-scp_<version>_amd64.deb` | Each user's machine (optional) |
9+
For installation options — including pre-built binary downloads, Docker-based .deb builds, and local builds — see [building.md](building.md).
4510

4611
---
4712

0 commit comments

Comments
 (0)