Skip to content

Commit

Permalink
recast raspi downloads matrix as a guide instead of downloads page
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Nov 21, 2023
1 parent 53950a0 commit 830150e
Show file tree
Hide file tree
Showing 8 changed files with 679 additions and 8,640 deletions.
17 changes: 0 additions & 17 deletions docs/downloads.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Let's take a look at how to get started with `zrok`.

## Downloading zrok

Releases are also available from the `zrok` project repository on GitHub at https://github.com/openziti/zrok/releases/latest. If you're a Linux user and you're not sure which download to use then check out the hints on [the Downloads page](./downloads.md).
Releases are also available from the `zrok` project repository on GitHub at https://github.com/openziti/zrok/releases/latest. If you're a Linux user check our [the Linux Service guide](/guides/linux-service.md).

### Extract zrok Distribution

Expand Down
18 changes: 9 additions & 9 deletions docs/guides/linux-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ When the service starts it will:
less ./openziti-install.bash
```

1. Run the script as root to install the `zrok-share` package.
1. Run the script as root to install the `zrok-share` package. It depends on the `zrok` (CLI) package, so both will be installed.

```bash
sudo bash ./openziti-install.bash zrok-share
Expand Down Expand Up @@ -73,22 +73,22 @@ ZROK_TARGET="/var/www/html"
ZROK_BACKEND_MODE="web"
```
### WebDAV Server
### Caddy Server
This uses zrok's `drive` backend mode to serve a directory of static files as a WebDAV resource. The directory must be readable by 'other', e.g. `chmod -R o+rX /usr/share/doc`.
Use zrok's built-in Caddy server to serve static files or as a reverse proxy to multiple web servers with various HTTP routes or as a load-balanced set. A sample Caddyfile is available in the path shown.

```bash title="/opt/openziti/etc/zrok/zrok-share.env"
ZROK_TARGET="/usr/share/doc"
ZROK_BACKEND_MODE="drive"
ZROK_TARGET="/opt/openziti/etc/zrok/multiple_upstream.Caddyfile"
ZROK_BACKEND_MODE="caddy"
```

### Caddy Server
### Network Drive

Use zrok's built-in Caddy server to serve static files or as a reverse proxy to multiple web servers with various HTTP routes or as a load-balanced set. A sample Caddyfile is available in the path shown.
This uses zrok's `drive` backend mode to serve a directory of static files as a virtual network drive. The directory must be readable by 'other', e.g. `chmod -R o+rX /usr/share/doc`.
```bash title="/opt/openziti/etc/zrok/zrok-share.env"
ZROK_TARGET="/opt/openziti/etc/zrok/multiple_upstream.Caddyfile"
ZROK_BACKEND_MODE="caddy"
ZROK_TARGET="/usr/share/doc"
ZROK_BACKEND_MODE="drive"
```
## Authentication
Expand Down
89 changes: 89 additions & 0 deletions docs/guides/raspberry-pi.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Raspberry Pi
hide_table_of_contents: false
---

import Details from '@theme/MDXComponents/Details';

## Install the zrok command

### Package Install

DEB and RPM packages are available for amd64, arm64, and armv7 architectures.

1. Download the OpenZiti install script.

```bash
curl -sSo ./openziti-install.bash https://get.openziti.io/install.bash
```

1. Inspect the script to ensure it is suitable to run as root on your system.

```bash
less ./openziti-install.bash
```

1. Run the script as root to install the `zrok` package.

```bash
sudo bash ./openziti-install.bash zrok
```

#### zrok-share service

[Check out this guide for running a zrok share as a Linux service](/guides/linux-service.md).

<br/><br/>

### Binary Install

1. [Download `zrok_{version}_linux_{arch}.tar.gz` directly from GitHub](https://github.com/openziti/zrok/releases/latest)
1. In the terminal:

```bash
tar -xzf zrok_{version}_linux_{arch}.tar.gz -C target_dir
./target_dir/zrok version
```

You need the right download for your OS and CPU. This can be confusing because the OS, e.g., Raspberry Pi OS, could be 32bit even if you have a 64bit Pi (v3, 4, or Zero 2). Linux users can always find the right version by looking up the result of `uname -m` in this table.

| Result |Linux Download Name |
|------------------|--------------------|
| x86_64 |linux-amd64 |
| aarch64, arm/v8 |linux-arm64 |
| armhf, arm/v7 |linux-armv7 |


or install `jq` and `curl` and run this script to install the correct architecture build of zrok.

<Details>
<summary>Binary Install script for Linux</summary>

```text
(set -euo pipefail;
cd $(mktemp -d);
ZROK_VERSION=$(
curl -sSf https://api.github.com/repos/openziti/zrok/releases/latest \
| jq -r '.tag_name'
);
case $(uname -m) in
x86_64) GOXARCH=amd64 ;;
aarch64|arm64) GOXARCH=arm64 ;;
armv7|armhf|arm) GOXARCH=arm ;;
*) echo "ERROR: unknown arch '$(uname -m)'" >&2
exit 1 ;;
esac;
curl -sSfL \
"https://github.com/openziti/zrok/releases/download/${ZROK_VERSION}/zrok_${ZROK_VERSION#v}_linux_${GOXARCH}.tar.gz" \
| tar -xz -f -;
sudo install -o root -g root ./zrok /usr/local/bin/;
zrok version;
)
```

</Details>
6 changes: 0 additions & 6 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ const config = {
position: 'right',
label: 'Docs',
},
{
type: 'doc',
docId: 'downloads',
position: 'right',
label: 'Downloads',
},
{
href: 'https://github.com/openziti/zrok',
label: 'GitHub',
Expand Down
Loading

0 comments on commit 830150e

Please sign in to comment.