Skip to content

Commit 8cbb6b8

Browse files
author
Varun Rao
committed
Add support for EMR 6.1 and PrestoSQL plugin
1 parent 3e43cfd commit 8cbb6b8

10 files changed

+23
-46
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The repo contains code tied to [AWS Big Data Blog](https://aws.amazon.com/blogs/
2222
| Module| Tag | Cloudformation stack | Apache Ranger Version | EMR Version | Supported Plugins|
2323
| -------| --- | --- | --- | --- |-------------------------------------------------------- |
2424
| V1 | [1.0](https://github.com/aws-samples/aws-emr-apache-ranger/tree/v1.0) | [![Foo](images/launch_stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=EMRSecurityWithRangerBlogV1&templateURL=https://s3.amazonaws.com/aws-bigdata-blog/artifacts/aws-blog-emr-ranger/1.0/cloudformation/nestedstack.template) | Apache Ranger 1.0, 2.1 | emr-5.28.1, emr-5.29.0, emr-5.30.1| Hive 2.x, Hadoop 2.x, PrestoDB 0.227/0.232 (Presto plugin needs Ranger 2.0) |
25-
| V1 | (work in progress) | [![Foo](images/launch_stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=EMRSecurityWithRangerBlogV1&templateURL=https://s3.amazonaws.com/aws-bigdata-blog/artifacts/aws-blog-emr-ranger/1.1/cloudformation/nestedstack.template) | Apache Ranger 2.2 | emr-6.1.0 | Hive 3.x, Hadoop 3.x, PrestoSQL 338 OR PrestoDB 0.232 |
25+
| V1 | [1.1](https://github.com/aws-samples/aws-emr-apache-ranger/tree/v1.1) | [![Foo](images/launch_stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=EMRSecurityWithRangerBlogV1&templateURL=https://s3.amazonaws.com/aws-bigdata-blog/artifacts/aws-blog-emr-ranger/1.1/cloudformation/nestedstack.template) | Apache Ranger 2.2 | emr-5.29.0, emr-5.30.1, emr-6.1.0 | Hive 3.x, Hadoop 3.x, PrestoSQL 338 OR PrestoDB 0.232 |
2626

2727
> WARNING: The current V1 setup does not enable strong cluster level Auth (Kerberos) for EMR. Only LDAP enabled Hue UI. V2 will support Kerberos - refer to the [roadmap](https://github.com/aws-samples/aws-emr-apache-ranger/projects/1) for details.
2828
### PrestoSQL Ranger plugin (EMR 6.1 & Ranger 2.2)

aws_emr_blog_v1/cloudformation/emr-template.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Parameters:
5959
- emr-5.28.0
6060
- emr-5.28.1
6161
- emr-5.29.0
62-
- emr-5.30.0
62+
- emr-5.30.1
6363
- emr-5.31.0
6464
- emr-5.32.0
6565
- emr-6.1.0
@@ -146,6 +146,7 @@ Resources:
146146
Path: !Join ['', ['s3://', !Ref s3artifactsRepo, '/', !Ref s3artifactsRepoVersion, '/scripts/download-scripts.sh']]
147147
Args:
148148
- !Join ['', ['s3://', !Ref s3artifactsRepo]]
149+
- !Ref 's3artifactsRepoVersion'
149150
Configurations:
150151
- Classification: hue-ini
151152
Configurations:

aws_emr_blog_v1/cloudformation/nestedstack.template

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,13 @@ Parameters:
8787
Type: String
8888
Default: '2.0'
8989
emrReleaseLabel:
90-
Default: emr-5.29.0
90+
Default: emr-6.1.0
9191
AllowedValues:
92-
- emr-5.0.0
93-
- emr-5.4.0
94-
- emr-5.16.0
95-
- emr-5.17.0
96-
- emr-5.26.0
97-
- emr-5.27.0
98-
- emr-5.28.0
99-
- emr-5.28.1
10092
- emr-5.29.0
101-
- emr-5.30.0
93+
- emr-5.30.1
10294
- emr-5.31.0
103-
- emr-5.32.0
10495
- emr-6.1.0
105-
Description: Release label for the EMR cluster
96+
Description: Release label for the EMR clusterPrestoEngine
10697
Type: String
10798
PrestoEngine:
10899
Description: Presto Engine. PrestoSQL is only available with EMR 6.x
@@ -114,7 +105,7 @@ Parameters:
114105
Description: S3 location of the repo.
115106
Type: String
116107
s3artifactsRepoVersion:
117-
Default: 1.0
108+
Default: 1.1
118109
Description: Project version
119110
Type: String
120111
AllowedValues:

aws_emr_blog_v1/cloudformation/ranger-server.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Parameters:
124124
- emr-5.28.0
125125
- emr-5.28.1
126126
- emr-5.29.0
127-
- emr-5.30.0
127+
- emr-5.30.1
128128
- emr-5.31.0
129129
- emr-5.32.0
130130
- emr-6.1.0
@@ -412,7 +412,7 @@ Resources:
412412
'
413413
- 'aws s3 cp '
414414
- !Join ['', ['s3://', !Ref s3artifactsRepo, '/', !Ref s3artifactsRepoVersion]]
415-
- '/scripts/install-ranger-admin-server.sh .
415+
- '/scripts/install-ranger-admin-server.sh . --region us-east-1
416416

417417
'
418418
- 'yum update aws-cfn-bootstrap

aws_emr_blog_v1/inputdata/ranger-presto-policy-analyst1.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
"type": "alter",
5757
"isAllowed": true
5858
},
59-
{
60-
"type": "admin",
61-
"isAllowed": true
62-
},
6359
{
6460
"type": "all",
6561
"isAllowed": true
@@ -101,4 +97,4 @@
10197
],
10298
"zoneName":"",
10399
"isDenyAllElse":false
104-
}
100+
}

aws_emr_blog_v1/inputdata/ranger-presto-policy-analyst2.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
"type": "alter",
5757
"isAllowed": true
5858
},
59-
{
60-
"type": "admin",
61-
"isAllowed": true
62-
},
6359
{
6460
"type": "all",
6561
"isAllowed": true
@@ -101,4 +97,4 @@
10197
],
10298
"zoneName":"",
10399
"isDenyAllElse":false
104-
}
100+
}

