Browse Source

Split configuration doc into two sections

Jeremy Stretch 8 years ago
parent
commit
b8c5366c3e
3 changed files with 60 additions and 68 deletions
  1. 45 0
      docs/configuration/mandatory-settings.md
  2. 11 67
      docs/configuration.md
  3. 4 1
      mkdocs.yml

+ 45 - 0
docs/configuration/mandatory-settings.md

@@ -0,0 +1,45 @@
+NetBox's local configuration is held in `netbox/netbox/configuration.py`. An example configuration is provided at `netbox/netbox/configuration.example.py`. You may copy or rename the example configuration and make changes as appropriate. NetBox will not run without a configuration file.
+
+## ALLOWED_HOSTS
+
+This is a list of valid fully-qualified domain names (FQDNs) for the NetBox server. NetBox will not permit write access to the server via any other hostnames. The first FQDN in the list will be treated as the preferred name.
+
+Example:
+
+```
+ALLOWED_HOSTS = ['netbox.example.com', '192.0.2.123']
+```
+
+---
+
+## DATABASE
+
+NetBox requires access to a PostgreSQL database service to store data. This service can run locally or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
+
+* NAME - Database name
+* USER - PostgreSQL username
+* PASSWORD - PostgreSQL password
+* HOST - Name or IP address of the database server (use `localhost` if running locally)
+* PORT - TCP port of the PostgreSQL service; leave blank for default port (5432)
+
+Example:
+
+```
+DATABASE = {
+    'NAME': 'netbox',               # Database name
+    'USER': 'netbox',               # PostgreSQL username
+    'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
+    'HOST': 'localhost',            # Database server
+    'PORT': '',                     # Database port (leave blank for default)
+}
+```
+
+---
+
+## SECRET_KEY
+
+This is a secret cryptographic key is used to improve the security of cookies and password resets. The key defined here should not be shared outside of the configuration file. `SECRET_KEY` can be changed at any time, however be aware that doing so will invalidate all existing sessions.
+
+Please note that this key is **not** used for hashing user passwords or for the encrypted storage of secret data in NetBox.
+
+`SECRET_KEY` should be at least 50 characters in length and contain a random mix of letters, digits, and symbols. The script located at `netbox/generate_secret_key.py` may be used to generate a suitable key.

+ 11 - 67
docs/configuration.md

@@ -1,62 +1,6 @@
-<h1>Configuration</h1>
+The following are optional settings which may be declared in `netbox/netbox/configuration.py`.
 
-NetBox's local configuration is held in `netbox/netbox/configuration.py`. An example configuration is provided at `netbox/netbox/configuration.example.py`. You may copy or rename the example configuration and make changes as appropriate. NetBox will not run without a configuration file.
-
-[TOC]
-
-# Mandatory Settings
-
----
-
-#### ALLOWED_HOSTS
-
-This is a list of valid fully-qualified domain names (FQDNs) for the NetBox server. NetBox will not permit write access to the server via any other hostnames. The first FQDN in the list will be treated as the preferred name.
-
-Example:
-
-```
-ALLOWED_HOSTS = ['netbox.example.com', '192.0.2.123']
-```
-
----
-
-#### DATABASE
-
-NetBox requires access to a PostgreSQL database service to store data. This service can run locally or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
-
-* NAME - Database name
-* USER - PostgreSQL username
-* PASSWORD - PostgreSQL password
-* HOST - Name or IP address of the database server (use `localhost` if running locally)
-* PORT - TCP port of the PostgreSQL service; leave blank for default port (5432)
-
-Example:
-
-```
-DATABASE = {
-    'NAME': 'netbox',               # Database name
-    'USER': 'netbox',               # PostgreSQL username
-    'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
-    'HOST': 'localhost',            # Database server
-    'PORT': '',                     # Database port (leave blank for default)
-}
-```
-
----
-
-#### SECRET_KEY
-
-This is a secret cryptographic key is used to improve the security of cookies and password resets. The key defined here should not be shared outside of the configuration file. `SECRET_KEY` can be changed at any time, however be aware that doing so will invalidate all existing sessions.
-
-Please note that this key is **not** used for hashing user passwords or for the encrypted storage of secret data in NetBox.
-
-`SECRET_KEY` should be at least 50 characters in length and contain a random mix of letters, digits, and symbols. The script located at `netbox/generate_secret_key.py` may be used to generate a suitable key.
-
-# Optional Settings
-
----
-
-#### ADMINS
+## ADMINS
 
 NetBox will email details about critical errors to the administrators listed here. This should be a list of (name, email) tuples. For example:
 
@@ -69,7 +13,7 @@ ADMINS = [
 
 ---
 
-#### DEBUG
+## DEBUG
 
 Default: False
 
@@ -77,7 +21,7 @@ This setting enables debugging. This should be done only during development or t
 
 ---
 
-#### EMAIL
+## EMAIL
 
 In order to send email, NetBox needs an email server configured. The following items can be defined within the `EMAIL` setting:
 
@@ -90,7 +34,7 @@ In order to send email, NetBox needs an email server configured. The following i
 
 ---
 
-#### LOGIN_REQUIRED
+## LOGIN_REQUIRED
 
 Default: False,
 
@@ -98,7 +42,7 @@ Setting this to True will permit only authenticated users to access any part of
 
 ---
 
-#### MAINTENANCE_MODE
+## MAINTENANCE_MODE
 
 Default: False
 
@@ -106,15 +50,15 @@ Setting this to True will display a "maintenance mode" banner at the top of ever
 
 ---
 
-#### NETBOX_USERNAME
+## NETBOX_USERNAME
 
-#### NETBOX_PASSWORD
+## NETBOX_PASSWORD
 
 If provided, NetBox will use these credentials to authenticate against devices when collecting data.
 
 ---
 
-#### PAGINATE_COUNT
+## PAGINATE_COUNT
 
 Default: 50
 
@@ -122,7 +66,7 @@ Determine how many objects to display per page within each list of objects.
 
 ---
 
-#### TIME_ZONE
+## TIME_ZONE
 
 Default: UTC
 
@@ -130,7 +74,7 @@ The time zone NetBox will use when dealing with dates and times. It is recommend
 
 ---
 
-#### Date and Time Formatting
+## Date and Time Formatting
 
 You may define custom formatting for date and times. For detailed instructions on writing format strings, please see [the Django documentation](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date).
 

+ 4 - 1
mkdocs.yml

@@ -6,9 +6,12 @@ pages:
         - 'PostgreSQL': 'installation/postgresql.md'
         - 'NetBox': 'installation/netbox.md'
         - 'Web Server': 'installation/web-server.md'
+        - 'LDAP (Optional)': 'installation/ldap.md'
         - 'Upgrading': 'installation/upgrading.md'
         - 'Alternate Install: Docker': 'installation/docker.md'
-    - 'Configuration': 'configuration.md'
+    - 'Configuration':
+        - 'Mandatory Settings': 'configuration/mandatory-settings.md'
+        - 'Optional Settings': 'configuration/optional-settings.md'
     - 'Data Model':
         - 'Circuits': 'data-model/circuits.md'
         - 'DCIM': 'data-model/dcim.md'