Skip to content

Instantly share code, notes, and snippets.

@LeoHeo
Last active June 28, 2016 16:02
Show Gist options
  • Save LeoHeo/19b122adc2e9a4afa862162ca0f8a4d0 to your computer and use it in GitHub Desktop.
Save LeoHeo/19b122adc2e9a4afa862162ca0f8a4d0 to your computer and use it in GitHub Desktop.

동영상을 기본으로 함

다른 부분만 기록

Seoul Region

기본적으로 Seoul Region을 ap-northeast-2라고 부름

IAM User

Code deploy, EC2 CodeDeploy Role를 생성
Inline Policies로 Custom Policy도 적용
참고 github
User에 Permission으로 새로운 유저 생성
Access Key, Secret Key Download

EC2 Amazon Linux

Role를 EC2 CodeDeploy로 지정 standalone SSH client 접속 EC2 만들고 상위에 Connect 입력 순서대로 입력

sudo su
yum -y update
cd /home/ec2-user
aws configure

aws configure하고 나서 마지막에 Region 입력하라고 하면 ap-northeast-2 입력 아래로 쭉 진행

s3를 만든다.

aws s3 cp s3://aws-codedeploy-<region>/latest/install . --region <region>
aws s3 cp s3://aws-codedeploy-ap-northeast-2/latest/install . --region ap-northeast-2

Download가 되어야 다음 install이 됨

chmod +x ./install
sed -i "s/sleep(.*)/sleep(10)/" install
./install auto
service codedeploy-agent status

여기까지 하면 아래와 같은 메세지가 출력 되어야 함 The AWS CodeDeploy agent is running as PID <ID>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment