Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

NOC Project Docker container

Docker container for the NOC Project.

Quickstart

Note that if the containers are not already downloaded, this will take a few minutes to complete.

curl -O https://raw.githubusercontent.com/abn/noc-docker/master/noc
chmod 755 noc

# this starts the database containers and the data container
./noc start

# upgrade before running in order to finalize onfiguration
./noc upgrade
./noc runserver

Once this is complete, you should be able to access NOC by visiting http://localhost:8000.

Configuring NOC

The noc helper script sets up your environment such that an instance named noc-data is used to persist data between runs. To edit configuration, you can load this up in any container with your favorite editor and modify files located at /opt/noc/etc.

docker run --rm -it --volumes-from noc-data fedora:22 bash

This command will drop you into a shell with the data mounted.

Configuring Database Passwords

The database passwords can be configured by either modifying the noc script or by using the environment variables PG_PASSWORD and/or MONGO_PASSWORD before initializing.

Accessing databases

Postgres

docker run -it --link noc-postgres:postgres \
    -e "PGPASSWORD=${PG_PASSWORD}" \
    -e "COMMAND=${COMMAND}" \
    --rm postgres bash -c 'psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U noc'

MongoDB

docker run -it --link noc-mongo:mongo \
    -e "COMMAND=${MONGO_CREATE_USER}" \
    --rm mongo bash -c 'mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/noc"'
Docker Pull Command
Owner
alectolytic
Source Repository

Comments (2)
painhardcore
2 years ago

plus if you have slow server, you can get errors in ./noc start
with postgresql like
"psql: could not connect to server: Connection refused
Is the server running on host "172.17.0.14" and accepting
TCP/IP connections on port 5432?
"
To resolve this you need to edit noc file at 16 line => sleep 10 instead of 2.

painhardcore
2 years ago

default name/password is admin/admin