App-Netdisco
view release on metacpan or search on metacpan
lib/App/Netdisco.pm view on Meta::CPAN
within that user's home. There are alternatives: see the
L<Deployment|https://github.com/netdisco/netdisco/wiki/Install-Tips>
documentation for further details.
To avoid muddying your system, use the following script to download and
install Netdisco and its dependencies into the C<netdisco> user's home area
(C<~/perl5>):
su - netdisco
curl -L https://cpanmin.us/ | perl - --notest --local-lib ~/perl5 App::Netdisco
Link some of the newly installed apps into a handy location:
mkdir ~/bin
ln -s ~/perl5/bin/{localenv,netdisco-*} ~/bin/
Test the installation by running the following command, which should only
produce a status message (it's just a test - you'll start the daemons
properly, later on):
~/bin/netdisco-backend status
=head1 Configuration
Make a directory for your local configuration and copy the configuration
template from this distribution:
mkdir ~/environments
cp ~/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml ~/environments
chmod 600 ~/environments/deployment.yml
Edit the file ("C<~/environments/deployment.yml>") and change the database
connection parameters to match those for your local system (that is, the
C<name>, C<user> and C<pass>).
In the same file uncomment and edit the C<domain_suffix> setting to be
appropriate for your local site. Change the C<community> string setting if
your site has different values.
Have a quick read of the other settings to make sure you're happy, then move
on. See
L<Configuration|https://github.com/netdisco/netdisco/wiki/Configuration> for
further details.
=head1 Initialisation
The database either needs configuring if new, or updating from the current
release of Netdisco (1.x). You also need vendor MAC address prefixes (OUI
data) and some MIBs if you want to run the backend daemon. The following
script will take care of all this for you:
~/bin/netdisco-deploy
If this is a new installation of Netdisco 2, answer yes to all questions. If
you wish to deploy without Internet access, see the
L<Deployment|https://github.com/netdisco/netdisco/wiki/Install-Tips>
documentation.
=head1 Startup
Run the following command to start the web-app server as a background process:
~/bin/netdisco-web start
The web app listens on port 5000 (for example C<< http://localhost:5000/ >> or
C<< http://yourhost.example.com:5000/ >>).
Run the following command to start the job control daemon (device polling,
port control, etc):
~/bin/netdisco-backend start
=head1 First Run
After installing Netdisco for the first time, you must manually discover at
least one device on your network. Choose a device which speaks CDP, FDP, or
LLDP and knows about its neighbors; Netdisco will then start following this
chain of neighbors to discover the rest of your network.
Either go to the web interface and enter an IP or fully qualified domain name,
OR perform the following step at the command line:
~/bin/netdisco-do discover -d {name or IP address of a switch or router}
=head1 Further Reading
We have several pages with tips for
L<alternate deployment scenarios|https://github.com/netdisco/netdisco/wiki/Install-Tips>,
L<understanding and troubleshooting Netdisco|https://github.com/netdisco/netdisco/wiki/Troubleshooting>,
L<tips and tricks for specific platforms|https://github.com/netdisco/netdisco/wiki/Vendor-Tips>,
and L<all the configuration options|https://github.com/netdisco/netdisco/wiki/Configuration>.
You can also speak to someone in the C<#netdisco@libera> IRC channel, or on
the L<community email list|https://lists.sourceforge.net/lists/listinfo/netdisco-users>.
Before installing or upgrading please always review the latest
L<Release Notes|https://github.com/netdisco/netdisco/wiki/Release-Notes>.
=head1 Upgrading from 2.x
Netdisco requires Perl (5.10+) and PostgreSQL (9.6+).
Always review the latest L<Release Notes|https://github.com/netdisco/netdisco/wiki/Release-Notes>.
Then the process below should be run for each installation:
# upgrade Netdisco
~/bin/localenv cpanm --notest App::Netdisco
ln -sf ~/perl5/bin/{localenv,netdisco-*} ~/bin/
# apply database schema updates, update MIBs and Vendor MACs
~/bin/netdisco-deploy
# restart web service (if you run it)
~/bin/netdisco-web restart
# restart the backend workers (wherever you run them)
~/bin/netdisco-backend restart
Furthermore, whenever you upgrade your Operating System, you must delete the
C<~/perl5> directory and re-run the following command, to update Netdisco's C
library bindings (and then run all of the above upgrade commands again):
( run in 2.625 seconds using v1.01-cache-2.11-cpan-d8267643d1d )