many small fixes to packaging and daemons after testing
This commit is contained in:
@@ -108,8 +108,8 @@ Makefile.PL
|
||||
MANIFEST This list of files
|
||||
META.yml
|
||||
share/config.yml
|
||||
share/environments/deployment.yml
|
||||
share/environments/development.yml
|
||||
share/environments/production.yml
|
||||
share/public/500.html
|
||||
share/public/css/bootstrap.min.css
|
||||
share/public/css/font-awesome.css
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
\.pid$
|
||||
\.swp$
|
||||
|
||||
^share/environments/(?!production|development)
|
||||
^share/environments/(?!production|development|deployment)
|
||||
test.pl
|
||||
logs/.*
|
||||
^lib/auto/App/Netdisco
|
||||
|
||||
@@ -19,6 +19,8 @@ no_index:
|
||||
- inc
|
||||
- share
|
||||
requires:
|
||||
App::cpanminus: 0
|
||||
App::local::lib::helper: 0
|
||||
DBD::Pg: 0
|
||||
DBD::SQLite: 0
|
||||
DBIx::Class: 0
|
||||
@@ -31,15 +33,17 @@ requires:
|
||||
HTTP::Tiny: 0
|
||||
JSON: 0
|
||||
List::MoreUtils: 0
|
||||
MCE: 1.305
|
||||
MCE: 1.405
|
||||
Net::MAC: 0
|
||||
NetAddr::IP: 0
|
||||
Path::Class: 0
|
||||
Plack: 0
|
||||
Plack: 1.0006
|
||||
Plack::Middleware::Expires: 0
|
||||
Role::Tiny: 0
|
||||
SNMP::Info: 2.11
|
||||
SQL::Translator: 0
|
||||
Socket6: 0
|
||||
Starman: 0
|
||||
Template: 0
|
||||
YAML: 0
|
||||
namespace::clean: 0
|
||||
|
||||
@@ -18,10 +18,11 @@ requires 'HTML::Entities' => 0;
|
||||
requires 'HTTP::Tiny' => 0;
|
||||
requires 'JSON' => 0;
|
||||
requires 'List::MoreUtils' => 0;
|
||||
requires 'MCE' => 1.305;
|
||||
requires 'MCE' => 1.405;
|
||||
requires 'Net::MAC' => 0;
|
||||
requires 'NetAddr::IP' => 0;
|
||||
requires 'Path::Class' => 0;
|
||||
requires 'Plack' => 1.0006;
|
||||
requires 'Plack::Middleware::Expires' => 0;
|
||||
requires 'Role::Tiny' => 0;
|
||||
requires 'Socket6' => 0;
|
||||
|
||||
@@ -22,8 +22,9 @@ use App::Netdisco::Daemon::Queue ':all';
|
||||
# needed to quench AF_INET6 symbol errors
|
||||
use NetAddr::IP::Lite ':lower';
|
||||
|
||||
use MCE;
|
||||
use Role::Tiny::With;
|
||||
use MCE::Signal '-setpgrp';
|
||||
use MCE;
|
||||
|
||||
# set temporary MCE files' location in home directory
|
||||
my $home = ($ENV{NETDISCO_HOME} || $ENV{HOME});
|
||||
|
||||
@@ -32,8 +32,8 @@ mkdir $log_dir if ! -d $log_dir;
|
||||
|
||||
Daemon::Control->new({
|
||||
name => 'Netdisco Web',
|
||||
program => 'plackup',
|
||||
program_args => [@args, $netdisco->stringify],
|
||||
program => 'starman',
|
||||
program_args => ['--disable-keepalive', @args, $netdisco->stringify],
|
||||
pid_file => file($home, 'netdisco-web.pid'),
|
||||
stderr_file => file($log_dir, 'netdisco-web.log'),
|
||||
stdout_file => file($log_dir, 'netdisco-web.log'),
|
||||
|
||||
@@ -19,11 +19,11 @@ BEGIN {
|
||||
$ENV{DANCER_APPDIR} ||= $auto->stringify;
|
||||
$ENV{DANCER_CONFDIR} ||= $auto->stringify;
|
||||
|
||||
my $test_envdir = dir($home, 'environments');
|
||||
$ENV{DANCER_ENVDIR} ||= (-f $test_envdir
|
||||
? $test_envdir->stringify : $auto->subdir('environments')->stringify);
|
||||
my $test_envdir = dir($home, 'environments')->stringify;
|
||||
$ENV{DANCER_ENVDIR} ||= (-d $test_envdir
|
||||
? $test_envdir : $auto->subdir('environments')->stringify);
|
||||
|
||||
$ENV{PLACK_ENV} ||= 'deployment';
|
||||
$ENV{DANCER_ENVIRONMENT} ||= 'deployment';
|
||||
|
||||
$ENV{DANCER_PUBLIC} ||= $auto->subdir('public')->stringify;
|
||||
$ENV{DANCER_VIEWS} ||= $auto->subdir('views')->stringify;
|
||||
@@ -171,8 +171,8 @@ or MAC addreses, VLAN numbers, and so on.
|
||||
|
||||
For SQL debugging try the following commands:
|
||||
|
||||
DBIC_TRACE_PROFILE=console DBIC_TRACE=1 ~/bin/netdisco-web-fg
|
||||
DBIC_TRACE_PROFILE=console DBIC_TRACE=1 ~/bin/netdisco-daemon-fg
|
||||
DBIC_TRACE_PROFILE=console DBIC_TRACE=1 ~/bin/localenv ~/bin/netdisco-web-fg
|
||||
DBIC_TRACE_PROFILE=console DBIC_TRACE=1 ~/bin/localenv ~/bin/netdisco-daemon-fg
|
||||
|
||||
=head2 Deployment
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ post '/login' => sub {
|
||||
my $user = schema('netdisco')->resultset('User')->find(param('username'));
|
||||
if ($user) {
|
||||
my $sum = Digest::MD5::md5_hex(param('password'));
|
||||
if ($sum and $sum eq $user->password) {
|
||||
if (($sum and $user->password) and ($sum eq $user->password)) {
|
||||
session(user => $user->username);
|
||||
header(Location => uri_for('/inventory')->path_query());
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@ plugins:
|
||||
schema_class: 'App::Netdisco::DB'
|
||||
dsn: 'dbi:Pg:dbname=netdisco;host=localhost'
|
||||
user: 'changeme'
|
||||
pass: 'netdisco'
|
||||
pass: 'changeme'
|
||||
options:
|
||||
RaiseError: 1
|
||||
AutoCommit: 1
|
||||
@@ -35,3 +35,14 @@ plugins:
|
||||
# also, do not forget the leading dot
|
||||
# domain_suffix: '.example.com'
|
||||
|
||||
# local settings for Netdisco poller and port changes
|
||||
|
||||
mibhome: '/home/netdisco/netdisco-mibs'
|
||||
mibdirs:
|
||||
- cisco
|
||||
- rfc
|
||||
- net-snmp
|
||||
|
||||
community: ['public']
|
||||
community_rw: ['private']
|
||||
|
||||
Reference in New Issue
Block a user