From dac2c0236d0578f7497ae691eeb124f564d5e012 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Thu, 30 Jan 2025 18:21:34 +0530 Subject: [PATCH 01/13] [change] Modified pip.yml to use requirements.txt file - Modified pip.yml to install dependencies from requirements.txt - Used role_path variable to reference requirements.txt in files directory - Implemented pip constraints to maintain version control from Ansible variables - Kept an extra_python_packages handling for custom additions - and preserved existing retry logic and environment settings --- tasks/pip.yml | 228 ++++---------------------------------------------- 1 file changed, 15 insertions(+), 213 deletions(-) diff --git a/tasks/pip.yml b/tasks/pip.yml index 621b6d30..45a9bb2f 100644 --- a/tasks/pip.yml +++ b/tasks/pip.yml @@ -6,36 +6,27 @@ - pip - setuptools - wheel - - attrs state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - -- name: Remove jsonfield2 - pip: - name: - - jsonfield2 - state: absent - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 2 + retries: 3 delay: 5 register: result until: result is success - notify: Reload application -- name: Install openwisp2 controller and its dependencies +- name: Install Python dependencies from requirements.txt pip: - name: - - "{{ openwisp2_controller_version }}" - - service_identity - state: latest + requirements: "{{ role_path }}/files/requirements.txt" + state: present virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" + extra_args: >- + {% if openwisp2_controller_version is defined %}--constraint <(echo "openwisp-controller=={{ openwisp2_controller_version }}"){% endif %} + {% if openwisp2_network_topology_version is defined %}--constraint <(echo "openwisp-network-topology=={{ openwisp2_network_topology_version }}"){% endif %} + {% if openwisp2_firmware_upgrader_version is defined %}--constraint <(echo "openwisp-firmware-upgrader=={{ openwisp2_firmware_upgrader_version }}"){% endif %} + {% if openwisp2_monitoring_version is defined %}--constraint <(echo "openwisp-monitoring=={{ openwisp2_monitoring_version }}"){% endif %} + {% if openwisp2_radius_version is defined %}--constraint <(echo "openwisp-radius=={{ openwisp2_radius_version }}"){% endif %} + {% if openwisp2_django_version is defined %}--constraint <(echo "django=={{ openwisp2_django_version }}"){% endif %} environment: LC_CTYPE: "en_US.UTF-8" notify: Reload application @@ -43,206 +34,17 @@ delay: 10 register: result until: result is success - tags: - - molecule-idempotence-notest - -- name: Install channels_redis~=4.2.0 - pip: - name: - - channels_redis~=4.2.0 - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 1 - delay: 10 - register: result - until: result is success - -- name: Install django-redis - pip: - name: "django-redis~=5.4.0" - state: present - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - notify: Reload application - retries: 5 - delay: 10 - register: result - until: result is success - -- name: Install openwisp2 network topology and its dependencies - when: openwisp2_network_topology - pip: - name: "{{ openwisp2_network_topology_version }}" - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - notify: Reload application - retries: 5 - delay: 10 - register: result - until: result is success - tags: - - molecule-idempotence-notest - -- name: Install openwisp firmware upgrader and its dependencies - when: openwisp2_firmware_upgrader - pip: - name: "{{ openwisp2_firmware_upgrader_version }}" - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - notify: Reload application - retries: 5 - delay: 10 - register: result - until: result is success - tags: - - molecule-idempotence-notest - -- name: Install openwisp monitoring and its dependencies - when: openwisp2_monitoring - pip: - name: "{{ openwisp2_monitoring_version }}" - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - notify: Reload application - retries: 5 - delay: 10 - register: result - until: result is success - tags: - - molecule-idempotence-notest - -- name: Install openwisp2_radius and its dependencies - when: openwisp2_radius - pip: - name: "{{ openwisp2_radius_version }}" - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - notify: Reload application - retries: 5 - delay: 10 - register: result - until: result is success - tags: - - molecule-idempotence-notest - -- name: Install django-cors-headers - when: openwisp2_django_cors.get('enabled') - pip: - name: "django-cors-headers~=4.4.0" - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - name: Install extra python packages pip: name: "{{ openwisp2_extra_python_packages }}" - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - tags: [extra_pip] - -- name: Install static minification dependencies - pip: - name: - - django-pipeline~=3.1.0 - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - -- name: Install uwsgi - pip: - name: uwsgi - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - -- name: Install psycopg2 - when: openwisp2_database.engine in ["django.db.backends.postgresql", "django.contrib.gis.db.backends.postgis"] - pip: - name: psycopg2 - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - -- name: Install MySQL-python - when: openwisp2_database.engine in ["django.db.backends.mysql", "django.contrib.gis.db.backends.mysql"] - pip: - name: MySQL-python - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - -- name: Install raven (sentry client) - when: openwisp2_sentry.get('dsn') - pip: - name: raven - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - -- name: Install django-celery-email - pip: - name: django-celery-email - state: latest - virtualenv: "{{ virtualenv_path }}" - virtualenv_python: "{{ openwisp2_python }}" - when: openwisp2_email_backend == "djcelery_email.backends.CeleryEmailBackend" - retries: 5 - delay: 10 - register: result - until: result is success - notify: Reload application - -- name: Install django - pip: - name: "{{ openwisp2_django_version }}" state: present virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" - retries: 5 - delay: 10 + when: openwisp2_extra_python_packages | length > 0 + retries: 3 + delay: 5 register: result until: result is success notify: Reload application - tags: - - molecule-idempotence-notest + tags: [extra_pip] From 5c91cdf8ce06b95cab4c2ba061da496c987a7e0b Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Thu, 30 Jan 2025 18:24:05 +0530 Subject: [PATCH 02/13] [change] Added requirements.txt for Python dependencies - Here grouped dependencies by their functionality (core, database, optional) - Added few comments to indicate optional packages and their purpose - While maintaining existing version constraints for critical packages - I've ensured compatibility with current OpenWISP installation process --- files/requirements.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 files/requirements.txt diff --git a/files/requirements.txt b/files/requirements.txt new file mode 100644 index 00000000..0763f77a --- /dev/null +++ b/files/requirements.txt @@ -0,0 +1,27 @@ +# Core Django and related packages +django-redis~=5.4.0 +django-pipeline~=3.1.0 +channels_redis~=4.2.0 +django-cors-headers~=4.4.0 + +# WSGI server +uwsgi + +# Optional dependencies +service_identity +attrs + +# Database adapters +psycopg2 +MySQL-python + +# Integration dependencies +raven # For Sentry integration +django-celery-email # For Celery email backend + +# OpenWISP packages +openwisp-controller +openwisp-network-topology # Optional +openwisp-firmware-upgrader # Optional +openwisp-monitoring # Optional +openwisp-radius # Optional From 391ea201e948109e582f51cc792ef1b50c8c9a49 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Thu, 30 Jan 2025 18:25:19 +0530 Subject: [PATCH 03/13] [change] Configured dependabot for Python dependencies - Added pip package ecosystem to dependabot configuration - While setting up weekly update schedule for dependency checks - Added all 'dependencies' and 'python' labels for better PR organization --- .github/dependabot.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 39bc7bf6..5656dfe0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,14 +1,13 @@ version: 2 updates: - - package-ecosystem: "pip" # Check for Python package updates - directory: "/" # The root directory where the Ansible role is located + - package-ecosystem: "pip" + directory: "/" schedule: - interval: "monthly" # Check for updates weekly + interval: "weekly" + open-pull-requests-limit: 10 + labels: + - "dependencies" + - "python" commit-message: - prefix: "[deps] " - - package-ecosystem: "github-actions" # Check for GitHub Actions updates - directory: "/" # The root directory where the Ansible role is located - schedule: - interval: "monthly" # Check for updates weekly - commit-message: - prefix: "[ci] " + prefix: "deps" + include: "scope" From fa90ca1a752492a65aa322039095d6a76814908a Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Tue, 4 Feb 2025 11:11:06 +0530 Subject: [PATCH 04/13] [change] Configured dependabot properly - Maintained consistent prefix formatting using square brackets: [deps] for pip and [ci] for GitHub Actions - Restored the GitHub Actions ecosystem configuration - Setup both update intervals to "weekly" as originally intended --- .github/dependabot.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5656dfe0..d502e68c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,5 +9,12 @@ updates: - "dependencies" - "python" commit-message: - prefix: "deps" + prefix: "[deps] " include: "scope" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "[ci] " From 07a2c8466a43324c5c998c4831fd262c34157db6 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Thu, 6 Feb 2025 00:15:23 +0530 Subject: [PATCH 05/13] [change] Modified pip.yml to use requirements.txt file --- tasks/pip.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tasks/pip.yml b/tasks/pip.yml index 45a9bb2f..b55f0566 100644 --- a/tasks/pip.yml +++ b/tasks/pip.yml @@ -1,5 +1,3 @@ ---- - - name: Update pip & related tools pip: name: @@ -20,13 +18,6 @@ state: present virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" - extra_args: >- - {% if openwisp2_controller_version is defined %}--constraint <(echo "openwisp-controller=={{ openwisp2_controller_version }}"){% endif %} - {% if openwisp2_network_topology_version is defined %}--constraint <(echo "openwisp-network-topology=={{ openwisp2_network_topology_version }}"){% endif %} - {% if openwisp2_firmware_upgrader_version is defined %}--constraint <(echo "openwisp-firmware-upgrader=={{ openwisp2_firmware_upgrader_version }}"){% endif %} - {% if openwisp2_monitoring_version is defined %}--constraint <(echo "openwisp-monitoring=={{ openwisp2_monitoring_version }}"){% endif %} - {% if openwisp2_radius_version is defined %}--constraint <(echo "openwisp-radius=={{ openwisp2_radius_version }}"){% endif %} - {% if openwisp2_django_version is defined %}--constraint <(echo "django=={{ openwisp2_django_version }}"){% endif %} environment: LC_CTYPE: "en_US.UTF-8" notify: Reload application From 7390bf0301aa4f7c481389cfbe73e868fd0e6ae8 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Fri, 7 Feb 2025 09:42:59 +0530 Subject: [PATCH 06/13] [change] The role_path is looking for requirements.txt is fixed --- tasks/pip.yml | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/tasks/pip.yml b/tasks/pip.yml index b55f0566..009904f8 100644 --- a/tasks/pip.yml +++ b/tasks/pip.yml @@ -1,3 +1,4 @@ +--- - name: Update pip & related tools pip: name: @@ -12,6 +13,16 @@ register: result until: result is success +- name: Verify requirements.txt exists + stat: + path: "{{ role_path }}/files/requirements.txt" + register: req_file + +- name: Debug requirements file path + debug: + msg: "Looking for requirements file at {{ role_path }}/files/requirements.txt" + when: req_file.stat is defined + - name: Install Python dependencies from requirements.txt pip: requirements: "{{ role_path }}/files/requirements.txt" @@ -26,6 +37,82 @@ register: result until: result is success +- name: Install openwisp2 controller + pip: + name: "{{ openwisp2_controller_version }}" + state: present + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + environment: + LC_CTYPE: "en_US.UTF-8" + notify: Reload application + retries: 5 + delay: 10 + register: result + until: result is success + tags: + - molecule-idempotence-notest + +- name: Install openwisp2 network topology + when: openwisp2_network_topology + pip: + name: "{{ openwisp2_network_topology_version }}" + state: present + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + notify: Reload application + retries: 5 + delay: 10 + register: result + until: result is success + tags: + - molecule-idempotence-notest + +- name: Install openwisp firmware upgrader + when: openwisp2_firmware_upgrader + pip: + name: "{{ openwisp2_firmware_upgrader_version }}" + state: present + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + notify: Reload application + retries: 5 + delay: 10 + register: result + until: result is success + tags: + - molecule-idempotence-notest + +- name: Install openwisp monitoring + when: openwisp2_monitoring + pip: + name: "{{ openwisp2_monitoring_version }}" + state: present + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + notify: Reload application + retries: 5 + delay: 10 + register: result + until: result is success + tags: + - molecule-idempotence-notest + +- name: Install openwisp2_radius + when: openwisp2_radius + pip: + name: "{{ openwisp2_radius_version }}" + state: present + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + notify: Reload application + retries: 5 + delay: 10 + register: result + until: result is success + tags: + - molecule-idempotence-notest + - name: Install extra python packages pip: name: "{{ openwisp2_extra_python_packages }}" @@ -39,3 +126,17 @@ until: result is success notify: Reload application tags: [extra_pip] + +- name: Install django + pip: + name: "{{ openwisp2_django_version }}" + state: present + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + retries: 5 + delay: 10 + register: result + until: result is success + notify: Reload application + tags: + - molecule-idempotence-notest From ba3aea35161de042a514251ca8a230fba53a586d Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Fri, 7 Feb 2025 09:43:47 +0530 Subject: [PATCH 07/13] [change] Modified requirements.txt for Python dependencies --- files/requirements.txt | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/files/requirements.txt b/files/requirements.txt index 0763f77a..63044d82 100644 --- a/files/requirements.txt +++ b/files/requirements.txt @@ -1,27 +1,25 @@ -# Core Django and related packages +# Core dependencies +attrs +service_identity + +# Django and related packages django-redis~=5.4.0 django-pipeline~=3.1.0 -channels_redis~=4.2.0 django-cors-headers~=4.4.0 - -# WSGI server -uwsgi - -# Optional dependencies -service_identity -attrs +channels_redis~=4.2.0 # Database adapters psycopg2 MySQL-python -# Integration dependencies -raven # For Sentry integration -django-celery-email # For Celery email backend +# WSGI server +uwsgi + +# Monitoring and error reporting +raven + +# Email backend +django-celery-email -# OpenWISP packages -openwisp-controller -openwisp-network-topology # Optional -openwisp-firmware-upgrader # Optional -openwisp-monitoring # Optional -openwisp-radius # Optional +# Remove deprecated packages +jsonfield2==*; python_version < "0.0" # Ensures this is never installed From 8df5413b2e36411e2d00389b11456daabdc92a52 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Tue, 11 Feb 2025 19:20:16 +0530 Subject: [PATCH 08/13] [change] fixed dependabot as it was previously --- .github/dependabot.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d502e68c..39bc7bf6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,20 +1,14 @@ version: 2 updates: - - package-ecosystem: "pip" - directory: "/" + - package-ecosystem: "pip" # Check for Python package updates + directory: "/" # The root directory where the Ansible role is located schedule: - interval: "weekly" - open-pull-requests-limit: 10 - labels: - - "dependencies" - - "python" + interval: "monthly" # Check for updates weekly commit-message: prefix: "[deps] " - include: "scope" - - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: "github-actions" # Check for GitHub Actions updates + directory: "/" # The root directory where the Ansible role is located schedule: - interval: "weekly" + interval: "monthly" # Check for updates weekly commit-message: prefix: "[ci] " From 9c99aa1f18ccae31ce1bde322bb68028df3abca2 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Tue, 11 Feb 2025 19:22:58 +0530 Subject: [PATCH 09/13] [change] added a requirements.txt file for removing Database adapters --- files/requirements.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/files/requirements.txt b/files/requirements.txt index 63044d82..94100114 100644 --- a/files/requirements.txt +++ b/files/requirements.txt @@ -8,9 +8,6 @@ django-pipeline~=3.1.0 django-cors-headers~=4.4.0 channels_redis~=4.2.0 -# Database adapters -psycopg2 -MySQL-python # WSGI server uwsgi From 534eb1a5b1bea89459fb00dd47af993630fc5029 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Tue, 11 Feb 2025 19:26:12 +0530 Subject: [PATCH 10/13] [change] modified pip.yml to fix the state as latest --- tasks/pip.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tasks/pip.yml b/tasks/pip.yml index 009904f8..453e4ace 100644 --- a/tasks/pip.yml +++ b/tasks/pip.yml @@ -26,7 +26,7 @@ - name: Install Python dependencies from requirements.txt pip: requirements: "{{ role_path }}/files/requirements.txt" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" environment: @@ -40,7 +40,7 @@ - name: Install openwisp2 controller pip: name: "{{ openwisp2_controller_version }}" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" environment: @@ -57,7 +57,7 @@ when: openwisp2_network_topology pip: name: "{{ openwisp2_network_topology_version }}" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" notify: Reload application @@ -72,7 +72,7 @@ when: openwisp2_firmware_upgrader pip: name: "{{ openwisp2_firmware_upgrader_version }}" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" notify: Reload application @@ -87,7 +87,7 @@ when: openwisp2_monitoring pip: name: "{{ openwisp2_monitoring_version }}" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" notify: Reload application @@ -102,7 +102,7 @@ when: openwisp2_radius pip: name: "{{ openwisp2_radius_version }}" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" notify: Reload application @@ -116,7 +116,7 @@ - name: Install extra python packages pip: name: "{{ openwisp2_extra_python_packages }}" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" when: openwisp2_extra_python_packages | length > 0 @@ -130,7 +130,7 @@ - name: Install django pip: name: "{{ openwisp2_django_version }}" - state: present + state: latest virtualenv: "{{ virtualenv_path }}" virtualenv_python: "{{ openwisp2_python }}" retries: 5 From 3d8c5eefc615431ba1f4a59955dd9c2069d2f868 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Tue, 11 Feb 2025 19:30:03 +0530 Subject: [PATCH 11/13] [change] modified pip.yml for database adapters psycopg2 & MySQL-python --- tasks/pip.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/tasks/pip.yml b/tasks/pip.yml index 453e4ace..7458dcb9 100644 --- a/tasks/pip.yml +++ b/tasks/pip.yml @@ -1,4 +1,5 @@ --- + - name: Update pip & related tools pip: name: @@ -140,3 +141,46 @@ notify: Reload application tags: - molecule-idempotence-notest + +- name: Install psycopg2 + when: openwisp2_database.engine in ["django.db.backends.postgresql", "django.contrib.gis.db.backends.postgis"] + pip: + name: psycopg2-binary + state: latest + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + retries: 3 + delay: 5 + register: result + until: result is success + notify: Reload application + +- name: Install MySQL-python for Python 2 + when: + - openwisp2_database.engine in ["django.db.backends.mysql", "django.contrib.gis.db.backends.mysql"] + - openwisp2_python is version('3.0', '<') + pip: + name: MySQL-python + state: latest + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + retries: 3 + delay: 5 + register: result + until: result is success + notify: Reload application + +- name: Install mysqlclient for Python 3 + when: + - openwisp2_database.engine in ["django.db.backends.mysql", "django.contrib.gis.db.backends.mysql"] + - openwisp2_python is version('3.0', '>=') + pip: + name: mysqlclient + state: latest + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + retries: 3 + delay: 5 + register: result + until: result is success + notify: Reload application From 35f55de0948a5d3a5de64e220a809cb62f32e12f Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Sat, 22 Feb 2025 16:45:38 +0530 Subject: [PATCH 12/13] [change] Fixed requirements.txt file for ravan --- files/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/files/requirements.txt b/files/requirements.txt index 94100114..09f86d3c 100644 --- a/files/requirements.txt +++ b/files/requirements.txt @@ -8,7 +8,6 @@ django-pipeline~=3.1.0 django-cors-headers~=4.4.0 channels_redis~=4.2.0 - # WSGI server uwsgi From 936e30332819f72b43d79270474f8b2916e7d229 Mon Sep 17 00:00:00 2001 From: Shwetas Dhake Date: Sat, 22 Feb 2025 16:46:30 +0530 Subject: [PATCH 13/13] [change] Modified pip.yml to fix the raven installation --- tasks/pip.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tasks/pip.yml b/tasks/pip.yml index 7458dcb9..5b1c3996 100644 --- a/tasks/pip.yml +++ b/tasks/pip.yml @@ -184,3 +184,29 @@ register: result until: result is success notify: Reload application + +- name: Install raven + when: openwisp2_sentry.get('dsn') + pip: + name: raven + state: latest + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + notify: Reload application + retries: 3 + delay: 5 + register: result + until: result is success + +- name: Install django-celery-email + when: openwisp2_email_backend == "djcelery_email.backends.CeleryEmailBackend" + pip: + name: django-celery-email + state: latest + virtualenv: "{{ virtualenv_path }}" + virtualenv_python: "{{ openwisp2_python }}" + notify: Reload application + retries: 3 + delay: 5 + register: result + until: result is success