Skip to content

Support NGINX Plus R30 #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name: Molecule CI/CD
on:
pull_request:
branches:
- main
# branches:
# - main
push:
branches:
- main
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## 0.24.2 (Unreleased)

FEATURES:

- Add Alpine Linux 3.18 and Debian bookworm to the list of NGINX Plus tested and supported distributions.
- Remove Alpine Linux 3.14 and Ubuntu bionic from the list of NGINX Plus tested and supported distributions.
- The `geoip2` module for NGINX Plus is no longer supported on Amazon Linux.

CI/CD:

- Reimplement some platforms in the upgrade & downgrade Molecule scenarios since all platforms now have at least two releases.
Expand All @@ -25,11 +31,11 @@ ENHANCEMENTS:

BUG FIXES:

- Fix an issue with the platform validation logic whereas distro versions ending in `*.*0` would not be correctly identified.
- Fix an issue with the platform validation logic where distribution versions ending in `*.*0` would not be correctly identified.

CI/CD:

- Comment out the platform parameter out of Molecule tests. QEMU based tests are failing when trying to test the newest supported distros.
- Comment out the platform parameter out of Molecule tests. QEMU based tests are failing when trying to test the newest supported distribution.
- Split Ansible Lint into its own GitHub Actions job since Molecule no longer runs linters natively.
- Replace `molecule[docker]` with `molecule` and `molecule-plugins[docker]`.
- Explicitly set the `ansible-compat` version (commented out for the time being whilst waiting for a new release of Molecule).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,17 @@ AlmaLinux:
- 8
- 9
Alpine:
- 3.14
- 3.15
- 3.16
- 3.17
- 3.18
Amazon Linux:
- 2
CentOS:
- 7.4+
Debian:
- bullseye (11)
- bookworm (12)
FreeBSD:
- 12.1+
- 13
Expand All @@ -160,7 +161,6 @@ SUSE/SLES:
- 12
- 15
Ubuntu:
- bionic (18.04)
- focal (20.04)
- jammy (22.04)
```
Expand Down
8 changes: 4 additions & 4 deletions molecule/downgrade-plus/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
pre_tasks:
- name: Set repo if Alpine
ansible.builtin.set_fact:
version: =27-r1
version: =29-r1
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =27-1~{{ ansible_facts['distribution_release'] }}
version: =29-1~{{ ansible_facts['distribution_release'] }}
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -27-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -29-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
version: =27-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
version: =29-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
Expand Down
39 changes: 19 additions & 20 deletions molecule/downgrade-plus/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
driver:
name: docker
platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
- name: almalinux-8
image: almalinux:8
dockerfile: ../common/Dockerfile.j2
Expand All @@ -18,34 +18,34 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.14
image: alpine:3.14
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.15
image: alpine:3.15
- name: alpine-3.16
image: alpine:3.16
# platform: x86_64
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
# platform: x86_64
- name: alpine-3.17
image: alpine:3.17
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: alpine-3.17
# image: alpine:3.17
# platform: aarch64
# - name: alpine-3.18
# image: alpine:3.18
# dockerfile: ../common/Dockerfile.j2
# privileged: true
# cgroupns_mode: host
Expand Down Expand Up @@ -78,6 +78,14 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: debian-bookworm
# image: debian:bookworm-slim
# dockerfile: ../common/Dockerfile.j2
# privileged: true
# cgroupns_mode: host
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
# command: /sbin/init
- name: oraclelinux-7
image: oraclelinux:7
# platform: x86_64
Expand Down Expand Up @@ -155,15 +163,6 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: ubuntu-bionic
image: ubuntu:bionic
# platform: x86_64
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: ubuntu-focal
image: ubuntu:focal
# platform: s390x
Expand Down
2 changes: 1 addition & 1 deletion molecule/downgrade-plus/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
changed_when: false
register: version
failed_when: version is not search('27')
failed_when: version is not search('29')
33 changes: 16 additions & 17 deletions molecule/plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.14
image: alpine:3.14
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
Expand All @@ -52,6 +44,14 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.18
image: alpine:3.18
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: amazonlinux-2
image: amazonlinux:2
# platform: x86_64
Expand All @@ -78,6 +78,14 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: debian-bookworm
image: debian:bookworm-slim
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: oraclelinux-7
image: oraclelinux:7
# platform: x86_64
Expand Down Expand Up @@ -155,15 +163,6 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: ubuntu-bionic
image: ubuntu:bionic
# platform: x86_64
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: ubuntu-focal
image: ubuntu:focal
# platform: s390x
Expand Down
14 changes: 14 additions & 0 deletions molecule/plus/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,17 @@
ansible.builtin.uri:
url: http://localhost
status_code: 200

- name: Fetch the latest version of NGINX Plus
ansible.builtin.uri:
url: https://version.nginx.com/plus
return_content: true
register: nginx_version

- name: Verify the latest version of NGINX Plus has been installed
ansible.builtin.command: nginx -v
args:
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
changed_when: false
register: version
failed_when: version is not search(nginx_version['content'] | regex_search('[0-9]+'))
34 changes: 17 additions & 17 deletions molecule/uninstall-plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ platforms: # Ubuntu bionic results in a segmentation fault error as of Ansible c
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.14
image: alpine:3.14
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
Expand All @@ -52,6 +44,15 @@ platforms: # Ubuntu bionic results in a segmentation fault error as of Ansible c
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.18
image: alpine:3.18
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: amazonlinux-2
image: amazonlinux:2
# platform: x86_64
Expand All @@ -78,6 +79,14 @@ platforms: # Ubuntu bionic results in a segmentation fault error as of Ansible c
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: debian-bookworm
image: debian:bookworm-slim
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: oraclelinux-7
image: oraclelinux:7
# platform: x86_64
Expand Down Expand Up @@ -155,15 +164,6 @@ platforms: # Ubuntu bionic results in a segmentation fault error as of Ansible c
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
# - name: ubuntu-bionic
# image: ubuntu:bionic
# platform: x86_64
# dockerfile: ../common/Dockerfile.j2
# privileged: true
# cgroupns_mode: host
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
# command: /sbin/init
- name: ubuntu-focal
image: ubuntu:focal
# platform: s390x
Expand Down
Loading