View Code? Open in Web Editor
NEW
โ ๏ธ [Moved to r21.io] ๐ฅ A set of scripts designed to ease the pain of working with AWS (EC2 and S3). Based on Sean Bannister original.
Home Page: https://git.r21.io/stationgroup/aws-helper-scripts
License: MIT License
aws-helper-scripts's People
Contributors
Stargazers
Watchers
aws-helper-scripts's Issues
The original script had volume tagging.
|
# Tag this EBS volume |
|
echo "Adding tags to the EBS volume..." |
|
INSTANCE_NAME=$(ec2-describe-tags --filter "resource-id=$INSTANCE_ID" --filter "key=Name" | cut -f5) |
|
ec2-create-tags $VOLUME_ID --tag "Server=$INSTANCE_NAME" --tag "Mount point=$MOUNT_POINT" |
|
echo |
|
#TODO: RFC 2616, section 4.2 (combine repeated headers' values) |
|
#TODO: Unfold long lines (not supported elsewhere) |
|
} |
|
|
|
function computeAwsAuthorizationHeader |
|
{ |
This issue was generated by todo based on a TODO
comment in f5e368d. It's been assigned to @reelsense because they committed the code.
The original version of this script had an auto
option that would find an unused device name automatically, vs. needing to specify the device path.
Here is the original code: # If the user specified auto we locate the next avaliable device location
|
# If the user specified auto we locate the next avaliable device location |
|
if [ $DEVICE = "auto" ]; then |
|
if ls /dev/xvdk* >/dev/null 2>&1; then |
|
LAST_DEVICE_NUMBER=$(ls -1 /dev/xvdk* | sed 's/[a-z\/]//g' | sort -n | tail -1) |
|
DEVICE_NUMBER=$(expr $LAST_DEVICE_NUMBER + 1) |
|
else |
|
DEVICE_NUMBER="1" |
|
fi |
|
fi |
Should there be a PATH
variable to ensure that /usr/bin/aws
gets executed vs. a potential conflict with a users custom binary in /usr/local/bin/aws
.
|
#TODO: Add the ability to automate Volume Snapshots |
|
# # Add cron entry to perform EBS Snapshots of this Volume |
|
# echo "Adding cron entry for ec2-consistent-snapshot to '/etc/cron.d/snapshot-ebs'..." |
|
# echo "42 * * * * root bash -c '((i-snapshot-volume $MOUNT_POINT mysql true \"automated backup\" 2>&1 1>&3 | tee >(logger -p cron.err -t \"i-snapshot-volume $MOUNT_POINT\")) 3>&1 1>&2) > >(logger -p cron.info -t \"i-snapshot-volume $MOUNT_POINT\") 2>&1'" >> /etc/cron.d/snapshot-ebs |
|
# echo |
|
|
This issue was generated by todo based on a TODO
comment in 4d106f5. It's been assigned to @reelsense because they committed the code.