Squashed commit of the following: commitaa2baf5c75Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 9 15:44:29 2013 +0100 next stable release commit79fe5b59e6Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 9 15:37:26 2013 +0100 fix localenv discovery for scripts commit1af2f78dd4Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 9 14:55:39 2013 +0100 include new bin scripts commit23d0e1b0e7Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 9 14:09:27 2013 +0100 more bug fixes commitdfeacd12e2Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 9 11:30:06 2013 +0100 several bug fixes commit9fd41f1c26Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 21:22:44 2013 +0100 bump version for next beta commitb0925cf116Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 21:20:13 2013 +0100 update plugin docs commit9571c45634Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 20:54:30 2013 +0100 sanitize configuration files commitdd447e4246Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 20:04:43 2013 +0100 tweak parsing of lists of regex in config commit9957548022Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 19:54:10 2013 +0100 workers instead of daemon_* config commit4f6b470429Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 19:39:40 2013 +0100 no more demo :( commiteda73c7dacAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 19:24:47 2013 +0100 lots of docs commit4a1ccba71aAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 18:17:42 2013 +0100 documentation for all config settings commit3538e47bcdAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 16:05:03 2013 +0100 update TODO commitcf9001fcccMerge:a43c9897b98e23Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Jun 8 16:03:29 2013 +0100 merge master after new release commita43c98962aAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Jun 3 20:37:39 2013 +0100 Missing mibdirs causes all MIBs to be loaded (with a warning) commit09829a25b8Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Jun 3 20:07:31 2013 +0100 local plugins site_plugins dir commitb0e804e558Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Jun 3 19:59:04 2013 +0100 use send_error and redirect from Dancer commit3d1185261aAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Jun 3 19:13:40 2013 +0100 support path config option commit31ca119f84Merge:9a798554d2b3a5Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Jun 3 00:06:17 2013 +0100 Merge remote-tracking branch 'origin/og-work' into og-work g-work" This reverts commit9a79855361, reversing changes made to6fd6118354. Conflicts: Netdisco/share/views/plugin/device_port_column/c_observiumsparklines.tt commit9a79855361Merge:6fd6118c8c3b82Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Jun 3 00:03:32 2013 +0100 Merge remote-tracking branch 'origin/master' into og-work commit6fd6118354Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 2 15:47:45 2013 +0100 extra note about behind proxy commit798086ca29Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 2 15:30:26 2013 +0100 complete the observium plugin commit66b3ced179Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Jun 2 12:48:06 2013 +0100 Plugins can have CSS and Javascript loaded within <head> commit4d2b3a5307Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 30 08:50:16 2013 +0100 get device dns to port template commited1bfa1ae7Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 30 08:17:02 2013 +0100 observium sparklines plugin; support X:: namespace commit76b7636c74Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 30 06:30:06 2013 +0100 rename private settings keys commitfdac8f6c33Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 30 05:59:53 2013 +0100 add macwalk and arpnip buttons to device details commit3d688c7d83Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 30 05:57:20 2013 +0100 Revert "reduce refresh to 5sec" This reverts commit8ea9ec7dd9. commitdc62382112Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 30 05:50:34 2013 +0100 support for arpwalk and macwalk and all jobs via web commit8bc7d83c98Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 30 05:35:41 2013 +0100 simplify discover options to only discoverall and discover commit8ea9ec7dd9Author: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 20:23:08 2013 +0100 reduce refresh to 5sec commit8c54e6c58bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 20:11:06 2013 +0100 show undiscovered neighbor properly commite0ee25628fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 19:54:09 2013 +0100 avoid unecessary log for queueing commitd5565423f2Author: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 19:51:37 2013 +0100 avoid warning on undefined remote type commit5d9b58a6b2Author: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 19:48:22 2013 +0100 avoid explosion when not admin commit377bb942e0Author: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 19:46:52 2013 +0100 avoid undefined warning commit08806dcfa2Author: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 19:46:42 2013 +0100 get_db_version will be 0 at first deploy commit9511c17056Author: Oliver Gorwits <oliver@cpan.org> Date: Wed May 29 19:15:55 2013 +0100 fix name of Template module commiteb0288de35Author: Oliver Gorwits <oliver@cpan.org> Date: Tue May 28 07:17:07 2013 +0100 initial config settings documentation commit7f2ea7f8dcAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon May 27 15:18:15 2013 +0100 remove check_mac to own module, use in macsuck too commitb995cf6398Author: Oliver Gorwits <oliver@cpan.org> Date: Mon May 27 15:01:29 2013 +0100 show probable but undiscovered neighbor is ports display commitdd8d461188Author: Oliver Gorwits <oliver@cpan.org> Date: Mon May 27 14:52:41 2013 +0100 new schema version for is_uplink and is_uplink_admin commit3f6a7b5aa2Author: Oliver Gorwits <oliver@cpan.org> Date: Mon May 27 14:47:59 2013 +0100 make sure device_port is updated when manual_topo is set commit33bf9a6599Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 26 19:51:49 2013 +0100 export store_arp and store_node commit0ed356d560Author: Oliver Gorwits <oliver@cpan.org> Date: Sat May 25 17:12:31 2013 +0100 use row lock not table lock commitf830bc3a3bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 25 16:38:33 2013 +0100 move macsuck/arpnip/discover to ::Core namespace commitbe40788987Author: Oliver Gorwits <oliver@cpan.org> Date: Fri May 24 21:10:34 2013 +0100 add maybe_uplink to device_port; more macsuck implementation commit88371026d5Author: Oliver Gorwits <oliver@cpan.org> Date: Fri May 24 14:34:58 2013 +0100 start on macsuck; tweak update locking commit6f7c87ac07Author: Oliver Gorwits <oliver@cpan.org> Date: Fri May 24 13:10:58 2013 +0100 ORDER BY ... FOR UPDATE will allow us to avoid table lock commit7c438e01fcAuthor: Oliver Gorwits <oliver@cpan.org> Date: Fri May 24 12:12:46 2013 +0100 yet more efficient arpnip commitc74c56dc02Author: Oliver Gorwits <oliver@cpan.org> Date: Fri May 24 11:34:23 2013 +0100 guard against race with *_or_* DBIC methods commitd50c54972eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon May 20 23:42:41 2013 +0100 more efficient arpnip commit73c8979130Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 19 22:52:15 2013 +0100 fix confusing name commitbf78e82411Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 19 22:37:22 2013 +0100 fix mistake in DBIx::Class schema commit6a5af95836Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 19 22:06:27 2013 +0100 arpnip implementation commit594abd3f82Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 16 00:00:50 2013 +0100 PostgreSQL explicit locking support. Squashed commit of the following: commit76e1539102Author: Oliver Gorwits <oliver@cpan.org> Date: Wed May 15 23:54:25 2013 +0100 finished explicit locking module commit369387258bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue May 14 23:50:42 2013 +0100 initial implementation of locking from schema object commit55c6d4fe63Author: Oliver Gorwits <oliver@cpan.org> Date: Tue May 14 21:05:01 2013 +0100 add discover button to device details page commit11fd8bf964Author: Oliver Gorwits <oliver@cpan.org> Date: Tue May 14 20:43:43 2013 +0100 fix typo and clear port box on autocomplete dropdown commita00f9b5c2eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue May 14 20:38:54 2013 +0100 move admin tasks and remove JobControl package commit74bc0023dfAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 11 18:25:04 2013 +0100 complete job queue delete and kill running timers properly when reloading page commitdd6947f38dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 11 16:51:28 2013 +0100 fix improper use of bootstrap table class commitcd5b83f71eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 11 15:55:45 2013 +0100 fix update view icon in sidebar commite9349f325dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 11 11:57:19 2013 +0100 css audit commit201470275dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Thu May 9 23:48:05 2013 +0100 add job queue to standard plugins list commita18a3c72a3Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 9 23:37:43 2013 +0100 fix table headings and improve Action display in Job Queue commit70f5da8bb6Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 9 23:30:32 2013 +0100 implement "no devices" prompt for admin users to do first discover commit2e8ac83173Author: Oliver Gorwits <oliver@cpan.org> Date: Thu May 9 21:53:39 2013 +0100 more js refactoring for report and search commit479ac0e55dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Thu May 9 21:50:29 2013 +0100 refactor js for device tabs commit6a17fe5d6cAuthor: Oliver Gorwits <oliver@cpan.org> Date: Thu May 9 21:05:42 2013 +0100 fix crazy races with javasacript by using global delegations commite94e3cef3bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Wed May 8 23:06:41 2013 +0100 remove Try::Tiny from web runtime commitc746e68b9bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue May 7 21:54:11 2013 +0100 make topo autocomplete more responsive commit24c511786fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue May 7 21:52:17 2013 +0100 display name and IP for device typeahead commit52ab7d1266Author: Oliver Gorwits <oliver@cpan.org> Date: Tue May 7 21:47:05 2013 +0100 add drop-down control for the topo form fields commit5744b6845fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Tue May 7 21:25:30 2013 +0100 complete the topology editor (add/delete) commitb510fbe8c5Author: Oliver Gorwits <oliver@cpan.org> Date: Tue May 7 00:59:11 2013 +0100 add new admin tasks to default plugins list commit11d55e0129Author: Oliver Gorwits <oliver@cpan.org> Date: Tue May 7 00:56:19 2013 +0100 Manual Device Topology Needed to add the 'autocomplete' jQuery UI component because it can do minLength=0 properly. Used the smoothness UI theme. Added typeahead AJAX calls to support the topology searching. Added new plugin and template for the topology editing page. commitbf7a419d08Author: Oliver Gorwits <oliver@cpan.org> Date: Mon May 6 22:16:24 2013 +0100 add a little colour to lone tab titles commit9690a31f19Author: Oliver Gorwits <oliver@cpan.org> Date: Mon May 6 22:01:13 2013 +0100 complete Manage Pseudo Devices commit024f4d9a83Author: Oliver Gorwits <oliver@cpan.org> Date: Mon May 6 00:49:47 2013 +0100 use bootstrap font colour instead of css commitf75f1e5cbfAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon May 6 00:45:18 2013 +0100 add frontend update/del forms, and display port count commitf0899e16b3Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 23:53:20 2013 +0100 add frontend pseudo device add form commit3271c01931Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 21:45:17 2013 +0100 complete the code for admin tasks page loading commit38f70624f3Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 17:04:30 2013 +0100 set up file paths consistently in all scripts commitc761ca839bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 17:00:30 2013 +0100 Helper script to import the Netdisco 1.x Topology file to the database commitf468b48049Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 16:20:39 2013 +0100 Handle whitespace ahead of OUI data commit5c8a5754f6Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 16:16:20 2013 +0100 also set neighbor info when discovering device interfaces commitacb988b6afAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 15:34:20 2013 +0100 try to avoid duplicate execution of scheduled jobs commitc6bcaf66c5Author: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 14:16:25 2013 +0100 do not clobber manual topo when discovering neighbors commitd9a6a1882aAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun May 5 13:02:45 2013 +0100 User icon color indicates port_control/admin ability commit2cdcb9db7eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Apr 29 23:34:27 2013 +0100 add support for admin tasks as plugins commit075a770c9aAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Apr 29 22:23:20 2013 +0100 skip pseudo devices (vendor netdisco) commit045c022d42Author: Oliver Gorwits <oliver@cpan.org> Date: Mon Apr 29 21:58:33 2013 +0100 incorporate manual topo info from the topology db table commit09285d42b4Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 18:39:12 2013 +0100 add unique constraints to topology table commit2780b72e49Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 15:38:05 2013 +0100 muted help text in sidebar commit733d4f83fbAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:39:54 2013 +0100 sorry, testing hook changes commit71e366e352Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:34:36 2013 +0100 sorry, testing hook changes commit7f9eaa99f5Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:33:44 2013 +0100 sorry, testing hook changes commit5215fd632dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:30:07 2013 +0100 sorry, testing hook changes commitbe817d60c2Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:21:45 2013 +0100 sorry, testing hook changes commit1fd3695358Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:18:57 2013 +0100 sorry, testing hook changes commitac448c4a91Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:13:03 2013 +0100 sorry, testing hook changes commitc563b8d9afAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:08:54 2013 +0100 sorry, testing hook changes commit3abcfb01d5Author: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:06:25 2013 +0100 sorry, testing hook changes commit877a81facfAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat Apr 27 14:05:25 2013 +0100 sorry, testing hook changes
282 lines
9.8 KiB
Perl
282 lines
9.8 KiB
Perl
package App::Netdisco;
|
|
|
|
use strict;
|
|
use warnings FATAL => 'all';
|
|
use 5.010_000;
|
|
|
|
use File::ShareDir 'dist_dir';
|
|
use Path::Class;
|
|
|
|
our $VERSION = '2.008000';
|
|
|
|
BEGIN {
|
|
if (not length ($ENV{DANCER_APPDIR} || '')
|
|
or not -f file($ENV{DANCER_APPDIR}, 'config.yml')) {
|
|
|
|
my $auto = dir(dist_dir('App-Netdisco'))->absolute;
|
|
my $home = ($ENV{NETDISCO_HOME} || $ENV{HOME});
|
|
|
|
$ENV{DANCER_APPDIR} ||= $auto->stringify;
|
|
$ENV{DANCER_CONFDIR} ||= $auto->stringify;
|
|
|
|
my $test_envdir = dir($home, 'environments')->stringify;
|
|
$ENV{DANCER_ENVDIR} ||= (-d $test_envdir
|
|
? $test_envdir : $auto->subdir('environments')->stringify);
|
|
|
|
$ENV{DANCER_ENVIRONMENT} ||= 'deployment';
|
|
|
|
$ENV{DANCER_PUBLIC} ||= $auto->subdir('public')->stringify;
|
|
$ENV{DANCER_VIEWS} ||= $auto->subdir('views')->stringify;
|
|
}
|
|
|
|
{
|
|
# Dancer 1 uses the broken YAML.pm module
|
|
# This is a global sledgehammer - could just apply to Dancer::Config
|
|
use YAML;
|
|
use YAML::XS;
|
|
no warnings 'redefine';
|
|
*YAML::LoadFile = sub { goto \&YAML::XS::LoadFile };
|
|
}
|
|
}
|
|
|
|
=head1 NAME
|
|
|
|
App::Netdisco - An open source web-based network management tool.
|
|
|
|
=head1 Introduction
|
|
|
|
The content of this distribution is the next major version of the Netdisco
|
|
network management tool. Pieces are still missing however, so if you're a new
|
|
user please see L<http://netdisco.org/> for further information on the project
|
|
and how to download the current official release.
|
|
|
|
L<App::Netdisco> provides a web frontend with built-in web server, and a
|
|
backend daemon to handle interactive requests such as changing port or device
|
|
properties.
|
|
|
|
If you have any trouble getting the frontend running, speak to someone in the
|
|
C<#netdisco> IRC channel (on freenode). Before installing or upgrading please
|
|
review the latest L<Release Notes|App::Netdisco::Manual::ReleaseNotes>.
|
|
|
|
=head1 Dependencies
|
|
|
|
Netdisco has several Perl library dependencies which will be automatically
|
|
installed. However it's I<strongly> recommended that you first install
|
|
L<DBD::Pg> and L<SNMP> using your operating system packages. The following
|
|
commands will test for the existence of them on your system:
|
|
|
|
perl -MDBD::Pg\ 999
|
|
perl -MSNMP\ 999
|
|
|
|
With those two installed, we can proceed...
|
|
|
|
Create a user on your system called C<netdisco> if one does not already exist.
|
|
We'll install Netdisco and its dependencies into this user's home area, which
|
|
will take about 250MB including MIB files.
|
|
|
|
root:~# useradd -m -p x -s /bin/bash netdisco
|
|
|
|
Netdisco uses the PostgreSQL database server. Install PostgreSQL and then change
|
|
to the PostgreSQL superuser (usually C<postgres>). Create a new database and
|
|
PostgreSQL user for the Netdisco application:
|
|
|
|
root:~# su - postgres
|
|
|
|
postgres:~$ createuser -DRSP netdisco
|
|
Enter password for new role:
|
|
Enter it again:
|
|
|
|
postgres:~$ createdb -O netdisco netdisco
|
|
|
|
=head1 Installation
|
|
|
|
The following is a general guide which works well in most circumstances. It
|
|
assumes you have a user C<netdisco> on your system, that you want to perform
|
|
an on-line installation, and have the application run self-contained from
|
|
within that user's home. There are alternatives: see the
|
|
L<Deployment|App::Netdisco::Manual::Deployment> 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<~netdisco/perl5>):
|
|
|
|
su - netdisco
|
|
curl -L http://cpanmin.us/ | perl - --notest --verbose --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 (and throw up no errors):
|
|
|
|
~/bin/netdisco-daemon 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 +w ~/environments/deployment.yml
|
|
|
|
Edit the file and change the database connection parameters to match those for
|
|
your local system (that is, the C<dsn>, C<user> and C<pass>).
|
|
|
|
In the same file uncomment and edit the C<domain_suffix> setting to be
|
|
appropriate for your local site. Optionally, set the C<no_auth> value to true
|
|
if you wish to skip user authentication in the web interface.
|
|
|
|
=head1 Bootstrap
|
|
|
|
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 daemon. The following script will
|
|
take care of all this for you:
|
|
|
|
~/bin/netdisco-deploy
|
|
|
|
Answer yes to all questions, if this is a new installation of Netdisco 2.
|
|
|
|
=head1 Startup
|
|
|
|
Run the following command to start the web-app server as a backgrounded daemon
|
|
(listening on port 5000):
|
|
|
|
~/bin/netdisco-web start
|
|
|
|
If the Inventory is empty because this is a new installation, you probably
|
|
want to either run some polling jobs from the command-line, or give a web user
|
|
some admin rights (see L</"User Rights">, below).
|
|
|
|
Run the following command to start the job control daemon (port control, etc):
|
|
|
|
~/bin/netdisco-daemon start
|
|
|
|
You should take care not to run this Netdisco daemon and the legacy daemon at
|
|
the same time. Similarly, if you use the device discovery with Netdisco 2,
|
|
disable your system's cron jobs for the Netdisco 1 poller.
|
|
|
|
=head1 Upgrading
|
|
|
|
Before upgrading please review the latest L<Release
|
|
Notes|App::Netdisco::Manual::ReleaseNotes>. Then, the process is as follows:
|
|
|
|
# upgrade Netdisco
|
|
~/bin/localenv cpanm --notest App::Netdisco
|
|
|
|
# apply database schema updates
|
|
~/bin/netdisco-deploy
|
|
|
|
# restart web service
|
|
~/bin/netdisco-web restart
|
|
|
|
# restart job daemon (if you use it)
|
|
~/bin/netdisco-daemon restart
|
|
|
|
=head1 Tips and Tricks
|
|
|
|
=head2 Searching
|
|
|
|
The main black navigation bar has a search box which is smart enough to work
|
|
out what you're looking for in most cases. For example device names, node IP
|
|
or MAC addreses, VLAN numbers, and so on.
|
|
|
|
=head2 User Rights
|
|
|
|
When user authentication is disabled (C<no_auth: true>) the default username
|
|
is "guest", which has no special privilege. To grant port and device control
|
|
rights to this user, create a row in the C<users> table of the Netdisco
|
|
database with a username of C<guest> and appropriate flags set to true:
|
|
|
|
netdisco=> insert into users (username) values ('guest');
|
|
netdisco=> update users set port_control = true where username = 'guest';
|
|
netdisco=> update users set admin = true where username = 'guest';
|
|
|
|
=head2 Command-Line Device and Port Actions
|
|
|
|
To run a device (discover, etc) or port control job from the command-line, use
|
|
the bundled L<netdisco-do> program. For example:
|
|
|
|
~/bin/netdisco-do -D discover -d 192.0.2.1
|
|
|
|
=head2 Import Topology
|
|
|
|
Netdisco 1.x had support for a topology information file to fill in device
|
|
port relations which could not be discovered. This is now stored in the
|
|
database (and edited in the web interface). To import a legacy topology file,
|
|
run:
|
|
|
|
~/bin/localenv nd-import-topology /path/to/netdisco-topology.txt
|
|
|
|
=head2 Deployment Scenarios
|
|
|
|
More documentation on how to deploy the application in other scenarios, for
|
|
example behind a web proxy, is in the
|
|
L<Deployment|App::Netdisco::Manual::Deployment> documentation.
|
|
|
|
=head2 Database API
|
|
|
|
Bundled with this distribution is a L<DBIx::Class> layer for the Netdisco
|
|
database. This abstracts away all the SQL into an elegant, re-usable OO
|
|
interface. See the L<Developer|App::Netdisco::Manual::Developing>
|
|
documentation for further information.
|
|
|
|
=head2 Plugins
|
|
|
|
Netdisco includes a Plugin subsystem for customizing the web user interface.
|
|
See L<App::Netdisco::Web::Plugin> for further information.
|
|
|
|
=head2 Developing
|
|
|
|
Lots of information about the architecture of this application is contained
|
|
within the L<Developer|App::Netdisco::Manual::Developing> documentation.
|
|
|
|
=head1 Caveats
|
|
|
|
Some sections are not yet implemented, e.g. the I<Device Module> tab.
|
|
|
|
Some menu items on the main black navigation bar go nowhere.
|
|
|
|
None of the Reports yet exist (e.g. searching for wireless devices, or duplex
|
|
mismatches). These will be implemented as a plugin bundle.
|
|
|
|
The Wireless, IP Phone and NetBIOS Node properies are not yet shown.
|
|
|
|
=head1 AUTHOR
|
|
|
|
Oliver Gorwits <oliver@cpan.org>
|
|
|
|
=head1 COPYRIGHT AND LICENSE
|
|
|
|
This software is copyright (c) 2012, 2013 by The Netdisco Developer Team.
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
modification, are permitted provided that the following conditions are met:
|
|
* Redistributions of source code must retain the above copyright
|
|
notice, this list of conditions and the following disclaimer.
|
|
* Redistributions in binary form must reproduce the above copyright
|
|
notice, this list of conditions and the following disclaimer in the
|
|
documentation and/or other materials provided with the distribution.
|
|
* Neither the name of the Netdisco Project nor the
|
|
names of its contributors may be used to endorse or promote products
|
|
derived from this software without specific prior written permission.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
DISCLAIMED. IN NO EVENT SHALL THE NETDISCO DEVELOPER TEAM BE LIABLE FOR ANY
|
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
=cut
|
|
|
|
1;
|