AWS Notes

http://aws.amazon.com/elasticbeanstalk/
https://console.aws.amazon.com/elasticbeanstalk/
Elastic Beanstalk Developer Guide
Deploy a Sample Web Application in the Free Usage Tier (Elastic Beanstalk)

AWS Management Console

AMIs

AMI: ami-1dee3a74 (CentOS-5.7-Update)
Root Device: EBS Type: t1.micro
Public IP: 50.19.200.65
Private IP: 10.208.203.194

AMI: ami-41d00528 (RHEL-6.2-Starter-EBS-x86_64-4-Hourly2)
Type: t1.micro
Root Device: EBS
Elastic IP: ? (was 50.17.225.245)
Public IP: ?
Private IP: 10.196.189.79
Domains: dev.eye.fi dev-staging.eye.fi

AMI: ami-03559b6a (centos-x64-6.0-core)
Root Device: EBS
Zone: us-east-1b
Type: t1.micro
Public DNS: ec2-50-17-225-245.compute-1.amazonaws.com
Elastic IP: 50.17.225.245
Private IP: 10.245.115.177
Domains: disneyland.eyefi www.disneyland.eyefi api.disneyland.eyefi

ssh -i ~/.ssh/aws-dev.pem root@disneyland.eyefi

ami-03559b6a (centos-x64-6.0-core)

$ yum install git gitweb subversion
$ yum install gcc gcc-devel
$ yum install make
$ yum install pcre-devel
$ yum install libcurl-devel
$ yum install zlib zlib-devel
$ yum install perl perl-devel mod_perl mod_perl-devel
$ yum install httpd mod_ssl
$ chkconfig httpd on
$ chkconfig --list httpd
	httpd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off
$ yum install php-common php-gd php-pear php-pecl-memcache php-mysql php-xml
php-bcmath
php-common
	config(php-common)
	php(zend-abi)
	php-api
	php-bz2
	php-calendar
	php-ctype
	php-curl
	php-date
	php-exif
	php-fileinfo
	php-ftp
	php-gettext
	php-gmp
	php-hash
	php-iconv
	php-json
	php-libxml
	php-openssl
	php-pcre
	php-reflection
	php-session
	php-shmop
	php-simplexml
	php-sockets
	php-spl
	php-tokenizer
	php-zend-abi
	php-zip
	php-zlib
php-dba
php-devel *
php-gd *
php-intl
php-mbstring *
php-mysql *
php-odbc *
php-pdo *
php-pear
php-pecl-apc *
php-soap *
php-tidy *
php-xmlrpc *
$ yum install php-bcmath
$ pecl install pecl_http-stable
	...
	Build process completed successfully
	Installing '/usr/lib64/php/modules/http.so'
	Installing '/usr/include/php/ext/http/php_http_response_object.h'
	Installing '/usr/include/php/ext/http/php_http_std_defs.h'
	Installing '/usr/include/php/ext/http/php_http_encoding_api.h'
	Installing '/usr/include/php/ext/http/php_http_exception_object.h'
	Installing '/usr/include/php/ext/http/php_http_util_object.h'
	Installing '/usr/include/php/ext/http/php_http_api.h'
	Installing '/usr/include/php/ext/http/php_http_cookie_api.h'
	Installing '/usr/include/php/ext/http/php_http_requestdatashare_object.h'
	Installing '/usr/include/php/ext/http/php_http_request_method_api.h'
	Installing '/usr/include/php/ext/http/php_http_headers_api.h'
	Installing '/usr/include/php/ext/http/php_http_message_api.h'
	Installing '/usr/include/php/ext/http/php_http_requestpool_object.h'
	Installing '/usr/include/php/ext/http/php_http_date_api.h'
	Installing '/usr/include/php/ext/http/phpstr/phpstr.h'
	Installing '/usr/include/php/ext/http/php_http_request_body_api.h'
	Installing '/usr/include/php/ext/http/php_http_deflatestream_object.h'
	Installing '/usr/include/php/ext/http/php_http_request_api.h'
	Installing '/usr/include/php/ext/http/php_http_inflatestream_object.h'
	Installing '/usr/include/php/ext/http/php_http_request_datashare_api.h'
	Installing '/usr/include/php/ext/http/php_http_querystring_object.h'
	Installing '/usr/include/php/ext/http/php_http_url_api.h'
	Installing '/usr/include/php/ext/http/php_http.h'
	Installing '/usr/include/php/ext/http/php_http_querystring_api.h'
	Installing '/usr/include/php/ext/http/php_http_send_api.h'
	Installing '/usr/include/php/ext/http/php_http_persistent_handle_api.h'
	Installing '/usr/include/php/ext/http/php_http_info_api.h'
	Installing '/usr/include/php/ext/http/php_http_request_object.h'
	Installing '/usr/include/php/ext/http/php_http_message_object.h'
	Installing '/usr/include/php/ext/http/missing.h'
	Installing '/usr/include/php/ext/http/php_http_cache_api.h'
	install ok: channel://pecl.php.net/pecl_http-1.7.4
	configuration option "php_ini" is not set to php.ini location
	You should add "extension=http.so" to php.ini
