Skip to content

Instantly share code, notes, and snippets.

@YoshihitoAso
Last active December 14, 2015 13:48
Show Gist options
  • Save YoshihitoAso/5095982 to your computer and use it in GitHub Desktop.
Save YoshihitoAso/5095982 to your computer and use it in GitHub Desktop.
【AWS】【ELB】ELBフェイルオーバーのチュートリアル
>> elbfailover-prod
$ sudo yum -y install httpd
$ echo "<html><head><title>OK</title><body><p>hello</p></body>" | sudo tee /var/www/html/index.html
$ sudo chkconfig httpd on
$ sudo service httpd start
>> ELB start & setup
hogehoge
>> elbfailover-sorry
$ sudo yum -y install httpd
$ echo "<html><head><title>NG</title><body><p>sorry</p></body>" | sudo tee /var/www/html/index.html
$ sudo chkconfig httpd on
$ sudo service httpd start
>> install aws-cli (python)
--reference
http://dev.classmethod.jp/cloud/aws-command-line-tool-python/
>> install jq
$ sudo yum -y install git gcc make flex bison rake
$ git clone https://github.com/stedolan/jq.git
$ cd jq
$ make
$ sudo make install
>> ELB failover script
https://gist.github.com/YoshihitoAso/5095996
>> failover
$ chmod +x ~/elbfailover.sh
$ ~/elbfailover.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment