GitHub Actions移è¡æã«ã¤ãã§ã«ãã£ããã¤
æ°æ§æ§æ
ã¢ããã¼ã·ã§ã³
capistrano-itamaeã§ã¯ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¹ãã®ããã«sshã§ããVMãå¿ è¦ã ã£ãã®ã§Vagrantã¨DigitalOceanã使ã£ã¦ã¾ããã
ãããä¸è¨ã®ãããªçç±ã§CIã®Dockerizeããããã¨èãã¾ãã
- VMä½æã«ã¯DigitalOceanã®ã¢ã«ã¦ã³ããå¿ è¦ãªã®ã§ã第ä¸è ãPRãéãæã«ãã¼ã«ã«ã§æ軽ã«åä½ç¢ºèªã§ããªããï¼CIã§ã¯åã®ã¢ã«ã¦ã³ãã§DigitalOceanã使ããããã«ãã¦ã¾ãï¼
- ãªã¢ã¼ãã«VMãä½ãã®ã§ãã¼ã«ã«ã«VMãä½ãå ´åã¨æ¯ã¹ã¦ãªã¼ãã¼ãããããã
- ä¸æ ®ã®äºæ ã§ãªã¢ã¼ãã®VMãæ®ãç¶ããã¨èª²éãçºçããã®ã§å®æçã«cronã§ãã§ãã¯ããå¿ è¦ããã
- CIã§æ¯åVagrantã®ã¤ã³ã¹ãã¼ã«ããã®ã«æéããããï¼30ç§ç¨åº¦ï¼
- CIã§èµ·åãããDockerã³ã³ããããå¥ã®Dockerã³ã³ãããèµ·åããã®ã¯ã ãããã®CIãµã¼ãã¹ã§å¯¾å¿ãã¦ã
- Werckerãä»ã®èªåã®ä¸ã§ã¯ã¬ã¬ã·ã¼æ§æ
å®éã®å·®å
Dockerã³ã³ããã«å¯¾ãã¦cap deployããã®ã¯ä¸è¨ã¨ã³ããªãåèã«ãªãã¾ããã
ã¡ãªã¿ã«æåã¯CircleCIã使ãäºå®ã ã£ãã®ã§ãããGitHub Actionsã¯ãã¼ã«ã«ã«ã³ã³ãããä½ãã®ã«å¯¾ãã¦CircleCIã ã¨ãªã¢ã¼ãã«ã³ã³ãããä½ãé¢ä¿ã§
docker image build . -t ssh_server docker run -d -p 10000:22 ssh_server
ã®ãããªæãã§ã³ã³ãããèµ·åããæã«ãCircleCIã ã¨10000çªãã¼ãã«éä¿¡ã§ããªãã£ãããããã«ãªãã¾ããã *1
ããPR
ã¾ã¨ã
- Dockerizeãããã¨ã«ããã¢ãã³ãªæ§æã«ãªã£ã
- CIããVagrantä¾åãã¯ããã
- ãªã¢ã¼ãã«ã³ã³ãããä½ãããã¼ã«ã«ã«ã³ã³ãããä½ããã®æåã®éããCIé¸æã®çç±ã«ãªãã¨ããå¦ã³ããã£ã
*1: https://circleci.com/docs/ja/2.0/building-docker-images/ ã«ããã¸ã§ãã¨ãªã¢ã¼ã Dockerã¯ããããç°ãªãéé¢ãããç°å¢å ã§å®è¡ããã¾ãã ãã®ãããDocker ã³ã³ããã¯ãªã¢ã¼ã Docker å ã§ç¨¼åãã¦ããã³ã³ããã¨ç´æ¥ããã¨ããããã¨ã¯ã§ãã¾ããããã£ã¦æ¸ãã¦ã