@@ -23,18 +23,25 @@ ARG HDFS_PLUGIN_VERSION
2323ARG YARN_PLUGIN_VERSION
2424ARG TEZ_VERSION
2525
26+ VOLUME /etc/keytabs
2627
2728COPY ./dist/version /home/ranger/dist/
2829COPY ./dist/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin.tar.gz /home/ranger/dist/
2930COPY ./dist/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin.tar.gz /home/ranger/dist/
3031COPY ./downloads/hadoop-${HADOOP_VERSION}.tar.gz /home/ranger/dist/
3132COPY ./downloads/apache-tez-${TEZ_VERSION}-bin.tar.gz /home/ranger/dist/
3233
33- COPY ./scripts/ranger-hadoop-setup.sh /home/ranger/scripts/
34- COPY ./scripts/ranger-hadoop.sh /home/ranger/scripts/
35- COPY ./scripts/ranger-hadoop-mkdir.sh /home/ranger/scripts/
36- COPY ./scripts/ranger-hdfs-plugin-install.properties /home/ranger/scripts/
37- COPY ./scripts/ranger-yarn-plugin-install.properties /home/ranger/scripts/
34+ COPY ./scripts/hadoop/ranger-hadoop-setup.sh ${RANGER_SCRIPTS}/
35+ COPY ./scripts/hadoop/ranger-hadoop.sh ${RANGER_SCRIPTS}/
36+ COPY ./scripts/hadoop/ranger-hadoop-mkdir.sh ${RANGER_SCRIPTS}/
37+ COPY ./scripts/hadoop/ranger-hadoop-healthcheck.sh ${RANGER_SCRIPTS}/
38+ COPY ./scripts/hadoop/ranger-hdfs-plugin-install.properties ${RANGER_SCRIPTS}/
39+ COPY ./scripts/hadoop/ranger-yarn-plugin-install.properties ${RANGER_SCRIPTS}/
40+ COPY ./scripts/hadoop/core-site.xml ${RANGER_SCRIPTS}/
41+ COPY ./scripts/hadoop/hdfs-site.xml ${RANGER_SCRIPTS}/
42+ COPY ./scripts/hadoop/yarn-site.xml ${RANGER_SCRIPTS}/
43+ COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/
44+ COPY ./scripts/kdc/krb5.conf /etc/krb5.conf
3845
3946RUN tar xvfz /home/ranger/dist/hadoop-${HADOOP_VERSION}.tar.gz --directory=/opt/ && \
4047 ln -s /opt/hadoop-${HADOOP_VERSION} /opt/hadoop && \
@@ -45,12 +52,16 @@ RUN tar xvfz /home/ranger/dist/hadoop-${HADOOP_VERSION}.tar.gz --directory=/opt/
4552 tar xvfz /home/ranger/dist/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin.tar.gz --directory=/opt/ranger && \
4653 ln -s /opt/ranger/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin /opt/ranger/ranger-hdfs-plugin && \
4754 rm -f /home/ranger/dist/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin.tar.gz && \
48- cp -f /home/ranger/scripts /ranger-hdfs-plugin-install.properties /opt/ranger/ranger-hdfs-plugin/install.properties && \
55+ cp -f ${RANGER_SCRIPTS} /ranger-hdfs-plugin-install.properties /opt/ranger/ranger-hdfs-plugin/install.properties && \
4956 tar xvfz /home/ranger/dist/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin.tar.gz --directory=/opt/ranger && \
5057 ln -s /opt/ranger/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin /opt/ranger/ranger-yarn-plugin && \
5158 rm -f /home/ranger/dist/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin.tar.gz && \
52- cp -f /home/ranger/scripts /ranger-yarn-plugin-install.properties /opt/ranger/ranger-yarn-plugin/install.properties && \
59+ cp -f ${RANGER_SCRIPTS} /ranger-yarn-plugin-install.properties /opt/ranger/ranger-yarn-plugin/install.properties && \
5360 chmod 744 ${RANGER_SCRIPTS}/ranger-hadoop-setup.sh ${RANGER_SCRIPTS}/ranger-hadoop.sh ${RANGER_SCRIPTS}/ranger-hadoop-mkdir.sh && \
61+ useradd -g hadoop -ms /bin/bash healthcheck && \
62+ chmod 744 ${RANGER_SCRIPTS}/ranger-hadoop-healthcheck.sh && \
63+ chmod 755 ${RANGER_SCRIPTS}/wait_for_keytab.sh && \
64+ chown healthcheck:hadoop ${RANGER_SCRIPTS}/ranger-hadoop-healthcheck.sh && \
5465 chown hdfs:hadoop ${RANGER_SCRIPTS}/ranger-hadoop-mkdir.sh
5566
5667RUN apt-get update && \
0 commit comments