Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.7.0 #1062

Merged
merged 20 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5408cf5
rename JOBRESULT_RETENTION to JOB_RETENTION
marcquark May 7, 2023
055538c
Fixed type in else
tobiasge May 8, 2023
2037e42
Merge pull request #1009 from marcquark/job_retention2
tobiasge May 8, 2023
23d5865
Update Ubuntu und Nginx Unit
tobiasge May 11, 2023
0d748ed
Merge pull request #1010 from tobiasge/image-update
tobiasge May 11, 2023
8208ded
docker-compose.yml: fix volume mount options
florianschroen Jun 15, 2023
ebc5900
Merge pull request #1024 from florianschroen/2023-06-15_fix_volume_op…
tobiasge Jun 15, 2023
d69dace
Update dependency django-auth-ldap to v4.4.0
renovate[bot] Jul 22, 2023
9bdd074
Merge pull request #1034 from netbox-community/renovate/django-auth-l…
tobiasge Jul 23, 2023
c991726
netbox.env: fixed unwanted string interpolation
toriningen Aug 3, 2023
ec60363
Set REMOTE_AUTH_AUTO_CREATE_USER default to False
NeodymiumFerBore Aug 4, 2023
75690ac
Update dependency django-auth-ldap to v4.5.0
renovate[bot] Aug 8, 2023
be7af2e
Merge pull request #1045 from netbox-community/renovate/django-auth-l…
tobiasge Aug 9, 2023
dd0c0b7
Merge pull request #1042 from toriningen/fix/1041-invalid-template
tobiasge Aug 16, 2023
f703bba
Merge pull request #1043 from NeodymiumFerBore/fix/honor-default-conf…
tobiasge Aug 16, 2023
12af423
Map REMOTE_AUTH_BACKEND env var to list
NeodymiumFerBore Aug 25, 2023
44d0f47
Prepare for Netbox 3.6
tobiasge Jul 7, 2023
4d54bb1
Merge pull request #1059 from NeodymiumFerBore/feat/remote-auth-backe…
tobiasge Aug 28, 2023
69c5580
Fix #1061: Install openssh-client
tobiasge Aug 29, 2023
2855320
Merge pull request #1039 from tobiasge/netbox-3.6
tobiasge Aug 30, 2023
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*.sql.gz
.netbox
.initializers
.python-version
docker-compose.override.yml
*.pem
configuration/*
Expand All @@ -11,5 +11,4 @@ configuration/ldap/*
!configuration/ldap/ldap_config.py
!configuration/logging.py
!configuration/plugins.py
prometheus.yml
super-linter.log
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
ARG NETBOX_PATH
COPY ${NETBOX_PATH}/requirements.txt requirements-container.txt /
RUN \
# We compile 'psycopg2' in the build process
sed -i -e '/psycopg2-binary/d' /requirements.txt && \
# We compile 'psycopg' in the build process
sed -i -e '/psycopg/d' /requirements.txt && \
# Gunicorn is not needed because we use Nginx Unit
sed -i -e '/gunicorn/d' /requirements.txt && \
# We need 'social-auth-core[all]' in the Docker image. But if we put it in our own requirements-container.txt
Expand Down Expand Up @@ -62,19 +62,20 @@ RUN export DEBIAN_FRONTEND=noninteractive \
libldap-common \
libpq5 \
libxmlsec1-openssl \
openssh-client \
openssl \
python3 \
python3-distutils \
tini \
&& curl -sL https://nginx.org/keys/nginx_signing.key \
> /etc/apt/trusted.gpg.d/nginx.asc && \
echo "deb https://packages.nginx.org/unit/ubuntu/ jammy unit" \
&& curl --silent --output /usr/share/keyrings/nginx-keyring.gpg \
https://unit.nginx.org/keys/nginx-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ lunar unit" \
> /etc/apt/sources.list.d/unit.list \
&& apt-get update -qq \
&& apt-get install \
--yes -qq --no-install-recommends \
unit=1.29.1-1~jammy \
unit-python3.10=1.29.1-1~jammy \
unit=1.30.0-1~lunar \
unit-python3.11=1.30.0-1~lunar \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /opt/netbox/venv /opt/netbox/venv
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.1
2.7.0
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ DOCKERFILE The name of Dockerfile to use.
${_GREEN}Default:${_CLEAR} Dockerfile

DOCKER_FROM The base image to use.
${_GREEN}Default:${_CLEAR} 'ubuntu:22.04'
${_GREEN}Default:${_CLEAR} 'ubuntu:23.04'

BUILDX_PLATFORMS
Specifies the platform(s) to build the image for.
Expand Down Expand Up @@ -219,7 +219,7 @@ fi
# Determining the value for DOCKER_FROM
###
if [ -z "$DOCKER_FROM" ]; then
DOCKER_FROM="docker.io/ubuntu:22.04"
DOCKER_FROM="docker.io/ubuntu:23.04"
fi

###
Expand Down
11 changes: 7 additions & 4 deletions configuration/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ def _environ_get_and_map(variable_name: str, default: str | None = None, map_fn:
CHANGELOG_RETENTION = _environ_get_and_map('CHANGELOG_RETENTION', None, _AS_INT)

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

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

# Remote authentication support
REMOTE_AUTH_ENABLED = _environ_get_and_map('REMOTE_AUTH_ENABLED', 'False', _AS_BOOL)
REMOTE_AUTH_BACKEND = environ.get('REMOTE_AUTH_BACKEND', 'netbox.authentication.RemoteUserBackend')
REMOTE_AUTH_BACKEND = _environ_get_and_map('REMOTE_AUTH_BACKEND', 'netbox.authentication.RemoteUserBackend', _AS_LIST)
REMOTE_AUTH_HEADER = environ.get('REMOTE_AUTH_HEADER', 'HTTP_REMOTE_USER')
REMOTE_AUTH_AUTO_CREATE_USER = _environ_get_and_map('REMOTE_AUTH_AUTO_CREATE_USER', 'True', _AS_BOOL)
REMOTE_AUTH_AUTO_CREATE_USER = _environ_get_and_map('REMOTE_AUTH_AUTO_CREATE_USER', 'False', _AS_BOOL)
REMOTE_AUTH_DEFAULT_GROUPS = _environ_get_and_map('REMOTE_AUTH_DEFAULT_GROUPS', '', _AS_LIST)
# REMOTE_AUTH_DEFAULT_PERMISSIONS = {}

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
env_file: env/netbox.env
user: 'unit:root'
volumes:
- ./test-configuration/logging.py:/etc/netbox/config/logging.py:z,ro
- ./test-configuration/test_config.py:/etc/netbox/config/test_config.py:z,ro
healthcheck:
start_period: ${NETBOX_START_PERIOD-120s}
timeout: 3s
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.4'
services:
netbox: &netbox
image: docker.io/netboxcommunity/netbox:${VERSION-v3.5-2.6.1}
image: docker.io/netboxcommunity/netbox:${VERSION-v3.6-2.7.0}
depends_on:
- postgres
- redis
Expand All @@ -15,9 +15,9 @@ services:
test: "curl -f http://localhost:8080/api/ || exit 1"
volumes:
- ./configuration:/etc/netbox/config:z,ro
- netbox-media-files:/opt/netbox/netbox/media:z,rw
- netbox-reports-files:/opt/netbox/netbox/reports:z,rw
- netbox-scripts-files:/opt/netbox/netbox/scripts:z,rw
- netbox-media-files:/opt/netbox/netbox/media:rw
- netbox-reports-files:/opt/netbox/netbox/reports:rw
- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
netbox-worker:
<<: *netbox
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions docker/launch-netbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exec unitd \
--control unix:$UNIT_SOCKET \
--pid /opt/unit/unit.pid \
--log /dev/stdout \
--state /opt/unit/state/ \
--tmp /opt/unit/tmp/ \
--statedir /opt/unit/state/ \
--tmpdir /opt/unit/tmp/ \
--user unit \
--group root
2 changes: 1 addition & 1 deletion env/netbox.env
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ REDIS_INSECURE_SKIP_TLS_VERIFY=false
REDIS_PASSWORD=H733Kdjndks81
REDIS_SSL=false
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
SECRET_KEY=r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X
SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X'
SKIP_SUPERUSER=true
WEBHOOKS_ENABLED=true
5 changes: 3 additions & 2 deletions requirements-container.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
django-auth-ldap==4.3.0
django-auth-ldap==4.5.0
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.13.2
psycopg2==2.9.6
dulwich==0.21.5
psycopg[c,pool]==3.1.10
python3-saml==1.15.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
'version': 1,
'disable_existing_loggers': True
}

DEFAULT_PERMISSIONS = {}