netbox-docker

🐳 Docker Image of NetBox

APACHE-2.0 License

Downloads
13.7K
Stars
1.8K
Committers
106

Bot releases are visible (Hide)

netbox-docker - Version 0.21.0

Published by cimnine over 4 years ago

This is the first release that is compatible with Netbox Docker 2.7.x.
The Docker Images with the tags 2.7, 2.7.0, 2.7.1 and 2.7.2 have been updated on Docker Hub.

If you have not updated this project since January 2020, please be sure to also check the release notes for the previous version, 0.20.0!

This release contains the following notable changes:

Compatibility with Netbox 2.7 #209

This project has been updated to work with Netbox 2.7.

Updates to our configuration.py file were necessary. This should not impact you if you upgrade from an earlier version of our project. But you will have the possibility to use separate Redis instances for caching and for the rqworker (i.e. webhooks delivery). The current Redis variables are used for the rqworker (i.e. REDIS_HOST, REDIS_PORT, etc.) and there are new variables for the cache (i.e. REDIS_CACHE_HOST, REDIS_CACHE_PORT, etc.). If the variables REDIS_CACHE_* are not defined the configuration file will fall back to the REDIS_* counterparts.

Please note that it is no longer possible to run Netbox without Redis. The variable WEBHOOKS_ENABLED was removed upstream.

Updates to the default startup scripts were necessary. If you have files in the initializers directory, be aware of the following breaking changes:

  • initializers/custom_fields.yml: (see c001626b85ba07bf2203faee16b09372fbe42ba6)
    • the selection type was changed to select
     select_field:
    -   type: selection
    +   type: select
       label: Choose between items
       required: false
       filter_logic: exact
       weight: 30
       on_objects:
       - dcim.models.Device
       choices:
       - value: First Item
         weight: 10
       - value: Second Item
         weight: 20
    
  • initializers/racks.yml (see 7b914d31d66f56bb9cf6ab8fbba131a23a6127a8)
    • Rack types must match one of the 5 rack types given, e.g. '4-post-cabinet'.
    • Rack width must match one of the 2 rack widths given, i.e. '19' or '23'.
     - site: AMS 2
       name: rack-02
       role: Role 2
    -   type: 4-post cabinet
    +   type: 4-post-cabinet
    -   width: 19 inches
    +   width: 19
       u_height: 47
       custom_fields:
         text_field: Description
    
  • initializers/devices.yml (see 4a58676647e41115d5ecc10c4e9035ca73db53ee)
    • Make sure the rack face is spelled in all-lowercase characters.
     - name: server01
       device_role: server
       device_type: Other
       site: AMS 1
       rack: rack-01
    -   face: Front
    +   face: front
       position: 1
       custom_fields:
         text_field: Description
    
  • initializers/vlans.yml (see 8d8b9a157e219ce3ed5944f8fd19ca668b4c6cb2)
    • Make sure the status is spelled in all-lowercase characters.
     - name: vlan1
       site: AMS 1
    -   status: Active
    +   status: active
       vid: 5
       role: Main Management
       description: VLAN 5 for MGMT
    
  • initializers/prefixes.yml (see f3403cd0f5a5c26e5aea9afed2e4d3a5a129a1b2)
    • Make sure the status is spelled in all-lowercase characters.
     - description: prefix1
       prefix: 10.1.1.0/24
       site: AMS 1
    -   status: Active
    +   status: active
       tenant: tenant1
       vlan: vlan1
    
  • initializers/virtual_machines.yml (see f3403cd0f5a5c26e5aea9afed2e4d3a5a129a1b2)
    • Make sure the status is spelled in all-lowercase characters.
     - cluster: cluster1
       comments: VM1
       disk: 200
       memory: 4096
       name: virtual machine 1
       platform: Platform 2
    -   status: Active
    +   status: active
       tenant: tenant1
       vcpus: 8
     - cluster: cluster1
       comments: VM2
       disk: 100
       memory: 2048
       name: virtual machine 2
       platform: Platform 2
    
  • initializers/dcim_interfaces.yml
    • Make sure the type is a value out of the possible choices and is spelled in all-lowercase characters.
    • All possible choices are found in Netbox's dcim/choices.py
     - device: server01
       enabled: true
    -   type: Virtual
    +   type: virtual
       name: to-server02
    
  • initializers/ip_addresses.yml
    • Make sure the status is spelled in all-lowercase characters.
     - address: 10.1.1.1/24
       device: server01
       interface: to-server02
    -   status: Active
    +   status: active
       vrf: vrf1
    

New Build System #214 #222

We've changed our build system once more. It is based on Github Actions now. This provides us more flexibility and hopefully more reliable feedback on pull requests.

