Version bump to NetBox v4.6.3 (#82)

* Add support for NetBox 4.6
* Test NetBox v4.6.3 and Python 3.14

Signed-off-by: wkoot <3715211+wkoot@users.noreply.github.com>
Co-authored-by: Artem Kotik <artem.i.kotik@ringcentral.com>
This commit is contained in:
wkoot
2026-06-25 18:06:27 +02:00
committed by GitHub
co-authored by Artem Kotik
parent 811490e429
commit f84a6bde2a
16 changed files with 69 additions and 70 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.12
ARG PYTHON_VERSION=3.14
FROM python:${PYTHON_VERSION}-alpine AS compile-image
# Python version build arg is not actually supported by NetBox container image, only used for maintenance convenience
@@ -12,7 +12,7 @@ RUN pip install -U .[build] &&\
python -m build &&\
pip install --no-index /build
FROM netboxcommunity/netbox:v4.2.3
ARG PYTHON_VERSION=3.12
FROM netboxcommunity/netbox:v4.6.3
ARG PYTHON_VERSION=3.14
COPY --from=compile-image /opt/netbox/venv/lib/python${PYTHON_VERSION}/site-packages/netbox_slm /opt/netbox/venv/lib/python${PYTHON_VERSION}/site-packages/netbox_slm
+2 -2
View File
@@ -1,5 +1,5 @@
FROM netboxcommunity/netbox:v4.2.3
ARG PYTHON_VERSION=3.12
FROM netboxcommunity/netbox:v4.6.3
ARG PYTHON_VERSION=3.14
COPY ../pyproject.toml /tmp/
RUN uv pip install -r /tmp/pyproject.toml --extra ci
+16 -8
View File
@@ -1,18 +1,20 @@
"""
Minimal NetBox config for NetBox SLM plugin testing, docs: https://netbox.readthedocs.io/en/stable/configuration/
Based on https://github.com/netbox-community/netbox/blob/v4.2.3/netbox/netbox/configuration_testing.py
Based on https://github.com/netbox-community/netbox/blob/v4.6.3/netbox/netbox/configuration_testing.py
"""
from os import environ
ALLOWED_HOSTS = ['*']
DATABASE = {
'NAME': environ.get('DB_NAME', 'netbox'),
'USER': environ.get('DB_USER', ''),
'PASSWORD': environ.get('DB_PASSWORD', ''),
'HOST': environ.get('DB_HOST', 'localhost'),
'PORT': environ.get('DB_PORT', ''),
'CONN_MAX_AGE': int(environ.get('DB_CONN_MAX_AGE', '300')),
DATABASES = {
'default': {
'NAME': environ.get('DB_NAME', 'netbox'),
'USER': environ.get('DB_USER', ''),
'PASSWORD': environ.get('DB_PASSWORD', ''),
'HOST': environ.get('DB_HOST', 'localhost'),
'PORT': environ.get('DB_PORT', ''),
'CONN_MAX_AGE': int(environ.get('DB_CONN_MAX_AGE', '300')),
}
}
DEBUG = environ.get('DEBUG', 'False').lower() == 'true'
@@ -38,3 +40,9 @@ REDIS = {
}
SECRET_KEY = 'dummydummydummydummydummydummydummydummydummydummy'
DEFAULT_PERMISSIONS = {}
API_TOKEN_PEPPERS = {
1: 'TEST-VALUE-DO-NOT-USE-TEST-VALUE-DO-NOT-USE-TEST-VALUE-DO-NOT-USE',
}
+2 -8
View File
@@ -12,7 +12,7 @@ services:
healthcheck:
disable: true
volumes:
- ./config:/etc/netbox/config:ro
- ./config:/etc/netbox/config:z,ro
- ./reports:/ci/reports:rw
- ../netbox_slm:/opt/netbox/netbox/netbox_slm:ro
netbox-worker:
@@ -22,14 +22,8 @@ services:
healthcheck:
disable: true
volumes:
- ./config:/etc/netbox/config:ro
- ./config:/etc/netbox/config:z,ro
- ../netbox_slm:/opt/netbox/netbox/netbox_slm:ro
netbox-housekeeping:
image: netbox:slm
depends_on:
- netbox
healthcheck:
disable: true
postgres:
ports:
- "5432:5432"
+13 -25
View File
@@ -1,21 +1,21 @@
---
# based on https://github.com/netbox-community/netbox-docker/blob/3.2.0/docker-compose.yml
# based on https://github.com/netbox-community/netbox-docker/blob/5.0.1/docker-compose.yml
services:
netbox: &netbox
image: netboxcommunity/netbox:${VERSION-v4.2.3}
image: docker.io/netboxcommunity/netbox:${VERSION-v4.6.3}
depends_on:
- postgres
- redis
- redis-cache
env_file: env/netbox.env
user: "unit:root"
user: "netbox:root"
healthcheck:
test: curl -f http://localhost:8080/login/ || exit 1
start_period: 90s
timeout: 3s
interval: 15s
volumes:
- ./config:/etc/netbox/config:ro
- ./config:/etc/netbox/config:z,ro
- netbox-media-files:/opt/netbox/netbox/media:rw
- netbox-reports-files:/opt/netbox/netbox/reports:rw
- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
@@ -33,22 +33,10 @@ services:
start_period: 20s
timeout: 3s
interval: 15s
netbox-housekeeping:
<<: *netbox
depends_on:
netbox:
condition: service_healthy
command:
- /opt/netbox/housekeeping.sh
healthcheck:
test: ps -aux | grep -v grep | grep -q housekeeping || exit 1
start_period: 20s
timeout: 3s
interval: 15s
# postgres
postgres:
image: postgres:17-alpine
image: docker.io/postgres:18-alpine
healthcheck:
test: pg_isready -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER
start_period: 20s
@@ -57,15 +45,15 @@ services:
retries: 5
env_file: env/postgres.env
volumes:
- netbox-postgres-data:/var/lib/postgresql/data
- netbox-postgres:/var/lib/postgresql
# redis
redis:
image: valkey/valkey:8.0-alpine
image: docker.io/valkey/valkey:9.0-alpine
command:
- sh
- -c
- valkey-server --appendonly yes --requirepass $$REDIS_PASSWORD
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- valkey-server --appendonly yes --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
healthcheck: &redis-healthcheck
test: '[ $$(valkey-cli --pass "$${REDIS_PASSWORD}" ping) = ''PONG'' ]'
start_period: 5s
@@ -76,11 +64,11 @@ services:
volumes:
- netbox-redis-data:/data
redis-cache:
image: valkey/valkey:8.0-alpine
image: docker.io/valkey/valkey:9.0-alpine
command:
- sh
- -c
- valkey-server --requirepass $$REDIS_PASSWORD
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- valkey-server --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
healthcheck: *redis-healthcheck
env_file: env/redis-cache.env
volumes:
@@ -89,7 +77,7 @@ services:
volumes:
netbox-media-files:
driver: local
netbox-postgres-data:
netbox-postgres:
driver: local
netbox-redis-cache-data:
driver: local