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

Developer convenience improvements #23

Merged
merged 3 commits into from
Jul 29, 2019
Merged
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
1 change: 1 addition & 0 deletions prestodev/centos6-oj8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN \
\
# install commonly needed packages
yum install -y \
net-tools `# netstat` \
sudo \
vim `# helpful when troubleshooting product tests` \
&& \
Expand Down
1 change: 1 addition & 0 deletions prestodev/centos7-oj8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN \
\
# install commonly needed packages
yum install -y \
net-tools `# netstat` \
sudo \
vim `# helpful when troubleshooting product tests` \
&& \
Expand Down
8 changes: 8 additions & 0 deletions prestodev/hdp2.6-hive-kerberized/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ RUN keytool -genkeypair \
-validity 100000
RUN chmod 644 /etc/presto/conf/keystore.jks

# Provide convenience bash history
RUN set -xeu; \
for user in root hive hdfs; do \
sudo -u "${user}" bash -c ' echo "klist -kt /etc/hive/conf/hive.keytab" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' echo "kinit -kt /etc/hive/conf/hive.keytab hive/[email protected]" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' echo "beeline -u \"jdbc:hive2://hadoop-master:10000/default;principal=hive/[email protected]\"" >> ~/.bash_history '; \
done

# EXPOSE KERBEROS PORTS
EXPOSE 88
EXPOSE 89
Expand Down
11 changes: 11 additions & 0 deletions prestodev/hdp2.6-hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ RUN ssh-keygen -t rsa -b 4096 -C "[email protected]" -N "" -f /root/.ssh/i
RUN chmod 755 /root && chmod 700 /root/.ssh
RUN passwd --unlock root

# Provide convenience bash history
RUN set -xeu; \
for user in root hive hdfs; do \
# ~hive might be owned by root
chown -R "${user}:" "$(eval echo ~"${user}")"; \
sudo -u "${user}" bash -c ' echo "beeline -u jdbc:hive2://localhost:10000/default -n hive" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' echo "hadoop dfs -ls -R /user/hive/warehouse" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' mkdir -p ~/.beeline '; \
sudo -u "${user}" bash -c ' echo "SELECT current_user();" >> ~/.beeline/history '; \
done

# HDFS ports
EXPOSE 1004 1006 8020 50010 50020 50070 50075 50470

Expand Down
8 changes: 8 additions & 0 deletions prestodev/hdp3.1-hive-kerberized/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ RUN keytool -genkeypair \
-validity 100000
RUN chmod 644 /etc/presto/conf/keystore.jks

# Provide convenience bash history
RUN set -xeu; \
for user in root hive hdfs; do \
sudo -u "${user}" bash -c ' echo "klist -kt /etc/hive/conf/hive.keytab" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' echo "kinit -kt /etc/hive/conf/hive.keytab hive/[email protected]" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' echo "beeline -u \"jdbc:hive2://hadoop-master:10000/default;principal=hive/[email protected]\"" >> ~/.bash_history '; \
done

# EXPOSE KERBEROS PORTS
EXPOSE 88
EXPOSE 89
Expand Down
10 changes: 0 additions & 10 deletions prestodev/hdp3.1-hive-kerberized/files/etc/hive/conf/hive-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@
<value>hdfs,hive</value>
</property>

<property>
<name>tez.lib.uris</name>
<value>file:///usr/hdp/3.1.0.0-78/tez</value>
</property>

<property>
<name>hive.support.concurrency</name>
<value>true</value>
Expand All @@ -79,11 +74,6 @@
<value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
</property>

<property>
<name>tez.lib.uris</name>
<value>file:///usr/hdp/3.1.0.0-78/tez/lib/tez.tar.gz</value>
</property>

<!-- Enable authentication -->
<property>
<name>hive.server2.authentication</name>
Expand Down
9 changes: 9 additions & 0 deletions prestodev/hdp3.1-hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ RUN ssh-keygen -t rsa -b 4096 -C "[email protected]" -N "" -f /root/.ssh/i
RUN chmod 755 /root && chmod 700 /root/.ssh
RUN passwd --unlock root

# Provide convenience bash history
RUN set -xeu; \
for user in root hive hdfs; do \
sudo -u "${user}" bash -c ' echo "beeline -n hive" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' echo "hdfs dfs -ls -R /user/hive/warehouse" >> ~/.bash_history '; \
sudo -u "${user}" bash -c ' mkdir -p ~/.beeline '; \
sudo -u "${user}" bash -c ' echo "SELECT current_user();" >> ~/.beeline/history '; \
done

# HDFS ports
EXPOSE 1004 1006 8020 9866 9867 9870 9864 50470

Expand Down
9 changes: 0 additions & 9 deletions prestodev/hdp3.1-hive/files/etc/hive/conf/hive-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@
<value>hdfs,hive</value>
</property>

<property>
<name>tez.lib.uris</name>
<value>file:///usr/hdp/3.1.0.0-78/tez</value>
</property>

<property>
<name>hive.support.concurrency</name>
<value>true</value>
Expand All @@ -79,8 +74,4 @@
<value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
</property>

<property>
<name>tez.lib.uris</name>
<value>file:///usr/hdp/3.1.0.0-78/tez/lib/tez.tar.gz</value>
</property>
</configuration>