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
user --name=cloudpack --uid=500 --groups=cloudpack,wheel --password=cloudpack |
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
for vpc_rb in $(ls -1 vpc-*.rb);do for sg in `grep security_group ${vpc_rb}| gsed -e 's/[[:space:]]security_group[[:space:]]"\(.*\)" do/\1/g'`;do gsed -n -e '/^ec2[[:space:]]"\(.*\)"[[:space:]]do/p;/^end/p;/^\(. \)security_group[[:space:]]"'${sg}'"/,/^\(. \)end/p;' ${vpc_rb} > ${sg}.rb ;done;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
$ export HOSTNAME=test.local |
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
aws ec2 describe-images --owner amazon --region ap-northeast-1 --filter "Name=name,Values=amzn-ami-hvm-*-gp2" "Name=virtualization-type,Values=hvm" --query 'sort_by(Images[].{YMD:CreationDate,Name:Name,ImageId:ImageId},&YMD)|reverse(@)|[0]' |
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
rpm -ivh ec2-utils-0.4-1.22.amzn1.src.rpm |
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
sudo yum -y install rpm-build texinfo bison ncurses-devel autoconf gettext gcc make |
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
--start-time (timestamp) | |
The time stamp to use for determining the first datapoint to return. | |
The value specified is inclusive; results include datapoints with | |
the time stamp specified. | |
--end-time (timestamp) | |
The time stamp to use for determining the last datapoint to return. | |
The value specified is exclusive; results will include datapoints up | |
to the time stamp specified. |
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/sh | |
INSTANCE_TYPE=$(curl -s http://169.254.169.254/2014-11-05/meta-data/instance-type) | |
yum install fio -y | |
umount /media/ephemeral0 | |
time dd if=/dev/zero of=/dev/xvdb bs=1M | |
sudo mkfs.ext4 /dev/xvdb | |
mount /media/ephemeral0 | |
for i in `seq 0 3`;do | |
time fio -name=random-write \ | |
--output=/home/ec2-user/${INSTANCE_TYPE}-${i}.txt \ |
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
top - 19:29:57 up 9:08, 1 user, load average: 0.92, 0.70, 0.69 | |
Tasks: 427 total, 3 running, 424 sleeping, 0 stopped, 0 zombie | |
Cpu0 : 54.6%us, 5.7%sy, 0.0%ni, 25.7%id, 0.0%wa, 10.8%hi, 3.2%si, 0.0%st | |
Cpu1 : 21.4%us, 2.4%sy, 0.0%ni, 76.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st | |
Cpu2 : 18.9%us, 1.7%sy, 0.0%ni, 79.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st | |
Cpu3 : 16.8%us, 1.3%sy, 0.0%ni, 81.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st | |
Cpu4 : 48.5%us, 5.1%sy, 0.0%ni, 46.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st | |
Cpu5 : 3.0%us, 0.7%sy, 0.0%ni, 96.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st | |
Cpu6 : 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st | |
Cpu7 : 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st |
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
for a in `brew cask list`;do brew cask install ${a};done |
NewerOlder