Skip to content
Open
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
6 changes: 0 additions & 6 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,6 @@ ASSETS_ROOT=/mnt/volumes/statics/assets/

CACHE_BUSTING_STATIC_ENABLED=False

MEMCACHED_ENABLED=False
MEMCACHED_BACKEND=django.core.cache.backends.memcached.PyLibMCCache
MEMCACHED_LOCATION=memcached:11211
MEMCACHED_LOCK_EXPIRE=3600
MEMCACHED_LOCK_TIMEOUT=10
#
# Options for memcached binary, e.g. -vvv to log all requests and cache hits
#
MEMCACHED_OPTIONS=
Expand Down
7 changes: 0 additions & 7 deletions .env_dev
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,10 @@ SECRET_KEY='myv-y4#7j-d*p-__@j#*3z@!y24fz8%^z2v6atuy4bo9vqr1_a'

CACHE_BUSTING_STATIC_ENABLED=False

MEMCACHED_ENABLED=False
MEMCACHED_BACKEND=django.core.cache.backends.memcached.PyLibMCCache
MEMCACHED_LOCATION=127.0.0.1:11211
MEMCACHED_LOCK_EXPIRE=3600
MEMCACHED_LOCK_TIMEOUT=10
PERMISSION_CACHE_EXPIRATION_TIME=604800
#
# Options for memcached binary, e.g. -vvv to log all requests and cache hits
#
MEMCACHED_OPTIONS=

MAX_DOCUMENT_SIZE=200
CLIENT_RESULTS_LIMIT=5
API_LIMIT_PER_PAGE=1000
Expand Down
5 changes: 0 additions & 5 deletions .env_test
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ MEDIA_ROOT=/mnt/volumes/statics/uploaded/

CACHE_BUSTING_STATIC_ENABLED=False

MEMCACHED_ENABLED=False
MEMCACHED_BACKEND=django.core.cache.backends.memcached.PyLibMCCache
MEMCACHED_LOCATION=memcached:11211
MEMCACHED_LOCK_EXPIRE=3600
MEMCACHED_LOCK_TIMEOUT=10
PERMISSION_CACHE_EXPIRATION_TIME=604800
#
# Options for memcached binary, e.g. -vvv to log all requests and cache hits
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
uses: actions/checkout@v6

- name: Build all services (Docker Compose v2)
run: ENVIRONMENT=test docker compose build db geoserver django nginx data-dir-conf --progress plain
run: ENVIRONMENT=test docker compose build db geoserver django nginx data-dir-conf

- name: Save built Docker images
run: |
mkdir -p docker_images
docker save -o docker_images/django.tar geonode/geonode:latest-ubuntu-24.04
docker save -o docker_images/django.tar geonode/geonode:latest-ubuntu-26.04

- name: Upload Docker images as artifact
uses: actions/upload-artifact@v6
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM geonode/geonode-base:latest-ubuntu-24.04
FROM geonode/geonode-base:latest-ubuntu-26.04
LABEL GeoNode development team

ENV LC_ALL=C.UTF-8 \
LANG=C.UTF-8
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ pull:
docker-compose pull

smoketest: up
docker-compose exec django python manage.py test geonode.tests.smoke --noinput --nocapture --detailed-errors --verbosity=1 --failfast
docker-compose exec django python manage.py test geonode.tests.smoke --noinput --nocapture --detailed-errors --verbosity=1

unittest: up
docker-compose exec django python manage.py test geonode.people.tests geonode.base.tests geonode.layers.tests geonode.maps.tests geonode.proxy.tests geonode.security.tests geonode.social.tests geonode.catalogue.tests geonode.documents.tests geonode.api.tests geonode.groups.tests geonode.services.tests geonode.geoserver.tests geonode.upload.tests geonode.tasks.tests --noinput --failfast
docker-compose exec django python manage.py test geonode.people.tests geonode.base.tests geonode.layers.tests geonode.maps.tests geonode.proxy.tests geonode.security.tests geonode.social.tests geonode.catalogue.tests geonode.documents.tests geonode.api.tests geonode.groups.tests geonode.services.tests geonode.geoserver.tests geonode.upload.tests geonode.tasks.tests --noinput

test: smoketest unittest

Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
x-common-django:
&default-common-django
image: geonode/geonode:latest-ubuntu-24.04
image: geonode/geonode:latest-ubuntu-26.04
build:
context: ./
dockerfile: Dockerfile
Expand All @@ -19,8 +19,6 @@ x-common-django:
condition: service_healthy
redis:
condition: service_healthy
memcached:
condition: service_healthy

services:

Expand Down
45 changes: 23 additions & 22 deletions docker/base/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
FROM ubuntu:24.04
FROM ubuntu:26.04

## Enable postgresql-client-15
RUN apt-get update -y && apt-get install curl wget unzip gnupg2 -y
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# will install python3.10
RUN apt-get install lsb-release -y
RUN echo "deb https://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |tee /etc/apt/sources.list.d/pgdg.list
ENV DEBIAN_FRONTEND=noninteractive

# Prepraing dependencies
RUN mkdir -p /usr/src/geonode

## Enable PostgreSQL apt repo (PGDG)
RUN apt-get update -y && apt-get install -y curl wget unzip gnupg2 lsb-release ca-certificates
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc \
| gpg --dearmor -o /usr/share/keyrings/postgresql.gpg
# PGDG has no repo for 26.04's codename yet; pin to a supported one.
RUN echo "deb [signed-by=/usr/share/keyrings/postgresql.gpg] https://apt.postgresql.org/pub/repos/apt/ noble-pgdg main" \
> /etc/apt/sources.list.d/pgdg.list
RUN apt-get update -y

