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.
License header missing. Add them to other files too
teradatalabs/mapr52-base/Dockerfile
Outdated
| FROM teradatalabs/centos6-java8-oracle | ||
| MAINTAINER Teradata Docker Team <docker@teradata.com> | ||
|
|
||
|
|
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.
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.
If possible, combine all the software installation with this step and do this first.
There was a problem hiding this comment.
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.
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.
@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.
Those are symlinks, so there's no control over it / doesn't matter
There was a problem hiding this comment.
@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.
@sanjay990 new line is not required as per artur , its same in other containers also
There was a problem hiding this comment.
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.
@sanjay990 new line is not required as per artur , its same in other containers also
| done | ||
|
|
||
|
|
||
|
|
|
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.
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.
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 <docker@teradata.com> | ||
|
|
||
|
|
||
| #Add repo for mapr |
There was a problem hiding this comment.
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.
Also, please stylize mapr as MapR in all your comments.
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.
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.
Software is a non-countable noun so softwares is incorrect. Either say "Install utility software" or "Install utility packages"
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.
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.
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.
sshh is incorrect. Also stylize to SSH.
| @@ -0,0 +1,22 @@ | |||
| [supervisord] | |||
There was a problem hiding this comment.
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.
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.
You're grepping for JobHistoryServer but the comment says CLDB.
| done | ||
|
|
||
| #wait for NodeManager to start | ||
|
|
There was a problem hiding this comment.
Extra newline here and in the other code blocks.
| @@ -0,0 +1,54 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
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 |
teradatalabs/mapr52-base/README.md
Outdated
| # mapr52-base | ||
|
|
||
|
|
||
| Docker image with Hive installed from MapR repositories. |
There was a problem hiding this comment.
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.
+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 | |||
|
|
|||
|
|
|||
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.
There's no HDFS in this image, only MapR FS.
| @@ -0,0 +1,4 @@ | |||
| exposes_hive | |||
There was a problem hiding this comment.
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.
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.
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.
add the badges, as it is done for any other image. Just copy + paste then search & replace the image name
teradatalabs/mapr52-hive/README.md
Outdated
| @@ -0,0 +1,17 @@ | |||
| # mapr52-hive | |||
teradatalabs/mapr52-base/README.md
Outdated
| # mapr52-base | ||
|
|
||
|
|
||
| Docker image with Hive installed from MapR repositories. |
There was a problem hiding this comment.
+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.
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.
double space before -N
| @@ -0,0 +1,54 @@ | |||
| #!/bin/bash | |||
|
|
|||
| hname=$(hostname) | |||
There was a problem hiding this comment.
use CAPITAL_UNDERSCORE variable names, as is the de-facto standard for bash files
teradatalabs/mapr52-hive/Dockerfile
Outdated
| MAINTAINER Teradata Docker Team <docker@teradata.com> | ||
|
|
||
| # ADD ALL REQUIRED SCRIPTS AND FILES TO ROOT DIRECTORY | ||
| ADD files/*.sh /root/ |
There was a problem hiding this comment.
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.
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.
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.
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.
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