$ pecl install oauth-stable
	...
	Build complete.
	Don't forget to run 'make test'.

	running: make INSTALL_ROOT="/var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2" install
	Installing shared extensions:     /var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2/usr/lib64/php/modules/
	running: find "/var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2" | xargs ls -dils
	133848   4 drwxr-xr-x 3 root root   4096 Jun 19 14:30 /var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2
	133871   4 drwxr-xr-x 3 root root   4096 Jun 19 14:30 /var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2/usr
	133872   4 drwxr-xr-x 3 root root   4096 Jun 19 14:30 /var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2/usr/lib64
	133873   4 drwxr-xr-x 3 root root   4096 Jun 19 14:30 /var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2/usr/lib64/php
	133874   4 drwxr-xr-x 2 root root   4096 Jun 19 14:30 /var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2/usr/lib64/php/modules
	133870 332 -rwxr-xr-x 1 root root 337326 Jun 19 14:30 /var/tmp/pear-build-rootxzUhW8/install-oauth-1.2.2/usr/lib64/php/modules/oauth.so

	Build process completed successfully
	Installing '/usr/lib64/php/modules/oauth.so'
	install ok: channel://pecl.php.net/oauth-1.2.2
	configuration option "php_ini" is not set to php.ini location
	You should add "extension=oauth.so" to php.ini
$ cd /usr/share
$ mkdir eyefi
$ cd eyefi
$ svn checkout https://runeimp@services.eye.fi/svn/server/branches/server2 server
$ git clone https://runeimp@services.eye.fi/git/dev.git dev
$ cd dev
$ git checkout dev.eye.fi
$ git branch --set-upstream dev.eye.fi origin/dev.eye.fi
$ git config -l
	user.name=RuneImp
	user.email=runeimp@eye.fi
	core.repositoryformatversion=0
	core.filemode=true
	core.bare=false
	core.logallrefupdates=true
	remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
	remote.origin.url=https://runeimp@services.eye.fi/git/dev.git
	branch.master.remote=origin
	branch.master.merge=refs/heads/master
	branch.dev.eye.fi.remote=origin
	branch.dev.eye.fi.merge=refs/heads/dev.eye.fi
