tidy and fix links, add deployment.yml

This commit is contained in:
Oliver Gorwits
2018-01-13 10:01:06 +00:00
parent 97cdaf3ea7
commit ec2b2bcfa2
6 changed files with 104 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
# vim: ft=Dockerfile
ARG TAG=master
FROM docker.io/netdisco/netdisco:${TAG}-base
FROM docker.io/netdisco/netdisco-base:${TAG}-base
LABEL org.netdisco.maintainer="The Netdisco Project"
LABEL org.netdisco.version=${TAG}

View File

@@ -28,19 +28,19 @@ RUN groupadd -r netdisco -g 901 && \
useradd -u 901 -r -p x -g netdisco -m -d $NETDISCO_HOME -s /bin/bash -c "netdisco user" netdisco
USER netdisco:netdisco
WORKDIR $NETDISCO_HOME
RUN curl -s https://api.github.com/repos/netdisco/netdisco/tags | \
RUN curl -sL https://api.github.com/repos/netdisco/netdisco/tags | \
jq '.[]|.name|select(test("^\\d+\\.\\d+$"))|"https://github.com/netdisco/netdisco.git@"+.' | \
sort -rg | head -n1 | \
PERL5LIB='.' xargs -n1 cpanm --quiet --notest --local-lib $NETDISCO_HOME/perl5
RUN mkdir $NETDISCO_HOME/bin && \
bash -c 'ln -sf $NETDISCO_HOME/perl5/bin/{localenv,netdisco-*} $NETDISCO_HOME/bin/'
WORKDIR $NETDISCO_HOME/bin
RUN bash -c 'ln -sf $NETDISCO_HOME/perl5/bin/{localenv,netdisco-*} .'
ENV PATH $NETDISCO_HOME/bin:$PATH
ENV SHELL "/bin/bash"
WORKDIR $NETDISCO_HOME/environments
COPY deployment.yml .
VOLUME ["/home/netdisco/environments", "/home/netdisco/nd-site-local"]
USER netdisco:netdisco
WORKDIR $NETDISCO_HOME
CMD ["bash"]

View File

@@ -0,0 +1,94 @@
#
# NETDISCO 2 CONFIGURATION FILE
#
# Settings in this file override share/config.yml
# See App::Netdisco::Manual::Configuration for more info.
# ------------------
# ESSENTIAL SETTINGS
# ------------------
database:
name: 'netdisco'
user: 'netdisco'
pass: 'netdisco'
#host: 'localhost'
# --------------------
# RECOMMENDED SETTINGS
# --------------------
# SNMP community string(s)
# ````````````````````````
device_auth:
- tag: 'default_v2_readonly'
community: 'public'
read: true
write: false
# - tag: 'default_v2_for_write'
# community: 'private'
# read: false
# write: true
# will be stripped from fqdn when displayed in the web UI
# also, do not forget the leading dot.
# ```````````````````````````````````````````````````````
#domain_suffix: '.example.com'
# ¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸
# ¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸
# ---------------------------------------------------------------
# OTHER INTERESTING SETTINGS WHERE THE DEFAULTS ARE PROBABLY OKAY
# ---------------------------------------------------------------
# do not discover IP Phones or Wireless Access Points.
# usually these are visible as device neighbors but don't support
# SNMP, which just clogs up the job queue.
# ```````````````````````````````````````````````````````````````
#discover_no_type:
# - '(?i)phone'
# - '(?i)(?:wap|wireless)'
# this is the schedule for automatically keeping netdisco up-to-date;
# these are good defaults, so only uncomment if needing to change.
# (or set "schedule: null" if you wish to disable the scheduler)
# ````````````````````````````````````````````````````````````````````
#schedule:
# discoverall:
# when: '5 7 * * *'
# macwalk:
# when:
# min: 20
# arpwalk:
# when:
# min: 50
# nbtwalk:
# when: '0 8,13,21 * * *'
# expire:
# when: '30 23 * * *'
# number of SNMP workers to run in parallel (in netdisco-backend).
# the default is twice the number of CPU cores. increase this if
# your system has few cores and the schedule is taking too long.
# ```````````````````````````````````````````````````````````````
#workers:
# tasks: 'AUTO * 2'
# number of parallel DNS queries for node names
# `````````````````````````````````````````````
#dns:
# max_outstanding: 50
# set to true to globally disable authentication/login.
# create a user called "guest" if you want to assign port/admin rights.
# `````````````````````````````````````````````````````````````````````
no_auth: true
# set to false if you MUST maintain backwards compatibility
# with Netdisco 1.x web frontend.
# `````````````````````````````````````````````````````````
#safe_password_store: true

View File

@@ -1,6 +1,6 @@
# vim: ft=Dockerfile
ARG TAG=master
FROM docker.io/netdisco/netdisco:${TAG}-base
FROM docker.io/netdisco/netdisco-base:${TAG}-base
LABEL org.netdisco.maintainer="The Netdisco Project"
LABEL org.netdisco.version=${TAG}

View File

@@ -16,7 +16,7 @@ RUN chmod +x /usr/local/bin/netdisco-db-entrypoint.sh
RUN PGDATA=/var/lib/postgresql/netdisco-pgdata /usr/local/bin/docker-entrypoint.sh postgres --version
WORKDIR /var/lib/postgresql/netdisco-sql
RUN curl -s https://api.github.com/repos/netdisco/netdisco/tags | \
RUN curl -sL https://api.github.com/repos/netdisco/netdisco/tags | \
jq '.[]|.name|select(test("^\\d+\\.\\d+$"))|"https://api.github.com/repos/netdisco/netdisco/tarball/"+.' | \
sort -rg | head -n1 | xargs -n1 curl -sL | \
tar --wildcards --strip-components=3 -zx '*App-Netdisco-DB-*' && \

View File

@@ -1,6 +1,6 @@
# vim: ft=Dockerfile
ARG TAG=master
FROM docker.io/netdisco/netdisco:${TAG}-base
FROM docker.io/netdisco/netdisco-base:${TAG}-base
LABEL org.netdisco.maintainer="The Netdisco Project"
LABEL org.netdisco.version=${TAG}