Skip to content

Commit ea2a440

Browse files
committed
Improve instructions for air gaps
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent c9030ee commit ea2a440

File tree

2 files changed

+47
-10
lines changed

2 files changed

+47
-10
lines changed

docs/deployment/edge.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ To download a specific version of the rpm, update the tag from `:latest` to i.e.
8383
Then install using the rpm package:
8484

8585
```bash
86-
dnf install openfaas-edge-*.rpm
86+
sudo dnf install openfaas-edge-*.rpm
8787
```
8888

89+
Note: additional packages may be required such as runc, iptables-services, selinux-policy, libselinux-utils, protobuf-c, and container-selinux.
90+
8991
## faasd CE (non-commercial use only)
9092

9193
faasd CE supports 15 functions and needs a computer with a stable Internet connection to run. There are restrictions on commercial use, but [individuals](https://github.com/openfaas/faasd/blob/master/EULA.md) can use it for free for personal, non-commercial use.

docs/edge/airgap.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
OpenFaaS Edge can be installed within an air-gapped environment using images copied from a machine with Internet access, to one without it.
44

5+
* Download the various images for OpenFaaS Edge, its installer, and any functions you want to a machine with Internet access.
6+
* Transfer the artifacts to the air-gapped machine.
7+
* Decide whether to restore the images to a self-hosted registry on the machine, to the containerd library, or a remote registry available to the air gap.
8+
* Copy across the license file and run the `faasd install` command along with any pull policy and DNS settings you require.
9+
10+
Note:
11+
12+
* If your registry requires authentication, you'll have to create a config file for the credentials. Follow the chapter entitled "Private registries" in Serverless For Everyone Else.
13+
* It is possible to run a self-hosted registry with a self-signed certificate directly on the host with systemd, follow the chapter entitled "Adding a self-hosted container registry" in Serverless For Everyone Else.
14+
515
## Download images for offline usage
616

717
You can download, transfer and restore the images whichever way you prefer, however we maintain a dedicated, supported tool to do this for you called airfaas.
@@ -29,6 +39,7 @@ If you do not have a `docker-compose.yaml` file, you can export the installation
2939
mkdir -p ./faasd-pro
3040
arkade oci install --path ./faasd-pro ghcr.io/openfaasltd/faasd-pro:latest
3141
```
42+
3243
The docker-compose.yaml file can be found at `./faasd-pro/var/lib/faasd/docker-compose.yaml`
3344

3445
### Download your functions
@@ -147,40 +158,64 @@ Download it on a machine with Internet access, transfer it to the air-gapped mac
147158
arkade oci install --path . ghcr.io/openfaasltd/faasd-pro-rpm:latest
148159
```
149160

161+
If you wish to obtain a specific version of the RPM, update the tag from `:latest` to i.e. `:0.2.18`. Browse available versions via `crane ls ghcr.io/openfaasltd/faasd-pro-rpm`.
162+
163+
Then copy all `openfaas-edge-*.rpm` files to the air-gapped machine, and run:
164+
150165
Before installing OpenFaaS Edge ensure all other required packages are installed on the air-gapped system:
151166

152167
```sh
153168
sudo dnf install runc iptables-services
154169
```
155170

156-
Then copy all .rpm files to the air-gapped machine, and run:
171+
Then install the OpenFaaS Edge RPM package:
157172

158173
```bash
159-
dnf install openfaas-edge-*.rpm
174+
sudo dnf install openfaas-edge-*.rpm
160175
```
161176

177+
The command will let you know whether any other required system package are missing such as `selinux-policy`, `libselinux-utils`, `protobuf-c`, and `container-selinux`.
178+
162179
After the installation completes add you OpenFaaS Edge license:
163180

164181
```sh
165182
sudo mkdir -p /var/lib/faasd/secrets
166183
sudo nano /var/lib/faasd/secrets/openfaas_license
167184
```
168185

169-
Perform the final installation step:
186+
The final installation step sets up and starts the faasd and faasd-provider services.
187+
188+
If you have a custom DNS server available, specify it using the `--dns-server` flag:
170189

171190
```sh
172-
sudo /usr/local/bin/faasd install
191+
--dns-server 10.0.0.1
173192
```
174193

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:
194+
If there is no DNS available, you can point faasd at the local host to use systemd-resolved:
176195

177196
```sh
178-
sudo /usr/local/bin/faasd install --dns-server 127.0.0.53
197+
--dns-server 127.0.0.53
179198
```
180199

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.
200+
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.
201+
202+
```sh
203+
--pull-policy=IfNotPresent
204+
```
205+
206+
Finally, construct the command to install OpenFaaS Edge:
182207

183-
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`.
208+
Example with no DNS server, and images restored to the containerd library:
184209

185-
Versions can be inspected using the crane tool and `crane ls ghcr.io/openfaasltd/faasd-pro-rpm`.
210+
```sh
211+
sudo /usr/local/bin/faasd install \
212+
--dns-server 127.0.0.53 \
213+
--pull-policy=IfNotPresent
214+
```
215+
216+
Example with custom DNS server, and a remote registry:
186217

218+
```sh
219+
sudo /usr/local/bin/faasd install \
220+
--dns-server 10.0.0.1
221+
```

0 commit comments

Comments
 (0)