Skip to content

Commit

Permalink
Changelog and documentation for #1814
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Dec 11, 2019
1 parent e02ac13 commit 9f204f7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/configuration/optional-settings.md
Expand Up @@ -293,6 +293,26 @@ Session data is used to track authenticated users when they access NetBox. By de

---

## STORAGE_BACKEND

Default: None (local storage)

The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports integration with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) package, which provides backends for several popular file storage services. If not configured, local filesystem storage will be used.

The configuration parameters for the specified storage backend are defined under the `STORAGE_CONFIG` setting.

---

## STORAGE_CONFIG

Default: Empty

A dictionary of configuration parameters for the storage backend configured as `STORAGE_BACKEND`. The specific parameters to be used here are specific to each backend; see the [`django-storages` documentation](https://django-storages.readthedocs.io/en/stable/) for more detail.

If `STORAGE_BACKEND` is not defined, this setting will be ignored.

---

## TIME_ZONE

Default: UTC
Expand Down
8 changes: 8 additions & 0 deletions docs/installation/2-netbox.md
Expand Up @@ -90,6 +90,14 @@ NetBox supports integration with the [NAPALM automation](https://napalm-automati
# pip3 install napalm
```

## Remote File Storage (Optional)

By default, NetBox will use the local filesystem to storage uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired backend](../../configuration/optional-settings/#storage_backend) in `configuration.py`.

```no-highlight
# pip3 install django-storages
```

# Configuration

Move into the NetBox configuration directory and make a copy of `configuration.example.py` named `configuration.py`.
Expand Down
34 changes: 34 additions & 0 deletions docs/release-notes/version-2.7.md
Expand Up @@ -40,6 +40,40 @@ This new functionality replaces the existing CSV-based import form, which did no
NetBox now supports the bulk import of device components such as console ports, power ports, and interfaces. Device
components can be imported in CSV-format.

### External File Storage ([#1814](https://github.com/netbox-community/netbox/issues/1814))

In prior releases, the only option for storing uploaded file (e.g. image attachments) was to save them to the local
filesystem on the NetBox server. This release introduces support for several remote storage backends via the
[`django-storages`](https://django-storages.readthedocs.io/en/stable/) package. These include:

* Amazon S3
* ApacheLibcloud
* Azure Storage
* DigitalOcean Spaces
* Dropbox
* FTP
* Google Cloud Storage
* SFTP

To enable remote file storage, first install `django-storages`:

```
pip install django-storages
```

Then, set the appropriate storage backend and its configuration in `configuration.py`. Here's an example using Amazon
S3:

```python
STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage'
STORAGE_CONFIG = {
'AWS_ACCESS_KEY_ID': '<Key>',
'AWS_SECRET_ACCESS_KEY': '<Secret>',
'AWS_STORAGE_BUCKET_NAME': 'netbox',
'AWS_S3_REGION_NAME': 'eu-west-1',
}
```

## Changes

### Topology Maps Removed ([#2745](https://github.com/netbox-community/netbox/issues/2745))
Expand Down

0 comments on commit 9f204f7

Please sign in to comment.