Skip to content
Draft
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: 4 additions & 16 deletions dev-support/ranger-docker/Dockerfile.ranger-hadoop
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,13 @@ ARG HDFS_PLUGIN_VERSION
ARG YARN_PLUGIN_VERSION
ARG TEZ_VERSION

VOLUME /etc/keytabs

COPY ./dist/version /home/ranger/dist/
COPY ./dist/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin.tar.gz /home/ranger/dist/
COPY ./dist/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin.tar.gz /home/ranger/dist/
COPY ./downloads/hadoop-${HADOOP_VERSION}.tar.gz /home/ranger/dist/
COPY ./downloads/apache-tez-${TEZ_VERSION}-bin.tar.gz /home/ranger/dist/

COPY ./scripts/hadoop/ranger-hadoop-setup.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/ranger-hadoop.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/ranger-hadoop-mkdir.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/ranger-hadoop-healthcheck.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/ranger-hdfs-plugin-install.properties ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/ranger-yarn-plugin-install.properties ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/core-site.xml ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/hdfs-site.xml ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/yarn-site.xml ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/
COPY ./scripts/kdc/krb5.conf /etc/krb5.conf
COPY ./scripts/hadoop/*.sh ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/

RUN tar xvfz /home/ranger/dist/hadoop-${HADOOP_VERSION}.tar.gz --directory=/opt/ && \
ln -s /opt/hadoop-${HADOOP_VERSION} /opt/hadoop && \
Expand All @@ -52,11 +40,11 @@ RUN tar xvfz /home/ranger/dist/hadoop-${HADOOP_VERSION}.tar.gz --directory=/opt/
tar xvfz /home/ranger/dist/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin.tar.gz --directory=/opt/ranger && \
ln -s /opt/ranger/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin /opt/ranger/ranger-hdfs-plugin && \
rm -f /home/ranger/dist/ranger-${HDFS_PLUGIN_VERSION}-hdfs-plugin.tar.gz && \
cp -f ${RANGER_SCRIPTS}/ranger-hdfs-plugin-install.properties /opt/ranger/ranger-hdfs-plugin/install.properties && \
rm -f /opt/ranger/ranger-hdfs-plugin/install.properties && \
tar xvfz /home/ranger/dist/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin.tar.gz --directory=/opt/ranger && \
ln -s /opt/ranger/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin /opt/ranger/ranger-yarn-plugin && \
rm -f /home/ranger/dist/ranger-${YARN_PLUGIN_VERSION}-yarn-plugin.tar.gz && \
cp -f ${RANGER_SCRIPTS}/ranger-yarn-plugin-install.properties /opt/ranger/ranger-yarn-plugin/install.properties && \
rm -f /opt/ranger/ranger-yarn-plugin/install.properties && \
chmod 744 ${RANGER_SCRIPTS}/ranger-hadoop-setup.sh ${RANGER_SCRIPTS}/ranger-hadoop.sh ${RANGER_SCRIPTS}/ranger-hadoop-mkdir.sh && \
useradd -g hadoop -ms /bin/bash healthcheck && \
chmod 744 ${RANGER_SCRIPTS}/ranger-hadoop-healthcheck.sh && \
Expand Down
15 changes: 3 additions & 12 deletions dev-support/ranger-docker/Dockerfile.ranger-hbase
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,18 @@ FROM ${RANGER_BASE_IMAGE}:${RANGER_BASE_VERSION}
ARG HBASE_VERSION
ARG HBASE_PLUGIN_VERSION

VOLUME /etc/keytabs

COPY ./dist/version /home/ranger/dist/
COPY ./dist/ranger-${HBASE_PLUGIN_VERSION}-hbase-plugin.tar.gz /home/ranger/dist/
COPY ./downloads/hbase-${HBASE_VERSION}-bin.tar.gz /home/ranger/dist/

COPY ./scripts/hbase/ranger-hbase-setup.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hbase/ranger-hbase.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hbase/ranger-hbase-plugin-install.properties ${RANGER_SCRIPTS}/
COPY ./scripts/hbase/hbase-site.xml ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/core-site.xml ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/
COPY ./scripts/kdc/krb5.conf /etc/krb5.conf
COPY ./scripts/hbase/*.sh ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/

RUN tar xvfz /home/ranger/dist/hbase-${HBASE_VERSION}-bin.tar.gz --directory=/opt/ && \
ln -s /opt/hbase-${HBASE_VERSION} /opt/hbase && \
rm -f /home/ranger/dist/hbase-${HBASE_VERSION}-bin.tar.gz && \
tar xvfz /home/ranger/dist/ranger-${HBASE_PLUGIN_VERSION}-hbase-plugin.tar.gz --directory=/opt/ranger && \
ln -s /opt/ranger/ranger-${HBASE_PLUGIN_VERSION}-hbase-plugin /opt/ranger/ranger-hbase-plugin && \
rm -f /home/ranger/dist/ranger-${HBASE_PLUGIN_VERSION}-hbase-plugin.tar.gz && \
cp -f ${RANGER_SCRIPTS}/ranger-hbase-plugin-install.properties /opt/ranger/ranger-hbase-plugin/install.properties && \
rm -f /opt/ranger/ranger-hbase-plugin/install.properties && \
chmod 755 ${RANGER_SCRIPTS}/wait_for_keytab.sh && \
chmod 744 ${RANGER_SCRIPTS}/ranger-hbase-setup.sh ${RANGER_SCRIPTS}/ranger-hbase.sh

Expand Down
14 changes: 3 additions & 11 deletions dev-support/ranger-docker/Dockerfile.ranger-hive
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ ARG HIVE_PLUGIN_VERSION
ARG TEZ_VERSION
ARG RANGER_DB_TYPE

VOLUME /etc/keytabs

COPY ./dist/version /home/ranger/dist/
COPY ./dist/ranger-${HIVE_PLUGIN_VERSION}-hive-plugin.tar.gz /home/ranger/dist/
COPY ./downloads/apache-hive-${HIVE_VERSION}-bin.tar.gz /home/ranger/dist/
COPY ./downloads/hadoop-${HIVE_HADOOP_VERSION}.tar.gz /home/ranger/dist/
Expand All @@ -36,13 +33,8 @@ COPY ./downloads/postgresql-42.2.16.jre7.jar /home/ranger/dist/
COPY ./downloads/mysql-connector-java-8.0.28.jar /home/ranger/dist/
COPY ./downloads/ojdbc8.jar /home/ranger/dist/

COPY ./scripts/hive/ranger-hive-setup.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hive/ranger-hive.sh ${RANGER_SCRIPTS}/
COPY ./scripts/hive/ranger-hive-plugin-install.properties ${RANGER_SCRIPTS}/
COPY ./scripts/hive/hive-site-${RANGER_DB_TYPE}.xml ${RANGER_SCRIPTS}/hive-site.xml
COPY ./scripts/hadoop/core-site.xml ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/
COPY ./scripts/kdc/krb5.conf /etc/krb5.conf
COPY ./scripts/hive/*.sh ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/

RUN cd /opt && tar xzf /home/ranger/dist/apache-hive-${HIVE_VERSION}-bin.tar.gz && \
ln -s /opt/apache-hive-${HIVE_VERSION}-bin /opt/hive && \
Expand All @@ -59,7 +51,7 @@ RUN cd /opt && tar xzf /home/ranger/dist/apache-hive-${HIVE_VERSION}-bin.tar.gz
tar xvfz /home/ranger/dist/ranger-${HIVE_PLUGIN_VERSION}-hive-plugin.tar.gz --directory=/opt/ranger && \
ln -s /opt/ranger/ranger-${HIVE_PLUGIN_VERSION}-hive-plugin /opt/ranger/ranger-hive-plugin && \
rm -f /home/ranger/dist/ranger-${HIVE_PLUGIN_VERSION}-hive-plugin.tar.gz && \
cp -f ${RANGER_SCRIPTS}/ranger-hive-plugin-install.properties /opt/ranger/ranger-hive-plugin/install.properties && \
rm -f /opt/ranger/ranger-hive-plugin/install.properties && \
chmod 755 ${RANGER_SCRIPTS}/wait_for_keytab.sh && \
chmod 744 ${RANGER_SCRIPTS}/ranger-hive-setup.sh ${RANGER_SCRIPTS}/ranger-hive.sh

Expand Down
12 changes: 2 additions & 10 deletions dev-support/ranger-docker/Dockerfile.ranger-kafka
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,19 @@ FROM ${RANGER_BASE_IMAGE}:${RANGER_BASE_VERSION}
ARG KAFKA_VERSION
ARG KAFKA_PLUGIN_VERSION

VOLUME /etc/keytabs

COPY ./dist/version /home/ranger/dist/
COPY ./dist/ranger-${KAFKA_PLUGIN_VERSION}-kafka-plugin.tar.gz /home/ranger/dist/
COPY ./downloads/kafka_2.12-${KAFKA_VERSION}.tgz /home/ranger/dist/

COPY ./scripts/kafka/ranger-kafka-setup.sh ${RANGER_SCRIPTS}/
COPY ./scripts/kafka/ranger-kafka.sh ${RANGER_SCRIPTS}/
COPY ./scripts/kafka/ranger-kafka-plugin-install.properties ${RANGER_SCRIPTS}/
COPY ./scripts/kafka/kafka-server-jaas.conf ${RANGER_SCRIPTS}/
COPY ./scripts/hadoop/core-site.xml ${RANGER_SCRIPTS}/
COPY ./scripts/kafka/*.sh ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/
COPY ./scripts/kdc/krb5.conf /etc/krb5.conf

RUN tar xvfz /home/ranger/dist/kafka_2.12-${KAFKA_VERSION}.tgz --directory=/opt/ && \
ln -s /opt/kafka_2.12-${KAFKA_VERSION} /opt/kafka && \
rm -f /home/ranger/dist/kafka_2.12-${KAFKA_VERSION}.tgz && \
tar xvfz /home/ranger/dist/ranger-${KAFKA_PLUGIN_VERSION}-kafka-plugin.tar.gz --directory=/opt/ranger && \
ln -s /opt/ranger/ranger-${KAFKA_PLUGIN_VERSION}-kafka-plugin /opt/ranger/ranger-kafka-plugin && \
rm -f /home/ranger/dist/ranger-${KAFKA_PLUGIN_VERSION}-kafka-plugin.tar.gz && \
cp -f ${RANGER_SCRIPTS}/ranger-kafka-plugin-install.properties /opt/ranger/ranger-kafka-plugin/install.properties && \
rm -f /opt/ranger/ranger-kafka-plugin/install.properties && \
chmod 755 ${RANGER_SCRIPTS}/wait_for_keytab.sh && \
chmod 744 ${RANGER_SCRIPTS}/ranger-kafka-setup.sh ${RANGER_SCRIPTS}/ranger-kafka.sh

Expand Down
13 changes: 3 additions & 10 deletions dev-support/ranger-docker/Dockerfile.ranger-knox
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,21 @@ FROM ${RANGER_BASE_IMAGE}:${RANGER_BASE_VERSION}
ARG KNOX_VERSION
ARG KNOX_PLUGIN_VERSION

VOLUME /etc/keytabs

COPY ./dist/version /home/ranger/dist/
COPY ./dist/ranger-${KNOX_PLUGIN_VERSION}-knox-plugin.tar.gz /home/ranger/dist/
COPY ./downloads/knox-${KNOX_VERSION}.tar.gz /home/ranger/dist/

COPY ./scripts/knox/ranger-knox-setup.sh ${RANGER_SCRIPTS}/
COPY ./scripts/knox/ranger-knox.sh ${RANGER_SCRIPTS}/
COPY ./scripts/knox/ranger-knox-plugin-install.properties ${RANGER_SCRIPTS}/
COPY ./scripts/knox/*.sh ${RANGER_SCRIPTS}/
COPY ./scripts/knox/ranger-knox-expect.py ${RANGER_SCRIPTS}/
COPY ./scripts/knox/ranger-knox-sandbox.xml ${RANGER_SCRIPTS}/
COPY ./scripts/wait_for_keytab.sh ${RANGER_SCRIPTS}/
COPY ./scripts/kdc/krb5.conf /etc/krb5.conf

RUN tar xvfz /home/ranger/dist/knox-${KNOX_VERSION}.tar.gz --directory=/opt/ && \
ln -s /opt/knox-${KNOX_VERSION} /opt/knox && \
rm -f /home/ranger/dist/knox-${KNOX_VERSION}.tar.gz && \
tar xvfz /home/ranger/dist/ranger-${KNOX_PLUGIN_VERSION}-knox-plugin.tar.gz --directory=/opt/ranger && \
ln -s /opt/ranger/ranger-${KNOX_PLUGIN_VERSION}-knox-plugin /opt/ranger/ranger-knox-plugin && \
rm -f /home/ranger/dist/ranger-${KNOX_PLUGIN_VERSION}-knox-plugin.tar.gz && \
cp -f ${RANGER_SCRIPTS}/ranger-knox-plugin-install.properties /opt/ranger/ranger-knox-plugin/install.properties && \
cp -f ${RANGER_SCRIPTS}/ranger-knox-sandbox.xml /opt/knox/conf/topologies/sandbox.xml && \
rm -f /opt/ranger/ranger-knox-plugin/install.properties && \
rm -f /opt/knox/conf/topologies/sandbox.xml && \
chmod 755 ${RANGER_SCRIPTS}/wait_for_keytab.sh && \
chmod 744 ${RANGER_SCRIPTS}/ranger-knox-setup.sh ${RANGER_SCRIPTS}/ranger-knox.sh ${RANGER_SCRIPTS}/ranger-knox-expect.py

Expand Down
2 changes: 0 additions & 2 deletions dev-support/ranger-docker/Dockerfile.ranger-solr
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
ARG SOLR_VERSION
FROM solr:${SOLR_VERSION}

VOLUME /etc/keytabs

# Copy audit config set
USER 0

Expand Down
7 changes: 7 additions & 0 deletions dev-support/ranger-docker/docker-compose.ranger-hadoop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ services:
hostname: ranger-hadoop.rangernw
volumes:
- ./dist/keytabs/ranger-hadoop:/etc/keytabs
- ./scripts/kdc/krb5.conf:/etc/krb5.conf:ro
- ./dist/version:/home/ranger/dist/version:ro
- ./scripts/hadoop/ranger-hdfs-plugin-install.properties:/opt/ranger/ranger-hdfs-plugin/install.properties
- ./scripts/hadoop/ranger-yarn-plugin-install.properties:/opt/ranger/ranger-yarn-plugin/install.properties
- ./scripts/hadoop/core-site.xml:/home/ranger/scripts/core-site.xml:ro
- ./scripts/hadoop/hdfs-site.xml:/home/ranger/scripts/hdfs-site.xml:ro
- ./scripts/hadoop/yarn-site.xml:/home/ranger/scripts/yarn-site.xml:ro
stdin_open: true
tty: true
networks:
Expand Down
5 changes: 5 additions & 0 deletions dev-support/ranger-docker/docker-compose.ranger-hbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ services:
hostname: ranger-hbase.rangernw
volumes:
- ./dist/keytabs/ranger-hbase:/etc/keytabs
- ./scripts/kdc/krb5.conf:/etc/krb5.conf:ro
- ./dist/version:/home/ranger/dist/version:ro
- ./scripts/hbase/ranger-hbase-plugin-install.properties:/opt/ranger/ranger-hbase-plugin/install.properties
- ./scripts/hbase/hbase-site.xml:/home/ranger/scripts/hbase-site.xml:ro
- ./scripts/hadoop/core-site.xml:/home/ranger/scripts/core-site.xml:ro
stdin_open: true
tty: true
networks:
Expand Down
5 changes: 5 additions & 0 deletions dev-support/ranger-docker/docker-compose.ranger-hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ services:
hostname: ranger-hive.rangernw
volumes:
- ./dist/keytabs/ranger-hive:/etc/keytabs
- ./scripts/kdc/krb5.conf:/etc/krb5.conf:ro
- ./dist/version:/home/ranger/dist/version:ro
- ./scripts/hive/ranger-hive-plugin-install.properties:/opt/ranger/ranger-hive-plugin/install.properties
- ./scripts/hive/hive-site-${RANGER_DB_TYPE}.xml:/home/ranger/scripts/hive-site.xml:ro
- ./scripts/hadoop/core-site.xml:/home/ranger/scripts/core-site.xml:ro
stdin_open: true
tty: true
networks:
Expand Down
5 changes: 5 additions & 0 deletions dev-support/ranger-docker/docker-compose.ranger-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ services:
hostname: ranger-kafka.rangernw
volumes:
- ./dist/keytabs/ranger-kafka:/etc/keytabs
- ./scripts/kdc/krb5.conf:/etc/krb5.conf:ro
- ./scripts/hadoop/core-site.xml:/home/ranger/scripts/core-site.xml
- ./scripts/kafka/kafka-server-jaas.conf:/home/ranger/scripts/kafka-server-jaas.conf
- ./dist/version:/home/ranger/dist/version:ro
- ./scripts/kafka/ranger-kafka-plugin-install.properties:/opt/ranger/ranger-kafka-plugin/install.properties
stdin_open: true
tty: true
networks:
Expand Down
4 changes: 4 additions & 0 deletions dev-support/ranger-docker/docker-compose.ranger-knox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ services:
hostname: ranger-knox.rangernw
volumes:
- ./dist/keytabs/ranger-knox:/etc/keytabs
- ./scripts/kdc/krb5.conf:/etc/krb5.conf:ro
- ./dist/version:/home/ranger/dist/version:ro
- ./scripts/knox/ranger-knox-sandbox.xml:/opt/knox/conf/topologies/sandbox.xml
- ./scripts/knox/ranger-knox-plugin-install.properties:/opt/ranger/ranger-knox-plugin/install.properties
stdin_open: true
tty: true
networks:
Expand Down
Loading