Cloud Native Days Tokyo 2022 Session: https://event.cloudnativedays.jp/cndt2022/talks/1518
ããã«ã¡ã¯ãä»å¹´ããã¢ããªãã£ã¯ã¹ã¨ã³ã¸ãã¢ãåä¹ããã¨ãã¦ãæ± ç°ã§ãã ãã¡ãã¯ãKAYAC Advent Calendar 2021 1æ¥ç®ã®è¨äºã§ãã ãã®è¨äºã§ã¯ãsetddblockã¨ããåæ£ããã¯ãå®ç¾ããããã®ãã¼ã«ã¨ããã®åä½è©¦é¨ã®ããã«ç¾ä»£çã¢ã¯ã»ã¹ã«ã¦ã³ã¿ã¼ãä½æãã話ããã¾ãã setddblock çæ§ãcronãªã©ã§å®æå®è¡ã®ã¹ã¯ãªãããå®è¡ããå ´åãåæå®è¡ããã¦ã¯å°ããã®ã¯ã©ããã¦ããã§ããããï¼ daemontoolsã®setlock ã¨ãããã¼ã«ã使ã£ã¦åæå®è¡ãé²ãã§ãããã¨ãããæ¹ãå¤ãã¨æãã¾ãã http://cr.yp.to/daemontools/setlock.html ãã®setlock ã¯ãã¼ã«ã«ã®ãã¡ã¤ã«ã·ã¹ãã ä¸ã«ããã¯ãã¡ã¤ã«ãä½æããããã¯ãã¡ã¤ã«ã®ä½æãæåãããæå®ãããã³ãã³ããå®è¡ããã¨ãããã¼ã«ã§ãã ä¾ãã°1åãã¨ã«èµ·
ããã«ã¡ã¯ãã¤ã³ãã©ã¨ã³ã¸ãã¢ã®æ°¸äº(shnagai)ã§ãã ã³ãããã§ã¯ãéçºç°å¢ã«ç¶ããç¶ã ã¨æ¬çªãµã¼ãã¹ã«ãDockerãå°å ¥ãã¦ãã¾ãã ä»åã¯ãä¸ã éç¨ã大å¤ãªcronã§ã¹ã±ã¸ã¥ã¼ã«ç®¡çãããããªå®æçãªãããå¦çããAmazon ECSã®ScheduledTaskã使ã£ã¦Dockeré§åãªç°å¢ã§æ§ç¯ãã話ã§ãã ä»ã®æ¹æ³ã¨ã®æ¯è¼ãã©ã®ããã«å®ç¾ãã¦ããã®ãã«ã¤ãã¦ç´¹ä»ãããã¨æãã¾ãã ä»å対象ã¨ãããããã®ç¨®é¡ ä»å対象ã¨ãããããå¦çã¯ãä¿ã«è¨ãã¹ã±ã¸ã¥ã¼ã«ç³»ã®ãããå¦çã§ãæ¯æ¥00æ00åã10åæ¯ã«ãµã¤ã¯ã«èµ·åçãäºåã«å®ç¾©ããæéã«æ£ç¢ºã«åããã¨ãæå¾ ããã¦ãããã®ã§ãããâ»ã¸ã§ããã¥ã¼å½¢å¼ã®ãããã ã¨ãAWS BatchãEBã®Workerãããã¯ãSQS + Cron on EC2ã§å¦çããã»ããã¹ãã¼ããã¨æãã¾ãã å®è¡æ¹å¼ã®é¸å® ä¸è¨è¦ä»¶ã®ããããå®ç¾ããåº
Googleãç¶ç¶çããªããªã«å¯¾å¿ãããããã¤èªååãã¼ã«ãSpinnaker 1.0ããªãªã¼ã¹ãçºè¡¨ãGCE/GKEã ãã§ãªããAWSãAzureãOpenStackãªã©ãã«ãã¯ã©ã¦ãå¯¾å¿ Spinnakerã¯ãã¨ãã¨Netflixãéçºãã2015å¹´ã«ãªã¼ãã³ã½ã¼ã¹ã¨ãã¦æåã®ãã¼ã¸ã§ã³ãå ¬éãã¦ãã¾ãã åèï¼Netflixããã«ãã¯ã©ã¦ã対å¿ã®ç¶ç¶çããªããªãå®ç¾ãããSpinnakerãããªã¼ãã³ã½ã¼ã¹ã§å ¬é ãã®ã¨ããã§ã«Netflixã®éçºã«Googleã¯åå ãã¦ããããã®å¾ãSpinnakerã®éçºãé²ãããã¦ãã¾ããã Spinnakerã¯ãããã¤ã«æ±ããããã»ã¨ãã©ãã¹ã¦ã®æ©è½ãåãã¦ããã¨ã次ã®ããã«èª¬æããã¦ãã¾ãã In Spinnaker, deployments are orchestrated using custom release pipelines,
ãã¯ãããããã¾ããcronã¯ãã¯ã¼ãã³ãã¨èªãããªããã§ãã å®ã¯2æé ããTMIXéçºãã¼ã ãé¢ããã¤ã³ãã©ãã¼ã ã«æå±ãã¦ãã¾ããããã¦ãã¤ã³ãã©ãã¼ã ã¨ãã¦ã®åä»äºã¨ãã¦ãAWS CloudWatch Eventsãç¨ãããããå¦çå®è¡åºç¤ã®æ§ç¯ãè¡ãã¾ããã ãããå¦çåºç¤ã®è¦ä»¶ Webãµã¼ãã¹ãããç¨åº¦ã®è¦æ¨¡ã«æé·ããã¨ãä¸å®ã®æéã§å®æçã«å®è¡ãããããå¦çãå¿ è¦ã«ãªãã§ãããããã¡ããTMIXã§ããããå¦çã¯å¿ è¦ã§ãããã¯ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¼ã®ã²ã¨ã¤ã«cronjobã®å®è¡ãä»»ãããã¨ã§è¡ã£ã¦ãã¾ããã ããããTMIXãå°æ¥Dockerã§åãããã¨ãèããã¨ããã¤ç ´æ£ããããä¸æãªã³ã³ããã§cronãå®è¡ããã訳ã«ã¯ãããããã®æ¹æ³ã¯ããã使ããªããªãã¾ãããªã«ãããå¥ã®æ¹æ³ãèããå¿ è¦ãããã¾ãã ããã¦ã次ã®ãããªè¦ä»¶ãå®ç¾©ãã¾ããã å¦çèªä½ã¯ ECS Task
ã¯ã³ã©ã¤ãã¼ mysql -u ã¦ã¼ã¶ -pãã¹ã¯ã¼ã -h æ¥ç¶å -e "SQLæ" | sed -e 's/\t/\" \"/g' | sed -e 's/^/\"/g' | sed -e 's/$/\"/g' | sed -e "s/^/$(date '+%Y%m%d %H:%M:%S') /g" >> ãã¡ã¤ã« ãã¹ã¯ã¼ããçããã¹ãã§æ¸ããªã£ã¦äººã¯ã´ãã§ã´ãã§ãã¦ãã ããã 追è¨ï¼ã´ãã§ã´ãã§ããã¯ãªããæ¸ãã¾ããã MySQLã§å¹¸ãã«ãªããã¤ãã®ç¶ã-ãã¹ã¯ã¼ããé è½ããæ¹æ³ - ãªãããªLife åãããæ å ±ã«å¿ãã¦ã権éãç°ãªãã¾ããDBã®rootç¸å½ã®æ¨©éãããã¨ããã®ã§ãããå°ãªãã¨ããå ¨ã¹ãã¼ãã¸ã®SELECTãã¨ãPROCESSãã¯å¿ è¦ã«ãªãã¯ãã ä½ãããã¤ï¼ MySQLã«ãã°ã¤ã³ãã¦ã-eã®å¾ã«æå®ããSQLãå®è¡ãã¦ããã°ã¢ã¦ãããã SQLã®çµæããã¤ãã§
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}