ã©ããã©ããä¹ã«ã¬ã¼æ§ã§ããæ¡éã§ãã ã³ã£ããããã»ã©ããã°æ¸ãã¦ãªãã¦ã³ã£ãããã¦ã¾ããåå¹´æ¸ãã¦ãªãããã Terraformã使ã£ã¦ããããããã§ãããæè¿EC2ã®AutoScaleãå ¥ãããã¨ãã¦è¾ããã¨ããã£ããããã®ã§ã¡ãã£ã¨ã¾ã¨ãã¦ã¿ã¾ãã Terraform Terraformã¯è¨ããã¨ãç¥ããHashicorpããã®ãããã¯ãã§ããã ã¤ã³ãã©æ§ç¯ãã³ã¼ãåãã¦Githubçã§ã¬ãã¸ããªç®¡çãããã¨ã«ãã£ã¦å±¥æ´ç®¡çãããã«ãªã¯ã¨ã¹ããã¼ã¹ã®æ§ç¯ãã§ããã®ã売ãã ã£ãããã¾ãã Terraformã§ã®AutoScaleæã®ãããã©ã 端çã«ããã¨ãã®2ã¤ã§ãã Terraformçµç±ã§å®è¡ããéã®LaunchConfigurationï¼ã¤ã«LCï¼ã¨AutoScalingGroupï¼ã¤ã«ASGï¼ã®åé¤ã®é çªãé LCå ã®user_dataæ´æ°ã§ä¸ç¶²æå°½ã«ãªã Terrafo
HashiCorp 並ã³ã« HashiCorp Products ã§ãã Atlas, Vagrant, Packer, Serf, Consul, Terraform, Vault, Nomad, Otto çã«é¢ãã Advent Calendar ã§ãã
ãã®ã¨ã³ããªã¯ HashiCorp Advent Calendar 2015 - Qiita 10æ¥ç®ã®è¨äºã§ããä»åã¯Terraformã®moduleæ©è½ã«é¢ããç¥è¦ããç´¹ä»ãã¾ãã moduleã¨ã¯ï¼ module "consul" { source = "github.com/hashicorp/consul/terraform/aws" servers = 3 } moduleã¯ãTerraform resourceãæ½è±¡åããããã®ãã®ã§ãããã使ããã©ã¡ã¼ã¿ãmoduleå ã«é è½ãã¦å ¥åé ç®ãæ¸ãããããè¤æ°ã®resourceãã¾ã¨ããããtfãã¡ã¤ã«ã®è¦éããè¯ãããããã«ä½¿ãã¾ãã çã®resourceã使ã£ã¦Terraformã®è¨å®ãã¡ã¤ã«ãæ¸ãã®ã«ã¯ãããç¨åº¦ã¤ã³ãã©ã®ç¥èãå¿ è¦ã§ããmoduleæ©è½ã使ã£ã¦ãå¯è½ãªéãå ¥åé ç®ãç°¡æ½ã«ããã°ãã¤ã³ãã©ã®ç¥èããªã人ã§ã
ååã®è¨äºã§ã¯Dockerã¨ECSã使ã£ãAWSä¸ã§ã®Infrastructure as codeã«ã¤ãã¦è¨åãã¾ãããããµã¼ããªã½ã¼ã¹ã®æ§æ管çã«ã¤ãã¦ã¯AWSã®ããã¼ã¸ã¡ã³ãã³ã³ã½ã¼ã«ããæåã§è¡ããªãã¨ãããªãã£ãããã³ã³ãããç¨ããã¢ããªã±ã¼ã·ã§ã³æ§æãå¼·å¶ãããå¾æ¥ã®åç´ãªã¤ã³ã¹ã¿ã³ã¹æ§æãã§ããªãã¨ããåé¡ç¹ãããã¾ãããååã®è¨äºã¯ãã¡ãã å¾è ã«ã¤ãã¦ã¯ãä»å¾ã³ã³ãããæ´»ç¨ããã¤ã³ãã©æ§æãæ®éã«ãªã£ã¦ãããã¨ã§è¨±å®¹ããã¦ããããããã¾ããããæ®éã«ã¤ã³ã¹ã¿ã³ã¹ãç«ã¦ã¦ã¤ã³ãã©ãæ§ç¯ãã¦ããæ¹ã«ã¨ã£ã¦ã¯Infrastructure as codeãããããããã«ã³ã³ãããåæã¨ãããµã¼ãæ§æã«å¤æ´ããªãã¦ã¯ãããªããªãã¦ãæ£ç´æ°ãé²ã¾ãªãã¨æãã¾ãã ããã§æ¬è¨äºã§ã¯ãä»ã¤ã³ãã©çéã§é常ã«å¼·ãå½±é¿åãæã£ã¦ããHashicorpã®ãããã¯ããPackerã¨Terrafor
AWS Partner Network (APN) Blog AWS CodeDeploy Deployments with HashiCorp Consul The following is a guest post from Cameron Stokes, Solutions Engineer at AWS DevOps Competency Partner HashiCorp. AWS CodeDeploy automates code deployments to Amazon Elastic Compute Cloud (Amazon EC2) and on-premises instances, allowing developers to customize deployment steps as needed per their application requiremen
Serfã®è¶³ããªãæ©è½ãè£ãConsul ååã®è¨äºã®å¾©ç¿ã«ãªãã¾ãããSerfï¼https://serfdom.ioï¼ã®ä¸»è¦ãªå½¹å²ã¯ããªã¼ã±ã¹ãã¬ã¼ã·ã§ã³ï¼èªåçã«è¤æ°ã®ãµã¼ããªã©ã®ã¤ã³ãã©ä¸ã§å¦çãããã¨ï¼ã¨ãã¯ã©ã¹ã¿ä¸ã®ã¡ã³ã管çã§ãã Serfãåç´ãªãã¼ã«ã¨ãã¦è¦ãå ´åã¯ããªã¼ã±ã¹ãã¬ã¼ã·ã§ã³ãç°¡åã«è¡ãã便å©ãªãã¼ã«ã¨è¨ããã§ããããããããå®éã®éç¨ã·ã¼ã³ãèãã¾ãã¨ã次ã®ãããªå¼±ç¹ãæµ®ãã³ä¸ããã¾ãã ã¡ã³ã管çã¯Serfã¨ã¼ã¸ã§ã³ãéã®éä¿¡æ£å¸¸æ§ãåºæºã§ãããã¢ããªã±ã¼ã·ã§ã³ãããã«ã¦ã§ã¢ã®ç¶æ³ã«å¿ããèªåå¦çãè¡ããªãï¼ãµã¼ãã¯ç¨¼åãã¦ããããã¦ã§ããµã¼ãããã¼ã¿ãã¼ã¹ãåæ¢ãããããªç¶æ³ï¼ ä½ããã®ç¶æ ãä¿æããä»çµã¿ããªãã®ã§ãåé·åã®ä»çµã¿ã¯èªåã§èæ ®ããå¿ è¦ããã Serfã¯ã©ã¹ã¿ã¨ã®éä¿¡ã«ã¯ç¬èªã®CLIãAPIã使ãå¿ è¦ããããä»ã®ãã¼ã«ã¨ã®è¦ªåæ§ãä½ã ãã
ã¯ããã« ããã«ã¡ã¯ãä¸å±±ã§ãã æè¿æ¥åã®ä¸ã§AWS CodeDeployã使ã£ã¦ãã¾ããAWSä¸ã§ã¢ããªã±ã¼ã·ã§ã³ã®ãããã¤ãèªååããä¸ã§ã¨ã¦ã便å©ãªãµã¼ãã¹ã§ãã ç§ã¯å®å ¨ã«ç¿ãããæ £ããæ´¾ã®é ãªã®ã§å®éã«æãåãããªãã¨ãªããªãæ°ãããµã¼ãã¹ãè¦ãããã¾ãããã¨ãã訳ã§ãä»åã¯CodeDeployã使ã£ãã¤ãã¥ã¼ã¿ãã«ãªBlue/Greenãããã¤ã¡ã³ãã®æ¤è¨¼ç°å¢ãTerraformã§æ§ç¯ãã¦ã¿ã¾ããã æ§æå³ æ§æå³ã¯ä»¥ä¸ã®éãã§ãã æ§æå³ã®è§£èª¬ 2ã¤ã®ASG(Blue/Green)ãä½æ ãã®ãã¡1ã¤ã®ASGãELBã«ç´ä»ãã(æåã¯Blue) ã¢ããªã±ã¼ã·ã§ã³ã®ãªãªã¼ã¹æã«CodeDeployçµç±ã§Greenã¸ããã㤠ELBã®ç´ä»ãå AutoScaling GroupãGreenã«ä»ãæ¿ãã ã¢ããªã±ã¼ã·ã§ã³ã®ãªãªã¼ã¹æ¯ã«ASGãä½æãã¦ãããã¤ããã®å¾ELBã®æ¯ãåã
ãä¹ ãã¶ãã§ããtjinjinã§ã(â¹â¡â¹) æè¿ãããããã¦ãã¾ãããæ¢ é¨ãããã¨å¤ã§ããï¼ï¼å¤ã¢ãã¡ãå§ã¾ãã¾ããï¼ï¼ ã¨ãããã¨ã§ãPVè¦ãæãã®ç§ã®ããããã¯å è±ã®åè ã§ãï¼âãã£ãâã§ã¯ãªãâãã£ãâã§ãï¼ AWSç°å¢ã®ã³ã¼ãå å¼ç¤¾ã§ã¯AWSç°å¢ã®æ§ç¯ã管çã³ã³ã½ã¼ã«ã§ã®æ¸©ãã¿ã®ããä½æ¥ãRakeTaskã§è¡ã£ã¦ãã¾ãããããµã¼ãã¹ãæ°è¦ã§ç«ã¦ãã®ã«æéããããã¨ãã課é¡ããããAWSç°å¢ãã³ã¼ãåãããã¨ããæããããã¾ãããã¤ã³ãã©ãã¼ã å ã§æ¤è¨ããçµæã ååããã£ããã ã³ã¼ããèªã¿ãããã¨ãããã¨ã§ä¸é¨ãµã¼ãã¹ã§terraformãæ¡ç¨ãå§ãã¦ãã¾ãã terraformã使ã£ã¦è¡ãä¸ã§ãä½ç¹ãå£ã«ã¶ã¡å½ãã£ãã®ã§æ å ±å ±æã§ããã°ã¨æãã¾ãã terraformã¨ã¯ï¼ ä¸è¨ã§è¡¨ãã¨ã¤ã³ãã©æ§æãã³ã¼ãåãããã¨ã®ã§ãããã¼ã«ã¨ããã¨ããã§ãããããã¿ããªå¤§å¥½ãHash
ãVagrantãã£ã¦ä½ãï¼ï¼ã»oã»ï¼ï¼Vagrantéçºè Mitchell Hashimotoæ°ã«èãã ä»®æ³ã®éçºç°å¢ä½æãã¼ã«ã¨ãã¦äººæ°ãé«ã¾ã£ã¦ãããVagrantï¼ãã¤ã°ã©ã³ãï¼ãããã®éçºè ã§ããMitchell Hashimotoï¼ãããã§ã«ããã·ã¢ãï¼æ°ãæ¥æ¥ããã¨ã®æ å ±ãèãã2013å¹´7æ12æ¥ãVOYAGE GROUPã§è¡ããããã¼ãã¢ããã«é§ãä»ããã ãVagrantãã¨ã¯ Vagrantã¨ã¯ãéãç°å¢ã«ç§»è¡å¯è½ãªéçºç°å¢ãç°¡åã«æ§ç¯ã»ç®¡çããé å¸ãããã¨ãã§ããéçºç°å¢ä½æãã¼ã«ããã»ãã®æ°è¡æ¸ãã ãã§éçºç¨ã®ä»®æ³ãã·ã³ãæ§ç¯ã§ãããã¨ããåªããã®ã ã Vagrantã®ãã¸ã§ã³ã¯ããéçºè ã¨ã·ã¹ãã 管çè ã«ã¨ã£ã¦æé«ã®ãéçºããã¼ããæä¾ãããã¨ããVagrantããã¦ã³ãã¼ããã¦ãvagrant upãã¨å ¥åããå®è¡ããã ãã§ãããå¯è½ã¨ãªãã ã·ã¹ãã 管ç
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}