Skip to content

Commit

Permalink
add support for ubuntu 24.04, remove debian 10 (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoesel authored Jun 18, 2024
1 parent c90c7aa commit 33fe230
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 16 deletions.
3 changes: 2 additions & 1 deletion roles/pterodactyl_panel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ There's a few things this role does *NOT* do, namely:

## Supported Distributions and Panel Versions

This role officially supports the Pterodactyl 1.x series of releases.
This role supports the Pterodactyl 1.x series of releases.
We officially support the following distributions and releases:

| Distribution | PHP Version | Supported Panel Release | Note |
|--------------|-------------|-------------------------|------|
| Ubuntu 24.04 LTS | `8.3` | `latest` | |
| Ubuntu 22.04 LTS | `8.1` | `latest` | |
| Ubuntu 20.04 LTS | `7.4` | `<=1.10.x` | `1.10` releases are the last to support PHP 7 |
| Debian 12 | `8.2` |`latest` | |
Expand Down
24 changes: 24 additions & 0 deletions roles/pterodactyl_panel/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
---
platforms:
- name: pterodactyl-panel-ubuntu-24
image: "docker.io/geerlingguy/docker-ubuntu2404-ansible"
groups:
- panel
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
override_command: false
pre_build_image: true
networks:
- name: molecule-pterodactyl-panel
- name: pterodactyl-panel-ubuntu-24-db
image: docker.io/mariadb
pre_build_image: true
override_command: false
env:
MYSQL_ROOT_PASSWORD: panel_molecule
MYSQL_DATABASE: panel_molecule
MYSQL_USER: panel_molecule
MYSQL_PASSWORD: qw#F8CcMFU%m64o
networks:
- name: molecule-pterodactyl-panel

- name: pterodactyl-panel-ubuntu-22
image: "docker.io/geerlingguy/docker-ubuntu2204-ansible"
groups:
Expand Down
9 changes: 9 additions & 0 deletions roles/pterodactyl_panel/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
apt:
update_cache: yes
when: ansible_os_family == "Debian"

# the geerlingguy images apparently use systemd-cron instead of the regular cron used on ubuntu by default,
# this causes module failures with the cron module as systemd-cron has different return codes
- name: Ensure systemd-cron is absent
ansible.builtin.apt:
name:
- systemd-cron
state: absent
when: ansible_os_family == "Debian"
13 changes: 10 additions & 3 deletions roles/pterodactyl_panel/tasks/panel_workers.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
- name: Look for crontab executable
#"command" is a shell builtin, hence the need for the shell module
shell: "command -v crontab"
register: _crontab_install
# dash (Debian sh shell) uses 127 instead of 1 for not found errors
failed_when: _crontab_install.rc not in [0,1,127]
changed_when: no
check_mode: no

# Schedules used to be run with cron, but we have since switched to systemd timers - make sure the old residue is gone.
- name: Old Schedule cronjob is absent
cron:
name: "Pterodactyl Panel - Schedule"
state: absent
register: _crontab_removal
# Some systems don't ship with crontab, but that also means that there can't be a job set up with it.
# To prevent having to install crontab just to look for a job that can't exist, we overwrite the error condition
failed_when: _crontab_removal.failed and 'Failed to find required executable' not in _crontab_removal.msg
when: _crontab_install.rc == 0

- name: Schedule systemd service is present
template:
Expand Down
4 changes: 2 additions & 2 deletions roles/pterodactyl_wings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Older versions are supported on a best-effort basis.
## Requirements

- The following distributions are currently supported:
- Ubuntu: 20.04 LTS, 22.04 LTS
- Debian: 10, 11, 12
- Ubuntu: 20.04 LTS, 22.04, 24.04 LTS
- Debian: 11, 12
- This role requires root access. Make sure to run this role with `become: yes` or equivalent
- Docker is required to run Wings. If docker is not present, this role will install it automatically
- You must have already created a new node in your panel.
Expand Down
23 changes: 13 additions & 10 deletions roles/pterodactyl_wings/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
platforms:
- name: pterodactyl-wings-ubuntu-22
image: "docker.io/geerlingguy/docker-ubuntu2204-ansible"
- name: pterodactyl-wings-ubuntu-24
image: "docker.io/geerlingguy/docker-ubuntu2404-ansible"
volumes:
# The wings daemon needs to connect to a docker daemon. We use a sibling setup
# to allow the wings containers to access the host docker daemon by passing through the docker socket
Expand All @@ -15,8 +15,8 @@ platforms:
override_command: false
pre_build_image: true

- name: pterodactyl-wings-ubuntu-20
image: "docker.io/geerlingguy/docker-ubuntu2004-ansible"
- name: pterodactyl-wings-ubuntu-22
image: "docker.io/geerlingguy/docker-ubuntu2204-ansible"
volumes:
# The wings daemon needs to connect to a docker daemon. We use a sibling setup
# to allow the wings containers to access the host docker daemon by passing through the docker socket
Expand All @@ -30,20 +30,23 @@ platforms:
override_command: false
pre_build_image: true

- name: pterodactyl-wings-debian-12
image: "docker.io/geerlingguy/docker-debian12-ansible"
- name: pterodactyl-wings-ubuntu-20
image: "docker.io/geerlingguy/docker-ubuntu2004-ansible"
volumes:
# The wings daemon needs to connect to a docker daemon. We use a sibling setup
# to allow the wings containers to access the host docker daemon by passing through the docker socket
- /var/run/docker.sock:/tmp/docker.sock
- /sys/fs/cgroup:/sys/fs/cgroup:rw
env:
# The /tmp/sock workaround is required due to this issue: https://github.com/ansible-community/molecule/issues/1568
DOCKER_HOST: /tmp/docker.sock
cgroupns_mode: host
privileged: true
override_command: false
pre_build_image: true

- name: pterodactyl-wings-debian-11
image: "docker.io/geerlingguy/docker-debian11-ansible"
- name: pterodactyl-wings-debian-12
image: "docker.io/geerlingguy/docker-debian12-ansible"
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -54,8 +57,8 @@ platforms:
override_command: false
pre_build_image: true

- name: pterodactyl-wings-debian-10
image: "docker.io/geerlingguy/docker-debian10-ansible"
- name: pterodactyl-wings-debian-11
image: "docker.io/geerlingguy/docker-debian11-ansible"
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down

0 comments on commit 33fe230

Please sign in to comment.