Skip to content

Commit b47e85a

Browse files
authored
Merge pull request #1062 from netbox-community/develop
Release 2.7.0
2 parents 22486fe + 2855320 commit b47e85a

File tree

11 files changed

+32
-26
lines changed

11 files changed

+32
-26
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*.sql.gz
22
.netbox
3-
.initializers
3+
.python-version
44
docker-compose.override.yml
55
*.pem
66
configuration/*
@@ -11,5 +11,4 @@ configuration/ldap/*
1111
!configuration/ldap/ldap_config.py
1212
!configuration/logging.py
1313
!configuration/plugins.py
14-
prometheus.yml
1514
super-linter.log

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
3131
ARG NETBOX_PATH
3232
COPY ${NETBOX_PATH}/requirements.txt requirements-container.txt /
3333
RUN \
34-
# We compile 'psycopg2' in the build process
35-
sed -i -e '/psycopg2-binary/d' /requirements.txt && \
34+
# We compile 'psycopg' in the build process
35+
sed -i -e '/psycopg/d' /requirements.txt && \
3636
# Gunicorn is not needed because we use Nginx Unit
3737
sed -i -e '/gunicorn/d' /requirements.txt && \
3838
# We need 'social-auth-core[all]' in the Docker image. But if we put it in our own requirements-container.txt
@@ -62,19 +62,20 @@ RUN export DEBIAN_FRONTEND=noninteractive \
6262
libldap-common \
6363
libpq5 \
6464
libxmlsec1-openssl \
65+
openssh-client \
6566
openssl \
6667
python3 \
6768
python3-distutils \
6869
tini \
69-
&& curl -sL https://nginx.org/keys/nginx_signing.key \
70-
> /etc/apt/trusted.gpg.d/nginx.asc && \
71-
echo "deb https://packages.nginx.org/unit/ubuntu/ jammy unit" \
70+
&& curl --silent --output /usr/share/keyrings/nginx-keyring.gpg \
71+
https://unit.nginx.org/keys/nginx-keyring.gpg \
72+
&& echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ lunar unit" \
7273
> /etc/apt/sources.list.d/unit.list \
7374
&& apt-get update -qq \
7475
&& apt-get install \
7576
--yes -qq --no-install-recommends \
76-
unit=1.29.1-1~jammy \
77-
unit-python3.10=1.29.1-1~jammy \
77+
unit=1.30.0-1~lunar \
78+
unit-python3.11=1.30.0-1~lunar \
7879
&& rm -rf /var/lib/apt/lists/*
7980

8081
COPY --from=builder /opt/netbox/venv /opt/netbox/venv

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.1
1+
2.7.0

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ DOCKERFILE The name of Dockerfile to use.
6161
${_GREEN}Default:${_CLEAR} Dockerfile
6262
6363
DOCKER_FROM The base image to use.
64-
${_GREEN}Default:${_CLEAR} 'ubuntu:22.04'
64+
${_GREEN}Default:${_CLEAR} 'ubuntu:23.04'
6565
6666
BUILDX_PLATFORMS
6767
Specifies the platform(s) to build the image for.
@@ -219,7 +219,7 @@ fi
219219
# Determining the value for DOCKER_FROM
220220
###
221221
if [ -z "$DOCKER_FROM" ]; then
222-
DOCKER_FROM="docker.io/ubuntu:22.04"
222+
DOCKER_FROM="docker.io/ubuntu:23.04"
223223
fi
224224

225225
###

configuration/configuration.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,11 @@ def _environ_get_and_map(variable_name: str, default: str | None = None, map_fn:
141141
CHANGELOG_RETENTION = _environ_get_and_map('CHANGELOG_RETENTION', None, _AS_INT)
142142

143143
# Maximum number of days to retain job results (scripts and reports). Set to 0 to retain job results in the database indefinitely. (Default: 90)
144-
if 'JOBRESULT_RETENTION' in environ:
145-
JOBRESULT_RETENTION = _environ_get_and_map('JOBRESULT_RETENTION', None, _AS_INT)
144+
if 'JOB_RETENTION' in environ:
145+
JOB_RETENTION = _environ_get_and_map('JOB_RETENTION', None, _AS_INT)
146+
# JOBRESULT_RETENTION was renamed to JOB_RETENTION in the v3.5.0 release of NetBox. For backwards compatibility, map JOBRESULT_RETENTION to JOB_RETENTION
147+
elif 'JOBRESULT_RETENTION' in environ:
148+
JOB_RETENTION = _environ_get_and_map('JOBRESULT_RETENTION', None, _AS_INT)
146149

147150
# API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be
148151
# allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_WHITELIST or
@@ -272,9 +275,9 @@ def _environ_get_and_map(variable_name: str, default: str | None = None, map_fn:
272275

273276
# Remote authentication support
274277
REMOTE_AUTH_ENABLED = _environ_get_and_map('REMOTE_AUTH_ENABLED', 'False', _AS_BOOL)
275-
REMOTE_AUTH_BACKEND = environ.get('REMOTE_AUTH_BACKEND', 'netbox.authentication.RemoteUserBackend')
278+
REMOTE_AUTH_BACKEND = _environ_get_and_map('REMOTE_AUTH_BACKEND', 'netbox.authentication.RemoteUserBackend', _AS_LIST)
276279
REMOTE_AUTH_HEADER = environ.get('REMOTE_AUTH_HEADER', 'HTTP_REMOTE_USER')
277-
REMOTE_AUTH_AUTO_CREATE_USER = _environ_get_and_map('REMOTE_AUTH_AUTO_CREATE_USER', 'True', _AS_BOOL)
280+
REMOTE_AUTH_AUTO_CREATE_USER = _environ_get_and_map('REMOTE_AUTH_AUTO_CREATE_USER', 'False', _AS_BOOL)
278281
REMOTE_AUTH_DEFAULT_GROUPS = _environ_get_and_map('REMOTE_AUTH_DEFAULT_GROUPS', '', _AS_LIST)
279282
# REMOTE_AUTH_DEFAULT_PERMISSIONS = {}
280283

docker-compose.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
env_file: env/netbox.env
1313
user: 'unit:root'
1414
volumes:
15-
- ./test-configuration/logging.py:/etc/netbox/config/logging.py:z,ro
15+
- ./test-configuration/test_config.py:/etc/netbox/config/test_config.py:z,ro
1616
healthcheck:
1717
start_period: ${NETBOX_START_PERIOD-120s}
1818
timeout: 3s

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.4'
22
services:
33
netbox: &netbox
4-
image: docker.io/netboxcommunity/netbox:${VERSION-v3.5-2.6.1}
4+
image: docker.io/netboxcommunity/netbox:${VERSION-v3.6-2.7.0}
55
depends_on:
66
- postgres
77
- redis
@@ -15,9 +15,9 @@ services:
1515
test: "curl -f http://localhost:8080/api/ || exit 1"
1616
volumes:
1717
- ./configuration:/etc/netbox/config:z,ro
18-
- netbox-media-files:/opt/netbox/netbox/media:z,rw
19-
- netbox-reports-files:/opt/netbox/netbox/reports:z,rw
20-
- netbox-scripts-files:/opt/netbox/netbox/scripts:z,rw
18+
- netbox-media-files:/opt/netbox/netbox/media:rw
19+
- netbox-reports-files:/opt/netbox/netbox/reports:rw
20+
- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
2121
netbox-worker:
2222
<<: *netbox
2323
depends_on:

docker/launch-netbox.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exec unitd \
5151
--control unix:$UNIT_SOCKET \
5252
--pid /opt/unit/unit.pid \
5353
--log /dev/stdout \
54-
--state /opt/unit/state/ \
55-
--tmp /opt/unit/tmp/ \
54+
--statedir /opt/unit/state/ \
55+
--tmpdir /opt/unit/tmp/ \
5656
--user unit \
5757
--group root

env/netbox.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ REDIS_INSECURE_SKIP_TLS_VERIFY=false
2929
REDIS_PASSWORD=H733Kdjndks81
3030
REDIS_SSL=false
3131
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
32-
SECRET_KEY=r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X
32+
SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X'
3333
SKIP_SUPERUSER=true
3434
WEBHOOKS_ENABLED=true

requirements-container.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
django-auth-ldap==4.3.0
1+
django-auth-ldap==4.5.0
22
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.13.2
3-
psycopg2==2.9.6
3+
dulwich==0.21.5
4+
psycopg[c,pool]==3.1.10
45
python3-saml==1.15.0

0 commit comments

Comments
 (0)