This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check if termination is allowed: | |
for i in `ec2-describe-instances | grep ^INSTANCE | cut -f2`; do ec2dinatt --disable-api-termination $i ; done | |
Protect: | |
for i in `ec2-describe-instances | grep ^INSTANCE | cut -f2`; do ec2minatt --disable-api-termination true $i ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -hx --max-depth=1 /var | |
lsof -n |grep deleted --kill -HUP <pid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/littlechef.py | |
+++ b/littlechef.py | |
@@ -49,6 +49,7 @@ def new_deployment(): | |
print >>authfh, "[userinfo]" | |
print >>authfh, "user = " | |
print >>authfh, "password = " | |
+ print >>authfh, "keypair-file = " | |
print "auth.cfg file created..." | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 0 * * * /vol/conf/snapshot.sh >> /mnt/backup_ebs.log 2>&1 | |
0 2 * * * /vol/conf/manage_snaphost.sh >> /mnt/backup_ebs.log 2>&1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
EBS_DEVICE='/dev/sdh' | |
INSTANCE_ID=$1 | |
AKI=${2:-'aki-5f15f636'} | |
ARI=${3:-'ari-0915f660'} | |
ARCH=${4:-'i386'} | |
SIZE=${5:-10} | |
AZ=${6:-'us-east-1d'} | |
NAME=${7:-"ami-from-$INSTANCE_ID"} |
NewerOlder