2020-08-12 07:15:18 +00:00
|
|
|
cdist-type__netbox(7)
|
|
|
|
=====================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
cdist-type__netbox - Install and configure NetBox
|
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
This (singleton) type installs and configures a NetBox instance, a web
|
2020-08-16 13:31:38 +00:00
|
|
|
application to help manage and document computer networks.
|
|
|
|
|
|
|
|
It installs it with the user ``netbox`` at ``/opt/netbox`` with `python-venv`.
|
2020-09-02 05:50:12 +00:00
|
|
|
It setup systemd unit files for the services `netbox` and `netbox-rq`. To
|
|
|
|
access the application through WSGI, uWSGI or Gunicorn can be used. The setup
|
|
|
|
can be done via there own types `__netbox_gunicorn` and `__netbox_uwsgi`.
|
|
|
|
|
|
|
|
The Gunicorn setup is recommended from the NetBox documentation. Consult each
|
|
|
|
manual page to decide. The types must be called after the `__netbox` type.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
REQUIRED PARAMETERS
|
|
|
|
-------------------
|
|
|
|
version
|
2020-08-22 12:40:07 +00:00
|
|
|
NetBox version to be installed. You can find the correct and newest version
|
|
|
|
on GitHub at the NetBox project page under
|
|
|
|
"`Releases <https://github.com/netbox-community/netbox/releases>`_".
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
database
|
|
|
|
PostgreSQL database name.
|
|
|
|
|
2020-08-22 13:53:24 +00:00
|
|
|
database-user
|
|
|
|
PostgreSQL database user.
|
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
database-password
|
|
|
|
PostgreSQL database password.
|
|
|
|
|
|
|
|
host
|
|
|
|
Hostname (domain or IP address) on which the application is served.
|
2020-08-25 17:30:32 +00:00
|
|
|
Multiple hostnames are possible; given as multiple arguments.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
2020-09-02 05:50:12 +00:00
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
OPTIONAL PARAMETERS
|
|
|
|
-------------------
|
2020-08-23 14:52:02 +00:00
|
|
|
secret-key
|
|
|
|
Random secret key of at least 50 alphanumeric characters and symbols. This
|
|
|
|
key must be unique to this installation and must not be shared outside the
|
|
|
|
local system. If no secret key is given, the type generates an own 50 chars
|
|
|
|
long key and saves it on the remote host to remember it for the next run.
|
|
|
|
|
|
|
|
The secret, random string is used to assist in the creation new
|
|
|
|
cryptographic hashes for passwords and HTTP cookies. It is not directly
|
|
|
|
used for hasing user passwords or for encrpted storage. It can be changed
|
|
|
|
at any time, but will invalidate all existing sessions.
|
|
|
|
|
2020-08-22 13:53:24 +00:00
|
|
|
database-host
|
2020-08-22 14:00:15 +00:00
|
|
|
PostgreSQL database hostname. Defaults to ``localhost``.
|
2020-08-22 13:53:24 +00:00
|
|
|
|
|
|
|
database-port
|
2020-08-22 14:00:15 +00:00
|
|
|
PostgreSQL database port. Defaults to empty (uses the default port).
|
2020-08-22 13:53:24 +00:00
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
ldap-server
|
2020-08-22 14:00:15 +00:00
|
|
|
LDAP server URI. Enables LDAP-backed authentication if specified.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
ldap-bind-dn
|
2020-08-22 14:00:15 +00:00
|
|
|
DN for the NetBox service account. Required for LDAP authentication.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
ldap-bind-password
|
2020-08-22 14:00:15 +00:00
|
|
|
Password for the NetBox service account. Required for LDAP authentication.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
ldap-user-base
|
2020-08-22 14:00:15 +00:00
|
|
|
Base used for searching user entries. Required for LDAP authentication.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
ldap-group-base
|
2020-08-22 14:00:15 +00:00
|
|
|
Base used for searching group entries.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
ldap-require-group
|
2020-08-22 14:00:15 +00:00
|
|
|
Group required to login.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
2020-09-07 15:10:59 +00:00
|
|
|
ldap-staff-group
|
|
|
|
Make members of this group to "staff". This gives the users "Admin Access",
|
|
|
|
which means access to the "NetBox Administration" site.
|
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
ldap-superuser-group
|
2020-08-22 14:00:15 +00:00
|
|
|
Make members of this groups superusers.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
2020-08-21 21:50:24 +00:00
|
|
|
redis-host
|
2020-08-22 14:00:15 +00:00
|
|
|
Redis database hostname. Defaults to ``localhost``.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
redis-port
|
2020-08-22 14:00:15 +00:00
|
|
|
Redis database port. Defaults to ``6379``.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
redis-password
|
2020-08-22 14:00:15 +00:00
|
|
|
Redis password. Defaults to empty password.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
redis-dbid-offset
|
2020-08-22 14:00:15 +00:00
|
|
|
Offset to set the redis database id's. The `tasks` database id is
|
|
|
|
`offset + 0` and `caching` is `offset + 1`. The offset defaults
|
|
|
|
to ``0``.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
smtp-host
|
2020-08-22 14:00:15 +00:00
|
|
|
Host of the SMTP email server. Defaults to ``localhost``.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
smtp-port
|
2020-08-22 14:00:15 +00:00
|
|
|
Port of the SMTP email server. Defaults to ``25``.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
smtp-user
|
2020-08-22 14:00:15 +00:00
|
|
|
Username to access the SMTP email server. Defaults to empty.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
smtp-password
|
2020-08-22 14:00:15 +00:00
|
|
|
Password to access the SMTP email server. Defaults to empty.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
smtp-from-email
|
2020-08-22 14:00:15 +00:00
|
|
|
Email from which NetBox will be sent of. Defaults to empty.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
basepath
|
2020-08-22 14:00:15 +00:00
|
|
|
Base URL path if accessing netbox within a directory instead of directly the
|
|
|
|
webroot ``/``. For example, if installed at https://example.com/netbox/, set
|
|
|
|
the value ``netbox/``.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
http-proxy
|
|
|
|
https-proxy
|
2020-08-22 14:00:15 +00:00
|
|
|
Proxy which will be used with any HTTP request like webhooks.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
2020-08-23 09:36:35 +00:00
|
|
|
data-root
|
|
|
|
This parameter set's the media, reports and scripts root to subdirectories
|
|
|
|
of the given directory. Values can be overwritten by special parameters like
|
|
|
|
`--media-root` for example. Use this option if you want to store persistant
|
|
|
|
data of netbox on an other partition. A trailing shlash is not needed.
|
|
|
|
|
|
|
|
The data directories have following predefined sub-directory names:
|
|
|
|
|
|
|
|
media root:
|
|
|
|
``$data_root/media``
|
|
|
|
reports root:
|
|
|
|
``$data_root/reports``
|
|
|
|
scripts root:
|
|
|
|
``$data_root/scripts``
|
|
|
|
|
|
|
|
media-root
|
|
|
|
The file path to where media files (like image attachments) are stored.
|
|
|
|
Change this path if you require to store data on an other partiotion.
|
|
|
|
A trailing slash is not needed. By default, it will be stored into the
|
|
|
|
installation directory (``/opt/netbox/netbox/netbox/media``).
|
|
|
|
|
|
|
|
reports-root
|
|
|
|
The file path of where custom reports are kept. Change this path if you
|
|
|
|
require to store data on an other partition. A trailing slash is not
|
|
|
|
needed. By default, it will be stored into the installation directory
|
|
|
|
(``/opt/netbox/netbox/netbox/reports``).
|
|
|
|
|
|
|
|
scripts-root
|
|
|
|
The file path of where custom scripts are kept. Change this path if you
|
|
|
|
require to store data on an other partition. A trailing slash is not
|
|
|
|
needed. By default, it will be stored into the installation directory
|
|
|
|
(``/opt/netbox/netbox/netbox/scripts``).
|
|
|
|
|
2020-09-02 05:50:12 +00:00
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
BOOLEAN PARAMETERS
|
|
|
|
------------------
|
2020-08-21 21:50:24 +00:00
|
|
|
redis-ssl
|
2020-08-22 14:00:15 +00:00
|
|
|
Enables a secure TLS/SSL connection to the redis database. By default, ssl
|
|
|
|
is disabled.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
smtp-use-tls
|
2020-08-22 14:00:15 +00:00
|
|
|
Uses TLS to connect to the SMTP email server. `See documentation
|
|
|
|
<https://docs.djangoproject.com/en/3.1/ref/settings/#email-use-tls`_
|
|
|
|
for more information.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
smtp-use-ssl
|
2020-08-22 14:00:15 +00:00
|
|
|
Uses implicit TLS with the SMTP email server. `See documentation
|
|
|
|
<https://docs.djangoproject.com/en/3.1/ref/settings/#email-use-ssl`_
|
|
|
|
for more information.
|
2020-08-21 21:50:24 +00:00
|
|
|
|
|
|
|
login-required
|
2020-08-24 17:31:49 +00:00
|
|
|
Sets if a login is required to access all sites. By default, anonymous
|
|
|
|
users can see most data (excluding secrets) but not make any changes.
|
|
|
|
|
|
|
|
update-notify
|
|
|
|
Enables the NetBox version check for new upstream updates. It checks every
|
|
|
|
24 hours for new releases and notify the admin users in the gui if any.
|
2020-08-12 07:15:18 +00:00
|
|
|
|
2020-09-02 05:50:12 +00:00
|
|
|
|
2020-08-16 13:18:47 +00:00
|
|
|
MESSAGES
|
|
|
|
--------
|
|
|
|
installed $VERSION
|
|
|
|
Netbox was fresh installed or updated. The new version number is appended.
|
|
|
|
|
2020-08-27 17:46:09 +00:00
|
|
|
configured
|
2020-08-16 13:18:47 +00:00
|
|
|
Some configuration files got updated and therefore the service was
|
|
|
|
restarted. This message will not be echoed if configuration got updated due
|
|
|
|
a standard installation.
|
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. code-block:: sh
|
|
|
|
|
|
|
|
__netbox --version 2.8.7 --database netbox \
|
2020-08-22 19:58:44 +00:00
|
|
|
--database-password "secretsecretsecret" \
|
|
|
|
--secret-key "secretsecretsecret" \
|
|
|
|
--host "${__target_host:?}" \
|
2020-08-25 17:30:32 +00:00
|
|
|
--host "cool-netbox.xyz" \
|
2020-08-22 19:58:44 +00:00
|
|
|
--ldap-server "ldaps://ldap.domain.tld" \
|
|
|
|
--ldap-bind-dn "uid=netbox,ou=services,dc=domain,dc=tld" \
|
|
|
|
--ldap-bind-password "secretsecretsecret" \
|
|
|
|
--ldap-user-base "ou=users,dc=domain,dc=tld" \
|
|
|
|
--ldap-group-base "ou=groups,dc=domain,dc=tld" \
|
|
|
|
--ldap-require-group "cn=netbox-login,ou=groups,dc=domain,dc=tld" \
|
|
|
|
--ldap-superuser-group "cn=netbox-admin,ou=groups,dc=domain,dc=tld"
|
2020-09-02 05:50:12 +00:00
|
|
|
# using recommended gunicorn setup
|
|
|
|
require="__netbox" __netbox_gunicorn
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
|
2020-08-21 21:50:24 +00:00
|
|
|
NOTES
|
|
|
|
-----
|
|
|
|
The configuration of NetBox contains more optional settings than that what can
|
|
|
|
be set with this type. If you think an important setting is missing or there
|
|
|
|
is a more good way to inject python code for dynamic configuration variables,
|
|
|
|
you are welcome to contribute!
|
|
|
|
|
|
|
|
- `Possible optional settings
|
|
|
|
<https://netbox.readthedocs.io/en/stable/configuration/optional-settings/>`
|
|
|
|
|
2020-08-22 20:04:33 +00:00
|
|
|
If you not setup ldap authentification, you may be interested into how to
|
|
|
|
`setting up a super user
|
|
|
|
<https://netbox.readthedocs.io/en/stable/installation/3-netbox/#create-a-super-user>`
|
|
|
|
directly on the machine to be able to access and use NetBox.
|
|
|
|
|
2020-09-02 05:50:12 +00:00
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
SEE ALSO
|
|
|
|
--------
|
2020-09-02 05:50:12 +00:00
|
|
|
`NetBox documentation <https://netbox.readthedocs.io/en/stable/>`_
|
|
|
|
|
|
|
|
:strong:`cdist-type__netbox_gunicorn`\ (7)
|
|
|
|
:strong:`cdist-type__netbox_uwsgi`\ (7)
|
|
|
|
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
AUTHORS
|
|
|
|
-------
|
|
|
|
Timothée Floure <t.floure@e-durable.ch>
|
2020-08-23 15:15:32 +00:00
|
|
|
Matthias Stecher <matthiasstecher@gmx.de>
|
2020-08-12 07:15:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
2020-08-23 15:15:32 +00:00
|
|
|
Copyright \(C) 2020 Timothée Floure.
|
|
|
|
Copyright \(C) 2020 Matthias Stecher.
|
|
|
|
You can redistribute it and/or modify it under the terms of the GNU
|
|
|
|
General Public License as published by the Free Software Foundation,
|
|
|
|
either version 3 of the License, or (at your option) any later version.
|