DevOps & Cloud Engineering(229)
-
codepipeline stage status
- 개요 CodePipeline의 상태 확인을 할 수 있는 스크립트이다 - 스크립트 #!/bin/bash echo "CodePipeline Deploy Status" for i in {0..2}; do for codepipeline in $(aws codepipeline list-pipelines --query pipelines[].name --output text) do stage=$(aws codepipeline get-pipeline-state --name $codepipeline --query 'stageStates[].latestExecution[].status | '[$i]'' --output text) if [[ $stage == "Succeeded" ]] || [[ $stage == "No..
2022.11.21 -
Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
- 개요 ubuntu에서 패키지 목록을 업데이트할 때 아래와 같은 에러 발생 시 대처 방법이다. - 에러 메세지 Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. - 상황 $ sudo apt-get update Hit:1 https://apt.releases.hashicorp.com jammy InRelease Ign:2 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 InRelease Hit:3 http://security.ubuntu.com/ubuntu jammy-security..
2022.11.21 -
DocumentDB dump
- 개요 AWS document db를 파일 형식으로 Dump 하는 방법을 정리했다 - 방법1 ( mongdump 설치 on amazon linux 2 ) yum install -y https://fastdl.mongodb.org/tools/db/mongodb-database-tools-amazon2-x86_64-100.6.1.rpm - 방법2 ( mongodb tls/ssl enabled dump ) ## all database dump mongodump --ssl \ --host="sample-cluster.node.us-east-1.docdb.amazonaws.com:27017" \ --collection=sample-collection \ --out=sample-output-file \ --use..
2022.11.17 -
Amazon OpenSearch 유용한 uri
- 개요 OpenSearch의 index 및 설정을 curl을 통해 확인하고 조작하는 방법에 대해 정리했다. - 방법 ## cluster setting curl https://foobar.es.amazonaws.com/_cluster/settings?pretty ## cluster status curl https://foobar.es.amazonaws.com/_cluster/health?pretty ## cluster master status curl https://foobar.es.amazonaws.com/_cat/master?v ## index list curl https://foobar.es.amazonaws.com/_cat/indices?v ## index curl https://foobar.es..
2022.11.16 -
lambda excute role template
- 개요 Lambda를 실행하기 위한 IAM role기본 template - IAM Role & STS { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "logs:CreateLogGroup", "Resource": "aws:logs:::*" }, { "Effect": "Allow", "Action": [ "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:::log-group:/aws/lambda/function_name:*" ] } ] } { "Version": "2012-10-17", "Statement": [ { "Effect": "Al..
2022.11.15 -
internal domain 못 찾는 경우
- 현상 route53 internal domain 등록된 dns를 특정 vpc에서 못 찾는 경우 - 원인 route53 private hosted zone에 VPC 추가 - 해결 Hosted zone details : Associated VPCs에 VPC 추가 VPC setting : enableDnsHostnames // enableDnsSupport - reference https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-updating https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-private.html
2022.11.11 -
graylog message tester
- 개요 graylog에 tcp, udp message 테스트 방법에 대해 정리 했다. - 필요 패키지 ( linux NC) yum install -y nc - tcp for i in `seq 20`; do echo -n '{ "version": "1.1", "host": "example.org", "short_message": "A short message", "level": 5, "_some_info": "foo" }' | nc -w0.1 12201; done - udp for i in `seq 20`; do echo -n '{ "version": "1.1", "host": "example.org", "short_message": "A short message", "level": 5, "_some_i..
2022.11.11 -
cloudtrail console login event
- 개요 Cloudtrail을 통해 AWS Web Console login 이력을 확인하는 방법에 대해 정리 했다. - cloudtrail console login event가 저장되는 region 사용중인 region US East (N. Virginia) us-east-1 US West (Oregon) us-west-2 - 비고 3개 리전을 전부 확인해야 제대로된 IAM 로그를 확인 가능 - 참고 https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-global-service-events
2022.11.11 -
AWS VPC에 할당된 전체 리소스 확인
- 개요 AWS 특정 VPC에 할당된 리소스를 전부 확인할 수 있는 스크립트 - 스크립트 (vpclist.sh) #!/bin/bash vpc="$1" region="ap-northeast-2" aws ec2 describe-vpc-peering-connections --region $region --filters 'Name=requester-vpc-info.vpc-id,Values='$vpc | grep VpcPeeringConnectionId aws ec2 describe-nat-gateways --region $region --filter 'Name=vpc-id,Values='$vpc | grep NatGatewayId aws ec2 describe-instances --region $region -..
2022.11.08 -
AWS EBS 확장하는 법
- 개요 EBS는 online 확장이 가능하며, 변경간에 서비스에 영향이 없다. - 확장 방법 ### 디스크 확장 ## Web Console # EC2 -> EBS -> volumes -> modify ## aws cli # aws ec2 modify-volume --volume-type io1 --iops 10000 --size 200 --volume-id vol-11111111111111111 ## 늘어난 디스크 확인 # lsblk ## 파일 시스템 확장 # growpart /dev/nvme0n1 1 #### 늘어난 파일 시스템 적용 ## xfs ### nitro & xen # sudo xfs_growfs -d / ### ext4 ## nitro # sudo resize2fs /dev/nvme0n1p..
2022.11.07