2017-11-01ãã1ã¶æéã®è¨äºä¸è¦§
Before & æé«ãªAfterã®Jenkinsfileã®diff currentBuild.description = ã«å¥½ããªå¤ãè¨å®ããã ã âï¸âï¸ stage ("start notification") { steps { slackSend color: "good", message: "ãã«ãéå§ãã¾ãã" + script { + currentBuild.description = "ããã«â¦
Jenkins pipline scriptã¨ã¯ï¼ æã¯pluginã§æä¾ããã¦ãã¿ããã ãã©ãJenkins2ããã¯æ¨æºpluginã«ãªã£ãã¨ãã代ç©ãGroovy DSLã¨ãgroovyã®scriptã§Jenkinsããããã®ã¸ã§ããã³ã¼ãã«è½ã¨ãã¾ãã Jenkinsfileã§ã¸ã§ããæ¸ãã¨ãã®ã¡ãªããã¨ãã¡ãªããâ¦
ç¼å°å¹´ å°å¹´ãç¹°ãè¿ãåãåãã¤ããã®ã§ãæ¬å½ã«ç¼ãç¾ããæã«ã¯å¤§äººãã¡ã¯ä¿¡ç¨ããã誰ãå©ãã«æ¥ãªãã£ããããã¦æã®ç¾ã¯å ¨ã¦ç¼ã«é£ã¹ããã¦ãã¾ããæ»äº¡ããã Wikipedia ãµã¼ãã¼ã®ç£è¦ã§alertãwarningãå¢ããããã¨ã ã ãã ãæé»ã®äºè§£ã¿ããã®â¦
â» è¿½è¨ çµæ§ã¡ããã¡ãããã¯ããã¦ããã£ã¦ããã®ã§æå¤ã¨éè¦ããã®ããªã ãããè¨äºè¦ã¦åãããªãã¨ãããã£ãã Twitterãªãæ°è»½ã«è³ªåãã¦ããã£ã¦å¤§ä¸å¤«ã§ãï¼ï¼ 社å ã§ã¤ã³ãã©ã¨ã³ã¸ãã¢å¢ãããããªã¨æã£ã¦ECSã®æ¦å¿µãç解ãã¦ããããã¨æã£ã¦â¦
awslogs-stream-prefixãã¤ããªãå ´å log streamåã "${docker psã®CONTAINER ID}${randomãªæåå}" ã¨ãªãã ããã ã¨ãä¾ãã°ãããã³ã³ããã®ãã°ã ãè¦ããã£ã¦ããå ´åã«ãsshãã°ã¤ã³ãã¦ãdocker psããªãã¨ãããªã awslogs-stream-prefixãã¤ãâ¦
ã¨ã«ããããã¨ããããã ãã®æ¬ãèªãã§ããã¤ã¯ããµã¼ãã¹ã¨ãé¢ä¿ãªãã社å ã®ã¤ã³ãã©ãã¾ã ã¾ã ããããã¨ãããªã¼ãã¨ããããã®æ¬ã«æ¸ãã¦ããã¬ãã«ã«ããªããã°ã¨ããæ°ã«ãªã£ãã æåãéã«ãã¤ã¯ããµã¼ãã¹ã£ã¦ãããããã®ã ãã¼ã¿ãããªæ¬ãâ¦
äºã®çºç«¯ Railsã®logrotateããããã¨ã®ãã¡ã¤ã«ãã©ãã«ä¿åããããã¨è¿·ã£ãã®ããã£ããã§ããã fluentdãªã©ã§S3ã«ä¿åãã¦ããã¨ãä½ããã¼ã¨æã£ã¦ããã§ããã社å ã®ã¡ã³ãã¼ã«ç¸è«ãã¦ã¿ãã¨ããAWSã®Cloudwatch Logsã§ç°¡åã«ã§ãããã¨ã®ãã¨ã§ã調â¦
ç¾è±¡ fluentdãéãã¦ãããã°ãS3ã«putãã¦ããã¤ããããå ¨ä½ã®ãã¡ã®1/3ãããããputããããã以å¤ããã¹ããã¦ããã¨ãã話ã§ãã 調ã¹ã¦ã¿ãã¨ã»ã»ã¨ã©ã¼åãã¦ã fluentdã®ãã«ã¹ãã§ãã¯ã¨ãã¯ç¢ºèªãã¦ãã¦ãfluentdãæ»ãã§ããæ§åã¯ãªãã S3ã«â¦
ç¾è±¡ æ®éRailsã®ã¢ã¯ã»ã¹ãã°ã£ã¦production.logã«åºåããã¾ãããåºåãããªããã¨ããã£ãã¨ããæªè«ã®è©±ã§ãã 対å¿ã1è¡ã§ã¾ã¨ããã¨ãPuma使ãã¨ãã¯Rails5ããã¯RAILS_LOG_TO_STDOUTãè¨å®ãããã¨ãããã¨ã§ãã ããããã¯æªè«ã®è©³ç´°ã§ã åå 1: â¦
GASã ã¨constã®ã¹ã³ã¼ããéãï¼ æè¿ã®Javascriptã¨ãTypeScriptçéã§ã¯ãvarãletãconstãå¤æ°ã®å®£è¨ã¨ãã¦ä½¿ãã¦ãscalaã¨ãswiftè³ããããã¨ãªãã¹ãåä»£å ¥ã¯é¿ãããã®ã§constã使ãããã ä¾ãã°foræå ã§ä¸æçãªå¤æ°ã宣è¨ãã¦å©ç¨ãããã¨ããå ´â¦
Route53ã®zoneã®ååãåãã«ãã¦ããã¨ã»ã» Route53ã§ã¯ãå¤é¨å ¬éç¨ã®public zoneã¨VPCå ã«éããprivate zoneã§ãããããã¬ã³ã¼ããç»é²ãããã¨ãã§ãã¾ãã ããããpublic/privateãªzoneã§domain nameãåãã«ããã¨public zoneã®ååãå¼ããªããªã£â¦
åºãããããã¦ã¼ã¹ã±ã¼ã¹ ä¾ãã°ãGCPã®2ã¤ã®projectããCloud SQLã®è¤æ°ã®Databaseã®metricsãéããã¦ããå ´åã project Aã®å ´åã¯ããã£ã¡ã®ãã£ã³ãã«ã«éç¥ãproject Bã®å ´åã¯ããã£ã¡ã®ãã£ã³ãã«ã«éç¥ãããã¿ãããªã¨ãã«æå¹ã§ãã metricsã®è¨â¦
cronã¯UTCã®ã¾ã¾ JSTã«ã¿ã¤ã ã¾ã¼ã³å¤æ´ããã¨ãã«ãcrondãrestartããªãã¨å®è¡ãUTCã®ã¾ã¾ã§ããã service crond restart ã§åæ ãã¾ããã åè: Timezoneãè¨å®ãããcronã®å®è¡æéãããã EC2ã®åæã¹ã¯ãªããã¨ãã§rebootããï¼ AWSã®EC2ã®user datâ¦
ã¾ã¨ã çªç¶EC2ã¤ã³ã¹ã¿ã³ã¹ãæ éãã¦ã1æéå¾ãããã«AWSãããã®ã¤ã³ã¹ã¿ã³ã¹ä¿®å¾©ä¸å¯è½ã ããretireããããã¨ããéç¥ãã¡ã¼ã«ã§æ¥ã¾ããã stopããããã«ãstoppingã§ãªããªãé²æããªãã£ãã®ã§ãéçºç°å¢ã ã£ãããterminateãããã©ãterminateãâ¦
å ¥éä¸é¨ä½ã©ã¹ã www.mpon.me www.mpon.me ããã¾ã§ã§ãç°¡åã«Terraformã®æ©è½ããããã£ã±ã«èª¬æãã¦ãã¾ããã ä»åã¯ãããããç¾å®ã«å³ããã¤ã³ãã©ãä½ãã¾ã§ã®æµãã追ããªãããå¾ã ã«ãªãã¡ã¯ã¿ãªã³ã°ãã¦ãããã¨ã§å®è·µçãªèãæ¹ã身ã«ã¤ãã¦ããâ¦
æ¦è¦ Google Container Engine(kubernetes)ã®ç£è¦ç°å¢ã®åå - ã¾ã¼ã½ãã£ã¦èª°ãã¤ããã®ï¼ãåãã¦Datadogã§ãã Google Cloud Platform Integrationãããã GCPã®ã¡ããªã¯ã¹ãAPIçµç±ã§ã¨ã£ã¦ãã¦ããã kubernetes Integrationãããã kubernetesã®ãªã½â¦
ã¾ãã¯k8sã®ç£è¦ç°å¢ã«ã¤ãã¦ç解ãã DatadogãStackdriverãªã©ã®å¤é¨ãµã¼ãã¹ã使ãã¨ç°¡åã«ã§ããããªã®ã§ã¯ããããããããä½ãç£è¦ãããã¨ãã¦ããã®ãããåãããªãããªã®ã§ãã¾ãã¯å¤é¨ãµã¼ãã¹ã使ããªãå ´åã©ããªã£ã¦ããã調ã¹ã¦ã¿ãã ã¡ãªã¿â¦
GKE+Locustã®è² è·ãã¹ãç°å¢ãä½ããã¨æã£ãèæ¯ GKEã¨Locustãé¸ãã§ã¿ãçç±ã¨ãã¦ã¯ä»¥ä¸ã®ãããªãã¤ã³ãã§ããã ã¤ã³ã¹ã¿ã³ã¹ã¯ç§èª²éãªã®ã§æ°è»½ã«å©ç¨ã§ãã GKE(k8s)ãªã®ã§åçãã¼ããããã³ã°ã®è¨å®ãªã©ãç°¡å Locustã¯åãªãpythonã®ã¹ã¯ãªããã®â¦