ãœãããŠã§ã¢éçºäŒç€Ÿã«ã¯ãå®çšŒåç°å¢ã«è¿ããã¹ãç°å¢ãå¿ èŠã§ãã ããã¯ããªãªãŒã¹ãµã€ã¯ã«ãé·ãããã¯ã¹çãœãããŠã§ã¢ã«ç¹ã«åœãŠã¯ãŸããŸãã
ãã¹ãç°å¢ã®æ§ç¯ã«é¢ããå€ãã®åé¡ã¯ãã¯ã©ãŠãã«é 眮ããããšã§è§£æ±ºãããŸãã ã¯ã©ãŠãããŒã¹ã®Mail.Ruã¯ã©ãŠããœãªã¥ãŒã·ã§ã³ ïŒMCSïŒãã©ãããã©ãŒã ã§ã®ãã¹ããªãã·ã§ã³ã«ã€ããŠèª¬æããŸãã ããããç§ãã¡ãèšãããšã®äžéšã¯ã©ã®ã¯ã©ãŠãã«ãåœãŠã¯ãŸããŸãã
ãã¹ãç°å¢ã®ã»ããã¢ããã®é£ãã
ã¯ã©ãŠãå ã®ãã¹ãç°å¢ã®æ©èœã«ã€ããŠèª¬æããåã«ããœãããŠã§ã¢ã®ãã¹ãããã»ã¹ã§äŒæ¥ãçŽé¢ããå°é£ã«ã€ããŠèª¬æããŸãã
ç°ãªãGitãã©ã³ã-ç°ãªãç°å¢
ãœãããŠã§ã¢éçºã«é¢ããã»ãšãã©ã®äŒæ¥ã¯ãããŒãžã§ã³ç®¡çã·ã¹ãã ã䜿çšããŠããŸãã ãããã®äžã§æãäžè¬çãªã®ã¯Git㧠ã87ïŒ ã®éçºè ã䜿çšããŠããŸãïŒRhodeCode ã¯Twitterã§æ祚ããŠããŸã ïŒã
Gitã®ãã¹ããã©ã¯ãã£ã¹ã¯ãæ©èœãã©ã³ããšåŒã°ãããã®ã§ãæ°ããæ©èœããšã«åå¥ã®ãã©ã³ãããªããžããªã«å²ãåœãŠãããŸãã ãã®ã¢ãããŒãã«ãããéçºè ã¯ãã²ããæŒããããšãªããå€æŽãããç¬ç«ãããããšãã§ããŸãããåã ã®æ©èœããã¹ãããããã«å€ãã®å°çšç°å¢ãå±éããå¿ èŠããããŸãã
ã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ã®ååã«æŽ»çšãããŠããªã
ç©çãµãŒããŒã®25ïŒ ã¯ãŸã³ãã§ãããé»åãæ¶è²»ããŸãããäœã®åœ¹ã«ãç«ã¡ãŸããã ãŸããå€ãã®ITå°é家㯠ãèªç€Ÿã«ã€ã³ã¹ããŒã«ãããŠãããµãŒããŒã®15ã30ïŒ ãäœãããŠããã®ãèšãããšãã§ããŸãã ã
ã ããããã«ã ããã§ã®ãã¹ãç°å¢çšã®ãªã³ãã¬ãã¹ããŒããŠã§ã¢ã¯ãä»ã®ããŒããŠã§ã¢ãšäœãå€ããã¯ãªããååãšããŠé©åã«åŠçãããŠããŸããã ãã以å€ã®å Žåã¯ã§ããŸããã ãµãŒããŒæ©åšã®ããªãŒããè³Œå ¥ãããšãæ¶è²»éãšãã¹ãç°å¢ã®æ°ãå¢ããå Žåã«ããªãœãŒã¹ã«ãã£ãŠåå²ãåœãŠãããŸãã ãã®çµæããã¹ãç°å¢ã¯ãäžãäžã«åããŠãå€éããã³é±æ«ã«ã¢ã€ãã«ç¶æ ã«ãªããæ¶è²»é»åãšå·åŽã®è²»çšãæ¯æãã ãã§ãã
ãã©ã€ããŒãã¯ã©ãŠãã§ã®ä»®æ³åã®åçŽãªã¢ããªã±ãŒã·ã§ã³ã§ã¯ãæè»æ§ã®ãªãæ¡åŒµæ§ãæ©åšã®ååã«æŽ»çšãããŠããªãåé¡ã解決ã§ããŸããã
é£æ床èšå®
ãã¹ãç°å¢ãšéçºç°å¢ã¯ãã»ãã®æ°å°ã®ä»®æ³ãã·ã³ä»¥äžã®ãã®ã§ãã éåžžãã¢ããªã±ãŒã·ã§ã³ãµãŒããŒãããŒã¿ããŒã¹ãµãŒããŒãã¡ãã»ãŒãžãã¥ãŒãµãŒããŒããã£ãã·ã¥ãµãŒããŒãå«ãŸããŸãã
éçºè ãç¬èªã«ãã®ãããªã€ã³ãã©ã¹ãã©ã¯ãã£ãäœæããã³æ§æããããšã¯å°é£ã§ããé©åãªå°éç¥èããªãå Žåãããã«ã¯æ°æ¥ãããå ŽåããããŸãã çµéšè±å¯ãªç®¡çè ã«ãšã£ãŠã¯ãããã¯ç°¡åã§ãããäžè¬çã«ã¯é¢çœããªãã§ãã ããã«ãå®å䞻矩ãéãªã£ãŠããããã¹ãç°å¢ãäœæããããã«ãªãœãŒã¹ãå²ãåœãŠãããã»ã¹ã«ã¯æéããããå ŽåããããŸãã
å¥ã®åé¡ã¯ããã«ã¿ã€ã ã®ã·ã¹ãã 管çè ãç¹å®ã®ãã¹ãç°å¢ãå±éããå°éç¥èãæããªãããšãå€ããäŒç€Ÿãå€éšããé«äŸ¡ãªã³ã³ãµã«ã¿ã³ããåŒãä»ããããšãäœåãªããããããšã§ãã äŸãšããŠãHadoopãSparkãHDFSããŸãã¯Airflowã«åºã¥ãããã°ããŒã¿ã®ãµã³ãããã¯ã¹ããããŸãã ãã®ãããªç°å¢ã®å±éã«ã¯ãBigDataåéã®è³æ Œãæã€ã¹ãã·ã£ãªã¹ãããå°ãªããšã1é±éãéåžžã®ã·ã¹ãã 管çè ããå°ãªããšã1ãæããããŸãã Kubernetesã¯ã©ã¹ã¿ãŒã«é¢ããåæ§ã®ã¹ããŒãªãŒïŒå®çšŒåæ§æã«è¿ããã¹ãã¯ã©ã¹ã¿ãŒã®æ§ç¯ã«ã¯ãå°ãªããšãæ°æ¥ããããŸãã
ãã®çµæãäŒç€Ÿã¯ã³ã³ãµã«ã¿ã³ããåŒãä»ããããã«ç¬¬äžè ã«é ŒããããåŸãŸããã ãã ãã ããã°ããŒã¿ã®å°é家ãèŠã€ããããšã¯éåžžã«é£ãã ããã®ãããªã·ã¹ãã ã®ç®¡çè ã¯ã»ãšãã©æå ã§æ°ããããšãã§ããŸãã ã¯ããDevOpsãšã³ãžãã¢ã¯ãã¹ãç°å¢ãå±éãããã¹ãŠã®ã¿ã¹ã¯ãåŠçã§ããŸããããã¹ãŠã®äŒæ¥ããããæã£ãŠããããã§ã¯ãããŸããã å®éã2016幎ãæ±äººæ€çŽ¢ãµã€ãIndeed.com 㯠ãäŒæ¥ãä»ã®ã©ã®å°é家ãããé·ãæéDevOpsãšã³ãžãã¢ãæ¢ããŠãããšææããŸããã
ã¯ã©ãŠãããããã®åé¡ã解決ããæ¹æ³
æ¶è²»ããããªãœãŒã¹ã®2åç®ã®ã¿ã®è«æ±ãšå³æã®ã¹ã±ãŒãªã³ã°
ã¯ã©ãŠããµãŒãã¹ã®æãæãããªãã©ã¹ã¯ãä»»æã®æéïŒ1ã€ã®ãµãŒããŒãŸãã¯ã¯ã©ã¹ã¿ãŒå šäœïŒã®ã¯ã©ãŠãã€ã³ãã©ã¹ãã©ã¯ãã£ãã¬ã³ã¿ã«ã§ããããšã§ãã Mail.Ru Cloud Solutions ïŒMCSïŒãã©ãããã©ãŒã ã§ã¯ã課éã¯1ç§ãããã§ããå®éã«äœ¿çšãããã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ã«å¯ŸããŠã®ã¿æ¯æãå¿ èŠããããŸãã
ãã¢ã¡ã¿ã«ããã©ã€ããŒãã¯ã©ãŠããããã³ã»ãšãã©ã®ãã·ã¢ã®ã¯ã©ãŠããããã€ããŒãšã¯ç°ãªããMCSã¯åæ¢ããä»®æ³ãã·ã³ïŒRAMãCPUïŒã«å¯ŸããŠãªãœãŒã¹ãè«æ±ããŸããã䜿çšæžã¿ã®ãã£ã¹ã¯é åã®ã¿ãæ¯æãå¿ èŠããããŸãã ããšãã°ã20åã®CPUã40 GBã®RAMã1 TBã®HDDã®ãã¹ãæ§æã®ã³ã¹ãã¯24,800âœ/æã§ããã£ã¹ã¯ã¹ããŒã¹ã®ã³ã¹ãã¯7,000âœ/æã§ãã ããšãã°ãèªååããŒã«ã䜿çšããŠãã®ãããªç°å¢ã21:00ã«åæ¢ãã9ïŒ00ã«å±éããå Žåã15 900 payãæ¯æãããšã«ãªããŸãïŒ24æéã¬ã³ã¿ã«ã®å Žåã®1.5åïŒã
ç§ãã¡ã®çµéšã§ã¯ããªã³ãã¬ãã¹ã€ã³ãã©ã¹ãã©ã¯ãã£ã§ã®ãã¹ããšæ¯èŒããŠãã¯ã©ãŠãã§ã®ãã¹ãã«ããç·ç¯çŽé¡ã¯60ã70ïŒ ã«éããŸãã
ã¯ã©ãŠãå ã®ãªãœãŒã¹ãå³åº§ã«å¢æžã§ãããããé©åãªã¿ã€ãã³ã°ã§ç°å¢ãè¿ éã«å±éãããªãŒã¹ããã容éãã»ãŒ100ïŒ æŽ»çšã§ããŸãã ãã¹ãç°å¢ã®å±éæéã¯ããªã³ãã¬ãã¹ã«æ¯ã¹ãŠæ°æ¥ããŸãã¯æ°ãæãççž®ãããŸãã
éçºè èªèº«ãå²ãåœãŠããªãœãŒã¹
éçºè ã¯ãã»ã«ããµãŒãã¹ããŒã¿ã«ã䜿çšããŠã管çè ã«é£çµ¡ããããšãªããã¯ã©ãŠãã§ãã¹ãç°å¢ãæ§æãããããã«ãªãœãŒã¹ãå²ãåœãŠãããšãã§ããŸãã ãã®åçŽãªã¢ã¯ã·ã§ã³ã§ããã補åã®åžå Žæå ¥ãŸã§ã®æéãæ°é±éççž®ã§ããŸãã
ãã¹ãç°å¢ãèªåçã«äœæããã³ç Žæ£ããããã®API
ã¯ã©ãŠãã䜿çšãããšã ãžã£ã¹ãã€ã³ã¿ã€ã ã¢ãã«ã§çåœã®ç°å¢ãäœæã§ããŸãã REST APIãšCLI ã䜿çšããŠããã¹ãç°å¢ãäžæ¬ã§ãããã€ããåæ¢ãæŽæ°ãåé€ã§ããŸãã ãã®ããã«ããŠããã¹ãç°å¢ã®ã©ã€ããµã€ã¯ã«å šäœãæ§æããæ°çŸã®ç°å¢ãå¥å šã«ä¿ã€ããšãã§ããŸãã ã€ã³ã¹ã¿ã³ãã¯ã©ãŠãã¹ã±ãŒãªã³ã°ãšç§åäœã®èª²éã«ãããæè»æ§ãšéçšã³ã¹ãã®åæžãå®çŸããŸãã
ãããç§ãã¡ã®çµéšããã®äŸã§ãã
å瀟ã¯150ã®éè¡åãã®ãœãããŠã§ã¢ãéçºããŠããŸãã åéè¡ã«ã¯ãGitã«ç¬èªã®ãã©ã³ãããããããã¯ã¹åããããœãªã¥ãŒã·ã§ã³äžã«è¿œå ã®æ©èœãçµã¿èŸŒãŸããŠããŸãã å瀟ã¯ãã¯ã©ã€ã¢ã³ãããšã«2ã€ãŸãã¯3ã€ã®äžŠè¡äœæ¥ãã¹ãç°å¢ãäœæããããšãäœåãªããããŠããŸããçŸåšã®ããŒãžã§ã³ã§ã®ãã¹ããæ°ããããŒãžã§ã³ã§ã®ãã¹ããçŸåšã®ããŒãžã§ã³ããæ°ããããŒãžã§ã³ãžã®æŽæ°ã®ãã§ãã¯ã§ãã åèšã§ã150ã®ã¯ã©ã€ã¢ã³ãã«å¯ŸããŠãåæã«æ倧450ã®ãã¹ãç°å¢ã®ã¿ãå±éããã³ä¿å®ããå¿
èŠããããŸã-ããã¯ãéçºç°å¢ãèæ
®ããŠããŸããã
ãã©ã€ããŒãã¯ã©ãŠãã¢ãŒãïŒç¬èªã®ããŒã¿ã»ã³ã¿ãŒã§ä»®æ³åã䜿çšïŒã§ã¯ãå©çšå¯èœãªããŒããŠã§ã¢ããã¹ãŠã®ç°å¢ã®äžŠåæäœã«ååã§ãªãããšãå€ãããããã®ãããªè² è·ã§äœæ¥ããããšã¯ã»ãšãã©äžå¯èœã§ãã ãã®çµæãéçºè ã¯ãã¹ãã®é çªãåŸ ã£ãŠãããã¢ããªã±ãŒã·ã§ã³ã®æ°ããããŒãžã§ã³ã®åäœããã°ãã確èªã§ããŸããã
ãããªãã¯ã¯ã©ãŠãã§ã®ãã¹ãç°å¢ã®èªåå±éãšç®¡çã«ããããã¹ãé床ã®å¶éããªããªããæçµçã«åžå Žæå ¥ãŸã§ã®æéãççž®ãããŸãã ããã«ãã¯ã©ãŠããªãœãŒã¹ãã¬ã³ã¿ã«ããéã®ã³ã¹ã管çã¯äºæž¬ããããããã¹ãã¹ã¿ã³ãã«ç¬èªã®å°çšæ©åšã䜿çšããå Žåãããã³ã¹ãèªäœãäœããªããŸãã
ãã©ã€ããŒãã¯ã©ãŠãã¢ãŒãïŒç¬èªã®ããŒã¿ã»ã³ã¿ãŒã§ä»®æ³åã䜿çšïŒã§ã¯ãå©çšå¯èœãªããŒããŠã§ã¢ããã¹ãŠã®ç°å¢ã®äžŠåæäœã«ååã§ãªãããšãå€ãããããã®ãããªè² è·ã§äœæ¥ããããšã¯ã»ãšãã©äžå¯èœã§ãã ãã®çµæãéçºè ã¯ãã¹ãã®é çªãåŸ ã£ãŠãããã¢ããªã±ãŒã·ã§ã³ã®æ°ããããŒãžã§ã³ã®åäœããã°ãã確èªã§ããŸããã
ãããªãã¯ã¯ã©ãŠãã§ã®ãã¹ãç°å¢ã®èªåå±éãšç®¡çã«ããããã¹ãé床ã®å¶éããªããªããæçµçã«åžå Žæå ¥ãŸã§ã®æéãççž®ãããŸãã ããã«ãã¯ã©ãŠããªãœãŒã¹ãã¬ã³ã¿ã«ããéã®ã³ã¹ã管çã¯äºæž¬ããããããã¹ãã¹ã¿ã³ãã«ç¬èªã®å°çšæ©åšã䜿çšããå Žåãããã³ã¹ãèªäœãäœããªããŸãã
ã¯ã©ãŠããã¹ãç°å¢ã®ãã1ã€ã®å©ç¹ã¯ãCI / CDããŒã«ãšã®çµ±åã§ãã ãããã®ãœãªã¥ãŒã·ã§ã³ïŒJenkinsãªã©ïŒã«ã¯ããã«ãäžã«MCSã¯ã©ãŠãã«ãã¹ãç°å¢ãåçã«äœæã§ãããã©ã°ã€ã³ãå«ãŸããŠããŸãã æ©èœãã¹ããŸãã¯ååž°ãã¹ããå®è¡ããçŽåã«ãã¹ãç°å¢ãã¢ã¯ãã£ãåã§ããŸãã ãã¹ããæåããå Žåãäœããééã£ãŠããã°ãç°å¢ã¯èªåçã«åŽ©å£ããŸããéçºè ãååž°ã®çç±ãåæ¥ç¶ããŠç解ã§ããããã«ãç°å¢ã¯ä¿åãããŸãã
ãã¹ãç°å¢çšã®ãã¬ãããã«ãã£ã³ã°ãããã¯
ãã¹ãç°å¢ãMail.Ru Cloud Solutionsãã©ãããã©ãŒã ã«ãã°ããå±é
PaaSã¯ãããšãã°ãã¯ã©ãŠãå ã®Kubernetesã³ã³ãããŒããã³ããŒã¿ããŒã¹ãæ¯æŽããŸãã Kubernetesã¯ãæ°çŸã®ã¢ããªã±ãŒã·ã§ã³ãå«ããµãŒãã¹ã«ã¿ãã°ãéçºããŠããŸãã
ã«ã¿ãã°ãããActiveMQãRabbitMQãKafkaã¯ã©ã¹ã¿ãŒããã°ç£èŠããã³åæã·ã¹ãã ãããŸããŸãªCMSããã³ããŒã¿ããŒã¹ãæ°åã§å±éã§ããŸãã ã«ã¹ã¿ãã€ãºãããã¢ããªã±ãŒã·ã§ã³ãã³ãã¬ãŒãã®ã¿ãå«ãäžè¬çãªDocker Hubãšã¯ç°ãªãã Kubernetes Service Catalogã«ã¯çµ±åãç°¡çŽ åããé«ã¬ãã«ã®ãã³ãã¬ãŒãããããŸãã ãã³ãã¬ãŒããããäºåã«æ§æãããã¢ããªã±ãŒã·ã§ã³ã³ã³ããŒãã³ãïŒã¡ãã»ãŒãžãã¥ãŒããµãŒãã¹æ€åºãããŒã¿ããŒã¹ãã¢ããªã±ãŒã·ã§ã³ãµãŒããŒãCI / CDããŒã«ããã£ãã·ã¥ãµãŒããŒããããã¯ãã§ãŒã³ããŒã«ãªã©ïŒããããã€ã§ããŸãããããã€ãããä»®æ³ãã·ã³ãæ§æããå¿ èŠã¯ãããŸããã
KubeappsããŒã±ãããã¬ã€ã¹ã§å©çšå¯èœãªã¢ããªã±ãŒã·ã§ã³ã
ããã°ããŒã¿ã®ãµã³ãããã¯ã¹
MCSã§ã¯ãããã°ããŒã¿ã¢ããªã±ãŒã·ã§ã³çšã®ãã¹ãç°å¢ãå±éã§ããŸãã PaaSãµãŒãã¹Big Dataã䜿çšããŠãHadoopãSparkãHBaseãããã³Airflowã®ã¯ã©ã¹ã¿ãŒãäœæã§ããŸãã å±éããã»ã¹ã¯å®å šã«èªååãããŠãããèªå·±æ§æã«æ¯ã¹ãŠæ°é±éã®æéãç¯çŽã§ããŸãã
ããã§ã®è¿œå ã®å©ç¹ã¯ãç§åäœã®è«æ±ãšã€ã³ã¹ã¿ã³ãã¹ã±ãŒãªã³ã°ã§ãã æ¡åŒµå¯èœãªãã¹ãç°å¢ãçæéã§äœæã§ãããããåæITã€ã³ãã©ã¹ãã©ã¯ãã£ãç¶æããããã®äŒæ¥ã®ã³ã¹ããåæžãããŸãã ç¯çŽã¯ããªã³ãã¬ãã¹ãšæ¯èŒããŠ80ïŒ ã«éããå¯èœæ§ããããŸãã
Infrastructure-as-a-Codeãšã®çµ±å
VMWareããŒã¹ã®ç¬èªã®ãœãªã¥ãŒã·ã§ã³ãšã¯ç°ãªããMCSã¯ã©ãŠããã©ãããã©ãŒã ã¯ãOpenStackãªãŒãã³ãœãããŠã§ã¢ã«åºã¥ããŠæ§ç¯ãããŠãããTerraformãAnsibleãPuppetãChefãªã©ã®ããŸããŸãªããŒã«ãšå®å šã«çµ±åãããŠããŸãã
Terraformã¯ãInfrastructure-as-CodeïŒIaCïŒã®ç²Ÿç¥ã«åºã¥ããŠæ§ç¯ãããŠãããã€ã³ãã©ã¹ãã©ã¯ãã£ãã»ããã¢ããããããã»ã¹ãã³ãŒããèšè¿°ããéçºè ã«éŠŽæã¿ã®ãããã®ãšããŠé 眮ãããŸãã Terraformã¯VMwareãšå®å šã«çµ±åãããŠããªãããããã©ã€ããŒãã¯ã©ãŠãã§ã®äœ¿çšã¯å°é£ã§ãã MCSã¯ã©ãŠãã§ã¯ãäŒæ¥ã¯Terraformã®æ¢è£œã®äŸã䜿çšã§ããŸãïŒãããã¯GitHubãªããžããªã«ãããŸã ïŒã
Terraformã䜿çšããŠãã¹ãç°å¢ãäœæããŸãã
ç§ãèŠããŠ
- ã¯ã©ãŠãã§ã®ãã¹ãã¯ITæ¥çã§èªç¶ãªæ £è¡ã«ãªãã€ã€ããããã§ã«å·ç«å€§åŠãã倧èŠæš¡ITäŒæ¥ãŸã§ãããŸããŸãªçµç¹ã§é©çšãããŠããŸãã
- ã¯ã©ãŠãã§ãã¹ãç°å¢ãæ§ç¯ãããšãAPIãä»ããå³æã®ã¹ã±ãŒã©ããªãã£ãšèªååã®å¯èœæ§ã«ãããè²»çšãç¯çŽã§ããŸããããã«ãããã¬ã³ã¿ã«ããã€ã³ãã©ã¹ãã©ã¯ãã£ãã»ãŒ100ïŒ äœ¿çšã§ããŸãã
- ã¯ã©ãŠããã©ãããã©ãŒã ã®è¿œå ãµãŒãã¹ãšKuberntetesã³ã³ãããŒã®ãã³ãã¬ãŒãã¯ãæ§æããå¿ èŠã®ãªãæ¢è£œã®ãã«ãã£ã³ã°ãããã¯ã§ãã
- ããã°ããŒã¿åŠçããŒã«ãªã©ãæ§æãå°é£ãªãµãŒãã¹ã¯ãäºåã«æ§æããããã³ãã¬ãŒããšããŠã¯ã©ãŠãã§ç°¡åã«ã¬ã³ã¿ã«ã§ããŸãã èšå®ã«é£ã³èŸŒãããšãªããæ°é±éç¯çŽã§ããŸãã
- MCSã¯OpenStackäžã«æ§ç¯ãããTerraformããã³ãã®ä»ã®DevOpsããŒã«ãšå®å šã«çµ±åãããŠããŸãã
ãããã®ããŒã«ã¯ãã¹ãŠãMail.Ru Cloud Solutionsãã©ãããã©ãŒã ã§ç¡æã§è©Šãããšãã§ããŸãã 11ææ«ãŸã§ã ãã®ãªã³ã¯ãILOVEHABRããã¢ãŒã·ã§ã³ã³ãŒããšãšãã«äœ¿çšããŠã1000ã«ãŒãã«ãã¢ã«ãŠã³ãã«è¿œå ããtest-test-testããããšãã§ããŸãã