Skip to content

Instantly share code, notes, and snippets.

<?php
/*
~色々定義~
*/
$idElement = $webdriver->findElementBy(LocatorStrategy::id, "id");
$idElement->sendKeys(array($id) );
$passwordElement = $webdriver->findElementBy(LocatorStrategy::id, "passwd");
$passwordElement->sendKeys(array($passwd) );
$idElement->submit();
sleep(2);
$ wget http://ec2-downloads.s3.amazonaws.com/CloudWatch-2010-08-01.zip
$ wget http://ec2-downloads.s3.amazonaws.com/AutoScaling-2011-01-01.zip
$ unzip CloudWatch-2010-08-01.zip
$ unzip AutoScaling-2011-01-01.zip
$ mv AutoScaling-1.0.61.3 AutoScaling
$ mv CloudWatch-1.0.13.4 CloudWatch
$ cd AutoScaling
$ mv credential-file-path.template credential-file-path
$ vi credential-file-path
# AutoScaling/credential-file-path
AWSAccessKeyId=[Access Key ID]
AWSSecretKey=[Secret Access Key]
$ cd ../CloudWatch
$ mv credential-file-path.template credential-file-path
# Auto Scaling Command Line Tool Path
$ export AWS_AUTO_SCALING_HOME=$HOME/AutoScaling
$ export AWS_CREDENTIAL_FILE=$HOME/AutoScaling/credential-file-path
# CloudWatch Command Line Tool Path
$ export AWS_CLOUDWATCH_HOME=$HOME/CloudWatch
# ec2 keys
$ export EC2_PRIVATE_KEY=$HOME/ec2-keys/pk-****.pem
$ export EC2_CERT=$HOME/ec2-keys/cert-****.pem
$ as-create-launch-config TEST_SCALE_INSTANCE --image-id ami-******* --key hogehoge --group default --instance-type t1.micro --region ap-northeast-1
$ as-describe-launch-configs
as-delete-launch-config TEST_SCALE_INSTANCE
$ as-create-auto-scaling-group TEST_SCALE_INSTANCE_GROUP --launch-configuration TEST_SCALE_INSTANCE --min-size 0 --max-size 20 --load-balancers TestScale --availability-zones ap-northeast-1a
$ as-describe-auto-scaling-groups
$ as-update-auto-scaling-group TEST_SCALE_INSTANCE_GROUP --launch-configuration ...