%s/digitalocean/netbox-community/gi

Thank you Digitalocean for sponsoring Netbox!
And thank you for letting it grow up and move out ;)
This commit is contained in:
Christian Mäder 2019-07-02 21:32:58 +02:00
parent aed5126279
commit dc3db2d9fd
6 changed files with 33 additions and 37 deletions

View File

@ -36,7 +36,7 @@ WORKDIR /tmp
# As the requirements don't change very often,
# and as they take some time to compile,
# we try to cache them very agressively.
ARG REQUIREMENTS_URL=https://raw.githubusercontent.com/digitalocean/netbox/$BRANCH/requirements.txt
ARG REQUIREMENTS_URL=https://raw.githubusercontent.com/netbox-community/netbox/$BRANCH/requirements.txt
ADD ${REQUIREMENTS_URL} requirements.txt
RUN pip install -r requirements.txt
@ -44,12 +44,12 @@ RUN pip install -r requirements.txt
# ADD will fetch the file and check if it has changed
# If not, Docker will use the existing build cache.
# If yes, Docker will bust the cache and run every build step from here on.
ARG REF_URL=https://api.github.com/repos/digitalocean/netbox/contents?ref=$BRANCH
ARG REF_URL=https://api.github.com/repos/netbox-community/netbox/contents?ref=$BRANCH
ADD ${REF_URL} version.json
WORKDIR /opt
ARG URL=https://github.com/digitalocean/netbox/archive/$BRANCH.tar.gz
ARG URL=https://github.com/netbox-community/netbox/archive/$BRANCH.tar.gz
RUN wget -q -O - "${URL}" | tar xz \
&& mv netbox* netbox

View File

