AWSã§ã¤ã³ã¹ã¿ã³ã¹ãçæãã¦ããã¼ã«ã«ãããã°ã¤ã³ã§ããããã«ãã¦ã¿ã
ä»äºã§å¿
è¦ã«ãªã£ãã®ã§ã¯ããã¼ãç§é170ä¸æç¼ããªãããã£ã¦ã¿ã
ã¤ã³ã¹ã¿ã³ã¹çæ
- https://console.aws.amazon.com/ec2/v2/home ã«ã¢ã¯ã»ã¹ããã°ã¤ã³ãã
- ããã©ã«ãã§ã¯ãã¢ã¡ãªã«ã«ã¤ã³ã¹ã¿ã³ã¹ãçæãããã®ã§ãå¤æ´ããããã°ãå³ä¸ã®ãOregonããã¯ãªãã¯ãã¦ã好ããªã¨ãªã¢ãé¸æ
- å·¦ã®ã¡ãã¥ã¼ãããinstancesããé¸æ
- ã¤ã³ã¹ã¿ã³ã¹ç®¡çç»é¢ã«é·ç§»ããã®ã§ããLaunch Instanceããã¿ã³ãã¯ãªãã¯
- ã¤ã³ã¹ã¿ã³ã¹çæç»é¢ã«é·ç§»ããã®ã§ãClassic Wizardããé¸æ
- ãAmazon Linux AMIããé¸æ
INSTANCE DETAILS
- ã¤ã³ã¹ã¿ã³ã¹æ°ã¯ 1
- Instance Type ã¯ä»ã®ã¨ããããã©ã«ãã«ãAvailability Zone ã¯ä»åã¯1å°ã ãç¹ã«è¨å®ãã
- æ´ã«è²ã èããããã©ãä»ã®ã¨ããã¯ããã©ã«ãã®ã¾ã¾ã§é²ã
CREATE KEY PAIR
- ãã¼ãã¢åãè¨å®ãã
- ãCreate & Download your Key Pairããã¯ãªãã¯ãã¦ãç§å¯éµããã¦ã³ãã¼ããã(ã.pem)
CONFIGURE FIREWALL
- ä»ã®ã¨ããã¯ãsshã§ã¢ã¯ã»ã¹ãããã ããªã®ã§ããã©ã«ãã®ã¾ã¾
ã¤ã³ã¹ã¿ã³ã¹èµ·å
- ãLaunchããã¯ãªãã¯ãã¦ã¤ã³ã¹ã¿ã³ã¹èµ·å!!
- ã¤ã³ã¹ã¿ã³ã¹ç®¡çç»é¢ã«é·ç§»ãã¦ãä¸è¦§ã«ä»åçæããã¤ã³ã¹ã¿ã³ã¹ã表示ããã
- æ«ãå¾ ã¤ã¨ãState ã running ã«ãªãã®ã§ããã¾ã§å¾ æ©
IPã¢ãã¬ã¹ã®æãåºãã¨ç´ä»ã
ãã®ã¾ã¾ã ã¨ãå¤é¨ããã¢ã¯ã»ã¹ããçºã®IPã¢ãã¬ã¹ãç¡ãã®ã§ãElastic IP ã«ã¦ãIPã¢ãã¬ã¹ãæãã ãã¦ãã¤ã³ã¹ã¿ã³ã¹ã«ç´ä»ãããå¿
è¦ããã
- å·¦ã®ã¡ãã¥ã¼ãããElastic IPsããé¸æ
- ãAllocate New Addressããé¸æ
- ä¸è¦§ã«çæãããIPã¢ãã¬ã¹ã表示ããã
- IPã¢ãã¬ã¹ãé¸æãã¦ããAssociatae Addressããé¸æ
- é¢é£ä»ããã¤ã³ã¹ã¿ã³ã¹ã®é¸æç»é¢ã«ãªãã®ã§ããã£ãçæããã¤ã³ã¹ã¿ã³ã¹ãé¸æ
ãã¼ã«ã«ç°å¢ããã¢ã¯ã»ã¹ãã¦ã¿ã
# **** ã¯ããã¦ã³ãã¼ãããç§å¯éµã®åå $ cp ~/Downloads/*****.pem ./.ssh/. $ chmod 600 ~/.ssh/test1234.pem # Amazon Linux AMI ã§ã¯ãec2-user ãªãã¢ã«ã¦ã³ããç¨æããã¦ãã $ ssh -i ~/.ssh/test1234.pem ec2-user@***.***.***.*** __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2013.03-release-notes/ There are 10 security update(s) out of 21 total update(s) available Run "sudo yum update" to apply all updates. $ ruby -v ruby 1.8.7 (2012-10-12 patchlevel 371) [x86_64-linux] # ç¹ã«ãã¹ã¯ã¼ããèãããã«sudoã§ãã(ããã) $ sudo ls
ã¾ãã¯ããã¾ã§
çµäºæé
ã¤ã³ã¹ã¿ã³ã¹ã®çµäº
- å·¦ã®ã¡ãã¥ã¼ãããinstancesããé¸æ
- ã¤ã³ã¹ã¿ã³ã¹ç®¡çç»é¢ã«é·ç§»ããã®ã§ãèµ·åä¸ã®ã¤ã³ã¹ã¿ã³ã¹ãé¸æ
- ãActionsããããstopãããterminateããé¸æ
- stop ãªãã°ã¤ã³ã¹ã¿ã³ã¹ã®åæ¢
- terminateã¯ã¤ã³ã¹ã¿ã³ã¹ã®åé¤
- ã¡ãªã¿ã«ã1åèµ·åããã¨ã1H以å
ã§ã1Håã®æéãçºçããã¨ã®ãã¨
http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/starting-stopping-instances.html
IPã¢ãã¬ã¹ã®é¢é£å¤ãã¨ç ´æ£
- å·¦ã®ã¡ãã¥ã¼ãããElastic IPsããé¸æ
- ä¸è¦§ããç ´æ£ãããIPã¢ãã¬ã¹ãé¸æ
- ãDisassociatae Addressããã¯ãªãã¯
- ãRelease Addressãã§IPã¢ãã¬ã¹ãç ´æ£
- Disassociataeããã¾ã¾ã§æ¾ç½®ããã¨æéãçºçããã®ã§æ³¨æ
http://aws.amazon.com/jp/ec2/pricing/#elastic-ip
- Disassociataeããã¾ã¾ã§æ¾ç½®ããã¨æéãçºçããã®ã§æ³¨æ
$0.00 : å®è¡ä¸ã®ã¤ã³ã¹ã¿ã³ã¹ã¨é¢é£ä»ãããã¦ãã Elastic IP ã¢ãã¬ã¹
$0.005 : å®è¡ä¸ã®ã¤ã³ã¹ã¿ã³ã¹ã¨é¢é£ä»ãããã¦ããªã Elastic IP ã¢ãã¬ã¹/æéãããï¼æ¯ä¾è¨ç®ï¼
宿é¡
- Amazon Linux AMI ã®å©ç¹ãcentOS ã¨ãã¨ã®éãã調æ»
- sudo ã§ããªã dev ã¢ã«ã¦ã³ããä½ã
- ã»ãã¥ãªãã£ã¢ãããã¼ããã¦ã¿ã
- ruby1.9 ãå ¥ãã¦ã¿ã
- ã³ã³ã½ã¼ã«ããã¤ã³ã¹ã¿ã³ã¹ãçæãã¦ã¿ã
- cloud watcher ã§ç£è¦ãã¦ã¿ã
ãããªæãã§