2017-01-01ãã1å¹´éã®è¨äºä¸è¦§
åå1å¹´éã®æ¯ãè¿ãæ¸ããã®ã¯è»¢è·åãæå¾ã ã£ãã®ããã£ã¦ããã転è·ãã¦ä¸¸3å¹´çµã£ãã®ããæ©ããã ä»å¹´ã¯ã¤ã³ãã©ã¨ã³ã¸ãã¢ã«ãªã£ã¦ããããã¨æã£ã¦ãã£ã¦ãã£ã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ã®ã¹ã¯ãªããã®â¦
âââãããã¡ãªã®ã åãªãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¼ ç§éæ°ç¾ã¨ã大éã®ãã¼ã¿ãåãä»ããå ´åã«åãã¦ãªãã SQSãããã¡ãªã®ã ãã¥ã¼ã¤ã³ã°ãç®çã ãã©ãSQSã¯å¤§éã®ãã¼ã¿ãåãä»ãããã¨ã¯ç®çã¨ãã¦ãªãã SQSã¯å½ä»¤ãã¤ã£ãããå¥ã®workerããããâ¦
Terraformå ¥é #1ã®ç¶ãã§ãã Terraformãå§ããã®ã«ä¸çªã®éå£ æ¢åã®ã¤ã³ãã©ã³ã¼ãã§è©¦ãã¦ã¿ãããã©ã¢ã¯ã»ã¹ãã¼ã®æºåã¨ãã¢ã«ã¦ã³ãç³è«ãé¢åã ãããªããå£ãããã§æã:scream: èªåã§ããã«ãã¦ããAWSå¥ç´ããªãã¨è©¦ããªããã§ããã¨æã£ã¦é¢åâ¦
åæ¸ã 人ãæ¸ããterraformã®ã¡ã³ããããã¯è¦ããè¦ã¾ãã§ãã£ã¦ããã©ãä¸ããããã¨è¨ããããããåãããªããããæã£ã¦ã1å¹´åãããã®èªåãæãåºããªããæ°è»½ã«å ¥éãã¦ãããã«ã¯ã©ãããã°ãããèãã¦ã¿ã¾ããã Terraformã¯ããããªããã»ãã¨â¦
GoogleAnalyticsã®SDKã®ã©ããã¼ã©ã¤ãã©ãªãä½ããã ãã®ããã«ã¯ãpodspecå´ã«dependencyãæ¸ãã¦ããå¿ è¦ãããããããªæãã Pod::Spec.new do |s| s.name = 'Example' s.version = '0.1.0' s.summary = 'A short description of Example.' ç¥ s.depenâ¦
å½æ¹ãiOSãobjcãããã£ã¦ã¦ãAndroidãå°ããããã³ãã¨ã³ãã¯ãjqueryã®é ãããtypescriptãããã¾ã§ãªãã¨ãªãã ãµã¼ãã¼ã¯ãRailsãScala Play frameworkããããå°ã ã ä»ã¯ã¤ã³ãã©å¨ããAWSãGCPãã³ã³ããå¨ãã¯ãdockerãk8sãECSãDeisãªã©ããâ¦
allocã¯NSObjectã®ã¯ã©ã¹ã¡ã½ãã alloc - NSObject | Apple Developer Documentation + (instancetype)alloc; The isa instance variable of the new instance is initialized to a data structure that describes the class; memory for all other instancâ¦
AnyObjectã®å typealias AnyClass = AnyObject.Type ä½ãåãããªããã®ã®åã表ç¾ãã¦ãã åè Swifter - Swift Must Know Tips
ã¾ã¨ã åãlabelåãã¤ãããã¦ãã¦ãnamespaceå ã§ã®ã¿æ¯ãåãããã æ¤è¨¼ã®æ§æ GKEä¸ã§è©¦ãã Deploymentã§ãã åã«nginxãapacheãåãã¦ãã ã sandbox1ã§ã¯nginxãsandbox2ã§ã¯apacheãåãã¦ã Service(LoadBalancer)ã§æ¥ç¶ labelã¯ååã«ãã nameâ¦
ã¾ã¨ã NSSClassFromString使ã å¼æ°ã3ã¤ä»¥ä¸ã ã¨performSelectorã¯ä½¿ããªã Swiftã ã¨NSInvocationã¯ä½¿ããªãã®ã§ä»£ããã«IMPã使ã Class methodã¨Instance methodã§å¼ã³æ¹ã¡ãã£ã¨éã performSelectorã®è¿ãå¤ã®åã¯Unmanaged<AnyObject>ã§takeUnretainedValueã使</anyobject>â¦
k8sjp.connpass.com ä»æ¥ã¯ããã§çºè¡¨ãã¦ãã¾ã Kubernetes Meetup Tokyo #4 https://t.co/2rxxAnKyAB #k8sjpâ ãªãªã·ãããµã (@_mpon) 2017å¹´4æ20æ¥ ECSããGKEã«ä¹ãæããã ææ³ Google Japanã®é£å ã§ãªãã¼ãä¼å ´ã§çºè¡¨ããã人ãã£ã¡ãããã kuberâ¦
Deisã®postgresãoff-clusterã«ãã(Cloud SQLãå©ç¨) - ã¾ã¼ã½ãã£ã¦èª°ãã¤ããã®ï¼ãDeisã®postgresãoff-clusterã«ãã(postgresql on GCEãå©ç¨) - ã¾ã¼ã½ãã£ã¦èª°ãã¤ããã®ï¼ã§Cloud SQLãdeisã®databaseã¨ãããã¨ãããã¦ããã©è§£æ±ºãã話ã Cloud Sâ¦