r71738 - in /branches/upstream/ylastic-costagent/current: Changes MANIFEST META.json META.yml Makefile.PL README bin/ylastic-costagent bin/ylastic_costagent lib/App/Ylastic/CostAgent.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Mar 20 11:39:28 UTC 2011


Author: jawnsy-guest
Date: Sun Mar 20 11:39:19 2011
New Revision: 71738

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71738
Log:
[svn-upgrade] new version ylastic-costagent (0.004)

Added:
    branches/upstream/ylastic-costagent/current/bin/ylastic-costagent
Removed:
    branches/upstream/ylastic-costagent/current/bin/ylastic_costagent
Modified:
    branches/upstream/ylastic-costagent/current/Changes
    branches/upstream/ylastic-costagent/current/MANIFEST
    branches/upstream/ylastic-costagent/current/META.json
    branches/upstream/ylastic-costagent/current/META.yml
    branches/upstream/ylastic-costagent/current/Makefile.PL
    branches/upstream/ylastic-costagent/current/README
    branches/upstream/ylastic-costagent/current/lib/App/Ylastic/CostAgent.pm

Modified: branches/upstream/ylastic-costagent/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/Changes?rev=71738&op=diff
==============================================================================
--- branches/upstream/ylastic-costagent/current/Changes (original)
+++ branches/upstream/ylastic-costagent/current/Changes Sun Mar 20 11:39:19 2011
@@ -1,14 +1,21 @@
 Revision history for App-Ylastic-CostAgent
 
+0.004     2011-03-20 03:32:00 America/New_York
+
+    - Renamed ylastic_costagent to ylastic-costagent 
+
 0.003     2011-03-19 22:20:02 America/New_York
+
     - Added documentation that libssl-dev may be needed for dependencies
     - Updated installation example recipe with curl instead of wget
 
 0.002     2011-03-18 23:24:22 America/New_York
+
     - Add dependency on Mozilla::CA and switch on hostname verification
       for SSL
     - Fix test failures from extra warnings on older Perls
 
 0.001     2011-03-18 20:38:41 America/New_York
+
     - initial release to CPAN
 

Modified: branches/upstream/ylastic-costagent/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/MANIFEST?rev=71738&op=diff
==============================================================================
--- branches/upstream/ylastic-costagent/current/MANIFEST (original)
+++ branches/upstream/ylastic-costagent/current/MANIFEST Sun Mar 20 11:39:19 2011
@@ -5,7 +5,7 @@
 META.yml
 Makefile.PL
 README
-bin/ylastic_costagent
+bin/ylastic-costagent
 dist.ini
 examples/config.ini
 lib/App/Ylastic/CostAgent.pm

Modified: branches/upstream/ylastic-costagent/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/META.json?rev=71738&op=diff
==============================================================================
--- branches/upstream/ylastic-costagent/current/META.json (original)
+++ branches/upstream/ylastic-costagent/current/META.json Sun Mar 20 11:39:19 2011
@@ -64,7 +64,7 @@
    "provides" : {
       "App::Ylastic::CostAgent" : {
          "file" : "lib/App/Ylastic/CostAgent.pm",
-         "version" : "0.003"
+         "version" : "0.004"
       }
    },
    "release_status" : "stable",
@@ -80,6 +80,6 @@
          "web" : "http://github.com/dagolden/app-ylastic-costagent/tree"
       }
    },
-   "version" : "0.003"
+   "version" : "0.004"
 }
 

Modified: branches/upstream/ylastic-costagent/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/META.yml?rev=71738&op=diff
==============================================================================
--- branches/upstream/ylastic-costagent/current/META.yml (original)
+++ branches/upstream/ylastic-costagent/current/META.yml Sun Mar 20 11:39:19 2011
@@ -27,7 +27,7 @@
 provides:
   App::Ylastic::CostAgent:
     file: lib/App/Ylastic/CostAgent.pm
-    version: 0.003
+    version: 0.004
 requires:
   Archive::Zip: 0
   Carp: 0
@@ -51,4 +51,4 @@
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=App-Ylastic-CostAgent
   homepage: http://github.com/dagolden/app-ylastic-costagent/tree
   repository: git://github.com/dagolden/app-ylastic-costagent.git