# Preparing dependencies
RUN apt-get install -y \
libgdal-dev libpq-dev libxml2-dev \
libxml2 libxslt1-dev zlib1g-dev libjpeg-dev \
libmemcached-dev libldap2-dev libsasl2-dev libffi-dev
libxslt1-dev zlib1g-dev libjpeg-dev \
libldap2-dev libsasl2-dev libffi-dev git

RUN apt-get update -y && apt-get install -y --no-install-recommends \
RUN apt-get install -y --no-install-recommends \
gcc vim zip gettext geoip-bin cron \
postgresql-client-15 \
python3-all-dev python3-dev \
python3-gdal python3-psycopg2 python3-ldap \
python3-pip python3-lxml \
uwsgi uwsgi-plugin-python3 python3-gdbm python3-venv python-is-python3 gdal-bin

RUN apt-get install -y devscripts build-essential debhelper pkg-kde-tools sharutils
# RUN git clone https://salsa.debian.org/debian-gis-team/proj.git /tmp/proj
# RUN cd /tmp/proj && debuild -i -us -uc -b && dpkg -i ../*.deb
RUN apt-get install -y devscripts build-essential debhelper pkg-kde-tools sharutils libcrypt-dev

RUN python -m venv /usr/src/venv
ENV PATH="/usr/src/venv/bin:$PATH"
RUN . /usr/src/venv/bin/activate

# Install pip packages
RUN pip3 install uwsgi \
RUN pip install uwsgi \
&& pip install pip --upgrade \
&& pip install wheel==0.38.1 \
&& pip install invoke==2.2.0 \
&& pip install GDAL==3.8.4
&& pip install GDAL==3.12.2

# Create symlink for "invoke" command
# Required after installing via pip inside a virtualenv and avoid changing the
# entrypoint.sh in existing GeoNode Projects where /usr/local/bin/invoke is used
# Symlink for "invoke" so existing entrypoint.sh paths (/usr/local/bin/invoke) keep working
RUN ln -s $(which invoke) /usr/local/bin/invoke

# Install "sherlock" to be used with "memcached"
# Install "sherlock" for use with "redis cache"
RUN pip install sherlock

# Cleanup apt update lists
# Cleanup apt lists
RUN rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion docs/src/setup/bare/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sudo apt install -y --allow-downgrades \
build-essential \
python3-gdal=3.8.4+dfsg-3ubuntu3 gdal-bin=3.8.4+dfsg-3ubuntu3 libgdal-dev=3.8.4+dfsg-3ubuntu3 \
python3-all-dev python3.12-dev python3.12-venv \
libxml2 libxml2-dev gettext libmemcached-dev zlib1g-dev \
libxml2 libxml2-dev gettext zlib1g-dev \
libxslt1-dev libjpeg-dev libpng-dev libpq-dev \
software-properties-common \
git unzip gcc zlib1g-dev libgeos-dev libproj-dev \
Expand Down
14 changes: 0 additions & 14 deletions docs/src/setup/configuration/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1196,20 +1196,6 @@ For more information, please rely to `TestMetadataStorers` which contain a smoke
The path to an image used as thumbnail placeholder.


**MEMCACHED_BACKEND**

: Default: ``django.core.cache.backends.memcached.PyMemcacheCache``

Define which backend of memcached will be used


**MEMCACHED_ENABLED**

: Default: ``False``

If True, will use MEMCACHED_BACKEND as default backend in CACHES


**MODIFY_TOPICCATEGORY**


Expand Down
7 changes: 7 additions & 0 deletions geonode/harvesting/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
models,
)

from django.core.cache import caches

service_cache = caches["services"]

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -85,6 +89,7 @@ class HarvesterAdmin(admin.ModelAdmin):
]

def save_model(self, request, harvester: models.Harvester, form, change):
service_cache.delete(harvester.remote_url)
super().save_model(request, harvester, form, change)
if _worker_config_changed(form):
self.message_user(
Expand Down Expand Up @@ -190,6 +195,7 @@ def initiate_abort_perform_harvesting(self, request, queryset):
if harvester.update_availability():
harvester.initiate_abort_perform_harvesting()
being_aborted.append(harvester)
service_cache.delete(harvester.remote_url)
else:
raise RuntimeError(f"Harvester {harvester!r} is not available")
except RuntimeError as exc:
Expand All @@ -208,6 +214,7 @@ def initiate_abort_perform_harvesting(self, request, queryset):
def reset_harvester_status(self, request, queryset):
for harvester in queryset:
if harvester.status != models.Harvester.STATUS_READY:
service_cache.delete(harvester.remote_url)
harvester.status = models.Harvester.STATUS_READY
harvester.save()
self.message_user(request, _("Resetting status for harvester %(name)s...") % {"name": harvester.name})
Expand Down
2 changes: 1 addition & 1 deletion geonode/harvesting/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ def ready(self):
urlpatterns += [re_path(r"^api/v2/", include("geonode.harvesting.api.urls"))]
settings.CELERY_BEAT_SCHEDULE["harvesting-scheduler"] = {
"task": "geonode.harvesting.tasks.harvesting_scheduler",
"schedule": config.get_setting("HARVESTER_SCHEDULER_FREQUENCY_MINUTES") * 60,
"schedule": config.get_setting("HARVESTER_SCHEDULER_FREQUENCY_MINUTES") * 0.5,
}
4 changes: 3 additions & 1 deletion geonode/harvesting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@
from django.utils import timezone
from django.utils.module_loading import import_string
from django.utils.translation import gettext_lazy as _

from django.core.cache import caches
from geonode import celery_app

from .config import get_setting

logger = logging.getLogger(__name__)

service_cache = caches["services"]


class Harvester(models.Model):
STATUS_READY = "ready"
Expand Down
Loading
Loading