Skip to content

Commit 21eb9b0

Browse files
weltekialexellis
authored andcommitted
Update airgap instructions
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent da66ab1 commit 21eb9b0

File tree

3 files changed

+64
-16
lines changed

3 files changed

+64
-16
lines changed

docs/deployment/edge.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,9 @@ chmod +x install-edge.sh
6464
sudo -E ./install-edge.sh
6565
```
6666

67-
*For an offline installation*
67+
!!! Note "Offline installation"
6868

69-
Copy the OCI bundle and the install-edge.sh script to the remote server.
70-
71-
Then mirror the various images from docker-compose.yaml into your private registry, and update the references from i.e. `image: ghcr.io/openfaasltd/gateway` to the equivalents in your registry.
72-
73-
If your system is unable to install apt, yum, or pacman packages, due to limited network access, then set the `SKIP_OS` environment to 1. The list of packages is available in the `install_required_packages` section of the script.
69+
For an offline installation see: [Air-gapped OpenFaaS Edge](/edge/airgap/)
7470

7571
### OpenFaaS Edge on RHEL-like systems
7672

docs/edge/airgap.md

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ faas-cli airfaas download images \
2323
openfaas-edge
2424
```
2525

26-
If you do not have a docker-compose.yaml file, you can install OpenFaaS Edge on a Linux host and then extract it from `/var/lib/faasd/docker-compose.yaml`.
26+
If you do not have a `docker-compose.yaml` file, you can export the installation bundle locally to get it.
27+
28+
```sh
29+
mkdir -p ./faasd-pro
30+
arkade oci install --path ./faasd-pro ghcr.io/openfaasltd/faasd-pro:latest
31+
```
32+
The docker-compose.yaml file can be found at `./faasd-pro/var/lib/faasd/docker-compose.yaml`
2733

2834
### Download your functions
2935

@@ -48,6 +54,8 @@ When running OpenFaaS Edge in an air-gap, you can restore the images to either a
4854

4955
The easiest way to test an air-gapped installation, is to bypass the need for a local registry, and to restore the images directly to the containerd library.
5056

57+
OpenFaaS Edge binaries and dependencies need to be installed before you can run the `restore` command. Follow the [air-gapped installation instructions](#perform-the-installation) and restore the images right before running `faasd install`.
58+
5159
Restore the OpenFaaS Edge images:
5260

5361
```bash
@@ -87,6 +95,12 @@ Further examples are available via the `--help` flag.
8795

8896
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.
8997

98+
Ensure required packages are installed on the air-gapped system:
99+
100+
```sh
101+
sudo apt-get install runc bridge-utils iptables iptables-persistent
102+
```
103+
90104
Download the installation package:
91105

92106
```bash
@@ -96,21 +110,33 @@ arkade oci install --path ./faasd-pro ghcr.io/openfaasltd/faasd-pro:latest
96110

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

99-
Finally, download the installation script, copy it over:
113+
Run the install script on the remote server:
100114

101115
```bash
102-
curl -sLSf \
103-
https://raw.githubusercontent.com/openfaas/faasd/refs/heads/master/hack/install-edge.sh \
104-
-o install-edge.sh
116+
sudo -E ./faasd-pro/install.sh
105117
```
106118

107-
Then run the install-edge.sh script on the remote server:
119+
After the installation script completes add you OpenFaaS Edge license:
108120

109-
```bash
110-
chmod +x install-edge.sh
111-
sudo -E ./install-edge.sh
121+
```sh
122+
sudo mkdir -p /var/lib/faasd/secrets
123+
sudo nano /var/lib/faasd/secrets/openfaas_license
124+
```
125+
126+
Perform the final installation step:
127+
128+
```sh
129+
sudo -E sh -c "cd ./faasd-pro/var/lib/faasd && faasd install"
130+
```
131+
132+
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:
133+
134+
```sh
135+
sudo faasd install --dns-server 127.0.0.53
112136
```
113137

138+
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.
139+
114140
### RHEL-like systems
115141

116142
For Operating Systems such as Oracle Linux, Alma Linux, and Rocky Linux you can use our official rpm package to install OpenFaaS Edge.
@@ -121,13 +147,38 @@ Download it on a machine with Internet access, transfer it to the air-gapped mac
121147
arkade oci install --path . ghcr.io/openfaasltd/faasd-pro-rpm:latest
122148
```
123149

150+
Before installing OpenFaaS Edge ensure all other required packages are installed on the air-gapped system:
151+
152+
```sh
153+
sudo dnf install runc iptables-services
154+
```
155+
124156
Then copy all .rpm files to the air-gapped machine, and run:
125157

126158
```bash
127159
dnf install openfaas-edge-*.rpm
128160
```
129161

130-
Follow any additional prompts and instructions.
162+
After the installation completes add you OpenFaaS Edge license:
163+
164+
```sh
165+
sudo mkdir -p /var/lib/faasd/secrets
166+
sudo nano /var/lib/faasd/secrets/openfaas_license
167+
```
168+
169+
Perform the final installation step:
170+
171+
```sh
172+
sudo /usr/local/bin/faasd install
173+
```
174+
175+
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:
176+
177+
```sh
178+
sudo /usr/local/bin/faasd install --dns-server 127.0.0.53
179+
```
180+
181+
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.
131182

132183
It is possible to specify a different version of the package by changing the `latest` tag to a specific version, e.g. `v0.2.16`.
133184

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ nav:
183183
- GPU for services: ./edge/gpus.md
184184
- gVisor: ./edge/gvisor.md
185185
- OpenTelemetry: ./edge/open-telemetry.md
186+
- Air gap installation: ./edge/airgap.md
186187
- Reference:
187188
- OpenFaaS YAML: ./reference/yaml.md
188189
- REST API: ./reference/rest-api.md

0 commit comments

Comments
 (0)