aws_emr_blog_v1/inputdata/ranger-presto-policy-general.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
"type":"alter",
5151
"isAllowed":true
5252
},
53-
{
54-
"type":"admin",
55-
"isAllowed":true
56-
},
5753
{
5854
"type":"all",
5955
"isAllowed":true
@@ -103,4 +99,4 @@
10399
],
104100
"zoneName":"",
105101
"isDenyAllElse":false
106-
}
102+
}

aws_emr_blog_v1/inputdata/ranger-presto-policy-information-schema.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@
6464
"type":"alter",
6565
"isAllowed":true
6666
},
67-
{
68-
"type":"admin",
69-
"isAllowed":true
70-
},
7167
{
7268
"type":"all",
7369
"isAllowed":true
@@ -116,4 +112,4 @@
116112
],
117113
"zoneName":"",
118114
"isDenyAllElse":false
119-
}
115+
}

aws_emr_blog_v1/scripts/download-scripts.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
set -euo pipefail
33
set -x
44
scripts_repo_path=$1
5+
project_version=${2-'1.0'}
56
mkdir -p /tmp/aws-blog-emr-ranger/scripts/emr-steps
67
cd /tmp/aws-blog-emr-ranger/scripts/emr-steps
78
#sudo yum -y install svn
89
#svn export $git_repo_path aws-blog-emr-ranger
9-
aws s3 sync $scripts_repo_path/scripts/emr-steps . --region us-east-1
10-
chmod -R 777 /tmp/aws-blog-emr-ranger
10+
aws s3 sync $scripts_repo_path/$project_version/scripts/emr-steps . --region us-east-1
11+
chmod -R 777 /tmp/aws-blog-emr-ranger

aws_emr_blog_v1/scripts/install-ranger-admin-server.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ mysql_jar=mysql-connector-java-5.1.39.jar
3838
# Setup
3939
yum install -y openldap openldap-clients openldap-servers
4040
# Setup LDAP users
41-
aws s3 cp $s3path/$project_version/inputdata/load-users-new.ldf .
42-
aws s3 cp $s3path/$project_version/inputdata/modify-users-new.ldf .
43-
aws s3 cp $s3path/$project_version/scripts/create-users-using-ldap.sh .
41+
aws s3 cp $s3path/$project_version/inputdata/load-users-new.ldf . --region us-east-1
42+
aws s3 cp $s3path/$project_version/inputdata/modify-users-new.ldf . --region us-east-1
43+
aws s3 cp $s3path/$project_version/scripts/create-users-using-ldap.sh . --region us-east-1
4444
chmod +x create-users-using-ldap.sh
4545
./create-users-using-ldap.sh $ldap_ip_address $ldap_admin_password $ldap_bind_password $ldap_default_user_password || true
4646
#Install mySQL
@@ -55,10 +55,10 @@ mysql -u root -prangeradmin -e "FLUSH PRIVILEGES;" || true
5555
rm -rf $installpath
5656
mkdir -p $installpath/hadoop
5757
cd $installpath
58-
aws s3 cp $ranger_s3path/$ranger_admin_server.tar.gz .
59-
aws s3 cp $ranger_s3path/$ranger_user_sync.tar.gz .
60-
aws s3 cp $mysql_jar_location .
61-
aws s3 cp $ranger_s3path/solr_for_audit_setup.tar.gz .
58+
aws s3 cp $ranger_s3path/$ranger_admin_server.tar.gz . --region us-east-1
59+
aws s3 cp $ranger_s3path/$ranger_user_sync.tar.gz . --region us-east-1
60+
aws s3 cp $mysql_jar_location . --region us-east-1
61+
aws s3 cp $ranger_s3path/solr_for_audit_setup.tar.gz . --region us-east-1
6262
#Update ranger admin install.properties
6363
tar -xvf $ranger_admin_server.tar.gz
6464
cd $ranger_admin_server

0 commit comments

Comments
 (0)