Skip to content
69 changes: 69 additions & 0 deletions teradatalabs/mapr52-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright 2017 Teradata
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM teradatalabs/centos6-java8-oracle
MAINTAINER Teradata Docker Team <docker@teradata.com>

# ADD REPO FOR MAPR
ADD files/maprtech.repo /etc/yum.repos.d/maprtech.repo
COPY files/id_rsa.pub /root/
RUN yum update -y \
# ... GET MapRGPG KEY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space

&& rpm --import http://package.mapr.com/releases/pub/maprgpg.key \

# INSTALL UTILITY SOFTWARE
&& yum install -y iputils vim openssh-server openssh-clients sudo lsof \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not needed, until proven otherwise

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from vim all others are required

# CONFIGURE SSH
&& chkconfig sshd on \
&& grep -rl '#Port 22' /etc/ssh/sshd_config | xargs sed -i 's/#Port 22/Port 22/g' \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is that needed? The other containers expose sshd as well and they don't seem to be sed-ing the 22 Port in config anywhere AFAIR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not working without that , other containers will all have same problems when some one will ssh hadoop-master from outside.


# INSTALL MAPR
&& yum install -y mapr-fileserver mapr-nfs mapr-nodemanager mapr-cldb \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

squash into a single yum install invocation

&& yum install -y mapr-zookeeper mapr-resourcemanager mapr-historyserver \
&& yum install -y mapr-webserver mapr-gateway mapr-httpfs \

# ADD USERS AND CHANGE OWNERSHIPS
&& adduser mapr \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract a function 'setup_user' that adds and configures a single user, then call 3 times for the users

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArturGajowy do you want the function to be created inside docker file or seperate shell script which will be called from docker file

&& adduser hive \
&& adduser hdfs \
&& touch /home/mapr /home/hive /home/hdfs \
&& echo "cd /home/mapr" >> /home/mapr/.bashrc \
&& echo "cd /home/hive" >> /home/hive/.bashrc \
&& echo "cd /home/hdfs" >> /home/hdfs/.bashrc \
&& chown -R mapr:mapr /home/mapr /opt/mapr/httpfs \
&& chown hive:hive /home/hive \
&& chown hdfs:hdfs /home/hdfs \
# CONFIGURE ZOOKEEPER'S DATA DIRECTORY
&& rm -rf /opt/mapr/zkdata \
&& mkdir /opt/mapr/zkdata \
&& chmod 777 /opt/mapr/zkdata \
&& mkdir -p /mapr \

# INSTALL PYTHON AND SUPERVISORD
&& yum install -y python-setuptools \
&& easy_install pip \
&& pip install supervisor \
&& mkdir /etc/supervisord.d/ \
# ... AND ITS MISSING DEPENDENCY
&& wget http://dl.fedoraproject.org/pub/epel/6/x86_64/python-meld3-0.6.7-1.el6.x86_64.rpm \
&& rpm -ihv python-meld3-0.6.7-1.el6.x86_64.rpm \
&& rm python-meld3-0.6.7-1.el6.x86_64.rpm \

# CLEANUP
&& yum -y clean all && rm -rf /tmp/* /var/tmp/* \

# GENERATE SSH KEYS
&& ssh-keygen -t rsa -b 4096 -C "automation@teradata.com" -N "" -f /root/.ssh/id_rsa \
&& cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys \
&& cat /root/id_rsa.pub | cat >> ~/.ssh/authorized_keys
9 changes: 9 additions & 0 deletions teradatalabs/mapr52-base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# mapr52-base
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add badges



Docker image with all MapR related softwares installed and there dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

software (it's uncountable)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

their


## Oracle license

By using this image, you accept the Oracle Binary Code License Agreement for Java SE available here:
[http://www.oracle.com/technetwork/java/javase/terms/license/index.html](http://www.oracle.com/technetwork/java/javase/terms/license/index.html)
1 change: 1 addition & 0 deletions teradatalabs/mapr52-base/files/id_rsa.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA1PL4EwRZFy1ewBTa4a1TK+mQ4rAupOeZsiqir/su61dAGvC6pEFAa+Litj6ub6NvcBRMAdXeBtbOnQpInE7BFwKVhwU3n60Mc69SjLiozK3Oxh9sfmbJv/JdELRS5aB9x82Y0bO5fZFPFj7SxPNMugQQMEMQHW01wsa5nJR2pYLwCtu7yoD6fQ0TJEsRqWwyQTNoR19yzL6h7p/hq9SqiqCKfsHWK4+Tj0IgF7Nwz8i+BqqOq2kC9lTRuT8HalNbqVVQ6iI+ER7FgdfSZtKKX6R9SOaKQ7p0Dt6JLFibMNhjwt5EKHsgfMOsl1G8SEncDREtTng8/JLlvIhiqmWzwQ== root@d57cdb1934d1
13 changes: 13 additions & 0 deletions teradatalabs/mapr52-base/files/maprtech.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[maprtech]
name=MapR Technologies
baseurl=http://package.mapr.com/releases/v5.2.0/redhat/
enabled=1
gpgcheck=0
protect=1

[maprecosystem]
name=MapR Technologies
baseurl=http://package.mapr.com/releases/MEP/MEP-1.0/redhat
enabled=1
gpgcheck=0
protect=1