Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emr ranger 2.0 #72

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions aws_emr_blog_v3/cloudformation/emr-template.template
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,16 @@ Parameters:
AllowedValues:
- emr-5.32.0
- emr-6.3.0
- emr-6.4.0
- emr-6.7.0
Description: Release label for the EMR cluster
AppsEMR:
Description: 'Comma separated list of applications to install on the cluster e.g., '
Type: String
Default: Hadoop, Spark, Hive, Livy, Hue
AllowedValues:
- "Hadoop, Spark, Hive, Livy, Hue"
- "Hadoop, Spark, Hive, Livy, Hue, Trino"
- "Hadoop, Spark, Hive, Livy"
EnableKerberos:
Description: Enable Kerberos on the Cluster. This is Required for Ranger EMR support
Expand Down Expand Up @@ -341,6 +344,11 @@ Parameters:
Default: true
Type: String
AllowedValues: [true, false]
EnableSparkDDLAndIceberg:
Description: Installs Spark DDL's and Iceberg configuration
Default: false
Type: String
AllowedValues: [ true, false ]
RangerAgentKeySecretName:
Description: Name of Ranger Agent Cert Secrets mgr resource
Type: String
Expand Down Expand Up @@ -533,10 +541,20 @@ Resources:
- App: "EMRFS-S3"
ClientSecretARN: !Join ['', ['arn:aws:secretsmanager:', !Ref "AWS::Region", ':', !Ref "AWS::AccountId", ':secret:', !Ref RangerAgentKeySecretName]]
PolicyRepositoryName: "amazonemrs3"
- App: "Trino"
ClientSecretARN: !Join ['', ['arn:aws:secretsmanager:', !Ref "AWS::Region", ':', !Ref "AWS::AccountId", ':secret:', !Ref RangerAgentKeySecretName]]
PolicyRepositoryName: "amazonemrtrino"
AuditConfiguration:
Destinations:
AmazonCloudWatchLogs:
CloudWatchLogGroup: !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:${RangerCloudWatchLogGroupName}'
EncryptionConfiguration:
EnableInTransitEncryption: true
EnableAtRestEncryption: false
InTransitEncryptionConfiguration:
TLSCertificateConfiguration:
CertificateProviderType: PEM
S3Object: !Join ['', ["s3://", !Ref S3ArtifactBucket, "/", !Ref S3ArtifactKey, "/", !Ref ProjectVersion, "/emr-tls/", "emr-certs-certs.zip"]]
LaunchEMRClusterFunction:
Type: AWS::Lambda::Function
DependsOn: LambdaExecutionRole
Expand Down Expand Up @@ -603,9 +621,11 @@ Resources:
DBHostName: !Ref DBHostName
DBUserName: !Ref DBUserName
DBRootPassword: !Ref DBRootPassword
ClientSecretARN: !Join ['', ['arn:aws:secretsmanager:', !Ref "AWS::Region", ':', !Ref "AWS::AccountId", ':secret:', !Ref RangerAgentKeySecretName]]
CertLocationPath: !Join ['', ["s3://", !Ref S3ArtifactBucket, "/", !Ref S3ArtifactKey, "/", !Ref ProjectVersion]]
RangerAdminPassword: !Ref RangerAdminPassword
DefaultDomain: !If [ USEastRegion, 'EC2.INTERNAL', 'COMPUTE.INTERNAL' ]
EnableSparkDDLAndIceberg: !Ref EnableSparkDDLAndIceberg

