-
Notifications
You must be signed in to change notification settings - Fork 21
Add docker container for MapR #14
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
base: master
Are you sure you want to change the base?
Conversation
mapr52-code checkin for docker container
|
Rewrite the commit message. Something like |
teradatalabs/mapr52-base/Dockerfile
Outdated
| @@ -0,0 +1,55 @@ | |||
| FROM teradatalabs/centos6-java8-oracle | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License header missing. Add them to other files too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanjay990 License header added for the files
teradatalabs/mapr52-base/Dockerfile
Outdated
| FROM teradatalabs/centos6-java8-oracle | ||
| MAINTAINER Teradata Docker Team <[email protected]> | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove blank line
teradatalabs/mapr52-base/Dockerfile
Outdated
| RUN rpm --import http://package.mapr.com/releases/pub/maprgpg.key | ||
|
|
||
| #add user and password | ||
| RUN adduser mapr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding user and creating a home directory can be merged into one -d. Also looks like you can merge many of these commands. Try to combine them as far as possible
teradatalabs/mapr52-base/Dockerfile
Outdated
|
|
||
| #Add repo for mapr | ||
| ADD files/maprtech.repo /etc/yum.repos.d/maprtech.repo | ||
| RUN yum update -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, combine all the software installation with this step and do this first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I agree. Keeping the packages close to where they are configured makes more sense to me. Maybe the line below about installing utility packages can be merged here but I think the MapR and Python installation blocks should remain where they are.
teradatalabs/mapr52-hive/Dockerfile
Outdated
|
|
||
| # RUN SETUP script | ||
| RUN /root/setup.sh | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all these extra lines from all the files.
| @@ -0,0 +1 @@ | |||
| ../../../commons/socks-proxy.sh No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanjay990 new line is not required as per artur , its same in other containers also
| @@ -0,0 +1 @@ | |||
| ../../../../commons/supervisord.d/bootstrap.conf No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are symlinks, so there's no control over it / doesn't matter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanjay990 new line is not required as per artur , its same in other containers also
| @@ -0,0 +1 @@ | |||
| ../../../../commons/supervisord.d/mysql-metastore.conf No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanjay990 new line is not required as per artur , its same in other containers also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The symlinks got messed up somehow. Please replace all the files with similar content with symlinks to the files pointed by the paths in those files.
| @@ -0,0 +1 @@ | |||
| ../../../../commons/supervisord.d/socks-proxy.conf No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanjay990 new line is not required as per artur , its same in other containers also
| done | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra lines
|
Please split the commit in two parts, one for the base image and another one for the -hive one |
|
Please add a |
ArturGajowy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a skim and two comments for now, please ping me when those are addressed
petroav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Sanjay pointed out, please re-write your commit message. In general, if you are committing for any Presto related project follow this guideline: http://chris.beams.io/posts/git-commit/.
A lot of my comments relate to style, which is just as important as content. In future pay attention to the style around you in the project and try emulate it as much as possible.
teradatalabs/mapr52-base/Dockerfile
Outdated
| MAINTAINER Teradata Docker Team <[email protected]> | ||
|
|
||
|
|
||
| #Add repo for mapr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adopt a consistent comment style throughout this commit. Other Dockerfiles all have a '#' followed by a space, followed by a comment. The comment should start with a capital letter or be in all caps. The other Dockerfiles have mixed style in terms of small vs large cap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please stylize mapr as MapR in all your comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
teradatalabs/mapr52-base/Dockerfile
Outdated
|
|
||
| #Add repo for mapr | ||
| ADD files/maprtech.repo /etc/yum.repos.d/maprtech.repo | ||
| RUN yum update -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I agree. Keeping the packages close to where they are configured makes more sense to me. Maybe the line below about installing utility packages can be merged here but I think the MapR and Python installation blocks should remain where they are.
teradatalabs/mapr52-base/Dockerfile
Outdated
| ADD files/maprtech.repo /etc/yum.repos.d/maprtech.repo | ||
| RUN yum update -y | ||
|
|
||
| #install utility softwares |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Software is a non-countable noun so softwares is incorrect. Either say "Install utility software" or "Install utility packages"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
teradatalabs/mapr52-base/Dockerfile
Outdated
| RUN yum update -y | ||
|
|
||
| #install utility softwares | ||
| RUN yum install iputils vim openssh-server openssh-clients sudo -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is more idiomatic for Linux commands to have options before the positional arguments so I think you should move the -y option to the front on all instances of yum install in this Dockerfile and other files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
teradatalabs/mapr52-base/Dockerfile
Outdated
| #install utility softwares | ||
| RUN yum install iputils vim openssh-server openssh-clients sudo -y | ||
|
|
||
| #configure sshh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sshh is incorrect. Also stylize to SSH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| @@ -0,0 +1,22 @@ | |||
| [supervisord] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use the configuration in the common subfolder of the project? I'm not too familiar how this work so maybe this is a question for @ArturGajowy.
|
|
||
| [supervisorctl] | ||
| serverurl = unix:///tmp/supervisor.sock | ||
| prompt = cdh-pseudo-distributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do end up keeping this config maybe we should update this to say something other than cdh-pseudo-distributed?
| maprcliReady=$(maprcli service list -node $hname | grep 'ERROR (10009)' | wc -l) | ||
| Services=0 | ||
| else | ||
| Services=$(maprcli service list -node $hname | grep JobHistoryServer |awk '{$1=$1};1' | tr ' ' '\n' | tail -1f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're grepping for JobHistoryServer but the comment says CLDB.
| done | ||
|
|
||
| #wait for NodeManager to start | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra newline here and in the other code blocks.
| @@ -0,0 +1,54 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know enough bash to say if this is idiomatic so I'll leave the review here to @ArturGajowy.
|
@ArturGajowy i have started working on modification for the review comments today.Will let you know once completed. |
Add docker container for MapR
Add review changes for MapR docker container
Rebasing the branch to master for splitting mapr commits into two
Add docker container code for MapR-Base
Add docker container code for MapR-Hive
|
@sanjay990 @petroav @ArturGajowy Review comments are now complete for the branch |
petroav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple small comments.
teradatalabs/mapr52-base/README.md
Outdated
| # mapr52-base | ||
|
|
||
|
|
||
| Docker image with Hive installed from MapR repositories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is correct. This README is in the mapr52-base folder so this image shouldn't have Hive installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. Just base this readme on https://github.com/Teradata/docker-images/blob/master/teradatalabs/iop-base/README.md
teradatalabs/mapr52-base/README.md
Outdated
| @@ -0,0 +1,9 @@ | |||
| # mapr52-base | |||
|
|
|||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra newline.
teradatalabs/mapr52-hive/README.md
Outdated
| @@ -0,0 +1,17 @@ | |||
| # mapr52-hive | |||
|
|
|||
| Docker image with HDFS, YARN and HIVE installed. Please note that running services have lower memory heap size set. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no HDFS in this image, only MapR FS.
| @@ -0,0 +1,4 @@ | |||
| exposes_hive | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this file for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that the tests defined in https://github.com/Teradata/docker-images/blob/master/test/image_tests/image_tests.bats.sh are run for this image
| @@ -0,0 +1,9 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yea but for example setup.sh for cdh5-hive-master does a bunch of things, so it's OK to name it something generic like setup.sh whereas here all we're doing is configuring MySQL so I think we should rename it. Don't feel strongly about it though. I can also see the argument for being consistent with other image files. Up to you.
ArturGajowy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests fail (see travis log). Seems like hive is not reachable on hadoop-master:10000. Please fix it and then we can proceed.
|
Please make the PR only contain two commits, with the respective messages: |
|
Please drop '52' from the image & directories names, we're not going to have two versions of the mapr container (say mapr-52 and mapr-53), so there's no point. |
teradatalabs/mapr52-base/README.md
Outdated
| @@ -0,0 +1,9 @@ | |||
| # mapr52-base | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the badges, as it is done for any other image. Just copy + paste then search & replace the image name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round done. Let me know when that's fixed and the tests pass on travis.
teradatalabs/mapr52-hive/README.md
Outdated
| @@ -0,0 +1,17 @@ | |||
| # mapr52-hive | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto badges
teradatalabs/mapr52-base/README.md
Outdated
| # mapr52-base | ||
|
|
||
|
|
||
| Docker image with Hive installed from MapR repositories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. Just base this readme on https://github.com/Teradata/docker-images/blob/master/teradatalabs/iop-base/README.md
| @@ -0,0 +1,4 @@ | |||
| exposes_hive | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that the tests defined in https://github.com/Teradata/docker-images/blob/master/test/image_tests/image_tests.bats.sh are run for this image
| #!/bin/sh | ||
|
|
||
| # CONFIGURE MapR | ||
| /opt/mapr/server/configure.sh -N mycluster -Z localhost -C localhost -HS localhost -no-autostart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double space before -N
| @@ -0,0 +1,54 @@ | |||
| #!/bin/bash | |||
|
|
|||
| hname=$(hostname) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use CAPITAL_UNDERSCORE variable names, as is the de-facto standard for bash files
teradatalabs/mapr52-hive/Dockerfile
Outdated
| MAINTAINER Teradata Docker Team <[email protected]> | ||
|
|
||
| # ADD ALL REQUIRED SCRIPTS AND FILES TO ROOT DIRECTORY | ||
| ADD files/*.sh /root/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add each file verbatim, don't use *. It's better if we keep this explicit
teradatalabs/mapr52-hive/Dockerfile
Outdated
| ADD files/conf/hive-site.xml /opt/mapr/hive/hive-1.2/conf/hive-site.xml | ||
| ADD files/conf/core-site.xml /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/core-site.xml | ||
| ADD files/supervisord.conf /etc/supervisord.conf | ||
| COPY files/supervisord.d/* /etc/supervisord.d/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done in the base image, see
# Copy supervisord startup script and base configs
COPY files/startup.sh /root/startup.sh
COPY files/supervisord.conf /etc/supervisord.conf
COPY files/supervisord.d/bootstrap.conf /etc/supervisord.d/bootstrap.conf
# Add supervisord configs in child images
ONBUILD COPY files/supervisord.d/* /etc/supervisord.d/
in any other base image
teradatalabs/mapr52-hive/Dockerfile
Outdated
| COPY files/supervisord.d/* /etc/supervisord.d/ | ||
|
|
||
| RUN chmod 777 /root/*.sh \ | ||
| # INSTALL UTILITY SOFTWARE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't install utility software, unless it's in a centos6-* image and we've all agreed it's needed
teradatalabs/mapr52-hive/Dockerfile
Outdated
| ADD files/supervisord.conf /etc/supervisord.conf | ||
| COPY files/supervisord.d/* /etc/supervisord.d/ | ||
|
|
||
| RUN chmod 777 /root/*.sh \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is that neeeded? Try to remove that or add a comment why it's needed
| /opt/mapr/server/configure.sh -N mycluster -Z localhost -C localhost -HS localhost -no-autostart | ||
|
|
||
| # SETUP FLAT FILE /home/mapr/storagefile | ||
| dd if=/dev/zero of=/home/mapr/storagefile bs=1G count=10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should be done here or in a setup.sh script. Probably depends on image size and the container startup time
Add Kerberize docker container for MapR with hive
Add modification for docker-base
Modification for kerberized MapR container
Adding modifications to test cluster for mapr
This reverts commit 586ebc7.
Adding test container changes to accomodate mapr
Adding Symlinks for the common files
Reverting links
Modification to include env.sh changes in Kerberized MapR cluster
Adding commands to start httpfs services
Adding privileged in docker-compose for MapR
Changing Test container to accomodate mapr
modification of tests to accomadate hive user
Fixing kerberos container
Debugging Bootsrap to know where its stuck
Reverting changes for debugging bootstrap
Moving partition creation to mapr-base and changes in capabilities
decreasing allocation of space to 3 GB
Increasing allocation of space back to 10 GB
makefile changes to debug images size
Changes in travis to increase wait time during build
Reverting the debugging changes
Adding httpfs to MapR-base and moving storagefile partition creation to hive
Removing creation of partition from bootstrap of kerberized container and removing chown
Adding SSHD AND THE SOCKS PROXY for kerberized mapr
Rearranging the code in MapR cluster to make it ready for review
This changes will make maprcli wait for MapR ticket in wardenTracker
changes in travis
Travis yml changes
|
@petroav @ArturGajowy All the review comments are incorporated and all the tests are passing . |
mapr52-code checkin for docker container