ã¯ããã«
ãä¹
ãã¶ãã§ãã
以åã®è¨äºã§æ¸ããéãããªããªãä½èª¿ä¸è¯ãè¯ããªãããã¾ãååããéã空ãã¦ãã¾ãã¾ããã
ã§ãåå¹´ã¶ãã®æè¡ããã°ã§ãããä»åã¯CDK Pipelinesã®self-mutateã«ã¤ãã¦ã«ãªãã¾ãã
ãªããã®è¨äºã¯ AWS CDK Advent Calendar 2024 22æ¥ç®ã®è¨äºã®ã¯ãã§ããããç§ãå é±ã«è»½ãèºçãæ£ã£ã¦ãã¾ã£ãé¢ä¿ã§ãæ稿ãé ããªã£ã¦ãã¾ãã¾ããã大å¤å¤±ç¤¼ãããã¾ããã
åæï¼CDK Pipelinesã£ã¦ï¼
CDK Pipelinesã¨ã¯ãAWS CodePipelineï¼ä»¥ä¸ãCodePipelineãï¼ãå©ç¨ãããããã¤ãã¤ãã©ã¤ã³ãCodeBuildãCodeDeployãªã©ãåå¥ã«å®ç¾©ãããã¨ãªãä½æã§ãããAWS CDKã®ã©ã¤ãã©ãªã«ãªãã¾ãã*1
CDKçã«ã¯L3ã³ã³ã¹ãã©ã¯ã¿ã¨ãªã£ã¦ãããããå°ãªãå®ç¾©ã§ãããã¤ãã¤ãã©ã¤ã³ãæ§ç¯ã§ããã®ã§ãä¸è¨ã®ãããªã±ã¼ã¹ã«åãã¦ãã¾ãã
- CodePipelineã«ã¤ãã¦è©³ããç¥ããªããã©ãã¨ãããããããã¤ãã¤ãã©ã¤ã³ãæ§ç¯ããã
- ãã¾ãç´°ããå¶å¾¡ã¯ãããªããããç´°ãã管çã¯ããããªã
ãªããCDK Pipelinesã®æ¦è¦ãç解ãããï¼ãã¨ããæ¹ã¯ãç§ããJAWS-UG CDKæ¯é¨ #16 ~CDK Conference 2024 Extra~ãã§çºè¡¨ããè³æãããã¾ãã®ã§ããããããã°ãã¡ããåç §ãã ããã*2
self-mutateã£ã¦ï¼
self-mutateã¨ã¯CDK Pipelinesã®æ©è½ã®1ã¤ã§ãããããã¤ãå®æ½ãããéã«CodePipelineã®å®ç¾©ãåæ§æããï¼âCodePipelineã®é¨åã ããå ã«ãããã¤ããï¼ãã¨ããä»çµã¿ã§ãã
ãããã®ä»çµã¿ãçµæ§åããã«ããã®ã§ããã®ä»çµã¿ã説æãã¾ããï¼ãããCDK Pipelinesãæ¬é ãããçç±ã®ä¸ã¤ã«ãªã£ã¦ã¾ã...ï¼
self-mutateã®èæ¯
CodePipelineã§ãããã¤ãè¡ã£ãå ´åãCodePipelineã®å®ç¾©ã¯ããããã¤ãè¡ã£ãæç¹ã®å®ç¾©ããé©ç¨ããã¾ãã
ã¡ãã£ã¨åããã«ããã®ã§ãããææ°ã®ãããã¤ã§ã®å¤æ´å
容ã«ãCodePipelineèªä½ã®å¤æ´ããå«ã¾ãã¦ããã¨ãã¦ããææ°ã®ãããã¤ã®å®è¡ã«ãã®å¤æ´ã¯é©ç¨ããã¾ãããï¼ããã¾ã§ãããããã¤ãè¡ã£ãæç¹ã®å®ç¾©ãã§ãããã¤ãè¡ãããï¼
ããã®ä½ãä¸ä¾¿ãã¨ããã¨ãææ°ãããã¤ã«CodePipeline以å¤ã®ãªã½ã¼ã¹ï¼Lambdaã¨ãï¼ã®å¤æ´ãå«ã¾ãã¦ããããããã¤æã«ãå¤æ´ããCodePipelineå®ç¾©ãé©ç¨ãããï¼=ææ°ã®CodePipelineå®ç¾©ã§ãããã¤ãããï¼ãã¨ããå ´åã
- æåã«CodePipelineã¨Lambdaããããã¤ãã
- ãã®ãããã¤ã§ã¯ãå¤æ´ããCodePipelineå®ç¾©ãã¯é©ç¨ãããªã
- 次ã«Lambdaã®ã¿ãããã¤ãã
- ãã®ãããã¤ã§ãå¤æ´ããCodePipelineå®ç¾©ããé©ç¨ããã
ã¨ãã2ã¹ããããè¸ã¾ãã°ãªããã2度æéã«ãªã£ã¦ãã¾ãã¾ãã
self-mutateã®ä»çµã¿ã¨ã¡ãªãã
ä¸è¨ã®åé¡ã解決ããããã®ä»çµã¿ãself-mutateã§ãã self-mutateã§ã¯ä¸è¨ã®åé¡ããCodePipelineå®ç¾©ã ããå ã«ãããã¤ããããã¨ã§è§£æ±ºãã¦ãã¾ãã
ã¤ã¾ããææ°ãããã¤ã«CodePipeline以å¤ã®ãªã½ã¼ã¹ã®å¤æ´ãå«ã¾ãã¦ãã¦ããä¸è¨ã®æåãåããã¨ã§ã常ã«ææ°ã®CodePipelineå®ç¾©ã§ãããã¤ãå®è¡ãããããã«ãªã£ã¦ãã¾ãã
ãããself-mutateã®ã¡ãªããã§ãã
- ã¾ãCodePipelineã®å¤æ´ã ããå ã«ãããã¤ãã
- 1ãå®äºå¾ãCodePipeline以å¤ã®ãªã½ã¼ã¹ããããã¤ãã
ç°¡åã«å³è§£ããã¨ãä¸è¨ã®ãããªæãã§ãã
self-mutateã®ãã¡ãªãã
ãã ããå½ç¶self-mutateã«ããã¡ãªããã¯ãããå ·ä½çã«ã¯ä»¥ä¸ã®ç¹ãæãããã¾ãã
ãããã¤ã«æéãããã
å
è¿°ã®éããself-mutateã§ã¯ãCodePipelineãã¨ããã以å¤ã®ãªã½ã¼ã¹ãã§ãããã¤ãåããããããå
é¨çã«ã¯2åãããã¤ãå®è¡ããã¾ãã
ãã®çµæããããã¤ã«ããå¤ãã®æéãããã£ã¦ãã¾ãã¾ãã
æ¬çªç°å¢ãªãã¨ããããéçºç°å¢ã ã¨ç ©ãããæãã¦ãã¾ãããããã¾ããã
â»ãªãself-mutateã¯è¨å®ã§OFFã«ãããã¨ãã§ãã¾ãããããã¾ã§ãéçºç¨éã§ã®ä¸æçãªãã®ã§ãããæ¬çªç°å¢ã§OFFã«ãããã¨ã¯æ¨å¥¨ããã¦ãã¾ããã
åããã«ãã
ä¸è¨ã®ã2åãããã¤ãå®è¡ããããã ã£ãããCodePipeline以å¤ã®ãªã½ã¼ã¹ç¨ã®ã¹ã¿ãã¯ãå¥ã§ä½æããããªã©è¤éãªé¨åããããæåã¯ã©ããã¦ãåããã«ããã¨æãã¾ããï¼å®éããããçç±ã§CDK Pipelinesãæ¬é ãã¦ãã¾ããã¨ããã±ã¼ã¹ãå¤ãã¨èãã¾ãï¼
CodePipelinesã®å¤æ´é »åº¦
ï¼ããã¯self-mutateèªä½ã®ãã¡ãªããã§ã¯ãªãã§ããï¼å®éã®ã¨ãããCodePipelineã®å¤æ´ãçºçããã®ã¯éçºåæã®æéã®ã¿ã§ããããçµããã°ãã¾ãå¤æ´ã¯çºçããªããã¨ãå¤ãã§ãã
ã¾ãä»®ã«å¤æ´ãçºçããã¨ãã¦ããCodePipeline以å¤ã®ãªã½ã¼ã¹ã®ãããã¤ã«å½±é¿ããªããã°å¥ã«åé¡ãªãã®ã§ããããã¤æéãæéãªã©ã®ãã¨ãèããã¨ãããã¾ã§ãã¦å°å
¥ããã¡ãªããã...ãã¨ãªãããããã¾ããã
ã¾ã¨ã
以ä¸ãCDK Pipelinesã®self-mutateã«ã¤ãã¦ã®èª¬æã§ããã
æ£ç´CDK Pipelinesãself-mutateã¯æåã¯åããã«ããé¨åãå¤ãæ¬é ãããã¡ã§ãããæ £ããã¨ãããå°ãªãå®ç¾©ã§ãããã¤ãã¤ãã©ã¤ã³ãæ§ç¯ã§ãããã常ã«ææ°ã®ãããã¤å®ç¾©ã§ãããã¤ãå®è¡ã§ããããªã©ã®ã¡ãªãããããã®ã§ããããããã¤ãã¤ãã©ã¤ã³ãæ§ç¯ã§èª²é¡ãæ±ãã¦ããå ´åã¯ãä¸åº¦å°å ¥ãæ¤è¨ããã¦ã¿ãã®ãããã®ã§ã¯ãªããã¨æãã¾ãã
宣ä¼
ã¡ãã£ã¨å ã®è©±ã«ãªãã¾ãããæ¥å¹´2/1(å)ã«å¯å±±ã§éå¬ããããBuriKaigi 2025ãã«ããã¦ãAmazon Aurora ãã¼ã¸ã§ã³ã¢ããã«ã¤ãã¦ãæ¹ãã¦ç解ãã ï½ ãã¼ã¸ã§ã³ã¢ããææ³ã¨æåã³ã¼ãã¸ã®å½±é¿ ï½ãã¨ããã»ãã·ã§ã³ã§ç»å£ããã¦é ããã¨ã«ãªãã¾ããã
å 容ã¨ãã¦ã¯Amazon Aurora ã®ãã¼ã¸ã§ã³ã¢ããæ¦è¦ããã¼ã¸ã§ã³ã¢ããããªããã¨ã§ã®å½±é¿ãã¾ããã¼ã¸ã§ã³ã¢ããæã«æ°ãä»ãããã¨ãªã©ãã話ãããäºå®ã§ãã
宣ä¼ãã®2
ç§äºã«ãªãã¾ããã12æããKDDIã¢ã¸ã£ã¤ã«éçºã»ã³ã¿ã¼(KAG)ã«å ¥ç¤¾ãã¾ããã
主ã«åå¤å±ãªãã£ã¹ã«ã¦ã
- ITãæ´»ç¨ããå°æ¹ã®çºå±ã¸ã®è²¢ç®
- å種ã³ãã¥ããã£æ´»åï¼è²¢ç®ï¼ç¹ã«å°æ¹ï¼
- åå¤å±ãªãã£ã¹ã®äºæ¥æ¡å¤§
ã«è²¢ç®ãã¦ããããã¨æã£ã¦ãã¾ãã®ã§ãããããããããããé¡ããããã¾ããï¼ãã以åã«ãã¾ãã¯èªåã®ä½èª¿ãæ²»ããã¨ãæåªå ããããã¾ããã...ï¼
ãªãã«ã¸ã¥ã¢ã«é¢è«ãéæåéä¸ã§ãã®ã§ãKAGã«ã¤ãã¦è©³ããç¥ãããããKAGå¿åããããã©ãã¡ãã£ã¨ä¸å®ãããããªã©ããå ´åã¯ããã²é æ ®ãªãã声ãããã ããã
ããã§ã¯ãæ稿é
ãã¦ãã¾ã£ã¦ããã¾ããããä»åã¯ãã®è¾ºã§ã
çæ§ãè¯ããå¹´ãï¼
*1:ãªãCDK Pipelinesã¯aws-cdk-lib/pipelinesã¢ã¸ã¥ã¼ã«ã«å±ãã¦ãã¾ããã¡ãªã¿ã«CodePipelineã¯aws-cdk-lib/aws-codepipelineã¢ã¸ã¥ã¼ã«ã«å±ãã¦ãã¾ãããããã¨ã¯å¥ç©ã§ã
*2:æ¬å½ã¯CDK Pipelinesã«ã¤ãã¦è©³ããæ¸ããã¨ããã®ã§ãããä»å¹´ã¯ãªãã©ã¤ã³ã¤ãã³ãã§çµæ§CDK Pipelinesã®äºã話ãã¦ããã®ã§ãä»åã¯self-mutateã«ã®ã¿ãã©ã¼ã«ã¹ãå½ã¦ã¾ãã