emrCreateWaitHandle:
Type: AWS::CloudFormation::WaitConditionHandle
Expand Down
2 changes: 2 additions & 0 deletions aws_emr_blog_v3/cloudformation/lambda-amilookup-win.template
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Parameters:
- Windows Server 2012 RTM English 64-bit
- Windows Server 2012 R2 English 64-bit
- Windows Server 2016 Base English 64-bit
- Windows Server 2019 Base English 64-bit
ConstraintDescription: Must be a valid Windows version.
ModuleName:
Description: The name of the JavaScript file
Expand All @@ -87,6 +88,7 @@ Parameters:
Type: String
AllowedValues:
- 3.0
- beta
Resources:
# SampleInstance:
# Type: AWS::EC2::Instance
Expand Down
1 change: 1 addition & 0 deletions aws_emr_blog_v3/cloudformation/nestedstack.template
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ Parameters:
AllowedValues:
- emr-5.32.0
- emr-6.3.0
- emr-6.4.0
KeyPairName:
Description: Name of an existing EC2 key pair to access the Amazon EMR cluster
Type: AWS::EC2::KeyPair::KeyName
Expand Down
2 changes: 1 addition & 1 deletion aws_emr_blog_v3/cloudformation/ranger-server.template

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions aws_emr_blog_v3/cloudformation/step1_vpc-ec2-ad.template
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Resources:
Properties:
TemplateURL: !Join ['', ['https://s3.amazonaws.com/', !Ref 'S3ArtifactBucket', '/', !Ref 'S3ArtifactKey', '/', !Ref 'ProjectVersion', '/cloudformation/', 'lambda-amilookup-win.template']]
Parameters:
ProjectVersion: !Ref 'ProjectVersion'
S3Bucket: !Ref 'S3Bucket'
S3Key: !Ref 'S3Key'
STEP1VPC:
Expand Down
9 changes: 8 additions & 1 deletion aws_emr_blog_v3/cloudformation/step2_ranger-rds-emr.template
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ Parameters:
Description: 'Comma separated list of applications to install on the cluster e.g., '
Type: String
Default: Hadoop, Spark, Hive, Livy, Hue
AllowedValues: ["Hadoop, Spark, Hive, Livy, Hue"]
AllowedValues:
- "Hadoop, Spark, Hive, Livy, Hue"
- "Hadoop, Spark, Hive, Livy, Hue, Trino"
- "Hadoop, Spark, Hive, Livy"
EnableKerberos:
Description: Enable Kerberos on the Cluster. This is Required for Ranger EMR support
Default: true
Expand All @@ -228,6 +231,8 @@ Parameters:
AllowedValues:
- emr-5.32.0
- emr-6.3.0
- emr-6.4.0
- emr-6.7.0
S3Bucket:
Description: S3Bucket for the code [update this is you want to run this stack in a region other than US-EAST-1]
Type: String
Expand Down Expand Up @@ -345,6 +350,7 @@ Resources:
Parameters:
S3Bucket: !Ref 'S3ArtifactBucket'
S3Key: !Ref 'S3ArtifactKey'
ProjectVersion: !Ref 'ProjectVersion'
VPC: !Ref VPC
Subnet: !If [ InstallEMRRangerinPublicSubnet, !Ref PublicSubnet1AID, !Ref PrivateSubnet1AID ]
DBHostName: !GetAtt 'RDSDatabase.Outputs.RDSInstanceAddress'
Expand All @@ -368,6 +374,7 @@ Resources:
Properties:
TemplateURL: !Join ['', ['https://s3.amazonaws.com/', !Ref 'S3ArtifactBucket', '/', !Ref 'S3ArtifactKey', '/', !Ref 'ProjectVersion', '/cloudformation/', 'emr-template.template']]
Parameters:
ProjectVersion: !Ref 'ProjectVersion'
S3Bucket: !Ref 'S3Bucket'
S3Key: !Ref 'S3Key'
S3ArtifactBucket: !Ref 'S3ArtifactBucket'
Expand Down
3 changes: 2 additions & 1 deletion aws_emr_blog_v3/code/amilookup-win/amilookup-win.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ var osNameToPattern = {
"Windows Server 2008 R2 English 64-bit": "Windows_Server-2008-R2_SP1-English-64Bit-Base-*",
"Windows Server 2012 RTM English 64-bit": "Windows_Server-2012-RTM-English-64Bit-Base-*",
"Windows Server 2012 R2 English 64-bit": "Windows_Server-2012-R2_RTM-English-64Bit-Base-*",
"Windows Server 2016 Base English 64-bit": "Windows_Server-2016-English-Full-Base-*"
"Windows Server 2016 Base English 64-bit": "Windows_Server-2016-English-Full-Base-*",
"Windows Server 2019 Base English 64-bit": "Windows_Server-2019-English-Full-Base-*"
};

var aws = require("aws-sdk");
Expand Down
Loading