AWS
ãã£ã¨ããæ¹æ³ããã£ãã®ã§ä¸çªä¸ã«è¿½è¨ ææ°ã®AMIã¿ãããªæ å ±ã¯ä»ã©ãã¯SSMã§æä¾ãã¦ãããããã«ãªã£ã¦ãã¦ãã¾ãã Amazon ECS æé©å AMI ãã¼ã¸ã§ã³ - Amazon Elastic Container Service aws ssm get-parameters --names /aws/service/ecs/optimizedâ¦
ä»ã¾ã§ã¯nginxã§ãªãã¤ã¬ã¯ãããã¦ã ãããªæãã§httpã§ã¢ã¯ã»ã¹ãã¦ãããhttpsã«ãªãã¤ã¬ã¯ãããã£ã¦ããã®ãnginxã®è¨å®ã§æ¸ãã¦ã¾ããã if ($http_x_forwarded_proto != https) { return 301 https://$host$request_uri; } ããã§å°ãã®ã¯ ALBããã®â¦
github.com ã¤ã³ã¿ã©ã¯ãã£ãã«ECS Serviceã«ãããã¤ããã¦ãImageã®ä¸è¦§ãè¦ããã¨ã ãããªæãã§$ ecswalk servicesã¨æã¤ã¨ãjã¨kã§é¸ãã ãã/ãæ¼ãã¦pecoã¿ããã«interactiveã§filteringãã¦é¸ã¶ãã¨ãã§ãã¾ãã AWSã®ã³ã³ã½ã¼ã«ã§è¦ãã¨ãã®æ å ±ã¨â¦
spot instanceããªã¯ã¨ã¹ãããã¨bad-parametersã¨è¨ããã¦ãã¾ã c3.xlargeã®ã¤ã³ã¹ã¿ã³ã¹ãone-timeã®spot requestããããã¨æã£ã¦ã以ä¸ã®ãããªã¨ã©ã¼ãåºã¦å¤±æããã bad-parameters: Your Spot request failed due to bad parameters. Spot request â¦
DNS-01æ¹å¼ HTTPãå©ç¨ãã¦èªè¨¼ããå ´åã«ãIPå¶éã社å ã®ã¿ã®éä¿¡ãªã©ã®å¶éããã¦ããç°å¢ã«ããã¦ã¯Let's Encryptå´ããã®éä¿¡ãå±ããªãã®ã§èªè¨¼ã§ãã¾ãããããã§DNSã®TXTã¬ã³ã¼ãã§èªè¨¼ããDNS-01ã®ã¿ã¤ããããã¾ãã ãã¡ãã®ãµã¤ãã®èª¬æããããâ¦
ä»æµè¡ãã®ã³ãã¯ãããã«ã¼ https://recruit-mp.qiita.com/_mpon/items/cc5a957f029c3902ddcb ã¨åããããªworkshopã¨ãããã¤ã§ãDeep Dive into the Connected Vehicle Reference Architectureã¨ãããã¤ãåããã ããããååã«ã¤ããã¦ãã³ãã³ã¨åå â¦
AWS re:Inventã§ã®workshopã¨ã¯ï¼ 2æéããã使ã£ã¦å®éã«AWSä¸ã§ãªãããã®å¦çããããã¤ã§ãã ä»åãã¼ãããã£ãã®ã¯ãHigh-Throughput Genomics on AWSã¨ããã ã²ãã 解æãAWSä¸ã§ããã¨ãããã¤ã§ããããªããECSã£ã¦æ¸ãã¦ãã£ããããã³ãã³ã¨åâ¦
wordpressãåããã«ã¯ä½ãå¿ è¦ã ã¾ãwordpressãåããããã«ä½ãå¿ è¦ããæ´çããã¨ãwordpressã¯MySQLã¨phpãåãç°å¢ãå¿ è¦ã§ãã ãªã®ã§æ¬å½ã«å¿ è¦ãªãã®ã¯DBãµã¼ãã¼ã¨Webãµã¼ãã¼ã ããªãã ãã©ãå®éã®æ¬çªéç¨ãã¦ãã¨ãããç»åã®ãã£ãã·ã¥ã¨ãDâ¦
alertåºãå¾ã«recoverãããªã alertãéç¥ããããã©ããã®å¾ãrecoverdãæ¥ãªãã¨ããç¾è±¡ 次ã®æ¥ã«ãªã£ã¦recoverããã ããã¯ãªããããæ¹ãããã ããã¨datadogã®ãµãã¼ãã«é£çµ¡ åå ãµãã¼ãã®åç > AWS Cloudwatch doesn't generate a metric valueâ¦
terraformã§ECSã®clusterã¨serviceãä½æããã«ããã£ã¦å®éã®éç¨ãéãã¦å°ãå¤ãã£ã¦ããã®ã§ã¾ã¨ãã¦ããã æåã®terraformã®moduleæ§æã§èµ·ããåé¡ç¹ 以åã¯ãaws_ecs_clusterã¨aws_autoscaling_groupãåä¸moduleã«ããã¦ããã åé¡ãã®1: ã¤ã³ã¹ã¿â¦
å ¥æããã¤ã³ã¹ã¿ã³ã¹ã¿ã¤ãã¨ã¹ãã©ãã¸ã¼ spot fleetã®åæ£ã¹ãã©ãã¸ã¼ã«ã¯ãlowestPriceã¨diversifiedããããlowestPriceã¯ãã®æç¹ã§å ¥æãå ¥ãããã¼ã«ã®ä¸ã§ä¸çªæå®å¤ã®ãã¤ã§å ¨å°è³¼å ¥ããããªã®ã§ããã®ãã¼ã«ãé«é¨°ããã¨ãã«å¼±ãã ããããdiveâ¦
ä¼ç¤¾ã§æçºè¡¨ãããã¤ãæ±ç¨çãªæãã«ãã¦æ®ãã¦ããã¾ãã EC2ã®ãå¤æ®µãæ§è½ãã®ã¾ã¾ã«8å²ãå®ããªãã¾ããã¨ãã話 Spot Fleetåã®AWSã®ECSã§ã¯ã©ã¹ã¿ã¼æ§æã«ã¤ã㦠ã¯ã©ã¹ã¿ã¼ã®EC2ã¤ã³ã¹ã¿ã³ã¹ã¯ãªã³ããã³ãï¼å®ä¾¡ï¼ã®autoscaling Dockeråã§ã¹ã±ã¼â¦
â» è¿½è¨ çµæ§ã¡ããã¡ãããã¯ããã¦ããã£ã¦ããã®ã§æå¤ã¨éè¦ããã®ããªã ãããè¨äºè¦ã¦åãããªãã¨ãããã£ãã 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ã«â¦
Route53ã®zoneã®ååãåãã«ãã¦ããã¨ã»ã» Route53ã§ã¯ãå¤é¨å ¬éç¨ã®public zoneã¨VPCå ã«éããprivate zoneã§ãããããã¬ã³ã¼ããç»é²ãããã¨ãã§ãã¾ãã ããããpublic/privateãªzoneã§domain nameãåãã«ããã¨public zoneã®ååãå¼ããªããªã£â¦
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ãâ¦
èæ¯ AWSã§VPCä½ã£ãããããã¨ãããã©ãGCPãã£ããã¨ãªãã£ã¦äººã¯è²ã éãã«æ¸æã ã¢ã«ã¦ã³ãã®é¢ä¿æ§ããããã¯ã¼ã¯ã®æ¦å¿µã®éããªã©ãç解ããã®ã§ã¾ã¨ãã AWSã¨GCPã®ã¢ã«ã¦ã³ãã®èãæ¹ã®éã AWSã®å ´åããã人éã«å¯¾ãã¦è²ã ãªAWSã¢ã«ã¦ã³ããä»ä¸â¦
http://docs.aws.amazon.com/ja_jp/general/latest/gr/aws_service_limits.html#limits_elastic_load_balancer ãã¼ããã©ã³ãµã¼ãããã®ã»ãã¥ãªãã£ã°ã«ã¼ã 5 ãæ å½è æ§ å¹³ç´ ãããä¸è©±ã«ãªã£ã¦ããã¾ãã AWSã«ã¹ã¿ãã¼ãµã¼ãã¹ã®èåã§ãããã¾ãã æâ¦
IPã¢ãã¬ã¹ããããã追å ãããã¨ããã:scream: åæ ç¹ã®IPã¢ãã¬ã¹ã追å ãã¦ã»ããã¨ããä¾é ¼ã§ãterraform planã§åé¡ãªãã£ãã®ã§ãapplyãããã¨ã©ã¼ãåºãã * aws_security_group.elb_app: Error authorizing security group ingress rules: RulesPâ¦
descriptionãæ°è»½ãªååã§ä½ã£ã¦ãã¾ã£ã¦ããã¨ã§ã¡ããã£ã¨å¤æ´ããããªã¼ã¨æã£ã¦ terraform planããã¨force new resourceã«ãªã£ã¦ãã¾ãã ããã¥ã¡ã³ãã«ãæ¸ãã¦ãã£ãã AWS: aws_security_group - Terraform by HashiCorp description - (Optional,â¦
åºå®ãã¼ãã ã¨ã¤ã³ã¹ã¿ã³ã¹ã®æ°ä»¥ä¸ã«ã³ã³ãããå¢ãããªã ECSä¸ã§fluentdãè¤æ°ã³ã³ããã§åããã¦éç´ãµã¼ãã¼ã¨ãã¦åãããã¨ãã¦ããã æåã ãã試ãã«autoscaling groupã§1ã¤ã®ã¤ã³ã¹ã¿ã³ã¹ã ãç«ã¡ä¸ãã¦ãã³ã³ããã2ã¤(desired count = 2)ãªãµâ¦
github.com time_slice_formatã®å¤ãexampleã«å¾ã£ã¦ã%Y%m%d-%Hã«ãããã ãã©ããªããªãs3ã«ã¢ãããããªãã buffered_pathã«ã¯åããã¦ããã ãã©ãªããªãS3ã«ã¯ä¸ãã£ã¦ããªãã instanceã®policiyããªã¼ã¨ãs3ã®bucketã®policiyããªã¼ã¨ãè²ã è¿·ã£ã¦ã¦â¦
ããèªåã§ä¸ããä½ã£ã¦ã¿ãã¨ã»ã»ã» ä»ã¾ã§äººãä½ã£ãECSä¸ã§ãµã¼ãã¹ã®ä½æã¨ãæ´æ°ã¨ããã¿ã¹ã¯ã®æ´æ°ã¨ããã£ã¦ãã¦ãªãã¨ãªã使ãã¦ããã©ã ããèªåã§ä¸ããä½ã£ã¦ã¿ãã¨ããããã®è¦ç´ ãã©ããªã£ã¦ãã®ãä½ãåãã£ã¦ãªããã¨ã«æ°ã¥ããã ä»ã¾ã§ã¯Eâ¦
ç§ã§ãã å ¬å¼ã®ãããåããããã docs.aws.amazon.com
AWS STSãåãããªãã£ã AWS Security Token Serviceã®ãã¨ã aws stsã§ã°ã°ã㨠ãã®ããã¥ã¡ã³ããåºã¦ãã¦ãã¼ã£ã¨èªãã§ãªããCLIãããã¨ãã«ä½¿ãã®ãï¼ã¿ãããªãããã§ãã£ããããªãã£ãã docs.aws.amazon.com EC2ãµã¼ãã¹ãä¿¡é ¼ããã¨ããæ¦å¿µ ãâ¦