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 Jan 17, 2024
1 parent 2039b23 commit 04f7d60
Show file tree
Hide file tree
Showing 3 changed files with 33 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 }}"
19 changes: 19 additions & 0 deletions tests/e2e/ansible/install_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,25 @@
- docker-ce-cli
state: present
when: docker_exist.rc != 0 and ansible_distribution == "CentOS"

- 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" and ansible_distribution_version == "39"
- name: Start docker service
service:
name: docker
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/ansible/install_kubeadm.yml
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" and ansible_distribution_version == "39"
- name: Disable swap
shell: |
[ -z "$(swapon --show)" ] && exit 0
Expand Down

0 comments on commit 04f7d60

Please sign in to comment.