Skip to content
Oliver Gorwits edited this page Mar 28, 2024 · 7 revisions

This page is a guide to running Netdisco latest version from git repository - what is known as the bleeding edge.

Typically this is quite stable, and run in operation at some sites by the developers.

Nevertheless, please take care and take regular database backups if the data is important to you.

Installation

Follow the Dependencies steps exactly as on the install guide: https://metacpan.org/pod/App::Netdisco#Dependencies

Make a directory for the code:

su - netdisco
mkdir git
cd git

Clone the git repository for Netdisco:

cd ~/git
git clone git@github.com:netdisco/netdisco.git

(If you don’t have a git account you can use their HTTPS links instead. If you want to write patches for Netdisco please contact us on IRC for commit access.)

Clone the git repository for SNMP::Info:

cd ~/git
git clone git@github.com:netdisco/snmp-info.git

Clone the git repository for Netdisco MIBs:

cd ~/git
git clone git@github.com:netdisco/netdisco-mibs.git

Now you will run an adjusted version of the cpanm command from the public install guide, to instead use the git repo:

cd ~/git/netdisco
curl -L https://cpanmin.us/ | perl - --notest --local-lib ~/perl5 --installdeps .

Note that we are not going to symlink any binaries to ~netdisco/bin.

Finally, we need to make some symlinks, for Netdisco MIBs, and so that when Netdisco loads SNMP::Info it picks the git repo:

cd
ln -s ~/git/netdisco-mibs

cd ~/perl5/lib/perl5/SNMP
rm -rf Info Info.pm

ln -s ~/git/snmp-info/lib/SNMP/Info
ln -s ~/git/snmp-info/lib/SNMP/Info.pm

You’re now all set to run Netdisco from the git repo.

Operation

Finish your setup by following the Confiuration step in the install guide: https://metacpan.org/pod/App::Netdisco#Configuration

Now, for initialisation and running Netdisco, it’s all done from the git repo:

cd ~/git/netdisco

# skip the MIBs download if you pulled the git repository, as above
# ./bin/netdisco-deploy

# ./bin/netdisco-web start
# ./bin/netdisco-backend start

# ./bin/netdisco-do ....

You can also run the web frontend and the backend in the foreground at your command prompt:

cd ~/git/netdisco

~/bin/localenv plackup -R share,lib,/home/netdisco/environments ./bin/netdisco-web-fg
./bin/netdisco-backend-fg

Season to taste, with environment variables such as DBIC_TRACE or NETDISCO_DB_TENANT or ND2_SINGLE_WORKER or ND2_DB_ROLLBACK.

Have fun, and patches welcome!

Updating

If you git pull to update the repositories (all of them), remember also to run netdisco-deploy in case the database schema changes. Restart any background daemons (the foreground web daemon will auto-restart).