-version: 0.003
+version: 0.004

Modified: branches/upstream/ylastic-costagent/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/Makefile.PL?rev=71738&op=diff
==============================================================================
--- branches/upstream/ylastic-costagent/current/Makefile.PL (original)
+++ branches/upstream/ylastic-costagent/current/Makefile.PL Sun Mar 20 11:39:19 2011
@@ -22,7 +22,7 @@
   },
   'DISTNAME' => 'App-Ylastic-CostAgent',
   'EXE_FILES' => [
-    'bin/ylastic_costagent'
+    'bin/ylastic-costagent'
   ],
   'LICENSE' => 'apache',
   'NAME' => 'App::Ylastic::CostAgent',
@@ -45,7 +45,7 @@
     'autodie' => '2.00',
     'utf8' => '0'
   },
-  'VERSION' => '0.003',
+  'VERSION' => '0.004',
   'test' => {
     'TESTS' => 't/*.t'
   }

Modified: branches/upstream/ylastic-costagent/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/README?rev=71738&op=diff
==============================================================================
--- branches/upstream/ylastic-costagent/current/README (original)
+++ branches/upstream/ylastic-costagent/current/README Sun Mar 20 11:39:19 2011
@@ -3,7 +3,7 @@
     Web Services
 
 VERSION
-    version 0.003
+    version 0.004
 
 DESCRIPTION
     This module contains the internal routines for L<ylastic-costagent>.