@ -13,17 +13,17 @@ Questions? Before opening an issue on Github, please join the [Network To Code][
To get Netbox up and running:
```
$ git clone -b master https://github.com/netbox-community/netbox-docker.git
$ cd netbox-docker
$ docker-compose pull
$ docker-compose up -d
```bash
git clone -b master https://github.com/netbox-community/netbox-docker.git
cd netbox-docker
docker-compose pull
docker-compose up -d
```
The application will be available after a few minutes.
Use `docker-compose port nginx 8080` to find out where to connect to.
```
```bash
$ echo "http://$(docker-compose port nginx 8080)/"
http://0.0.0.0:32768/
@ -85,12 +85,7 @@ You may run this image in a cluster such as Docker Swarm, Kubernetes or OpenShif
In this case, we encourage you to statically configure Netbox by starting from [Netbox's example config file][default-config], and mounting it into your container in the directory `/etc/netbox/config/` using the mechanism provided by your container platform (i.e. [Docker Swarm configs][swarm-config], [Kubernetes ConfigMap][k8s-config], [OpenShift ConfigMaps][openshift-config]).
But if you rather continue to configure your application through environment variables, you may continue to use [the built-in configuration file][
].
But if you rather continue to configure your application through environment variables, you may continue to use [the built-in configuration file][docker-config].
We discourage storing secrets in environment variables, as environment variable are passed on to all sub-processes and may leak easily into other systems, e.g. error collecting tools that often collect all environment variables whenever an error occurs.
Therefore we *strongly advise* to make use of the secrets mechanism provided by your container platform (i.e. [Docker Swarm secrets][swarm-secrets], [Kubernetes secrets][k8s-secrets], [OpenShift secrets][openshift-secrets]).
@ -109,7 +104,7 @@ If a secret is defined by an environment variable and in the respective file at
Please also consider [the advice about running Netbox in production](#production) above!
[docker-config]: https://github.com/netbox-community/netbox-docker/blob/master/configuration/configuration.py
[default-config]: https://github.com/digitalocean/netbox/blob/develop/netbox/netbox/configuration.example.py
[default-config]: https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py
[entrypoint]: https://github.com/netbox-community/netbox-docker/blob/master/docker/docker-entrypoint.sh
[swarm-config]: https://docs.docker.com/engine/swarm/configs/
[swarm-secrets]: https://docs.docker.com/engine/swarm/secrets/
@ -219,7 +214,7 @@ echo "from django.contrib.auth.models import Permission\nfor p in Permission.obj
You can also build your own Netbox Docker image containing your own startup scripts, custom fields, users and groups
like this:
```
```Dockerfile
ARG VERSION=latest
FROM netboxcommunity/netbox:$VERSION
@ -234,27 +229,27 @@ To use this feature, set the environment-variable `VERSION` before launching `do
`VERSION` may be set to the name of
[any tag of the `netboxcommunity/netbox` Docker image on Docker Hub][netbox-dockerhub].
```
$ export VERSION=v2.2.6
$ docker-compose pull netbox
$ docker-compose up -d
```bash
export VERSION=v2.2.6
docker-compose pull netbox
docker-compose up -d
```
You can also build a specific version of the Netbox image. This time, `VERSION` indicates any valid
[Git Reference][git-ref] declared on [the 'digitalocean/netbox' Github repository][netbox-github].
[Git Reference][git-ref] declared on [the 'netbox-community/netbox' Github repository][netbox-github].
Most commonly you will specify a tag or branch name.
```
$ export VERSION=develop
$ docker-compose build --no-cache netbox
$ docker-compose up -d
```bash
export VERSION=develop
docker-compose build --no-cache netbox
docker-compose up -d
```
Hint: If you're building a specific version by tag name, the `--no-cache` argument is not strictly necessary.
This can increase the build speed if you're just adjusting the config, for example.
[git-ref]: https://git-scm.com/book/en/v2/Git-Internals-Git-References
[netbox-github]: https://github.com/digitalocean/netbox/releases
[netbox-github]: https://github.com/netbox-community/netbox/releases
### LDAP enabled variant
@ -304,7 +299,7 @@ Now start everything up again.
If this didn't help, try to see if there's anything in the logs indicating why nginx doesn't start:
```bash
$ docker-compose logs -f nginx
docker-compose logs -f nginx
```
### Getting a "Bad Request (400)"
@ -331,14 +326,14 @@ docker-compose up -d netbox netbox-worker
First make sure that the webhooks feature is enabled in your Netbox configuration and that a redis host is defined.
Check `netbox.env` if the following variables are defined:
```
```bash
WEBHOOKS_ENABLED=true
REDIS_HOST=redis
```
Then make sure that the `redis` container and at least one `netbox-worker` are running.
```
```bash
# check the container status
$ docker-compose ps
@ -385,6 +380,7 @@ Compare the version with the list below to check whether a breaking change was i
The following is a list of breaking changes of the `netbox-docker` project:
* 0.16.0: Update the Netbox URL from "github.com/digitalocean/netbox" to "github.com/netbox-community/netbox"
* 0.15.0: Update for Netbox v2.6.0.
The `configuration/configuration.py` file has been updated to match the file from Netbox.
`CORS_ORIGIN_WHITELIST` has a new default value of `http://localhost`.
@ -436,8 +432,8 @@ New Docker images are built and published every 24h on the [Docker Build Infrast
To run the tests coming with Netbox, use the `docker-compose.yml` file as such:
```
$ docker-compose run netbox ./manage.py test
```bash
docker-compose run netbox ./manage.py test
```
## About

View File

@ -11,7 +11,7 @@ else
GITHUB_OAUTH_PARAMS=""
fi
ORIGINAL_GITHUB_REPO="${SRC_ORG-digitalocean}/${SRC_REPO-netbox}"
ORIGINAL_GITHUB_REPO="${SRC_ORG-netbox-community}/${SRC_REPO-netbox}"
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/branches?${GITHUB_OAUTH_PARAMS}"

View File

@ -11,7 +11,7 @@ else
GITHUB_OAUTH_PARAMS=""
fi
ORIGINAL_GITHUB_REPO="digitalocean/netbox"
ORIGINAL_GITHUB_REPO="netbox-community/netbox"
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/releases?${GITHUB_OAUTH_PARAMS}"

View File

@ -38,7 +38,7 @@ if [ "${1}x" == "x" ] || [ "${1}" == "--help" ] || [ "${1}" == "-h" ]; then
echo " This is used to tag all patch releases to their containing version e.g. v2.5.1 -> v2.5"
echo " Default: <DOCKER_ORG>/<DOCKER_REPO>:\$MAJOR.\$MINOR"
echo " SRC_ORG Which fork of netbox to use (i.e. github.com/<SRC_ORG>/<SRC_REPO>)."
echo " Default: digitalocean"
echo " Default: netbox-community"
echo " SRC_REPO The name of the netbox for to use (i.e. github.com/<SRC_ORG>/<SRC_REPO>)."
echo " Default: netbox"
echo " URL Where to fetch the package from."
@ -81,7 +81,7 @@ fi
NETBOX_DOCKER_PROJECT_VERSION="${NETBOX_DOCKER_PROJECT_VERSION-$(sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' VERSION)}"
# variables for fetching the source
SRC_ORG="${SRC_ORG-digitalocean}"
SRC_ORG="${SRC_ORG-netbox-community}"
SRC_REPO="${SRC_REPO-netbox}"
BRANCH="${1}"
URL="${URL-https://github.com/${SRC_ORG}/${SRC_REPO}/archive/$BRANCH.tar.gz}"

View File

@ -3,7 +3,7 @@ import re
import socket
# For reference see http://netbox.readthedocs.io/en/latest/configuration/mandatory-settings/
# Based on https://github.com/digitalocean/netbox/blob/develop/netbox/netbox/configuration.example.py
# Based on https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py
# Read secret from file
def read_secret(secret_name):