ECS
ecs agentã¨ã¯ ECSã®å ´åãecs agentãã³ã³ããã®ã¹ã±ã¸ã¥ã¼ãªã³ã°ãããããã®ä»äºããã¦ããã¦ãã¾ãããªã®ã§ãããã¤ãæ¥ç¶ç¶æ ã«ãªã£ã¦ãªãã¨ç®¡çå¤ã«ãªã£ã¦æ»äº¡ã¨ãããã¨ã«ãªãã¾ãã github.com ãªã®ã§ãããã¯çµæ§è¦ã¦ãããªãã¨ãããªããã ãã©ãâ¦
AWS re:Inventã§ã®workshopã¨ã¯ï¼ 2æéããã使ã£ã¦å®éã«AWSä¸ã§ãªãããã®å¦çããããã¤ã§ãã ä»åãã¼ãããã£ãã®ã¯ãHigh-Throughput Genomics on AWSã¨ããã ã²ãã 解æãAWSä¸ã§ããã¨ãããã¤ã§ããããªããECSã£ã¦æ¸ãã¦ãã£ããããã³ãã³ã¨åâ¦
wordpressãåããã«ã¯ä½ãå¿ è¦ã ã¾ãwordpressãåããããã«ä½ãå¿ è¦ããæ´çããã¨ãwordpressã¯MySQLã¨phpãåãç°å¢ãå¿ è¦ã§ãã ãªã®ã§æ¬å½ã«å¿ è¦ãªãã®ã¯DBãµã¼ãã¼ã¨Webãµã¼ãã¼ã ããªãã ãã©ãå®éã®æ¬çªéç¨ãã¦ãã¨ãããç»åã®ãã£ãã·ã¥ã¨ãDâ¦
terraformã§ECSã®clusterã¨serviceãä½æããã«ããã£ã¦å®éã®éç¨ãéãã¦å°ãå¤ãã£ã¦ããã®ã§ã¾ã¨ãã¦ããã æåã®terraformã®moduleæ§æã§èµ·ããåé¡ç¹ 以åã¯ãaws_ecs_clusterã¨aws_autoscaling_groupãåä¸moduleã«ããã¦ããã åé¡ãã®1: ã¤ã³ã¹ã¿â¦
ä¼ç¤¾ã§æçºè¡¨ãããã¤ãæ±ç¨çãªæãã«ãã¦æ®ãã¦ããã¾ãã EC2ã®ãå¤æ®µãæ§è½ãã®ã¾ã¾ã«8å²ãå®ããªãã¾ããã¨ãã話 Spot Fleetåã®AWSã®ECSã§ã¯ã©ã¹ã¿ã¼æ§æã«ã¤ã㦠ã¯ã©ã¹ã¿ã¼ã®EC2ã¤ã³ã¹ã¿ã³ã¹ã¯ãªã³ããã³ãï¼å®ä¾¡ï¼ã®autoscaling Dockeråã§ã¹ã±ã¼â¦
â» è¿½è¨ çµæ§ã¡ããã¡ãããã¯ããã¦ããã£ã¦ããã®ã§æå¤ã¨éè¦ããã®ããªã ãããè¨äºè¦ã¦åãããªãã¨ãããã£ãã Twitterãªãæ°è»½ã«è³ªåãã¦ããã£ã¦å¤§ä¸å¤«ã§ãï¼ï¼ 社å ã§ã¤ã³ãã©ã¨ã³ã¸ãã¢å¢ãããããªã¨æã£ã¦ECSã®æ¦å¿µãç解ãã¦ããããã¨æã£ã¦â¦
awslogs-stream-prefixãã¤ããªãå ´å log streamåã "${docker psã®CONTAINER ID}${randomãªæåå}" ã¨ãªãã ããã ã¨ãä¾ãã°ãããã³ã³ããã®ãã°ã ãè¦ããã£ã¦ããå ´åã«ãsshãã°ã¤ã³ãã¦ãdocker psããªãã¨ãããªã awslogs-stream-prefixãã¤ãâ¦