formating changes for README.md files.

This commit is contained in:
Colin Johnson 2012-12-09 17:01:16 +00:00
parent 656654dc52
commit 76444ca1f9
10 changed files with 93 additions and 65 deletions

View File

@ -2,21 +2,25 @@
as-apply-alarms was created to easily apply alarms to anywhere from one to a number of Amazon Auto Scaling Groups. The tool applies alarms for CPU Utilization. as-apply-alarms will run "out of the box" however the intent is rather to provide a template (and the logic) for managing multiple Auto Scaling Group's alarms.
# Directions For Use:
## Example of Use:
as-apply-alarms -d auto-scaling-group-name -t name-of-sns-topic
-
as-apply-alarms -d auto-scaling-group-name -t name-of-sns-topic
the above example would apply alarms to the Auto Scaling Group named <auto-scaling-group-name> and if any of these Alarms enter state "Alarm" would send a message to "name-of-topic."
## Required Parameters:
as-apply-alarms requires the following two arguments:
-g <auto-scaling-group-name> - the name of the Auto Scaling Group for which you wish to apply alarms.
-t <name-of-topic> - the name of the sns-topic where Alarms should be sent.
`-g <auto-scaling-group-name>` - the name of the Auto Scaling Group for which you wish to apply alarms.
`-t <name-of-topic>` - the name of the sns-topic where Alarms should be sent.
#
## Optional Parameters:
-a - pass the -a parameter to apply alarms to all Auto Scaling Groups.
-r <region> - region that contains the Auto Scaling Group(s) where alarms should be applied
-e <evaluation period> - set to the number of evaluation periods before an SNS topic is notified.
-p <previewmode> - set to "true" to preview what alarms would be applied.
`-a` - pass the -a parameter to apply alarms to all Auto Scaling Groups.
`-r <region>` - region that contains the Auto Scaling Group(s) where alarms should be applied
`-e <evaluation period>` - set to the number of evaluation periods before an SNS topic is notified.
`-p <previewmode>` - set to "true" to preview what alarms would be applied.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-12-09
Version 0.5
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-12-09
- Version 0.5
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -6,17 +6,24 @@ as-update-launch-config was created to easily modify the EC2 Instance Type of an
the above example would modify the Auto Scaling Group "my-scaling-group" to use an m1.small EC2 Instance Type with the user-data available at /home/cjohnson/web-server-user-data.txt - note that this would also use an Amazon Linux AMI by default. The three parameters -a -i and -u are required for operation, as explained in the section "Required Parameters."
## Required Parameters:
as-update-launch-config requires the following three arguments:
`-a <auto-scaling-group-name>` - the name of the Auto Scaling Group that you wish to modify.
`-i <instance-type>` - the EC Instance Type you wish to switch use - for example -i m1.small would mean all future instances are launched as m1.small EC2 Instances.
`-u <user-data>` - path to the user-data file that the Auto Scaling Group's Launch Configuration should use.
## Optional Parameters:
`-b <bits>` if you specify a t1.micro, m1.small, m1.medium or c1.medium EC2 Instance Type you must specify either a 32-bit or 64-bit platform. This parameter is valid only for the t1.micro, m1.small, m1.medium and c1.medium instance types.
`-p <region>` - allows you specify the region in which your Auto Scaling Group and Launch Configuration are in.
`-r <region>` - allows you specify the region in which your Auto Scaling Group and Launch Configuration are in.
`-p <preview>` - set to "true" if you wish to preview output rather than execute. Useful for testing.
`-s <storage>` - set to ebs if you wish to use an EBS backed AMI or s3 if you wish to use an s3 backed AMI. With no input, ebs is selected by default.
`-m <AMI>` - allows you specify the AMI that you desire your Auto Scaling Group's Launch Configuration to use.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-09-12
Version 0.5
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-09-12
- Version 0.5
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -2,13 +2,16 @@
aws-ha-release allows the high-availability / no downtime replacement of all EC2 Instances in an Auto Scaling Group that is behind an Elastic Load Balancer.
#
# Potential Use:
Some potential uses aws-ha-release are listed below:
1. Delivery of new code - if your deployment scheme utilizes the termination of EC2 instances in order to release new code aws-ha-release provides an automated way to do this without incurring any downtime.
Some potential uses for aws-ha-release are listed below:
1. Delivery of new code - if your deployment scheme utilizes the termination of EC2 instances in order to release new code aws-ha-release provides an automated way to do this without incurring any downtime.
2. Return of all EC2 instances to "pristine" or "vanilla" state - all older EC2 instances can be replaced with newer EC2 instances.
# Directions For Use:
## Example of Use:
aws-ha-release.sh -a my-scaling-group
`aws-ha-release.sh -a my-scaling-group`
the above example would terminate and replace each EC2 Instance in the Auto Scaling group "my-scaling-group" with a new EC2 Instance.
## Required Options:
aws-ha-release.sh requires the following option:
@ -18,7 +21,7 @@ aws-ha-release.sh requires the following option:
`-t <elb_timeout>` - time, in seconds, in which an EC2 instance should be given to complete request processing prior to being terminated. Set this value high enough so that any requests sent through an ELB would have time to be completed by an EC2 instance. For example: if the ELB allows connections to stay open for 120 seconds then setting this value to 120 seconds allows an instance behind an ELB 120 seconds to complete all processing before being terminated. By default both an AWS ELB and aws-ha-release.sh utilize 60 seconds timeout period.
`-i <inservice_time_allowed>` - allows you to specify the number of seconds an EC2 instance is provided to come into service. By default EC2 instances are given 300 seconds to come into service - if aws-ha-release.sh notices that an instance has not come into service in 300 seconds it will exit and return an exit status of 79. If an EC2 instance and application combination requires more than 300 seconds to come "InService" from the perspective of an ELB then this value should be set to a greater number.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-12-09
Version 0.1
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-12-09
- Version 0.1
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -7,35 +7,40 @@ ec2-automate-backup was created to provide easy backup/snapshot functionality fo
# Directions For Use:
## Example of Use:
ec2-automate-backup -v vol-6d6a0527
----
`ec2-automate-backup -v vol-6d6a0527`
the above example would provide a single backup of the EBS volumeid vol-6d6a0527. The snapshot would be created with the description "vol-6d6a0527_2012-09-07".
## Required Parameters:
ec2-automate-backup requires one of the following two parameters be provided:
`-v <volumeid>` - the "volumeid" parameter is required to select EBS volumes for snapshot if ec2-automate-backup is run using the "volumeid" selection method - the "volumeid" selection method is the default selection method.
`-t <tag>` - the "tag" parameter is required if the "method" of selecting EBS volumes for snapshot is by tag (-s tag). The format for tag is key=value (example: Backup=true) and the correct method for running ec2-automate-backup in this manner is ec2-automate-backup -s tag -t Backup=true.
## Optional Parameters:
`-r <region>` - the region that contains the EBS volumes for which you wish to have a snapshot created.
`-s <selection_method>` - the selection method by which EBS volumes will be selected. Currently supported selection methods are "volumeid" and "tag." The selection method "volumeid" identifies EBS volumes for which a snapshot should be taken by volume id whereas the selection method "tag" identifies EBS volumes for which a snapshot should be taken by a key=value format tag.
`-c <cron_primer_file>` - running with the -c option and a providing a file will cause ec2-automate-backup to source a file for environmental configuration - ideal for running ec2-automate-backup under cron. An example cron primer file is located in the "Resources" directory and is called cron-primer.sh.
`-n` - tag snapshots "Name" tag as well as description
`-k <purge_after_days>` - the period after which a snapshot can be purged. For example, running "ec2-automate-backup.sh -v "vol-6d6a0527 vol-636a0112" -k 31" would allow snapshots to be removed after 31 days. purge_after_days creates two tags for each volume that was backed up - a PurgeAllow tag which is set to PurgeAllow=true and a PurgeAfter tag which is set to the present day (in UTC) + the value provided by -k.
`-p` - the -p flag will purge (meaning delete) all snapshots that were created more than "purge after days" ago. ec2-automate-backup looks at two tags to determine which snapshots should be deleted - the PurgeAllow and PurgeAfter tags. The tags must be set as follows: PurgeAllow=true and PurgeAfter=YYYY-MM-DD where YYYY-MM-DD must be before the present date.
#
# Potential Uses and Methods of Use:
#
* To backup multiple EBS volumes use ec2-automate-backup as follows: `ec2-automate-backup -v "vol-6d6a0527 vol-636a0112"`
* To backup a selected group of EBS volumes on a daily schedule tag each volume you wish to backup with the tag "Backup=true" and run ec2-automate-backup using cron as follows: `0 0 * * 0 ec2-automate-backup -s tag -t "Backup=true"`
* To backup a selected group of EBS volumes on a daily and/or monthly schedule tag each volume you wish to backup with the tag "Backup-Daily=true" and/or "Backup-Monthly=true" and run ec2-automate-backup using cron as follows:
- `0 0 * * 0 ec2-user /home/ec2-user/ec2-automate-backup.sh -s tag -t "Backup-Daily=true"`
- `0 0 1 * * ec2-user /home/ec2-user/ec2-automate-backup.sh -s tag -t "Backup-Monthly=true"`
* To perform daily backup using cron and to load environment configuration with a "cron-primer" file:
- `0 0 * * 0 ec2-user /home/ec2-user/ec2-automate-backup.sh -c /home/ec2-user/cron-primer.sh -s tag -t "Backup=True"`
- `0 0 * * 0 ec2-user /home/ec2-user/ec2-automate-backup.sh -c /home/ec2-user/cron-primer.sh -s tag -t "Backup=True"`
# Additional Information:
the file "ec2ab - IAM User Required Permissions.json" contains the IAM permissions required to run ec2-cost-calculate.rb in with the least permissions required as of 2012-11-21.
#
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-12-09
Version 0.1
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-12-09
- Version 0.1
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -2,16 +2,17 @@
ec2-cost-calculate.rb was created to easily sum the total of instances running in one or all regions. The typical use would be to run the ec2-cost-calculate.rb script and then import into a spreadsheet application for further analysis. Another use would be to run the ec2-cost-calculate.rb script with cron, producing a weekly output file (an example of this: `echo "0 0 * * 0 ec2-user /home/ec2-user/ec2-cost-calculate.rb --period day --region all --output file --file /home/ec2-user/ec2-cost-report`date +"%Y%m%d"`.txt" > /etc/cron.d/ec2-cost-calculate`).
# Directions For Use:
## Example of Use:
`ec2-cost-calculate.rb --period day`
ec2-cost-calculate.rb --period day
the above example would provide a list of all instances in all regions along with the daily cost of running each instance.
## Required Parameters:
ec2-cost-calculate.rb has no parameter requirements. ec2-cost-calculate.rb defaults to all regions and hourly cost if no parameters are provided.
## Optional Parameters:
optional parameters are available by running ec2-cost-calculate.rb --help.
# Additional Information:
optional parameters are available by running `ec2-cost-calculate.rb --help`.
## Running with IAM Credentials
the file "ec2cc - IAM User Required Permissions.json" contains the permissions required to run ec2-cost-calculate.rb in with the "Least Permissions" required as of 2012-11-11.
#
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-12-09
Version 0.2
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
# Additional Information:
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-12-09
- Version 0.2
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -2,15 +2,16 @@
ec2-cost-calculate was created to easily sum the total of instances running in one or all regions. The typical use would be to run the ec2-cost-calculate script and then import into a spreadsheet application for further analysis. Another use would be to run the ec2-cost-calculate script with cron, producing a weekly output file (an example of this: `echo "0 0 * * 0 ec2-user /home/ec2-user/ec2-cost-calculate.sh -p day -r all > /home/ec2-user/ec2-cost-report`date +"%Y%m%d"`.txt" > /etc/cron.d/ec2-cost-calculate.sh`).
# Directions For Use:
## Example of Use:
`ec2-cost-calculate.sh -r us-east-1 -p day`
ec2-cost-calculate.sh -r us-east-1 -p day
the above example would provide a list of all instances in the region "us-east-1" along with the daily cost of running each instance.
## Required Parameters:
ec2-cost-calculate has no parameter requirements. ec2-cost-calculate does, however, default to the region "us-east-1" and hourly cost if no parameters are provided.
## Optional Parameters:
`-r <region>` - the region you wish to calculate cost for: these arguments include "all" for all regions or us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-northeast-1 or sa-east-1
`-p <period>` - the period for which you wish to calculate instance cost. Allowable arguments are hour, day, week, month or year.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-12-09
Version 0.5
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-12-09
- Version 0.5
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -1,11 +1,11 @@
# Introduction:
ec2-write-memory-metrics was created to extend Amazon's default metrics for EC2 instances to include a metrics for memory usage.
# Directions For Use:
`ec2-write-memory-metrics.sh`
ec2-write-memory-metrics.sh
## Example of Use:
The most valuable use of this application is to be run through cron on a regular basis.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2011-12-09
Version 0.1
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2011-12-09
- Version 0.1
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -1,11 +1,11 @@
# Introduction:
ec2-write-storage-used was created to extend Amazon's default metrics for EC2 instances to include a metric for the amount of storage space used on an individual EC2 instance.
# Directions For Use:
ec2-write-storage-used.sh
ec2-write-storage-used.sh
## Example of Use:
The most valuable use of this application is to be run through cron on a regular basis.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2011-12-09
Version 0.1
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2011-12-09
- Version 0.1
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -6,15 +6,20 @@ rds-apply-alarms was created to easily apply alarms to anywhere from one to a nu
the above example would apply alarms to "rds-instance-name" and, if any of these Alarms enter state "Alarm" would send a message to "name-of-topic."
## Required Parameters:
rds-apply-alarms requires the following two arguments:
`-d <rds-instance-name>` - the name of the Database Instance for which you wish to apply alarms.
`-t <name-of-topic>` - the name of the sns-topic where Alarms should be sent.
## Optional Parameters:
`-a` - pass the -a parameter to apply alarms to ALL RDS instances in a given region.
`-r <region>` - region that contains the RDS instances(s) where alarms should be applied
`-e <evaluation period>` - set to the number of evaluation periods before an SNS topic is notified.
`-p <previewmode>` - set to "true" to preview what alarms would be applied.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-12-09
Version 0.5
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-12-09
- Version 0.5
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3

View File

@ -7,10 +7,12 @@ the above example would provide a list of all RDS instances in the region "us-ea
## Required Parameters:
rds-cost-calculate has no parameter requirements. rds-cost-calculate does, however, default to the region "us-east-1" and hourly cost if no parameters are provided.
## Optional Parameters:
`-r <region>` - the region you wish to calculate cost for: these arguments include "all" for all regions or us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-northeast-1 or sa-east-1
`-p <period>` - the period for which you wish to calculate instance cost. Allowable arguments are hour, day, week, month or year.
# Additional Information:
Author: Colin Johnson / colin@cloudavail.com
Date: 2012-12-09
Version 0.5
License Type: GNU GENERAL PUBLIC LICENSE, Version 3
- Author: Colin Johnson / colin@cloudavail.com
- Date: 2012-12-09
- Version 0.5
- License Type: GNU GENERAL PUBLIC LICENSE, Version 3