Skip to content

Commit 08db386

Browse files
Gschiavonpianista215
authored andcommitted
Remove History server auth (apache#133)
* removed mesos security * Removed mesos security from HS * added clear mesage
1 parent d283582 commit 08db386

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Fixed Supervise mode
66
* Separate stderr and stdout in dispatcher
77
* Fix history server stderr/stdout. Now is possible to set log level through SPARK_LOG_LEVEL
8+
* Removed mesos security from History Server and unified environment variable VAULT_HOSTS
89
* Secret folder path configurable
910

1011
## 2.2.0.4 (January 11, 2018)

docker/dispatcher/service

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ function add_if_non_empty() {
2929
function configure_properties() {
3030

3131
echo '' > /opt/spark/dist/conf/mesos-cluster-dispatcher.properties
32-
if [[ "$SECURED_MESOS" == "true" ]]
33-
then
32+
if [ "$SECURED_MESOS" == "true" ]; then
33+
if [ ! -z "$TENANT_NAME" ]; then
3434
#Login to get access token for Vault
3535
login
3636
#Get Mesos secrets from Vault
@@ -44,7 +44,10 @@ then
4444
echo "spark.mesos.principal=${MESOS_PRINCIPAL}" >> /opt/spark/dist/conf/mesos-cluster-dispatcher.properties
4545
echo "spark.mesos.secret=${MESOS_SECRET}" >> /opt/spark/dist/conf/mesos-cluster-dispatcher.properties
4646
echo "spark.mesos.role=${TENANT_NAME}" >> /opt/spark/dist/conf/mesos-cluster-dispatcher.properties
47-
47+
else
48+
echo 'Please set the TENANT_NAME variable to download the secrets from Vault (Mesos security enabled)'
49+
exit -1
50+
fi
4851
else
4952
echo 'MESOS SECURITY IS NOT ENABLE'
5053
fi

docker/historyServer/entrypoint.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ function set_log_level() {
3838
function main() {
3939
HDFS_HADOOP_SECURITY_AUTH_TO_LOCAL=${HDFS_HADOOP_SECURITY_AUTH_TO_LOCAL:=${auth_to_local_value}}
4040
VAULT_PORT=${VAULT_PORT:=8200}
41-
VAULT_HOSTS=$VAULT_HOST
4241
VAULT_URI="$VAULT_PROTOCOL://$VAULT_HOSTS:$VAULT_PORT"
4342

4443
SPARK_HOME=/opt/sds/spark
@@ -47,16 +46,6 @@ function main() {
4746

4847
set_log_level
4948

50-
if [[ "$SECURED_MESOS" == "true" ]]
51-
then
52-
#Get Mesos secrets from Vault
53-
getPass "userland" "history-server" "mesos"
54-
# This should populate HISTORY_SERVER_MESOS_USER and HISTORY_SERVER_MESOS_PASS
55-
SPARK_HISTORY_OPTS="-Dspark.mesos.principal=${HISTORY_SERVER_MESOS_USER} -Dspark.mesos.secret=${HISTORY_SERVER_MESOS_PASS} -Dspark.mesos.role=${HISTORY_MESOS_ROLE} ${SPARK_HISTORY_OPTS}"
56-
else
57-
echo 'MESOS SECURITY IS NOT ENABLE'
58-
fi
59-
6049
if [[ "$HDFS_KRB_ENABLE" == "true" ]]
6150
then
6251

0 commit comments

Comments
 (0)