AWS CloudFormationã使ã£ã¦isucon2ã13åã§æ§ç¯ã§ããããã«ãã¦ã¿ã
æ¬å®¶ã§自家製 #isucon2 のつくりかたãå ¬éããã¦ãã¾ãããæ£ç´é¢åãããã§ããããããã§isucon2ãããã«è©¦ããAmazon CloudFormationãã³ãã¬ã¼ããä½æãã¾ãããããã使ãã°isucon2ç°å¢ãç´13åã§æ§ç¯ã§ãã¾ãã
https://github.com/matsuu/isucon2-cloudformation
ä½ãæ¹
- CloudFormationã®ãã³ãã¬ã¼ããgithubãããã¦ã³ãã¼ããã¾ãã
- 2012/11/6ç¾å¨ãã³ãã¬ã¼ãã¯3種é¡ç¨æãã¦ã¾ãã好ããªãã¿ã¼ã³ãã©ãã
- AWS Management Consoleã«ãã°ã¤ã³ãã¦EC2ãé¸æãã¾ã
- å³ä¸ã®Worldããisucon2ç°å¢ãä½æãããªã¼ã¸ã§ã³ãé¸æãã¾ã
- å·¦ã¡ãã¥ã¼ããKey Pairãé¸æããå
¬ééµãä½æãã¾ã
- ãã§ã«ä½ææ¸ã®æ¹ã¯æ°ãã«ä½æããå¿ è¦ã¯ããã¾ãã
- ä½æããå ¬ééµã®Key Pair Nameãæ§ãã¦ããã¾ãï¼å¾ã»ã©ä½¿ãã¾ãï¼
- ä¸ã¡ãã¥ã¼ã®ServicesããAmazon CloudFormationãé¸æãã¾ã
- Create New Stackãé¸æãã¾ã
- Stack Nameã«é©å½ãªååãå
¥åããUpload a Template Fileãé¸æãå
ç¨ãã¦ã³ãã¼ãããCloudFormationãã³ãã¬ã¼ããé¸æãContinueãé¸æãã¾ã
- Show Advanced Optionsã§Notificationãè¨å®ãã¦ããã°ä½æå®äºãã¡ã¼ã«éç¥ã§ããã®ã§ä¾¿å©ã§ã
- KeyNameã«å
ã»ã©æ§ããå
¬ééµã®Key Pair Nameãå
¥åãã¦Continueãé¸æãã¾ã
- InstanceTypeã¯m1.small以å¤ãè¨å®ã§ãã¾ã
- ãã«ã¸ã§ã¢ãªæ¹ã¯cc2.8xlargeã¨ãè¨å®ããã¨ããããããªãã§ãããã
- REVIEWã§è¨å®å 容ã確èªãContinueãæ¼ãã¦ãã°ããå¾ ã¦ã°ã§ãããã
åºæ¥ä¸ãã£ããµã¼ã群ã®ãã°ã¤ã³æ
å ±ãªã©ã¯Outputsã¿ãã«è¡¨ç¤ºããã¾ãã
ãªããä½æãããã¤ã³ã¹ã¿ã³ã¹ã¯Delete Stackãé¸æããã°ã¾ãã£ã¨å
¨é¨åé¤ã§ãã¾ãã®ã§ãå®å¿ãã ããã
注æç¹ã¨ã
- ä½æããEC2ã¤ã³ã¹ã¿ã³ã¹å°æ°åã®å¾é課éãé©ç¨ããã¾ãããã«ã¸ã§ã¢ã¤ã³ã¹ã¿ã³ã¹ãé¸ãã§ã¯ã©ã¦ãç ´ç£ãã¦ãå½æ¹ã¯è²¬ä»»ãè² ãã¾ããã
- tagomorisããã®isucon2ãªãã¸ããªã«ä¾åãã¦ã¾ããæ§ç¯ã«å¤±æããå ´åã¯é£çµ¡ãã¦ãã ãããä¿®æ£ãã¾ãã
- ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¯ã¾ã Perlç°å¢ããä½ãããã§ã¾ããã
- m1.smallã§æ§ç¯ããã¨ãã³ããã¼ã¯ãå®èµ°ããã¨ã©ã¼ã«ãªãã¾ããä»æ§ã§ããããã°ã£ã¦ããã©ã¼ãã³ã¹ãã¥ã¼ãã³ã°ãã¦ãã ããã
AWS CloudFormationãåãã¦ä½¿ã£ã¦ã¿ãææ³
ããããAWSçKickstartã§ãããELBãRoute53ãªã©ãå«ããã¹ã¦ã1ã¤ã®ãã³ãã¬ã¼ãã§ä½æã§ããã®ã§è¯ãã§ããããããä»åã®ãããªç¨éã«ãæé©ã§ãã
ãã³ãã¬ã¼ãã®è¦éããããã®ã§ããã¯ãã¢ãä»è¾¼ã¾ãã¦ããå¿é
ãããªãã¦ããã®ãé
åçãä»äººãä½ã£ãAMIãªãã¦ä¿¡ç¨ã§ãã¾ãããããã
Update Stackã§ãã¨ããæè»ã«æ§æå¤æ´ãã§ããããã§ãããããã
ã¨ã¦ãããã§ãã¦ãã®ã§ãä»ã®ã¯ã©ã¦ããµã¼ãã¹ãAWS CloudFormationäºæã®ãã³ãã¬ã¼ãã·ã¹ãã ãå®è£
ãã¦ããããå¬ããã¨æãã¾ããã
ä»å¾ã®æ¹åäºå®
- ã¨ã©ã¼å¦çãçãã®ã§ã¡ããã¨ãã
- VPCã«å¯¾å¿ããã
- ãªãã¡ã¯ã¿ãªã³ã°
- ãã³ããã¼ã¯ãã¼ã«ã®ç®¡çç»é¢ããªãã¨ããã
種é¡å¥ã«InstanceTypeãå¤æ´ã§ããããã«ããRDSã«å¯¾å¿ããã