본문 바로가기
반응형

[AWS]354

25. [활용] Setup auto-scaling group ## 세션관리가 필요한 Auto Scaling 그룹 만들기 !! ( ASG 사용하면 ALB Sticky Session 이용안하고, DynamoDB 이용해야함) 1) Launch Configuration 생성 (Auto Scaling 항목 아래에 있음) - 기존 AMI 이용 - 기존 IAM Role 이용 2) ASG 그룹 생성 (위의 LC를 이용함) 3) ASG 그룹에서 ALB의 TG그룹을 연동 4) TG그룹에서 인스턴스 확인 가능 5) ALB DNS로 접속 테스트 6) 세션정보를 DynamoDB (중앙저장소) 관리 성공 OK so in this video let's set up our auto scaling group right. And we need to go through a series of ste.. 2022. 1. 24.
24. [활용] Create IAM role "Custom Policy 생성 getitem putitem updateitem Add - ARN " OK in the video let's set up the IAM role and this role will help our PHP application talk to the dynamodb table because dynamodb is an. AWS service and for the application to connect to the DynamoDB service and to access the tables and actions in that service the application needs permissions right. And the way to grant those permissions .. 2022. 1. 24.
23. [활용] Create sessions table in DynamoDB "이 값 이름은 PHP 애플리케이션에 하드코딩되어 있으므로 이 값도 동일하게 호출해야 합니다. 테이블 이름이 세션으로 설정되어 있는지 확인하고 기본 키를 ID로 설정하십시오." "기본적으로 DynamoDB 서비스에서 세션 테이블을 생성했습니다. 그리고 다음 비디오 세트에서 PHP 애플리케이션에서 테이블을 사용하는 방법을 살펴보겠습니다." OK in this video let us see how to create a session table. Right. This will be a table that our application will use to manage sessions centrally and we want to centralize sessions and so we create a session .. 2022. 1. 23.
22. Intro: Scalability - app layer ## 우리는 지난 시간에 로드밸런서 고정 세션을 사용합니다. 그리고 이것은 고정된 수의 서버에 적합합니다. ## 하지만 오토 스케일링을 사용하여 새로운 애플리케이션을 디자인하거나 애플리케이션을 다시 엔지니어링할 기회가 있다면, 세션을 처리하는 가장 좋은 방법은 이미지를 중앙 집중화하는 것처럼 세션을 중앙 집중화하는 것입니다. --> DynamoDB 및 IAM 역할을 활용 Welcome to Module four now in this module, we want to add scalability to our application, right? And we look at the application layer in this module and in the next one, we look at the scal.. 2022. 1. 23.
21. Configure sticky sessions 로드 밸런서는 쿠키를 사용하여 자체 쿠키를 사용하여 단순히 고정되도록 만드는 것임을 기억하십시오. 응용 프로그램 세션에 대해 아무것도 모릅니다. 여기에서 두 가지 다른 일이 일어나고 있으며 동기화해야 함을 이해하십시오. "로드 밸런서 세션 고정"과 "고유한 애플리케이션 세션 고정" In this video let's set up sticky sessions right. And let us start by understanding what the problem is. Right. And the problem is that when the user goes to the load balancer. Right and the load balancer will send this user to one server i.. 2022. 1. 23.
20. Setup load balancer This video let's see how to create a load balancer so the way we do this is will run through the launch sequence of the load balancer and there are a few things we'll have to configure. First we have to make sure that we use the application load balancer which is good for things like http and https load balancing. OK. Next we'll have to make sure that the load balancer comes up in the default VP.. 2022. 1. 23.
19. Configure & verify application OK in this video that's the how to configure the application. With the URL of the S3 image right. So this is the URL of the S3 image and also the endpoint the DNS endpoint of the RDS instance that we have. Right. And we need to configure these in our PHP application so that so that the application can talk to RDS and it can also use the image from S3. It can also use the image from S3. So the UR.. 2022. 1. 20.
18. Centralize images in S3 OK so in this video let us see how to create a bucket. Right. This is the S3 bucket and here we want to upload an image the image that we have in our application. The AWS icon image. And then we also need to make the image public so that we can access it because remember S3 has a security layer. Right. And by default all content is private, the access is denied. So we need do we need to make thi.. 2022. 1. 19.
17. Separate db tier OK so in this video let's launch our RDS instance this one. And once we launch this will connect to the instance from our EC2 instance using my sql client I'm using my sql client. So let's start with this launch and then once we verify the connectivity then we can configure this RDS instance in our application. In a later step in this module and then test out our application as well. OK. So the .. 2022. 1. 19.
16. Intro: Fault tolerance - multi-tier architecture Welcome to module 3, in this module we want to look at fault tolerance But for a multi-tier stack. Right. So in the previous module we looked at a single instance stack. Right. And this was a Essentially the PHP application with the mysql database in the same server. Right. And here we saw that although we have some options for recovering from different kinds of failures in in many of these opti.. 2022. 1. 19.
15. Recovery: Availability zone failure In this video let's see how to recover from an AZ failure. So the AZ availability is on has failed. Right. And this could be because of say a power supply problem or say the Internet connection into the availabilities on has failed or something like that. Right. And we're not able to access our services in this availability. So OK. And so we have to do something where we recover into a different.. 2022. 1. 19.
14. Recovery: Volume failure This video let's see how to recover from a volume failure. Right. And specifically we're talking about the data volume failure because this has are available data right we don't care so much about the root volume because the Rupali is already backed up in the AMI. Right. And the software doesn't change so much that the data is what changes very frequently and and the snapshotting that they do is.. 2022. 1. 19.
13. Recovery: Instance failure All right so in this video let's see how to recover from of instance failure. So. So here let's say are EC2 instance fails. But the obvious one to you especially the data was fine. Right. Also the easy availability zone is fine as well. So how do we recover in this scenario. So what we have to do is we have to create a replacement instance. Right. And this instance has to be in the same zone. Ri.. 2022. 1. 18.
12. Prep for recovery: Create AMI & EBS snapshot All right in this video let's see how to do the last two items in our list of checklist here. It's all for preparation as preparation for recovery. And these are create the AMI and also create the EBS snapshot. Right. So remember the purpose of the AMI is to help us create a replacement server so we can use this AMI and we can create a replacement for instance. And this could be in the same avai.. 2022. 1. 18.
11. Prep for recovery: Configure Elastic IP address All right in this video let's see how to configure the elastic IP address right so this one here and it's a very simple thing. It's a two step process. The first step is to allocate so we allocate which means we request AWS to issue an elastic IP address to our account. Right so this is always allocated to our account which means that we can attach this elastic IP address or associate the elasti.. 2022. 1. 18.
10. Prep for recovery: Configure MySQL to use data volume # SSH into your EC2 instance and run following commands: #Stop mysql: sudo systemctl stop mysql # Copy mysql db to /data, mount point of data vol, note that file permissions are also copied: sudo rsync -av /var/lib/mysql /data # Edit mysql config to change datadir, edit /etc/mysql/mysql.conf.d/mysqld.cnf: sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf datadir=/data/mysql # change datadir to this # E.. 2022. 1. 18.
9. Prepare for recovery: Configure data volume # SSH into your server, after you have attached the data volume to the instance # Check if data volume exists, device with name xvdf should exist: lsblk # Install file system on data volume sudo mkfs -t ext4 /dev/xvdf # Create mount point: sudo mkdir /data # Mount the volume to the mount point: sudo mount /dev/xvdf /data # Add this line to /etc/fstab, so volume is mounted after reboot: sudo vi /.. 2022. 1. 18.
8. Install MySQL server on EC2 instance # Run following commands after you SSH into your server # install mysql-server package, you will need to enter a password, twice. Remember this password sudo apt-get install mysql-server # test mysql server installation mysql -u root -p # exit mysql mysql> exit # edit localdb.php page with mysql server user and password, user should be root and password will be what you setup in the installation.. 2022. 1. 18.
7. Intro: Fault tolerance - single instance architecture Welcome to module 2, in this module will look at fault tolerance for single instance architectures what we mean by single instance architecture is that you have the PHP application right. And then you have the mysql. server right also the Apache web server right. All in the same in the same instance. And and we want to look at how to recover from different types of failures. Right. And this arch.. 2022. 1. 17.
6. Create AMI https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html Create an Amazon EBS-backed Linux AMI - Amazon Elastic Compute Cloud Create an Amazon EBS-backed Linux AMI To create an Amazon EBS-backed Linux AMI, start from an instance that you've launched from an existing Amazon EBS-backed Linux AMI. This can be an AMI you have obtained from the AWS Marketplace, an AMI you have cre.. 2022. 1. 17.
5. Deploy app on an EC2 instance ## run these after you SSH into the server # clone the app git clone https://savitras@bitbucket.org/savitras/aws-course-php-app.git # change to app folder cd aws-course-php-app/ # install app dependencies sh apt-get.sh # install composer curl -sS https://getcomposer.org/installer | php # install AWS SDK php composer.phar install # deploy php pages to apache document root sudo cp *.php /var/www/h.. 2022. 1. 17.
4. Prerequisites: Launch an EC2 instance # copy private key from downloads folder to working directory cp Downloads/your-private-key.pem . # secure private key chmod 400 your-private-key.pem # remove private key from Downloads folder rm Downloads/your-private-key.pem # SSH into server ssh -i your-private-key.pem ubuntu@ec2-public-ip Connect to your Linux instance from Windows using PuTTY https://docs.aws.amazon.com/AWSEC2/latest/UserGu.. 2022. 1. 17.
3. Intro : Deploy application 2022. 1. 17.
2. AWS Account, Free Tier and Costs 2022. 1. 16.
1. Intro: Course 2022. 1. 16.
[AWS] EC2를 72% 저렴하게 쓰는 방법! EC2 예약 인스턴스 완벽정리 출처 : https://www.youtube.com/watch?v=MHIKINUxVtQ&t=0s 2022. 1. 5.
[AWS] EC2 예약 인스턴스(RIs) vs Savings Plans 차이점!! 출처 : https://www.youtube.com/watch?v=hscwZJgF6Fc 2022. 1. 2.
[AWS] 그라파나 CPU/MEM 모니터링 설정 방법 SELECT mean("usage_idle")*-1+100 FROM "30d"."cpu" WHERE ("region" = 'eu-west-1') AND $timeFilter GROUP BY time($__interval), "host" ## 그라파나 MEMORY 사용현황 모니터링 SELECT mean("used_percent") FROM "30d"."mem" WHERE ("region" = 'us-west-2') AND $timeFilter GROUP BY time($__interval), "host" 2021. 12. 30.
[“outputs.influxdb”] did not complete within its flush interval Hi, can anyone help to sort out why there is errors: [“outputs.influxdb”] did not complete within its flush interval. Flush Interval was 10s, I have increased it to 15s but still getting errors. Nov 30 13:28:57 home-home-grafana-1 systemd[1]: Reloading The plugin-driven server agent for reporting metrics into InfluxDB. Nov 30 13:28:57 home-home-grafana-1 telegraf[972]: 2020-11-30T11:28:57Z I! Re.. 2021. 12. 29.
[AWS] TELEGRAF Metric_buffer_limit can’t exceed 1000 #9712 It looks like 1000 is the maximum buffer size we can reach with parameter metric_buffer_limit. Telegraf v1.19.3 in a Docker container. Here is my configuration : [agent] interval = "1s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 1000000 collection_jitter = "0s" flush_interval = "1s" flush_jitter = "0s" debug = true quiet = false omit_hostname = false ###################.. 2021. 12. 23.
반응형