Sign inSign up

nowx/nbsp

By nowx

Updated about 9 years ago

Stand up an NBSP with default settings

Image
0

346

nowx/nbsp repository overview

nbsp-dockerfile Build Status Docker Build Status Docker Build Status

Compiles and installs NBSP, but does not configure anything. If, for example, the default configuration stashes files on the disk, this will stash files on the disk as well.

Why the script?

I love RUN commands just like you. If you look at the script, though, very little of it is actually commands. The bash script is very simple and intuitive, where sticking that all into a run command would be a bit messy.

Note that the setup script automagically fetches the latest version, which is then stored in the file /NBSP_VERSION. If you want a different version, set the $NBSP_VERSION variable. ...But wait there's more! Because of how excellent Ubuntu is, we can get different results by doing the same thing!

What Sets Ubuntu Apart from Distros that Work

Consider the following.

> netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

> echo $?
0

No ports are in use, right? BUT WAIT!

> ftp -n $FTP_HOST
ftp: bind: Address already in use

Now here's the funnest part of all the fun. I've never had any luck getting this thing to compile or run properly under CentOS, but I ran Ubuntu/Mint/Debian for years so I'm familiar with how they work (or don't, more accurately). This only happens on Travis and Docker Hub. Oh, and to make it even MORE fun, executing the exact same command on Docker and Travis using a CentOS base works perfectly.

This means you get to check for updated versions of NBSP if you want to stay up to date. You can do this by running the exact same command that's failing in the image-

# install_latest_version:10:22
FTP_HOST="ftp.noaaport.net"
FTP_DIR="/software/packages"
(
ftp -n $FTP_HOST <<EOT
user anonymous [email protected]
cd $FTP_DIR
ls -lt
quit
EOT
) | awk '/nbsp-[0-9]/ {print $NF; exit}'
How do I use it?

If the software works out of the box, which it generally does, this as well will work out of the box. The program can be configured to connect to a DVB (although it is not out of the box), and the list of servers can be used if the program is intended to run as a slave server.

Install notes:

This is printed out after apt install nbsp and has been copied verbatim from the terminal, apologies on the formatting:

The configuration files are installed in /usr/local/etc/nbsp.

The installation process should have created various directories under /var/noaaport, and already enabled the rstfilter and dafilter. In addition the web server is enabled by default, and can be accesed as

http://localhost:8015

or http://:8015

The program will run in this default installation without further configuration.

An init script is also installed to start automatically the program at boot time, and stop when the system at shutdown. It can also be started or stoped manually by executing

/etc/init.d/nbspd start
/etc/init.d/nbspd stop

NOTE:

As of version 2.0.r2, nbspd runs as user noaaport, and therefore the directories where the daemon writes must be owned by that user:

chown -R noaaport:noaaport /var/noaaport
chown -R noaaport:noaaport /var/log/noaaport
chown -R noaaport:noaaport /var/log/nbsp
chown -R noaaport:noaaport /var/run/nbsp

During a fresh install, the package installer will create the directories with the appropriate ownership, but not during an upgrade. If you are uprading from an older version, those commands must be executed manually.

NOTE:

See the files

/usr/local/etc/nbsp/defaults/nbspd.conf
/usr/local/etc/nbsp/dist/sysctl.conf-ex

for sysctl notes. Alternatively execute

nbspconfigure-dvbs2

and it will carry out the steps indicated in those files.

NOTE

To configure Nbsp with a memory based spool for a pure ingest role (no processing but network aware and the inventory enabled), execute

nbspreconfigure mspoolbdb

and check the files in

defaults/configs

Executing 'nbspreconfigure' without arguments, will revert to the standard default configuration.

NOTE:

It is recommended to omit scanning the directory "/var/noaaport" by the periodic updatedb script. Executing

nbspconfigure-updatedb

updates the "/etc/updatedb.conf" to include the noaaport directory in the list of directories to omit.

Tag summary

Content type

Image

Digest

Size

223.1 MB

Last updated

about 9 years ago

docker pull nowx/nbsp