Skip to content

Commit

Permalink
feat: Add support for installing NGINX Agent on Ubuntu noble (nginxin…
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg committed Jul 22, 2024
1 parent 02a9ee6 commit 15b5935
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BREAKING CHANGES:
FEATURES:

- Add support for installing NGINX Open Source on Alpine Linux 3.20.
- Add support for installing NGINX Agent on Ubuntu noble.

DOCUMENTATION:

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ To use the role, include the following task in your playbook:

## Platforms

The NGINX Ansible role supports almost all platforms supported by [NGINX Open Source](https://nginx.org/en/linux_packages.html), [NGINX Plus](https://docs.nginx.com/nginx/technical-specs/), the [NGINX Agent](https://docs.nginx.com/nginx-agent/technical-specifications/), and the [NGINX Amplify agent](https://github.com/nginxinc/nginx-amplify-doc/blob/master/amplify-faq.md#21-what-operating-systems-are-supported):
The NGINX Ansible role supports almost all platforms supported by [NGINX Open Source](https://nginx.org/en/linux_packages.html), [NGINX Plus](https://docs.nginx.com/nginx/technical-specs/), [NGINX Agent](https://docs.nginx.com/nginx-agent/technical-specifications/), and the [NGINX Amplify agent](https://github.com/nginxinc/nginx-amplify-doc/blob/master/amplify-faq.md#21-what-operating-systems-are-supported):

### NGINX Open Source

Expand Down Expand Up @@ -267,6 +267,7 @@ SUSE/SLES:
Ubuntu:
- focal (20.04)
- jammy (22.04)
- noble (24.04)
```

### NGINX Amplify Agent
Expand Down Expand Up @@ -315,7 +316,7 @@ Working functional playbook examples can be found in the **[`molecule/`](https:/

| Name | Description |
| ---- | ----------- |
| **[`agent/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/agent/converge.yml)** | Install and configure the NGINX Agent to connect to the NGINX One SaaS control plane on F5 Distributed Cloud |
| **[`agent/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/agent/converge.yml)** | Install and configure NGINX Agent to connect to the NGINX One SaaS control plane on F5 Distributed Cloud |
| **[`amplify/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/amplify/converge.yml)** | Install and configure the NGINX Amplify agent |
| **[`default/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/default/converge.yml)** | Install a specific version of NGINX, install various NGINX supported modules, tweak systemd and set up logrotate |
| **[`distribution/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/distribution/converge.yml)** | Install NGINX from the distribution's package repository instead of NGINX's package repository |
Expand Down
2 changes: 1 addition & 1 deletion molecule/agent/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

- name: Get list of NGINX One dangling instance IDs
ansible.builtin.uri:
url: https://{{ lookup('env', 'ONE_TENANT') }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances?paginated=false&filter_fields=hostname&filter_ops=IN&filter_values=almalinux-8|almalinux-9|alpine-3.17|alpine-3.18|alpine-3.19|alpine-3.20|amazonlinux-2|debian-bullseye|debian-bookworm|oraclelinux-8|oraclelinux-9|rhel-8|rhel-9|rockylinux-8|rockylinux-9|sles-15|ubuntu-focal|ubuntu-jammy
url: https://{{ lookup('env', 'ONE_TENANT') }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances?paginated=false&filter_fields=hostname&filter_ops=IN&filter_values=almalinux-8|almalinux-9|alpine-3.17|alpine-3.18|alpine-3.19|alpine-3.20|amazonlinux-2|debian-bullseye|debian-bookworm|oraclelinux-8|oraclelinux-9|rhel-8|rhel-9|rockylinux-8|rockylinux-9|sles-15|ubuntu-focal|ubuntu-jammy|ubuntu-noble
method: GET
headers:
Authorization: APIToken {{ lookup('env', 'ONE_API_TOKEN') }}
Expand Down
8 changes: 8 additions & 0 deletions molecule/agent/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: ubuntu-noble
image: ubuntu:noble
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
provisioner:
name: ansible
log: true
Expand Down
2 changes: 1 addition & 1 deletion tasks/agent/install-agent.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Configure NGINX Agent repository
- name: Manage NGINX Agent repository
ansible.builtin.include_tasks: "{{ role_path }}/tasks/agent/setup-{{ ansible_facts['os_family'] | lower }}.yml"
when: ansible_facts['os_family'] in ['Alpine', 'Debian', 'RedHat', 'Suse']

Expand Down
2 changes: 1 addition & 1 deletion tasks/agent/setup-alpine.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: (Alpine Linux) Add NGINX Agent repository
- name: (Alpine Linux) Configure NGINX Agent repository
ansible.builtin.lineinfile:
path: /etc/apk/repositories
insertafter: EOF
Expand Down
2 changes: 1 addition & 1 deletion tasks/agent/setup-debian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: (Debian/Ubuntu) Add NGINX Agent repository
- name: (Debian/Ubuntu) Configure NGINX Agent repository
ansible.builtin.apt_repository:
filename: nginx-agent
repo: deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.nginx.org/nginx-agent/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] | lower }} agent
Expand Down
2 changes: 1 addition & 1 deletion tasks/agent/setup-redhat.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Add NGINX Agent repository
- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Configure NGINX Agent repository
ansible.builtin.yum_repository:
name: nginx-agent
file: nginx-agent
Expand Down
2 changes: 1 addition & 1 deletion tasks/agent/setup-suse.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: (SLES) Add NGINX Agent repository
- name: (SLES) Configure NGINX Agent repository
community.general.zypper_repository:
name: nginx-agent
repo: https://packages.nginx.org/nginx-agent/sles/{{ ansible_facts['distribution_major_version'] }}
3 changes: 1 addition & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,5 @@

- name: Install NGINX Agent
ansible.builtin.include_tasks: "{{ role_path }}/tasks/agent/install-agent.yml"
when:
- nginx_agent_enable | bool
when: nginx_agent_enable | bool
tags: nginx_install_agent

0 comments on commit 15b5935

Please sign in to comment.