Our users should benefit as well by having more reliable releases when a new version of Netbox is out.

The last benefit is that all build-related configurations are now in this repository. This means we can track changes and retrieve pull-requests on them. Additionally, forks get the same build-configuration as well.

Default branch is release

We have switched to a new branching model in the previous version of this project.
Thereby we changed the default branch to be the develop branch. This has led to some confusion. We are now changing the default branch back to the stable branch, i.e. release.

This is also due to the new build system (see above).

Compatibility

This version is compatible with Netbox 2.7.x (and hopefully later versions as well).

⚠️ This version is not compatible with Netbox 2.6.x or lower!

Known Issues

There are no known issues.

netbox-docker - Version 0.20.0

Published by cimnine almost 5 years ago

This release contains the following notable changes:

New Branching Model #184 #202

We have switched the branching model of this repository. What was the master branch will become the release branch. There is a new develop branch already.

This new branching model and the reasons for the change are documented in our wiki.

If you want to update your local docker-compose scripts, this means you have to checkout the new branch:

git fetch --prune
git checkout -b release --track origin/release

Non-Root image #172 #186

The Netbox Docker image was enhanced to be compatible with setups that require the container to be run as non-root user. This was suggested originally by @Furragen in #172 and was implemented in #186.

The changes to the image are kept to a minimum. You can now run the netbox and netbox-worker containers by defining an uid, e.g. 101. The way Linux works is that this user does not have to exist, so we don't actually create it.

All files created with this new image will be created using umask 002.

Upgrade instructions

If you have read-write-enabled mounts (e.g. for the media folder of Netbox), make sure that they are group-writable for root. The same is valid for the static filed folder.

The simplest way to do this is by deleting the volume:

docker-compose stop netbox
docker volume rm netbox-docker_netbox-static-files
docker-compose up -d netbox

(If your project folder is not called netbox-docker, use the following command to figure out the name of the volume to delete: docker volume ls | grep netbox-static-files).

PostgreSQL 11 #195

Our docker-compose file was updated to use PostgreSQL 11.
If you have experience with running Netbox with PostgreSQL 12, please open an issue.
We'd love to upgrade!

Also note that you will need to take manual action after you upgrade a live PostgreSQL database.
If your database is not too big, a full backup (with PostgreSQL 10) and restore (with a clean PostgreSQL 11) is probably the easiest to achieve. Our troubleshooting wiki page has instructions on how to backup and restore a Netbox database. Please test the procedure on a test system first!

Note that there is no requirement to update to PostgreSQL 11, you can stick to version 10 just fine. You could do this with a docker-compose.override.yml like so:

version: '3.4'
services:
  postgres:
    image: postgres:10-alpine

Redis 5 #194

Our docker-compose file was updated to use Redis 5.

Massive Speedup in startup_scripts #207

It was possible to change the way the startup_scripts are executed. Initializers are startup_scripts as well, and they ship by default.

Before it used to take minutes to run through all the startup_scripts, now it's a matter of seconds.
There's almost no reason anymore to disable the execution of startup_scripts ;)

SSLMODE for PostgreSQL #177

A contribution by @sdktr enables the use of TLS when connection to a PostgreSQL database. TLS is often required if you use this image on cloud platforms. The default mode is set to prefer, which means that if TLS is available, Netbox will use it. Else it will fall-back to the unencrypted connection.

Documentation moved to the Wiki #189

Most of our documentation was removed from the README.md file, which has grown quite a bit.
That file now only contains the bare-minimum to get started with Netbox Docker.
Everything else, especially the troubleshooting section, are now in our wiki.

Maintenance

There have been a bunch of other maintenance tasks. See milestone 0.20.0 for a list of issues that are related to this release.

Compatibility

This version is compatible with Netbox 2.6.x, and probably earlier.

⚠️ This version does not work with Netbox 2.7.x! This is planned for the next version, 0.21.0.

Known Issues

It seems that are labels are not correctly applied when we build our image on Docker Hub. See #210 .

netbox-docker - Version 0.19.4

Published by cimnine almost 5 years ago

This release contains the following changes:

More Labels in the Docker Image & Badges in the README #185

The Docker image will contain more labels. The labels follow label-schema.org and the OpenContainer image spec, section annotations, specifications.

This provides more information for debugging problems and allows MicroBadger to extract information from the Docker image.

This repository now also displays some status badges in the README:

GitHub release (latest by date)GitHub starsGitHub closed pull requestsDocker Cloud Build Status
Docker PullsMicroBadger LayersMicroBadger SizeGitHub license

Ignore local override file #187

@markhoney shared how he customizes the docker-compose.yml file: He creates a docker-compose.override.yml file, an official docker-compose feature. He also submitted a PR that adds that file to the .gitignore file. Thank you!

