Manage Docker with Netbox & style.
Project description
Netbox Docker Plugin
Manage Docker with Netbox & style. Made to work with netbox-docker-agent.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for netbox-docker-plugin-1.0.0rc7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a203ae27c6a53cbb7b71887c5fbc5c6eef1972e46884dbe1b7188e20a8969451 |
|
MD5 | f0ed74f58910447a94bec5e127350024 |
|
BLAKE2b-256 | 76fa79a30c31ad53f4c7d7003839b5b5b02151187840f8fd344f48c2b0754a55 |
Hashes for netbox_docker_plugin-1.0.0rc7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f898e7eac9680ec93078abc6f0c0c8d6302c8d60b77229300754bb6377cbd051 |
|
MD5 | f5c2b7e7d9d4d36e2018e54af438a5ad |
|
BLAKE2b-256 | 05998befef03345dfc75a41a35092b1a4481a8f6bb8a8d6997ae18fff939e41c |