Skip to content

Commit

Permalink
Install fuse-overlay
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed Jan 27, 2023
1 parent e1e8cf1 commit b5e85d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cgroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
fail-fast: false
matrix:
vm: [ fedora ]
vm: [fedora]
mode: [unified]
max-parallel: 1
defaults:
Expand All @@ -69,7 +69,7 @@ jobs:
id: vagrant-cache
continue-on-error: true
- name: "Vagrant Plugin(s)"
run: vagrant plugin install vagrant-k3s
run: vagrant plugin install vagrant-k3s vagrant-reload
- name: "Vagrant Up"
run: vagrant up
- name: "K3s Prepare"
Expand Down
2 changes: 1 addition & 1 deletion tests/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The sub-directories therein contain fixtures for running simple clusters to asse
- [Ubuntu 20.04](../tests/install/ubuntu-focal) (Focal Fossa)
- [Control Groups](../tests/cgroup) :arrow_right: on any code change
- [mode=unified](../tests/cgroup/unified) (cgroups v2)
- [Fedora 37](../tests/cgroup/unified/ fedora) (rootfull + rootless)
- [Fedora 37](../tests/cgroup/unified/fedora) (rootfull + rootless)
- [Snapshotter](../tests/snapshotter/btrfs/opensuse-leap) :arrow_right: on any code change
- [BTRFS](../tests/snapshotter/btrfs) ([containerd built-in](https://github.com/containerd/containerd/tree/main/snapshots/btrfs))
- [Leap 15.4](../tests/snapshotter/btrfs/opensuse-leap)
Expand Down
9 changes: 8 additions & 1 deletion tests/cgroup/unified/fedora/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Vagrant.configure("2") do |config|

config.vm.define 'cgroup-unified', primary: true do |test|
test.vm.hostname = 'smoke'
test.vm.provision "disable-firewall", type: "shell", inline: "systemctl stop firewalld && systemctl disable firewalld"
test.vm.provision :file, run: 'always', source: ENV['TEST_UNITFILE_ROOTFULL'], destination: 'k3s-rootfull.service'
test.vm.provision :file, run: 'always', source: ENV['TEST_UNITFILE_ROOTLESS'], destination: 'k3s-rootless.service'
test.vm.provision 'k3s-prepare', type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once', privileged: true do |sh|
Expand All @@ -36,9 +37,13 @@ Vagrant.configure("2") do |config|
systemctl daemon-reload
# Install sonobuoy binary
curl -fsSL https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.20.0/sonobuoy_0.20.0_linux_amd64.tar.gz | tar xzvC /usr/local/bin sonobuoy
dnf install -y jq
SONOBUOY_URL=$(curl -s https://api.github.com/repos/vmware-tanzu/sonobuoy/releases/latest | \
jq -r '.assets[] | select(.name|match("linux_amd64.tar.gz$")) | .browser_download_url')
curl -fsSL $SONOBUOY_URL | tar xzvC /usr/local/bin sonobuoy
# [Rootless] Configure sysctl
dnf install -y fuse-overlayfs fuse
echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/rootless.conf
sysctl --system
# [Rootless] Enable cgroup v2 delegation
Expand All @@ -47,6 +52,7 @@ Vagrant.configure("2") do |config|
[Service]
Delegate=yes
EOF
systemctl daemon-reload
# [Rootless] Enable systemd lingering
Expand All @@ -58,6 +64,7 @@ EOF
chown -R vagrant:vagrant /home/vagrant/.config
SHELL
end

test.vm.provision 'k3s-install', type: 'k3s', run: ENV['CI'] == 'true' ? 'never' : 'once' do |k3s|
k3s.args = %w[server]
k3s.env = %w[INSTALL_K3S_NAME=server INSTALL_K3S_SKIP_DOWNLOAD=true K3S_TOKEN=vagrant INSTALL_K3S_SKIP_ENABLE=true]
Expand Down

0 comments on commit b5e85d6

Please sign in to comment.