Forge Home

aws_helper

Aws Helper for an instance

10,588 downloads

9,115 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.7 (latest)
  • 0.0.6
  • 0.0.2
  • 0.0.1
released May 21st 2015
This version is compatible with:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'neillturner-aws_helper', '0.0.7'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add neillturner-aws_helper
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install neillturner-aws_helper --version 0.0.7

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

neillturner/aws_helper — version 0.0.7 May 21st 2015

puppet-aws_helper

Aws Helper for an instance

Allows functions on EBS volumes, snapshots, IP addresses and more

  • initially snapshots are supported
  • cleanup ebs volumes.

Minimal Usage

Assuming server started with an IAM role that have read access to AWS can create and delete snapshots. To backup the root disk on device /dev/sda daily at 2am and keep the last 7 days of snapshots and send an email at 3am giving a list of the last 20 snapshots.

 class { 'aws_helper': }

 class { 'aws_helper::ebs_backup'
   cron_hour        => '2',
 }
 
 class { 'aws_helper::snap_email'
   cron_hour        => '3',
   to               => 'me@company.com',
   from             => 'ebs.backup@company.com',
   email_server     => 'smtpemailserver.com',
 }

Cleanup ebs disks - Delete old server root disks. Disks that are 8GB in size, not attached to a server, not tagged in any way and from a snapshot will be deleted.

 class { 'aws_helper::ebs_cleanup'
   cron_hour        => '19',
 }

Complex Usage

Snapshot EBS root disk and attached disk to device /dev/sdf volume vol-654321 access AWS through an http proxy and send an email at 3am giving a list of the last 30 snapshots. If your server does not have a role then you need to code the AWS keys although this is not best practice.

 class { 'aws_helper': }

 class { 'aws_helper::ebs_backup'
   aws_access_key    => 'xxxxxxxxxxxx',
   aws_secret_key    => 'yyyyyyyyyyy',
   http_proxy        => 'http://10.20.30.40:3123',
   helper_path       => '/usr/bin/',
   root_device       => '/dev/sda',
   root_vol          => 'vol-123456',
   attached_device   => '/dev/sdf',
   attached_vol      => 'vol-654321',
   log               => '/var/log/ebs_backup.log',
   snapshots_to_keep => '20',
   description       => 'testserver',
   script_path       => '/usr/sbin',
   cron_minute       => '30',
   cron_hour         => '2',
 )
 
 class { 'aws_helper::snap_email'
   aws_access_key    => 'xxxxxxxxxxxx',
   aws_secret_key    => 'yyyyyyyyyyy',
   owner             => 999888777777,
   http_proxy        => 'http://10.20.30.40:3123',     
   cron_hour        => '3',
   to               => 'me@company.com',
   from             => 'ebs.backup@company.com',
   email_server     => 'smtpemailserver.com',
   subject          => 'My EBS Backups',
   rows             => '30',
 }     

Other functions to follow