Deploy ãã¼ã« Stretcher 㧠Rollback ãã
Stretcher ã使ãã¨ãConsul ã¨é£æºãã¦ãæè¬ Pull åã® Deploy ãã§ããããã«ãªãã¾ãã
Consul ã¨é£æºãããå ´åã¯ã
$ consul event -name deploy s3://xxx-stretcher-files/deploy-20151112-193139.yml
ã®ããã«ãconsul event
㧠Manifest ã® path ãæå®ãã¦ã¤ãã³ããéãã¨ã
YAML ã«æ¸ãã¦ãã path(s3, http, file) ãã tar.gz ãåå¾ãã¦å±éãã¦ããã¾ãã
Stretcher 㯠Rollback ããã®ãç°¡åã§ã
Rollback ããããã¼ã¸ã§ã³ã® Manifest ã® path ãæå®ã㦠consul event
ãå®è¡ããã ãã§ãã
S3 ã«ç½®ãã¦ããå ´åãé½åº¦ aws s3 ls
ãªã©ã㦠Manifest ã® path ã調ã¹ã¦ consul event
ãå®è¡ããã®ã¯é¢åã§ãã
ããã§ã以ä¸ã®æ§ãªã¹ã¯ãªãããç¨æãã¦ãã㨠Rollback ã楽ã«ãªãã¾ãã
aws s3 ls
ã®çµæããææ°ã® Manifest ãé¤ãã¦ã
bash ã® select ã§çªå·ã§é¸æã§ããããã«ãã¦ãã¾ãã
å®è¡ããã¨ä»¥ä¸ã®ããã«ãªãã¾ãã
$ ./rollback_stretcher.sh 1) deploy-20151112-191452.yml 14) deploy-20151029-215027.yml 2) deploy-20151112-191236.yml 15) deploy-20151028-182546.yml 3) deploy-20151112-190934.yml 16) deploy-20151028-175655.yml 4) deploy-20151112-190820.yml 17) deploy-20151028-175201.yml 5) deploy-20151112-190421.yml 18) deploy-20151028-174909.yml 6) deploy-20151112-190254.yml 19) deploy-20151028-174155.yml 7) deploy-20151112-190127.yml 20) deploy-20151028-171838.yml 8) deploy-20151112-190018.yml 21) deploy-20151022-191616.yml 9) deploy-20151112-185832.yml 22) deploy-20151022-143736.yml 10) deploy-20151112-185441.yml 23) deploy-20151022-143011.yml 11) deploy-20151112-185341.yml 24) deploy-20151022-142645.yml 12) deploy-20151112-185242.yml 25) deploy-20151022-141728.yml 13) deploy-20151110-162450.yml 26) deploy-20151022-140614.yml Select manifest (quit q or Ctrl-C) : 1 Event ID: 7a5e80c5-27aa-973e-3328-b7093a91439f
Rollback ããã¹ã¯ãªãããç¨æãã¦ããã¨ã
é害çºçæã«ãè½ã¡çãã¦ä½æ¥ãã§ããã®ã§è¯ãã§ããã
â»åææ¡ä»¶ã¨ãã¦ãManifest ã®ãã¡ã¤ã«åã« timestamp ãå«ã㦠sort ã§ããããã«ãã¦ããå¿ è¦ãããã¾ãã