Update Nginx to 1.17 #188

@edenpark59 suggested to update Nginx to a more recent version and submitted a PR. Thank you!

Respect SKIP_GIT #191

@mattolenik reported that the SKIP_GIT environment variable of the build.sh script has no effect and submitted a PR to fix that. Thank you!

Known Issues

There are no known issues.

netbox-docker - Version 0.19.3

Published by tobiasge almost 5 years ago

This release is a bugfix release for #179. Thanks to @ananace for reporting this first.

Known Issues

There are no known issues.

netbox-docker - Version 0.19.2

Published by cimnine almost 5 years ago

This release is a bugfix release for #170. Thanks to @fdebonneval for reporting this first and to @tobiasge for providing a fix.

Known Issues

There are no known issues.

netbox-docker - Version 0.19.1

Published by cimnine about 5 years ago

This release contains two changes:

  • A bugfix, which prevented built images to be pushed to Docker Hub.
  • Support to add custom scripts, contributed by @tobiasge in #166.

See also 0.19.1, because it contains some important changes.

Known Issues

There are no known issues.

netbox-docker - Version 0.19.0

Published by cimnine about 5 years ago

This is a huge release that changes completely how this image is built:

  • Using multi stage builds to
    • separate the compilation of the Python wheels
    • merge the two Dockerfiles into one
    • this results in Docker Images that are about half as big
  • Downloading netbox externally
    • ... instead of in the Dockerfile
    • which makes it more efficient for Docker to cache the build layers
    • which reduces build time, especially locally
  • Enable test builds for PRs
  • Regularly build tags, and not only when a new Netbox version is released.

✅ If you just use the image to run Netbox, nothing should notably change for you.
✅ If you extend the image for your own purposes, nothing should change for your either.
⚠️ If you built the image yourself, you will either have to use ./build.sh or maintain your own Netbox clone. See the wiki page on building the Netbox Docker image.

Known Issues

There are no known issues.

netbox-docker - Version 0.18.2

Published by cimnine about 5 years ago

This release is a bugfix release to address #165.

See also the release notes from 0.18.0.

Known Issues

There are no known issues.

Caveats

As always, it will take some time for the Docker images to appear on Docker Hub. Existing Docker Images tagged with v2.6.6 (or older) will not be updated. v2.6 will only be updated if a new version v2.6.7 (or later) of Netbox is released.

Outlook

The PRs #159 and #164 are on the horizon, in which the Dockerfile is reworked. Any input on the PRs is appreciated.

netbox-docker - Version 0.18.1

Published by cimnine about 5 years ago

This release includes the following changes:

  • Most of the documentation was moved from the README.md to [the wiki][wiki].

See also the release notes from 0.18.0.

Known Issues

There are no known issues.

Caveats

As always, it will take some time for the Docker images to appear on Docker Hub. Existing Docker Images tagged with v2.6.6 (or older) will not be updated. v2.6 will only be updated if a new version v2.6.7 (or later) of Netbox is released.

Outlook

There is PR #159 in which the Dockerfile is reworked. Any input on the PR is appreciated.

netbox-docker - Version 0.18.0

Published by cimnine about 5 years ago

This release includes the following changes:

  • Most of the documentation was moved from the README.md to the wiki.
  • @axarriola contributed a whole lot more initalizer scripts, that are now shipping by default with netbox-docker. #143

Known Issues

The following issues are known and confirmed:

  • The superuser is always created and this can't be prevented. #160

Caveats

As always, it will take some time for the Docker images to appear on Docker Hub. Existing Docker Images tagged with v2.6.5 (or older) will not be updated. v2.6 will only be updated if a new version v2.6.6 (or later) of Netbox is released.

Outlook

There is PR #159 in which the Dockerfile is reworked. Any input on the PR is appreciated.

netbox-docker - Version 0.17.1: Bugfix

Published by cimnine about 5 years ago

