Skip to content

Update air gap instructions to use .deb package #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
83 changes: 74 additions & 9 deletions docs/edge/airgap.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,14 @@ Further examples are available via the `--help` flag.

## Perform the installation

### Debian-based systems
If your are installing OpenFaaS Edge on a RHEL of Dabian based system it is recommended to follow the dedicated instructions for the specific distribution:

If you're using an Operating System such as Ubuntu, you can export the installation bundle and copy it to the air-gapped machine, then perform the installation as normal.
- [Debian based systems](#debian-based-systems) (e.g. Ubuntu, Debian)
- [RHEL base systems](#rhel-like-systems) (e.g. Oracle Linux, Alma Linux, Rocky Linux)

Ensure required packages are installed on the air-gapped system:
Alternatively we also have [generic installation instructions](#generic-install-script) available.

```sh
sudo apt-get install runc bridge-utils iptables iptables-persistent
```
### Generic install script

Download the installation package:

Expand All @@ -141,6 +140,8 @@ arkade oci install --path ./faasd-pro ghcr.io/openfaasltd/faasd-pro:latest

Then copy the `faasd-pro` directory to the air-gapped machine.

Make sure required packages are installed. The list of required packages is available in the `install_required_packages` section if the [install script](https://raw.githubusercontent.com/openfaas/faasd/refs/heads/master/hack/install-edge.sh)

Run the install script on the remote server:

```bash
Expand All @@ -160,13 +161,77 @@ Perform the final installation step:
sudo -E sh -c "cd ./faasd-pro/var/lib/faasd && faasd install"
```

By default OpenFaaS uses Google's public DNS servers you need to specify custom DNS servers during the installation phase by setting the `--dns-server` flag:
### Debian-based systems

If you're using an Operating System such as Ubuntu or Debian , you can use our official Debian package to install OpenFaaS Edge.

Download it on a machine with Internet access, transfer it to the air-gapped machine, and install it using:

```bash
arkade oci install --path . ghcr.io/openfaasltd/faasd-pro-debian:latest
```

If you wish to obtain a specific version of the package, update the tag from `:latest` to i.e. `:0.2.18`. Browse available versions via `crane ls ghcr.io/openfaasltd/faasd-pro-debian`.

Then copy all `openfaas-edge-*.deb` files to the air-gapped machine.

Before installing OpenFaaS Edge ensure all other required packages are installed on the air-gapped system:

```sh
sudo apt-get install runc bridge-utils iptables iptables-persistent
```

If you have no way to source the required packages in the offline environment, you can download them on an online machine with tools like e.g [apt-offline](https://github.com/rickysarraf/apt-offline/wiki) and copy them to the air-gapped machine.

Install the OpenFaaS Edge package:

```sh
sudo apt-get install ./openfaas-edge-*.deb
```

After the installation completes add you OpenFaaS Edge license:

```sh
sudo faasd install --dns-server 127.0.0.53
sudo mkdir -p /var/lib/faasd/secrets
sudo nano /var/lib/faasd/secrets/openfaas_license
```

Make sure to also add `--pull-policy=IfNotPresent` when images were restored directly to the containerd library. This is not required when using a local image registry.
The final installation step sets up and starts the faasd and faasd-provider services.

If you have a custom DNS server available, specify it using the `--dns-server` flag:

```sh
--dns-server 10.0.0.1
```

If there is no DNS available, you can point faasd at the local host to use systemd-resolved:

```sh
--dns-server 127.0.0.53
```

If your images are restored to the containerd library, you will have to use the `--pull-policy=IfNotPresent` flag to prevent faasd from trying to pull the images from the Internet.

```sh
--pull-policy=IfNotPresent
```

Finally, construct the command to install OpenFaaS Edge:

Example with no DNS server, and images restored to the containerd library:

```sh
sudo faasd install \
--dns-server 127.0.0.53 \
--pull-policy=IfNotPresent
```

Example with custom DNS server, and a remote registry:

```sh
sudo faasd install \
--dns-server 10.0.0.1
```

### RHEL-like systems

Expand Down