ããã«ã¡ã¯ãæè¡é¨SRã°ã«ã¼ãã®è åã§ãã
æè¿ãNinja650ããNinja1000ã«ä¹ãæãã¾ããããã¯ã¼ãããããã§ï¼éçºé²ã»ï¼éçºé²ãå¹³æ°ã§ã§ãã¦ãã¾ããã·ããã¯ã¼ã¯ãã©ãã©ãä¸æã«ãªã£ã¦ãã¾ããç²¾é²ããããã®ã§ãã
ãã®è¨äºã§ã¯ãAmazon RDS/Auroraãã¯ãã¼ã³ããã·ã¹ãã ãä½ã£ã話ãæ¸ãã¾ãã
Amazon RDS/Auroraãã¯ãã¼ã³ããã·ã¹ãã
ãµã¼ãã¹éçºãè¡ã£ã¦ããã¨ã調æ»ãæ¤è¨¼ã§ãããã¯ã·ã§ã³ç°å¢ã§ä½¿ããã¦ãããã¼ã¿ãã¼ã¹ãå¿ è¦ã«ãªããã¨ãããã¾ããéçºç°å¢ãã¹ãã¼ã¸ã³ã°ç°å¢ã«ããã¼ã¿ãã¼ã¹ã¯åå¨ããã®ã§ããããããã¯ã·ã§ã³ç°å¢ã®ãã¼ã¿ã§ããåç¾ããªããã°ã®èª¿æ»ãããããã¯ã·ã§ã³ç°å¢ã®ãã¼ã¿éã§ã®ã¹ãã¼ãå¤æ´ã®è² è·ã®æ¤è¨¼ãªã©ãéçºç°å¢ãã¹ãã¼ã¸ã³ã°ç°å¢ã®ãã¼ã¿ãã¼ã¹ã§ã¯ã§ããªãä½æ¥ãå¤ãã§ãããããããªãã¬ã¼ã·ã§ã³ãã¹ãå人æ å ±ã¸ã®ã¢ã¯ã»ã¹ãèããã¨ããããã¯ã·ã§ã³ç°å¢ã®ãã¼ã¿ãã¼ã¹ã§ç´æ¥ä½æ¥ããããã¨ã¯å¤§ããªãªã¹ã¯ãä¼´ãã¾ãã
Amazon Auroraã®ã¯ãã¼ã³ä½ææ©è½ã使ãã¨ããããã¯ã·ã§ã³ç°å¢ã«å½±é¿ãåã¼ããªãã¯ãã¼ã³ãä½æã§ããã®ã§ãããå人æ å ±ã«ã¢ã¯ã»ã¹ã§ãã¦ãã¾ãç¹ã¯è§£æ±ºã§ãã¾ãããã¾ããã¯ãã¼ã³ã®ä½æãåé¤ã«ã¯å¼·åãªIAMã®æ¨©éãå¿ è¦ãªããã管çè ãã¯ãã¼ã³ãä½æãã¦å©ç¨è ã«æ¸¡ããããªæéãçºçãã¦ãã¾ããã
ããã§ããããã®åé¡ã解決ããéçºè ãæ軽ã«ãããã¯ã·ã§ã³ç°å¢ã®ãã¼ã¿ãã¼ã¹ã触ããããã«ãAmazon RDS/Auroraãã¯ãã¼ã³ããã·ã¹ãã ãä½æãã¾ããã
ã¯ãã¼ã³ä½æã®æé ã¯ä»¥ä¸ã®éãã§ãã
- Slackã§Rubotyã«å¯¾ãã¦
@ruboty rds clone db-cluster:my-cluster db.t3.small 4h
ã¨ããã³ãã³ããéã- æ®æ®µããChatOpsã§ãããã¤ãè¡ããã¦ãããã¨ãä½æããã¯ãã¼ã³DBã®æ å ±ãå ±æãããããã¨ãªã©ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãã¦Slackãå©ç¨ãã¾ãã
- RubotyãBarbequeã®ã¸ã§ããèµ·åãã
- Barbequeã®ã¸ã§ããã¯ãã¼ã³ãä½æãã
- Auroraã®å ´åã¯ã¯ãã¼ã³ä½ææ©è½ãRDSã®å ´åã¯ã¹ãããã·ã§ãããã復å
- ã¯ãã¼ã³DBã®ãã¹ã¿ã¼ã¦ã¼ã¶ã¼ã®ãã¹ã¯ã¼ããå¤æ´ãã
- ã¯ãã¼ã³DBã®ãã¼ã¿ããã¹ãã³ã°ãã
- ã»ãã¥ãªãã£ã°ã«ã¼ããå¤æ´ãã¦ã社å ãããã¯ã¼ã¯ããã¯ãã¼ã³DBã«ã¢ã¯ã»ã¹ã§ããããã«ãã
ãã¼ã¿ã®ãã¹ãã³ã°ã«ã¯ååã®@mozamimyãä½ã£ãDumptruckã¨ãã社å ãã¼ã«ãå©ç¨ãã¦ããã以ä¸ã®ãããªJsonnetã®è¨å®ãã¡ã¤ã«ã«å¾ã£ã¦ãã¼ã¿ããã¹ãã³ã°ãã¾ãã
{ database: 'db_name', except: ['secure_%'], // `secure_`ããªãã£ãã¯ã¹ã®ãã¼ãã«ã¯ã¯ãã¼ã³DBã«ã³ãã¼ããªã rules: [ { table: 'users', transforms: [ { column: 'tel', value: "lpad(id, 12, '0')", // SQLã§ãã¼ã¿ããã¹ãã³ã° inline_sql: true, }, { column: 'email', value: "concat(id, '@example.com')", inline_sql: true, }, ], }, ], }
ä½æããã¯ãã¼ã³DBã¯ãå©ç¨å¾ã«éçºè ãèªåã§åé¤ããããå©ç¨æéãåããã¨ãããå¦çãèªåçã«ã¯ãã¼ã³DBãåé¤ãã¾ãã
éçºè
ãèªåã§DBã®åé¤ããã©ã¡ã¼ã¿ã®å¤æ´ãè¡ããããã«ãããããã¯ã©ã¹ã¿IDãã¤ã³ã¹ã¿ã³ã¹IDã«ã¯ rcc-
ã¨ãããã¬ãã£ãã¯ã¹ãä»ããIAMã®å¯¾è±¡ãªã½ã¼ã¹ãrcc-*
ã¨ãã権éãéçºè
ã«ä»ä¸ãã¦ãã¾ãã
ã¾ã¨ã
Amazon RDS/Auroraã®ã¯ãã¼ã³ãæ軽ã«ã§ããããã«ãªã£ããã¨ã«ããããããã¯ã·ã§ã³ç°å¢ã®ãã¼ã¿ã®èª¿æ»ãããã¼ã¿ãã¼ã¹ã®ããã©ã¼ãã³ã¹ã®æ¤è¨¼ãã¯ãã©ãããã«ãªãã¾ãããã¾ãããã¼ã¿ã®ãã¹ãã³ã°ãè¨å®ãã¡ã¤ã«ã§ç®¡çãããã¨ã«ãããã©ã®ã«ã©ã ã«ç§å¿æ å ±ãå ¥ã£ã¦ãããããããããããªã£ãã¨æãã¾ãããããã¯ã·ã§ã³ç°å¢ã®ãã¼ã¿ãã¼ã¹ã使ã£ãä½æ¥ã¯ç®¡çè ãSREã«ä½æ¥ãéä¸ããã¡ãªã®ã§ããã®ãããªå½¢ã§ãªãã¹ãéçºè ã«æ¨©éãå§è²ãã¦ããããã§ãã