This release includes the following changes:

  • Workaround for the AttributeError: module 'ruamel.yaml' has no attribute 'SafeDumper' by @takumin (in #149)

Known Issues

At the time of writing there are no known issues.

Caveats

As always, it will take some time for the Docker images to appear on Docker Hub. Existing Docker Images tagged with v2.6.1 (or older) will not be updated. v2.6 will only be updated if a new version v2.6.2 (or later) of Netbox is released.

netbox-docker - Version 0.17.0

Published by cimnine about 5 years ago

This release includes the following changes:

  • Update to python:3.7-alpine3.10 by @tobiasge (#144)
  • Fix of the initializer scripts by @LBegnaud (#148)

Known Issues

At the time of writing there are no known issues.

Caveats

As always, it will take some time for the Docker images to appear on Docker Hub. Existing version tags before and including v2.6.1 will not be updated. v2.6 will only be updated if a new version v2.6.2 (or later) of Netbox is released.

netbox-docker -

Published by cimnine over 5 years ago

This release reflects the fact that Netbox has grow up and moved out. The project's URL has changed from https://github.com/digitalocean/netbox to https://github.com/netbox-community/netbox.

At this point I would like to express my gratitude to Digitalocean for making Netbox opensource and sponsoring a huge part of it's development.

This release also includes a fix by @miso231, see #142. Thank you for your contribution!

Known Issues

At the time of writing there are no known issues.

Caveats

As always, it will take some time for the Docker images to appear on Docker Hub. Existing version tags before and including v2.6.1 will not be updated. v2.6 will only be updated if a new version v2.6.2 (or later) of Netbox is released.

As there are no changes to the way the container works, this does not actually matter in this release.

netbox-docker - Version 0.15.0: Compatibility with Netbox v2.6.0

Published by cimnine over 5 years ago

This release contains changes required to work with Netbox v2.6.0.

There are also breaking changes, as the configuration file was updated to match the latest version from Netbox.

Known Issues

Also, at the time of this release, there is a known issue in Netbox that prevents netbox-docker:2.6.0 to start properly. A fix has already been merged an will be released with Netbox v2.6.1.

Noteworthy changes

The configuration/configuration.py file has been updated to match the file from Netbox.
CORS_ORIGIN_WHITELIST has a new default value of http://localhost.
To provide a nice development environment, CORS_ORIGIN_ALLOW_ALL added to env/netbox.env with a default value of True.
There are also new options:

  • REDIS_CACHE_DATABASE
  • CACHE_TIMEOUT (set to 0 to disable caching)
  • CHANGELOG_RETENTION
  • CORS_ORIGIN_REGEX_WHITELIST (space separated list of regular expressions)
  • EXEMPT_VIEW_PERMISSIONS (space separated list)
  • METRICS_ENABLED

Caveats

As always, it will take some time for the Docker images to appear on Docker Hub. Existing version tags before and including v2.6.0 will not be updated. v2.6 will only be updated if a new version v2.6.1 (or later) of Netbox is released.

netbox-docker - Version 0.14.0

Published by cimnine over 5 years ago

Features:

  • A new variable for our LDAP users, AUTH_LDAP_GROUP_TYPE. Thanks @mryauch, see #135.
  • More aggressive use of Docker caching. Thanks @rje6459 for the inspiration and some of the work! See #136 and #137.

As always, it will take some time for the Docker images to appear on Docker Hub. Existing version tags before and including v2.5.13 will not be updated. 2.5 will only be updated if a new version v2.5.14 (or later) of Netbox is released.

netbox-docker - Version 0.13.1: Django 2.2

Published by cimnine over 5 years ago

Netbox recently upgraded to Django 2.2. To speed up the build this dependency is hardcoded in our Dockerfile. This releases addresses this incompatibility.

netbox-docker - Version 0.13.0: AUTH_LDAP_BIND_PASSWORD

Published by cimnine over 5 years ago

This release allows to extract the AUTH_LDAP_BIND_PASSWORD into the secrets file /run/secrets/auth_ldap_bind_password. Thanks go out to @mryauch for the PR #133.

Please not that version 0.12.0 was released earlier today. It added support for securing your Redis connection with TLS by exporting the environment variable REDIS_SSL.

netbox-docker - Version 0.12.0: REDIS_SSL support

Published by cimnine over 5 years ago

This release adds support to secure the connection to your Redis with TLS. Support for this was added in Netbox 2.5.9. Thanks go out to @ajknv for the PR #129.

netbox-docker - Version 0.11.0: Minor Version Tags and SELinux support

Published by cimnine over 5 years ago

This release features two PRs:

  • #130 by @tobiasge, which adds a new tag to the Docker images published to hub.docker.com. There will be a tag for MAJOR.MINOR releases, i.e. v2.5.8 will also be tagged as v2.5, starting with the next release of Netbox.
  • #131 by @Bialogs, which should allow the docker-compose setup to work on SELinux enabled hosts
netbox-docker - Version 0.10.0: SKIP_STARTUP_SCRIPTS

Published by cimnine over 5 years ago

This release contains a new feature contributed by @tobiasge in #128:

To speed up the startup time of netbox-docker it is possible to disable the execution of the startup scripts.

As documented, a new environment variable SKIP_STARTUP_SCRIPTS was introduced. If the variable is set to true, netbox-docker will not run the startup scripts.

To enable this new behaviour, you could add the following line to the netbox.env file:

SKIP_STARTUP_SCRIPTS=true