Skip to main content

Manage Docker with Netbox & style.

Project description

Netbox Docker Plugin

Testing Report

Manage Docker with Netbox & style. Made to work with netbox-docker-agent.

UI Container view with dependencies

Contribute

Install our development environment

Requirements:

  • Python 3.11
  • PostgreSQL 15 Official Netbox doc
    • user: netbox (with database creation right)
    • password: secret
    • database: netbox
    • port: 5432
  • Redis 7.2
    • port: 6379

Set a PROJECT variable :

PROJECT="/project/netbox"

Create a project directory $PROJECT:

mkdir $PROJECT

Go inside your project directory, clone this repository and the Netbox repository:

cd $PROJECT
git@github.com:SaaShup/netbox-docker-plugin.git
git clone git@github.com:netbox-community/netbox.git

Create your venv and activate it:

python -m venv venv
source venv/bin/activate

Install netbox-docker-plugin dependencies:

cd $PROJECT/netbox-docker-plugin
pip install -e .

Configure Netbox and install Netbox dependencies:

cd $PROJECT/netbox
cp $PROJECT/netbox-docker-plugin/netbox_configuration/configuration_dev.py $PROJECT/netbox/netbox/netbox/configuration.py
pip install -r requirements.txt

Run database migrations:

cd $PROJECT/netbox
python3 netbox/manage.py migrate

Create a Netbox super user:

cd $PROJECT/netbox
python3 netbox/manage.py createsuperuser

Start Netbox instance:

cd $PROJECT/netbox
python3 netbox/manage.py runserver 0.0.0.0:8000 --insecure

Visit http://localhost:8000/

Run tests

After installing you development environment, you can run the tests plugin (you don't need to start the Netbox instance):

cd $PROJECT/netbox
python3 netbox/manage.py test netbox_docker_plugin.tests --keepdb -v 2

With code coverage, install coverage.py and use it:

cd $PROJECT/netbox
python3 -m pip install coverage

The run the test with coverage.py and print the report:

cd $PROJECT/netbox
coverage run --include='*/netbox_docker_plugin/*' netbox/manage.py test netbox_docker_plugin.tests --keepdb -v 2
coverage report -m

Hosting

Check https://saashup.com for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox-docker-plugin-1.0.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

netbox_docker_plugin-1.0.0-py3-none-any.whl (62.9 kB view details)

Uploaded Python 3

File details

Details for the file netbox-docker-plugin-1.0.0.tar.gz.

File metadata

  • Download URL: netbox-docker-plugin-1.0.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for netbox-docker-plugin-1.0.0.tar.gz
Algorithm Hash digest
SHA256 90691d3a0051efc05158fe13c43719cf39e7e62cf5eb1de0e53ec14ec6bfc5aa
MD5 6bd72b42a1022ce01d6a9195b3833057
BLAKE2b-256 c06dd950e3df6d5897795704aec4de1e99f8ddce140245d6f2675d605610165b

See more details on using hashes here.

File details

Details for the file netbox_docker_plugin-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_docker_plugin-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7098c962c4afad92a4200b89bc996554385b688db378b99bf765cc86f10840c8
MD5 0177b9a2ec437bda870b34992b93ae31
BLAKE2b-256 052b9256d7557517d17d24a75f181a9e2212f6c8839b04b31ab715ad44a2d201

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page