Skip to content

Commit

Permalink
[WIP] Support Rocky Linux 9 hosts
Browse files Browse the repository at this point in the history
VXLAN still does not seem to work

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Sep 14, 2023
1 parent 57a770a commit 00dc7af
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile.d/check-preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ else
fi

# Check kernel modules
for f in ip6_tables ip6table_nat ip_tables iptable_nat vxlan; do
for f in br_netfilter ip6_tables ip6table_nat ip_tables iptable_nat vxlan; do
if ! grep -qw "^$f" /proc/modules; then
WARNING "Kernel module \"${f}\" does not seem loaded? (negligible if built-in to the kernel)"
fi
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ but Usernetes (Gen 2) supports creating a cluster with multiple hosts.

## Requirements

> **Note**
>
> Using Ubuntu 22.04 hosts is recommended.
- Host OS should be one of the following:
- Ubuntu 22.04 (recommended)
- Rocky Linux 9
- AlmaLinux 9

- [Rootless Docker](https://rootlesscontaine.rs/getting-started/docker/):
```bash
Expand Down Expand Up @@ -52,7 +53,12 @@ sudo systemctl daemon-reload

- Kernel modules:
```
sudo modprobe vxlan
sudo tee /etc/modules-load.d/usernetes.conf <<EOF >/dev/null
br_netfilter
vxlan
EOF
sudo systemctl restart systemd-modules-load.service
```

## Usage
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ services:
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
U7S_HOST_IP: ${U7S_HOST_IP}
sysctls:
- net.ipv4.ip_forward=1
networks:
default:
ipam:
Expand Down
14 changes: 13 additions & 1 deletion hack/init-host.root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,20 @@ EOF
systemctl daemon-reload
fi

cat /etc/modules-load.d/usernetes.conf <<EOF
br_netfilter
vxlan
EOF
systemctl restart systemd-modules-load.service

if ! command -v dockerd-rootless-setuptool.sh >/dev/null 2>&1; then
curl https://get.docker.com | sh
if grep -q centos /etc/os-release; then
# Works with Rocky and Alma too
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf -y install docker-ce
else
curl https://get.docker.com | sh
fi
fi
systemctl disable --now docker

Expand Down

0 comments on commit 00dc7af

Please sign in to comment.