안녕하세요
Gruter Enterprise Tajo 를 사용하기 위한 1회성 선행 작업으로
IAM Role 생성과 Security Group 생성이 있습니다.
G.E.T User Guide 문서
(https://s3.amazonaws.com/gruter-enterprise-tajo/GruterEnterpriseTajoUserGuide.pdf)
5페이지
Create IAM Role for Tajo 섹션에 자세한 설명이 있으니 참조하세요. (아래 빨간색 부분)
고영경 드림.
---
Create IAM Role for Tajo
Create a role for Tajo and add a policy into it in order to grant EC2 control and S3 access to Tajo. Then create an instance-profile and add the role above. Note that the quoted JSON string in --assume-role-policy-document and --policy-document should be in a single line.
aws iam create-role --role-name ROLE_NAME \ --assume-role-policy-document \ '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}' aws iam put-role-policy --role-name ROLE_NAME \ --policy-name Tajo-Permissions \ --policy-document \ '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:*","Resource":"*"},{"Action":"ec2:*","Effect":"Allow","Resource":"*"}]}' aws iam create-instance-profile --instance-profile-name PROFILE_NAME aws iam add-role-to-instance-profile --instance-profile-name PROFILE_NAME --role-name ROLE_NAME |
aws iam create-role --role-name ROLE_NAME \
--assume-role-policy-document \
'{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}'
aws iam put-role-policy --role-name ROLE_NAME \
--policy-name Tajo-Permissions \
--policy-document \
'{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:*","Resource":"*"},{"Action":"ec2:*","Effect":"Allow","Resource":"*"}]}'
aws iam create-instance-profile --instance-profile-name PROFILE_NAME
aws iam add-role-to-instance-profile --instance-profile-name PROFILE_NAME --role-name ROLE_NAME
aws iam list-instance-profiles
동영상은 편집상 인스턴스 런치 후 바로 태그가 보였는데, 실제 구동시 인스턴스 런치 후 약 3~5분 후(부팅및 설정 실행에 따른 소요) 태그가 생성됩니다.
따라서 생성하신 후 3~5분 정도 후에 확인해 보시기 바랍니다. 그리고 AWS web UI에서 태크는 오토리로드가 안돼니 페이지 리플레시를 해야합니다.
만약 5분이 지나도 태그가 생성이안돼시면, EC2 web UI에서 해당 인스턴스를 선택후 하단의 Description의 IAM role를 클릭해 들어가셔서 Show Policy로 ec2권한이 있는지 확인 부탁드립니다.
안녕하세요.
클러스터 모드가 아니라 stand-alone 두 개가 실행되었다면
S3 BUCKET 을 지정하지 않은 것 아닌지 확인해 보세요.
User Guide 문서의 아래 빨간색 부분입니다.
5) Step 3. Configure Instance Details:
a) Number of Instances: Enter the total number of instances. For example, set it
"4" if you want to create Tajo cluster with 1 master and 3 workers.
NOTE: If "1", Tajo master and worker will be installed on a single instance, but only Tajo master will be started by default. You can start Tajo worker process manually by:
ex) sudo -u tajo tajo-daemon.sh start worker
b) IAM role: Choose the role which you created before.
c) Advanced Details: Set the following configurations in the textarea.
ex) -b my-tajo-bucket -d 'tajo tajopw 123.45.67.8:3306'
● -b S3_BUCKET: REQUIRED. Your S3 bucket to be used for Tajo root directory. If it is omitted, individual stand-alone Tajo instances will be created instead of Tajo cluster, which you may not intend.