åœç€Ÿã®Wild Apricotã¯ãASPããã³.NETã§å®è¡ãããMS SQL ServerãããŒã¿ããŒã¹ãšããŠäœ¿çšãããœãããŠã§ã¢ïŒSaaSïŒãéçºããŠããŸãã ãããã£ãŠãç§ãã¡ãæã£ãŠããã€ã³ãã©ã¹ãã©ã¯ãã£ã®å€§éšåã¯ãWindowsãäž»ã«Server 2012 R2ãå®è¡ããŠããŸãã ãããã£ãŠãsysopéšéã¯å®æçã«æ°ããè»ã調éããå¿ èŠããããå Žåã«ãã£ãŠã¯ã©ã€ãç°å¢ãšãã¹ãç°å¢ã®äž¡æ¹ã§ãã¡ãŒã å šäœãå±éããããšããããŸãã çŸåšãçŽ20ã®ãã€ããŒãã€ã¶ãŒããããããã«å¿ããŠ100ãè¶ ããããŸããŸãªãã·ã³ãããããã®å€§åã¯Windows VMã§ãã çŸåšã¯ããããããäºãã«åé¢ããããšãæãŸãã12åã®ã³ã³ããŒãã³ãã§æ§æãããŠãããããã«6å以äžã®éçºç°å¢ãã€ã³ã¹ããŒã«ããããšãèšç»ãããŠããŸãã ãã®ãããªåé¡ã解決ããããã«ãããã»ã¹å šäœã®èªååãèããŸããã å šäœã®ãã¹ã®èª¬æãéåžžã«è©³çŽ°ã«ãããããèšäºã倧ãããªã£ãããã3ã€ã®éšåã«åããããšã«ããŸããã ãã®ããŒãã§ã¯ãäžè¬çãªåé¡ã«å¯ŸåŠããããŒã«ã®éžæã«ã€ããŠèª¬æãããããªãäœæ¥ã®ããã«ç°å¢ãæºåããæ¹æ³ã説æããŸãã
ãªãWindowsãªã®ãããªãHyper-Vãªã®ãïŒ
æŽå²çã«ãç§ãã¡ãæã£ãŠãããã¹ãŠã®æ°ããVMã¯ãMicrosoft Hyper-Vãã€ããŒãã€ã¶ãŒãå®è¡ããŠããŸãã
ããã«ã¯ããã€ãã®çç±ããããŸãã
- è¿å¹Žãéåžžã«å€ãéçºãããŠãããå šäœãšããŠãã¿ã¹ã¯ã«ååãªæ©èœãåããŠããŸãã æãéèŠãªããšãšããŠãVagrantã¯åœŒã人éçã«ãµããŒããå§ããŸãããããã«ã€ããŠã¯åŸã§è©³ãã説æããŸãã ãŸããå€ãã®Linuxãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ãµããŒããç»å ŽããŸãããããã«ãããè€æ°ã®OSã䜿çšãããŠããå ŽåïŒä»ã®èª°ããééã£ãŠããå ŽåïŒãHyper-Vã§ç°ãªããã·ã³ã®åç©åããã¹ãã§ããŸãã
- Microsoftã®ãµãŒããŒOSãšã¯ã©ã€ã¢ã³ãOSã®äž¡æ¹ã«çµã¿èŸŒãŸããŠãããã€ãã£ãããŒã«ïŒMMCããŒã«ããããšPowershellïŒã䜿çšããŠç®¡çãããšäŸ¿å©ã§ãã
- Hyper-Vã®åœ¹å²ã¯ãµãŒããŒã«è¿œå ããã®ãéåžžã«ç°¡åã§ãããäžè¬çã«ãã€ã³ã¹ããŒã«ã¯ïŒããšãã°ãKVMãŸãã¯ESXiã®å ŽåãããïŒããåºãç¯å²ã®ç®¡çè
ãå©çšã§ããŸããèšèªã ããã«ããã管çè
ã ãã§ãªããéçºè
ããã¹ã¿ãŒïŒå€ãã®å Žåãç®çã®ããã«ç°å¢ãè¿
éã«äžããå¿
èŠãããïŒã«ãç°¡åã«ã€ã³ã¹ããŒã«ã§ããå¯èœãªã¢ããªã±ãŒã·ã§ã³ã®ç¯å²ãåºãããŸãã
ç©çãã·ã³ããä»®æ³ãã·ã³ãžã®ç§»è¡ã¯ãã·ã³ãã«ãªãŠãŒãã£ãªãã£Disk2VHDã®å©ããåããŠéåžžã«ç°¡åãã€é«éã§ã-ã¹ãããã·ã§ããã¡ã«ããºã ã䜿çšããããã«ãããã©ã€ãç°å¢ã§å®è¡ãããŠãã皌åäžã®ã·ã¹ãã ã®VHDã€ã¡ãŒãžãäœæã§ããŸãã ã€ã³ãã©ã¹ãã©ã¯ãã£ãä»®æ³åããéã«éåžžã«åœ¹ç«ã¡ãŸããã åæ§ã«ãVMWareãã¹ãã移è¡ããŸããã - Microsoft Hyper-V Serverã¯è³Œå ¥ããå¿ èŠã¯ãããŸããã ç¡æã§ãã ç§ãã¡ã«ãšã£ãŠãããã¯ããŸãé¢é£æ§ããããŸããã§ããããããã¯è¿œå è²»çšãªãã§åœŒå¥³ãšãéã¶ãçŽ æŽãããæ©äŒã§ãã
- å¿ èŠã«å¿ããŠãåŸã§Hyper-VããAzureã¯ã©ãŠããã©ãããã©ãŒã ã«ç°¡åã«ç§»è¡ã§ããŸãããåãããŒã«ã䜿çšããŠåŒãç¶ã管çã§ããŸãã
ç®æš
ç§ã®ä»äºã¯ãæ°ããä»®æ³ãã·ã³ã®äœæãèªååããããšã§ããã å¿ èŠãªãã¹ãŠã®ãœãããŠã§ã¢ãšèšå®ã䜿çšããŠããã€ããŒãã€ã¶ãŒã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãè¿ éã«äžããå¿ èŠããããŸãã ããã¯åºæ¬çã«ãæ§æ管çã·ã¹ãã ãåããæ¬æ Œçãªç¶ç¶çå±éã·ã¹ãã ãžã®æåã®ã¹ãããã§ããããããå®è£ ããäºå®ã§ãã ããã¯ãã®èšäºã®ç¯å²ãã¯ããã«è¶ ããŠããŸããããã®ãããã¯ã«é¢ããååãªè³æãããããã®è³æãèå³æ·±ãæçšã§ããããšãå€æããå Žåã次ã®èšäºã§ãã€ã¯ããœãã補åã®äžçã§åããã¹ãŠã®ãã¥ã¢ã³ã¹ã«ã€ããŠã®è©±ãç¶ããŸãã ãã®çµæãã¿ã¹ã¯ã¯ããªãäŒçµ±çãªããŒã«ã®ã»ããã䜿çšããŠæ£åžžã«è§£æ±ºãããŸãããããã®å€ãã¯é·ãéãªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã®äžçã§ç¥ãããŠããŸããããããŸããŸãªèœãšãç©Žãè±å¯ã§ãããããWindowsã®äžçã«ããããå®å šã«é©çšããããšã¯ããã»ã©å®¹æã§ã¯ãããŸããã§ããã ãã®çµæã次ã®ãããŒã«ããããã«æ±ºããŸããã
- ãã§ã³ã¬ãŒã
- æŸæµªè ;
- Boxstarter
- ã·ã§ãã
ãã®èšäºã§ã¯ããªã¹ãã®æåã®3ã€ã®ãã€ã³ãã«ã€ããŠèª¬æããŸãã
VagrantãšChefãChocolateyãBoxstarterãéžã¶çç±
ããã§åœŒãã¯äœããããªãéžã°ããã®ã§ããïŒ
- Chocolateyã¯ãWindowsçšã®ããã±ãŒãžãããŒãžã£ãŒã§ãã ãã¡ãããMicrosoftã¯Windows Server 10ã«ç¬èªã®çµ±åããã±ãŒãžãããŒãžã£ãŒãæèŒããããšãçºè¡šããŸããããæ¬çªç°å¢ã«å®è£ ããåã¯ãŸã ãŸã å ã§ãããçŸåšã®ãšãããchocolatiersãéåžžã«ããŸã䜿çšã§ããŸãã ãã¹ãŠã®äŸåé¢ä¿ãšãšãã«ãå¿ èŠãªãœãããŠã§ã¢ã®ã€ã³ã¹ããŒã«ãèªååã§ããŸãã ãã®ããã«ãNuGetããã±ãŒãžã䜿çšãããŸããããã¯ãèªåã§äœæã§ããŸããããã¯ãç¬èªã®ãµãŒããŒãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ããå¿ èŠãããå Žåã«éåžžã«äŸ¿å©ã§ãã
- Vagrantã䜿çšãããšãããã¯ã¹ãµã³ãã«ä»®æ³ãã·ã³ãäœæããŠäœ¿çšãã1ã€ïŒãŸãã¯è€æ°ããŸãã¯æ°åïŒã®ä»®æ³ãã·ã³ãèªåçã«å±éããå¿
èŠãªãã©ã¡ãŒã¿ãŒãæ§æããããããããããžã§ãã³ã°ïŒå¿
èŠãªãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ããã³æ§æããããã»ã¹ïŒãå®è£
ããããšãã§ããŸãã ããšãã°ãIISãšChef-clientãã€ã³ã¹ããŒã«ã§ããææ°ã®WindowsæŽæ°ããã°ã©ã ãã€ã³ã¹ããŒã«ããããã©ã«ããŒãïŒãã¡ã€ã«æ¡åŒµåãšé ããã¡ã€ã«ãèŠããããã«ïŒæ§æãããããŒãããã¡ã€ã¢ãŠã©ãŒã«ã§éããããŠãŒã¶ãŒã¢ã«ãŠã³ããèšå®ããããªã©ããã¹ãŠçŽæ¥åå ããã«åè¿°ã®ã·ããªãªã«åŸã£ãŠãå¿
èŠã«å¿ããŠèªååèµ·åãã管çè
ã
é¡äŒŒç©ã®äžã§ãSystem Centerã¯ããã«æãæµ®ãã³ããã³ãã¬ãŒããäœæããŠãããããè€æ°ã®ä»®æ³ãã·ã³ãå±éããããšãã§ããŸãã ãã ããå€ãã®çç±ã§ãVagrantã奜ã¿ãŸããã軜éã§ãéãäžå€®ãµãŒããŒãå¿ èŠãšãããæ°ããä»®æ³ãã·ã³ã®ãã£ã¹ã¯ã¯å ã®ãã³ãã¬ãŒãã®ãã£ã¹ã¯ã«äŸåããŸããã ããã«ãVagrantã¯éåžžã®ã³ãã³ãã©ã€ã³ããæ©èœãããããGUIãªãã§ãã€ããŒãã€ã¶ãŒäžã§ç°¡åã«äœ¿çšã§ããŸãã
ãã®èšäºã«ã¯ãããŸããŸãªèœãšãç©Žãžã®ããªãã®åç §ãå«ãŸããŸã-ææ°ããŒãžã§ã³ãçŸåšæ€èšãããŠããããšãããã«èšãããã§ã-ããããåŸç¶ã®ããŒãžã§ã³ã§1.7.2ïŒç§ã¯é¡ã£ãŠããŸãïŒå€ãã®åé¡ãä¿®æ£ãããäžèŠãªæŸèæãèœã¡ãŸãã ãããã圌ãã¯ãã£ãšæ°ãããã°ãè¿œå ããŠãããã®ã§ãäžé£ã®èšäºå šäœãäœæããããšãã§ããŸãã - Boxstarterã¯ãå®æãããã·ã³ãšçºçãããã·ã³ã®äž¡æ¹ã®æ§æãå€§å¹ ã«ç°¡çŽ åãã䟿å©ãªã¹ã¯ãªããã®ã»ããã§ãã Chocolateyãšéåžžã«å¯æ¥ã«é£æºãã1ã€ã®ã³ãã³ãã§æçµã·ã¹ãã ãæ§æããWebãµã€ããŸãã¯ãããã¯ãŒã¯ãã©ã«ããŒããã¹ã¯ãªãããããŠã³ããŒãã§ããŸãã ããã«ããã®äžã«ã¯ãèè ã«ããã·ã§ãåãã®æ¢è£œã®ã¬ã·ãããããŸãã
- Chef㯠ãåæã®åæåãšææ°ã®ç¶æ ã®ç¶æã®äž¡æ¹ãå«ããæãåºãæå³ã§æ§æãéäžç®¡çããããã«äœ¿çšãããŸãã 代ããã«ä»ã®ã·ã¹ãã ã䜿çšããããšãã§ããŸããããã®æ®åçã匷åãªã³ãã¥ããã£ãããã³æŽ»çºãªéçºã®ããã«ç§ã¯ããã«æ±ºããŸãããããšãã°ãæè¿ãIISã®ã³ãã¥ããã£ã¯ãã¯ããã¯ã®å€§å¹ ã«æ¹åãããæ°ããããŒãžã§ã³ãç»å ŽããŸããã ãŸãããã¡ãããããã¯åœŒã以åã«ãããå°ãçµéšãããšããäºå®ã®åœ±é¿ãåããŸããã
ãã®ããŒã«ãããã䜿çšãããšã䜿ãæ £ããã·ã¹ãã ã§1ã€ã®ããã«ã«ç¶ç¶çããªããªãŒã®ãã¹ãŠã®éæ³ãåãå ¥ããããšãã§ããŸãã
å±éã®äž»ãªæ®µé
ããŠãå±éã®å¿çšæè¡éšåã§ãã楜ããéšåã«åãããããŸãããã
Hyper-Vããã³ç®¡çãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ãã
ãŸãããã¹ãïŒä»®æ³ãã·ã³ããããã€ãããã·ã¹ãã ïŒãæºåããå¿ èŠããããŸãã ããããããŒã«ã«ãã¹ãã«å¿ èŠã§ããããã¹ãŠãããªãã座ã£ãŠããã®ãšåãã³ã³ãã¥ãŒã¿ãŒäžã§å転ããå Žåããã¹ãŠãã·ã³ãã«ã§ééçã§ãã ãã ããæçµçã«å®å šã«ç°ãªãå ŽæïŒã©ã€ãç°å¢ã®ããŒã¿ã»ã³ã¿ãŒãè¿é£ã®ãµãŒããŒããŸãã¯ç¥æ¯ã®ãããããã¯ïŒã§ä»®æ³ã³ã³ãã¥ãŒã¿ãŒãå¿ èŠã«ãªããšãç¶æ³ãããçºçããŸãã å®éã®ãšãããVagrantã¹ã¯ãªããã¯ããã«ããŒã«ã«ãã¹ãã§ãã¹ãŠã®æäœãå®è¡ããŸãã ååãšããŠãã ããæåã«èªå® ã«å±éããèšå®ããŠãã¬ã€ããããããé ããã€ããŒãã€ã¶ãŒã«ç§»è¡ããããšã¯ãããŸãããããµãŒããŒãããªããšåããããã¯ãŒã¯ã»ã°ã¡ã³ãã«ããå Žåã§ããããªãã®æéããããããšãããããŸãã å°çã®å察åŽã«ããããŒã¿ã»ã³ã¿ãŒã®VPNãä»ããŠå±éããå¿ èŠãããå Žåãã€ã³ã¹ã¿ã³ã¹ããšã«1æé以äžãããå¯èœæ§ããããäžèŠãªã¢ã¯ã·ã§ã³ãå®è¡ããå¿ èŠãããå ŽåããããŸãïŒç§ã®å Žåããšã¯ã¹ããŒããšã€ã³ããŒããããã«ä»®æ³ã¹ã€ãããåŒã³åºãããå Žåã®ãããã¯ãŒã¯ã®åæ§æããŸããŸãªæ¹æ³ã§ã
ãã®ãããæé©ãªãœãªã¥ãŒã·ã§ã³ãšããŠé »ç¹ã«äœ¿çšããããšãèšç»ãããŠãããã¹ãŠã®ãã€ããŒãã€ã¶ãŒã§Vagrant LiftãéžæããŸããã ããã«ããããã»ã¹ãé«éåãããŸãïŒ1å°ã®ãã·ã³ã§ã-çµå±ã®ãšãããããã¯ã¹ã®ééã¯å±éãããã€ã¡ãŒãžã®VHDãã¡ã€ã«ãããå€§å¹ ã«å°ãªããªããŸãïŒãããµãŒããŒã«äœåãªãœãããŠã§ã¢ãè¿œå ãããŸãã 幞ããªããšã«ãChocolateyãšVagrantã¯GUIãå¿ èŠãšããªããããç¡æã®Hyper-V Serverã«ãç°¡åã«ã€ã³ã¹ããŒã«ã§ããŸãã
ãã®ã¿ã¹ã¯å šäœã¯ããªãç°¡åã§ãã
- Hyper-Vã®åœ¹å²ãWindows 8ãŸãã¯Server 2012ã«ã€ã³ã¹ããŒã«ããã«ã¯ãåèµ·åãå¿
èŠã§ãããGUIã䜿çšããå Žåã¯ãµãŒããŒãããŒãžã£ãŒã䜿çšããŠïŒèšäºã®æåŸã«ãããªã³ã¯ãåç
§ïŒã管çè
æš©éãæã€PowerShellã䜿çšããŸãïŒ
Install-WindowsFeature âååHyper-V -IncludeManagementTools
- ã·ã§ã³ã©ãã£ãšã¯Powershellãã1ã€ã®ã³ãã³ãã§å
¥åãããŸãïŒ
iexïŒïŒnew-object net.webclientïŒ.DownloadStringïŒ 'https://chocolatey.org/install.ps1'ïŒïŒ
- ãŸããVagrantã¯æ¢ã«ChocolateyããäžæããŠããŸãïŒ
choco install vagrant
äžè¬ã«ãäžèŠãªããã°ã©ã ã§ãµãŒããŒãè©°ãŸãããããªãå ŽåããŸãã¯åžžã«ææ°ããŒãžã§ã³ã䜿çšããããšã奜ãå ŽåïŒãªããžããªã«ã¯éåžžææ°ããŒãžã§ã³ãå«ãŸããŠããã«ãããããããããã«ã¯è¡šç€ºãããªãããšã«æ³šæããŠãã ããïŒ-Vagrantãã€ã³ã¹ããŒã«ããããšã§Chocolatiersãªãã§å®å šã«å®è¡ã§ããŸããã£ã¹ããªãã¥ãŒã·ã§ã³ããæåã§ã msiããã±ãŒãžã®åœ¢åŒã§æäŸããããããã³ã³ãœãŒã«ããã®ã€ã³ã¹ããŒã«ã«åé¡ã¯ãªãã¯ãã§ãã ããããå人çã«ã¯ããã§ã³ã¬ãŒãã奜ãã ãšããçç±ã ãã§ãªããç§ã¯æåã®ãªãã·ã§ã³ã奜ã-ç§ã¯ãã¹ãŠã®ãœãããŠã§ã¢ããã®ããã«ããŠãèªå® ã®ã©ãããããäžã§ã眮ããŠããã
ãã®ç¬éãç§ãã¡ã¯æåã®èœãšãç©Žã«çŽé¢ããŠããŸãïŒç§ã¯ãã§ã«ãã®éãåä»ã«ãªããšèŠåããŸãããïŒïŒ å®éããã©ã³ãïŒã€ãŸãããvagrantãã®ç¿»èš³æ¹æ³ïŒã¯ããŒãžã§ã³ããšã«ç°ãªããã£ã¬ã¯ããªã«çœ®ãããææ°ãªãªãŒã¹ã§ã¯CïŒ\ HashiCorp \ Vagrantãã©ã«ããŒã®ã·ã¹ãã ãã©ã€ãã®ã«ãŒãã«çŽæ¥ã€ã³ã¹ããŒã«ãããããã«ãªããŸããã ã ãã¹ãŠã¯åé¡ãããŸãããã圌ã¯å®æçã«èªåã®ãã©ã«ããŒãžã®ãã¹ãç°å¢å€æ°ã«æžã蟌ãããšãå¿ããŠããããããã€ããªãžã®ãã«ãã¹ãå ¥åããªãéããã·ã¹ãã ã¯ãããèŠã€ããããšãã§ããŸããã ããã¯ãåçŽãªPowershellã³ãã³ãã§åŠçãããŸãã
$ envïŒPath + =â; CïŒ\ HashiCorp \ Vagrant \ binâ
ã³ãã³ãã©ã€ã³ã§ã¯ã/ Mã¹ã€ãããæå®ããŠsetxã³ãã³ãã䜿çšããŸãã ããšãã°ãããã¯ã¹ãä¿åãããã©ã«ãã®å Žæãå€æŽããå¿ èŠãããå ŽåïŒããã©ã«ãã§ã¯ããã©ã€ãCã®ãã©ã«ãã«ä¿åããŸããã·ã¹ãã ãã©ã€ãã«ååãªã¹ããŒã¹ããªãå ŽåãããŸãå¿«é©ã§ã¯ãªãå ŽåããããŸãïŒïŒ
setx VAGRANT_HOME "XïŒ/ your / path" / M
ããã§ããã¹ãã®æºåãå®äºããŸããã å±éã®ããã®åºæ¬çãªããã¯ã¹ã®äœææ¹æ³ãšããããããã«äœ¿çšããæ¹æ³ã«ã€ããŠ-次ã®ããŒãïŒ ããŒã2 ïŒã§èª¬æããŸãã ãŸããæçšãªè³æãšãªã³ã¯ã®ãªã¹ããå«ãå¥ã®ç« ããããŸãã