Added: branches/upstream/ylastic-costagent/current/bin/ylastic-costagent
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/bin/ylastic-costagent?rev=71738&op=file
==============================================================================
--- branches/upstream/ylastic-costagent/current/bin/ylastic-costagent (added)
+++ branches/upstream/ylastic-costagent/current/bin/ylastic-costagent Sun Mar 20 11:39:19 2011
@@ -1,0 +1,192 @@
+#!/usr/bin/env perl
+#
+# This file is part of App-Ylastic-CostAgent
+#
+# This software is Copyright (c) 2011 by David Golden.
+#
+# This is free software, licensed under:
+#
+#   The Apache License, Version 2.0, January 2004
+#
+use strict;
+use warnings;
+# PODNAME: ylastic-costagent
+# ABSTRACT: Send AWS usage and cost data to Ylastic
+
+use File::Basename;
+use Getopt::Lucid ':all';
+use Log::Dispatchouli 2;
+use Pod::Usage;
+
+use App::Ylastic::CostAgent;
+
+my $opts = Getopt::Lucid->getopt([
+  Param("dir|d"),
+  Param("syslog|s"),
+  Param("logpath|l"),
+  Switch("dry-run|n"),
+  Switch("debug"),
+  Switch("help|h"),
+]);
+
+if ($opts->get_help ) {
+  pod2usage(1);
+  exit;
+}
+
+my $cf = shift @ARGV
+  or die "usage: $0 <config-file>\n";
+
+local $ENV{DISPATCHOULI_PATH} = $opts->get_logpath
+  if $opts->get_logpath;
+
+my $logger = Log::Dispatchouli->new({
+  ident     => basename($0),
+  facility  => $opts->get_syslog ? $opts->get_syslog : undef,
+  to_file   => $opts->get_logpath ? 1 : undef,
+  log_pid   => 0,
+  debug     => $opts->get_debug,
+});
+
+my $app = App::Ylastic::CostAgent->new(
+  config_file => $cf,
+  logger      => $logger,
+  dir         => $opts->get_dir,
+  upload      => ! $opts->get_dry_run,
+);
+
+exit $app->run;
+
+
+
+=pod
+
+=head1 NAME
+
+ylastic-costagent - Send AWS usage and cost data to Ylastic
+
+=head1 VERSION
+
+version 0.004
+
+=head1 SYNOPSIS
+
+   ylastic-costagent [OPTIONS] <CONFIG_FILE>
+ 
+   --dir|-d      Directory to hold downloads (default is tempdir)
+   --syslog|-s   Syslogd facility for logging (default is none)
+   --logpath|-l  Directory to hold a logfile (default is no logfile)
+   --dry-run|-n  Download, but don't upload (default is false)
+   --debug       Log with extra detail (default is false)
+   --help|h      Show summary of options
+
+=head1 DESCRIPTION
+
+This program downloads your Amazon Web Services usage data and uploads it to
+your Ylastic account for cost analysis.  It should be run regularly from a cron
+job to ensure up-to-date usage and spending history.
+
+=for Pod::Coverage method_names_here
+
+=head1 CONFIGURATION
+
+=head2 Installation
+
+Install L<App::Ylastic::CostAgent> using your regular CPAN client or
+distribution package manager (if available).  You may need the
+OpenSSL development libraries installed if you don't already have
+SSL working.
+
+If you aren't sure how to configure a CPAN client, see this excellent post on
+L<using CPAN as a non-root user|http://goo.gl/j27IB>.
+
+For example, assuming Ubuntu Linux and a bash shell:
+
+  $ sudo apt-get install libssl-dev
+  $ curl -L http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib
+  $ eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`
+  $ echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.bashrc
+  $ cpanm App::Ylastic::CostAgent
+
+=head2 Config file format
+
+The C<<< ylastic-costagent >>> program requires a configuration file that
+specifies your Ylastic and AWS account data.  The file is 'INI' format.
+Here is a template:
+
+   ylastic_id = 1234567890abdcef1234567890abcdef12345678
+ 
+   [1234-5689-0123]
+   user = foo at example.com
+   pass = trustno1
+ 
+   [4321-9865-3210]
+   user = foo at example.com
+   pass = trustno1
+
+Each Amazon account should be listed as a separate section with
+the account ID number in brackets.  (You may omit dashes if you wish.)
+
+=head2 Security
+
+Your config file contains AWS usernames and passwords.  These give
+complete control over your AWS account(s).  Do not make your config file
+groupE<sol>world readable.  You should only run this program on a machine that is
+safely behind a firewall.  All web requests with account data are transmitted
+over SSL.
+
+=head2 Automation
+
+This program should be run regularly to keep your usage data current on
+Ylastic.  Here is an example cron job entry that updates usage data every 12
+hours:
+
+   0 */12 * * * /path/to/ylastic-costagent -s user /path/to/config.ini
+
+The CE<lt>-s userE<gt> option will log to the CE<lt>userE<gt> facility of syslogd.
+
+If you use a local perl library, be sure to add an appropriate PERL5LIB to
+your crontab file:
+
+   PERL5LIB=$HOME/perl5/lib/perl5/i686-linux:$HOME/perl5/lib/perl5
+
+Look at the PERL5LIB set by L<local::lib> for the right paths to use.
+
+=head1 ACKNOWLEDGMENTS
+
+This program is based on the original ylastic_aws_costs_agent.py program
+distributed by Ylastic, which was credited as based on a Python scrypt by
+Robert Coup.
+
+=head1 SEE ALSO
+
+=over
+
+=item *
+
+L<Amazon Web Services|http://aws.amazon.com>
+
+=item *
+
+L<Ylastic|http://ylastic.com>
+
+=back
+
+=head1 AUTHOR
+
+David Golden <dagolden at cpan.org>
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2011 by David Golden.
+
+This is free software, licensed under:
+
+  The Apache License, Version 2.0, January 2004
+
+=cut
+
+
+__END__
+
+

Modified: branches/upstream/ylastic-costagent/current/lib/App/Ylastic/CostAgent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/ylastic-costagent/current/lib/App/Ylastic/CostAgent.pm?rev=71738&op=diff
==============================================================================
--- branches/upstream/ylastic-costagent/current/lib/App/Ylastic/CostAgent.pm (original)
+++ branches/upstream/ylastic-costagent/current/lib/App/Ylastic/CostAgent.pm Sun Mar 20 11:39:19 2011
@@ -14,7 +14,7 @@
 
 package App::Ylastic::CostAgent;
 BEGIN {
-  $App::Ylastic::CostAgent::VERSION = '0.003';
+  $App::Ylastic::CostAgent::VERSION = '0.004';
 }
 # ABSTRACT: Perl port of the Ylastic Cost Agent for Amazon Web Services
 
@@ -268,7 +268,7 @@
 
 =head1 VERSION
 
-version 0.003
+version 0.004
 
 =head1 DESCRIPTION
 




More information about the Pkg-perl-cvs-commits mailing list