# Not sure if the following is necessary - RuneImp
$ git branch --set-upstream dev.eye.fi origin/dev.eye.fi
$ yum install mysql-server mysql-connector-odbc mysql-devel apr-util-mysql php-mysql unixODBC
	Installed:
	  apr-util-mysql.x86_64 0:1.3.9-3.el6_0.1 mysql-connector-odbc.x86_64 0:5.1.5r1144-7.el6 mysql-devel.x86_64 0:5.1.61-1.el6_2.1 mysql-server.x86_64 0:5.1.61-1.el6_2.1 php-mysql.x86_64 0:5.3.3-3.el6_2.8
	  php-pdo.x86_64 0:5.3.3-3.el6_2.8        unixODBC.x86_64 0:2.2.14-11.el6               

	Dependency Installed:
	  keyutils-libs-devel.x86_64 0:1.4-3.el6  krb5-devel.x86_64 0:1.9-22.el6_2.1  libcom_err-devel.x86_64 0:1.41.12-11.el6  libselinux-devel.x86_64 0:2.0.94-5.2.el6  libsepol-devel.x86_64 0:2.0.41-4.el6 
	  libtool-ltdl.x86_64 0:2.2.6-15.5.el6    mysql.x86_64 0:5.1.61-1.el6_2.1     openssl-devel.x86_64 0:1.0.0-20.el6_2.5   perl-DBD-MySQL.x86_64 0:4.013-3.el6       perl-DBI.x86_64 0:1.609-4.el6        

	Dependency Updated:
	  keyutils-libs.x86_64 0:1.4-3.el6     krb5-libs.x86_64 0:1.9-22.el6_2.1        libcom_err.x86_64 0:1.41.12-11.el6     libselinux.x86_64 0:2.0.94-5.2.el6     libselinux-utils.x86_64 0:2.0.94-5.2.el6    
	  libsepol.x86_64 0:2.0.41-4.el6       mysql-libs.x86_64 0:5.1.61-1.el6_2.1     openssl.x86_64 0:1.0.0-20.el6_2.5
$ service mysqld start
$ /usr/bin/mysqladmin -u root password 'wanagi123'
$ /usr/bin/mysqladmin -u root -h ip-10-245-115-177 password 'wanagi123'
$ mysql -u root

	SHOW DATABASES;
	SHOW TABLES FROM mysql;
	CREATE USER 'dev'@'localhost' IDENTIFIED BY 'unagi123';
	GRANT ALL ON dev_eye_fi.* TO 'dev'@'localhost';
	GRANT USAGE ON *.* TO 'dev'@'localhost' WITH MAX_QUERIES_PER_HOUR 90;
	SELECT Host, User, Password FROM mysql.user;
	SELECT Host, Db, User, Create_priv AS CRUD_C, Select_priv AS CRUD_R, Update_priv AS CRUD_U, Delete_priv AS CRUD_D FROM mysql.db;
	QUIT;

$ find / -name mysql
	/var/lib/mysql – Where the DBs are
	/var/lib/mysql/mysql
	/usr/lib64/mysql – libmysqlclient.so, mysqlbug, mysql_config, plugins...
	/usr/lib64/perl5/auto/DBD/mysql
	/usr/lib64/perl5/DBD/mysql
	/usr/include/mysql – Header files
	/usr/bin/mysql
	/usr/share/mysql – ini, cnf and sql files
	/usr/share/eyefi/dev/conf/mysql
	/usr/share/eyefi/dev/backup/mysql
# Fix auto-start on boot
$ /sbin/chkconfig --level 2345 mysqld on
$ /sbin/chkconfig --list mysqld
	mysqld         	0:off	1:off	2:on	3:on	4:on	5:on	6:off
$

Apps & Tools

CLI

BitNami Cloud Tools for AWS
Tim Kay aws

Elastic Beanstalk

AWS Elastic Beanstalk Command Line Tool

EC2 (Elasitc Cloud Computing)

Amazon EC2 API Tools
Amazon EC2 VM Import Connector for VMware vCenter

CloudFormation

Bootstrapping Applications using AWS CloudFormation
CloudFormer template creation tool (AWS Console Tab)
AWS CloudFormation Command Line Tools
Amazon CloudFront Authentication Tool for Curl

S3 (Simple Storage Service)

Amazon S3 Authentication Tool for Curl (Perl)
Command-Line Tool for Amazon S3
Firefox Organizer for Amazon S3 and Amazon CloudFront
libs3: A C Library API for Amazon S3

ElastiCache

Amazon ElastiCache Command Line Toolkit

RDS (Relational Database Service)

Amazon RDS Command Line Toolkit

Route 53

Amazon Route 53 Zone Creation Tool (Perl)
Amazon Route 53 to BIND Conversion Tool
BIND to Amazon Route 53 Conversion Tool (Perl)

SES (Simple Email Service)

Amazon Simple Email Service Scripts (Perl)

SNS (Simple Notification Service)

Amazon Simple Notification Service Command Line Interface Tool