Skip to content

Commit

Permalink
tests: Add fedora to run-local linux distros
Browse files Browse the repository at this point in the history
Fedora also can be used to run k8s clusters locally. Add the fedora
requirements to allow for testing.

Co-authored-by: Pradipta Banerjee <[email protected]>
Signed-off-by: Tyler Fanelli <[email protected]>
  • Loading branch information
tylerfanelli and bpradipt committed Feb 16, 2024
1 parent 14a040c commit 7e8dd91
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/e2e/ansible/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ build_pkgs:
- make
- gcc
- qemu-user-static
fedora:
- make
- gcc
- qemu-user-static
centos:
- make
- gcc
Expand All @@ -16,13 +20,18 @@ kubeadm_pkgs:
ubuntu:
- conntrack
- socat
fedora:
- conntrack
- socat
centos:
- conntrack
- socat
k8s_version: v1.24.0
test_pkgs:
ubuntu:
- jq
fedora:
- jq
centos:
- jq
target_arch: "{{ 'amd64' if ansible_architecture == 'x86_64' else ansible_architecture }}"
18 changes: 18 additions & 0 deletions tests/e2e/ansible/install_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,24 @@
systemd:
daemon_reload: yes
when: ansible_distribution == "Ubuntu" and ansible_architecture == 's390x'
- name: Handle docker installation on Fedora 39
block:
- name: Install yum-utils
dnf:
name: yum-utils
state: present
- name: Add docker yum repo
shell: yum-config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
args:
creates: /etc/yum.repos.d/docker-ce.repo
- name: Install docker packages
dnf:
name:
- containerd.io
- docker-ce
- docker-ce-cli
state: present
when: docker_exist.rc != 0 and ansible_distribution == "Fedora"
- name: Start docker service
service:
name: docker
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/ansible/install_kubeadm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
- kubeadm
- kubelet
- kubectl
- name: Remove zram-generator-defaults in Fedora
ansible.builtin.yum:
name: zram-generator-defaults
state: absent
when: ansible_distribution == "Fedora"
- name: Disable swap
shell: |
[ -z "$(swapon --show)" ] && exit 0
Expand Down

0 comments on commit 7e8dd91

Please sign in to comment.