From 54087ff534069f34a620d011231302ca3ab413e3 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 10:54:53 -0600 Subject: [PATCH 01/20] Update Dockerfile Added the install of unzip command and made the dockerfile easier to use/build from as it will not assume the builder has unzipped the GPDB download from Pivnet. It unzips, then runs the resulting bin now. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d80a3a7..e91ef01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ MAINTAINER dbaskette@pivotal.io #COPY ./configs/* /tmp/ COPY * /tmp/ RUN echo root:pivotal | chpasswd \ - && yum install -y which tar more util-linux-ng passwd openssh-clients openssh-server ed m4; yum clean all \ + && yum install -y unzip which tar more util-linux-ng passwd openssh-clients openssh-server ed m4; yum clean all \ + && unzip /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.zip -d /tmp/ \ && sed -i s/"more << EOF"/"cat << EOF"/g /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ && echo -e "yes\n\nyes\nyes\n" | /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ && rm /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ From a97d05f12ca21e96e559fce162acee530f019094 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 10:57:42 -0600 Subject: [PATCH 02/20] Create README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d9d0e81 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# gpdb-docker +Greenplum Database Docker image + +# Building the Image +cd +docker build -t . From 073cd661788280012982c5fe341c58c9ee8e7210 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 10:58:23 -0600 Subject: [PATCH 03/20] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d9d0e81..7724c44 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,6 @@ Greenplum Database Docker image # Building the Image cd docker build -t . + +# Running the Image +docker run -i -p 5432:5432 From 808406924b0291295a283df009b74ca14e4bf117 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 11:11:12 -0600 Subject: [PATCH 04/20] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7724c44..b46de80 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Greenplum Database Docker image # Building the Image cd -docker build -t . +docker build -t [image_tag] . # Running the Image -docker run -i -p 5432:5432 +docker run -i -p 5432:5432 [image_tag] From 00db3effb326da8bb48ab635d4141026a968c293 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 11:13:52 -0600 Subject: [PATCH 05/20] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b46de80..6c4812e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Greenplum Database Docker image # Building the Image cd -docker build -t [image_tag] . +docker build -t [tag] . # Running the Image -docker run -i -p 5432:5432 [image_tag] +docker run -i -p 5432:5432 [tag] From a6ae171ca12393914ddf59748fb20ff961168829 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 11:14:42 -0600 Subject: [PATCH 06/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c4812e..496fd99 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Greenplum Database Docker image # Building the Image -cd +cd [docker working directory] docker build -t [tag] . # Running the Image From 171f256409d3d1080380ca8276ee49045dfbe482 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 11:14:51 -0600 Subject: [PATCH 07/20] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 496fd99..415f2a8 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Greenplum Database Docker image # Building the Image cd [docker working directory] + docker build -t [tag] . # Running the Image From cb04e25349233b115741668b35c4e5066578e6ca Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 11:15:58 -0600 Subject: [PATCH 08/20] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 415f2a8..feb3abe 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # gpdb-docker Greenplum Database Docker image -# Building the Image +# Building the Docker Image cd [docker working directory] docker build -t [tag] . -# Running the Image +# Running the Docker Image docker run -i -p 5432:5432 [tag] From 899f7281d6114b3eb6ae9053a959f747d9a174ed Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 12:22:24 -0600 Subject: [PATCH 09/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index feb3abe..add535c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # gpdb-docker -Greenplum Database Docker image +Greenplum Database Base Docker image # Building the Docker Image cd [docker working directory] From 1916368af77dcb8d5683d06da8e9b8213c4c91ed Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 12:22:51 -0600 Subject: [PATCH 10/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index add535c..f623958 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # gpdb-docker -Greenplum Database Base Docker image +Pivotal Greenplum Database Base Docker image # Building the Docker Image cd [docker working directory] From da748af2ed5010d17e30855ac904450a3051aba8 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 12:23:24 -0600 Subject: [PATCH 11/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f623958..8e2a381 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # gpdb-docker -Pivotal Greenplum Database Base Docker image +Pivotal Greenplum Database Base Docker Image # Building the Docker Image cd [docker working directory] From 45d3ab1c773ea48006f081b804b1ffeb0fcfe0aa Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 12:42:04 -0600 Subject: [PATCH 12/20] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 8e2a381..22cceb4 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,13 @@ docker build -t [tag] . # Running the Docker Image docker run -i -p 5432:5432 [tag] + +# Using psql in the Container +su - gpadmin + +psql + +# Using pgadmin outside the Container +Launch pgAdmin3 + +Create new connection using IP Address and Port # (5432) From 34f4e0f14ed9ba51339cf75b544f7d87d4e5fcfa Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 12:42:29 -0600 Subject: [PATCH 13/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22cceb4..3087272 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # gpdb-docker -Pivotal Greenplum Database Base Docker Image +Pivotal Greenplum Database Base Docker Image (4.3.7.1) # Building the Docker Image cd [docker working directory] From 81c0262893454bbd493762f37d45e6c9c1b674e5 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 12:52:51 -0600 Subject: [PATCH 14/20] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3087272..6e174ce 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Pivotal Greenplum Database Base Docker Image (4.3.7.1) # Building the Docker Image +You will first need to download the Pivotal Greenplum Database 4.3.7.1 installer (.zip) located at https://network.pivotal.io/products/pivotal-gpdb + cd [docker working directory] docker build -t [tag] . From 4dc7d14ff2a0e5512f13866029ba6e283dfcec00 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 12:53:30 -0600 Subject: [PATCH 15/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e174ce..327875f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Pivotal Greenplum Database Base Docker Image (4.3.7.1) # Building the Docker Image -You will first need to download the Pivotal Greenplum Database 4.3.7.1 installer (.zip) located at https://network.pivotal.io/products/pivotal-gpdb +You will first need to download the Pivotal Greenplum Database 4.3.7.1 installer (.zip) located at https://network.pivotal.io/products/pivotal-gpdb and place it inside the docker working directory. cd [docker working directory] From f22af12b748e3e16f92ec2d4674ad426d73d21f7 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 13:12:41 -0600 Subject: [PATCH 16/20] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 327875f..54b4a46 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,13 @@ cd [docker working directory] docker build -t [tag] . +# Container Accounts +root/pivotal + +gpadmin/pivotal + +gpmon/pivotal + # Running the Docker Image docker run -i -p 5432:5432 [tag] From 8dc318f2c61cf9868c1064115b1f7f09c6ad4604 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 13:13:37 -0600 Subject: [PATCH 17/20] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 54b4a46..344d86d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ Pivotal Greenplum Database Base Docker Image (4.3.7.1) # Building the Docker Image You will first need to download the Pivotal Greenplum Database 4.3.7.1 installer (.zip) located at https://network.pivotal.io/products/pivotal-gpdb and place it inside the docker working directory. +# Running the Docker Image +docker run -i -p 5432:5432 [tag] + cd [docker working directory] docker build -t [tag] . @@ -15,9 +18,6 @@ gpadmin/pivotal gpmon/pivotal -# Running the Docker Image -docker run -i -p 5432:5432 [tag] - # Using psql in the Container su - gpadmin From e4c6420b3e8ca1b66a794da5f20826fe45a2cda2 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 13:13:54 -0600 Subject: [PATCH 18/20] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 344d86d..68034e4 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,6 @@ root/pivotal gpadmin/pivotal -gpmon/pivotal - # Using psql in the Container su - gpadmin From 3d935bbf91dbd014bb6f8788bdbf637e41f51cb0 Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 13:17:09 -0600 Subject: [PATCH 19/20] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 68034e4..12aa604 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ Pivotal Greenplum Database Base Docker Image (4.3.7.1) # Building the Docker Image You will first need to download the Pivotal Greenplum Database 4.3.7.1 installer (.zip) located at https://network.pivotal.io/products/pivotal-gpdb and place it inside the docker working directory. -# Running the Docker Image -docker run -i -p 5432:5432 [tag] - cd [docker working directory] docker build -t [tag] . +# Running the Docker Image +docker run -i -p 5432:5432 [tag] + # Container Accounts root/pivotal From e9478c82552356281e053483a249d361cf419ddd Mon Sep 17 00:00:00 2001 From: Derek Comingore Date: Sun, 21 Feb 2016 17:28:15 -0600 Subject: [PATCH 20/20] Update Dockerfile --- Dockerfile | 63 ++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index e91ef01..167f08a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,38 @@ # # Dockerfile for a GPDB SNE Sandbox Base Image # -# AutoBuild setup on 2/16/16 FROM centos:6.7 MAINTAINER dbaskette@pivotal.io -#COPY ./bins/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin /tmp/ -#COPY ./configs/* /tmp/ COPY * /tmp/ RUN echo root:pivotal | chpasswd \ - && yum install -y unzip which tar more util-linux-ng passwd openssh-clients openssh-server ed m4; yum clean all \ - && unzip /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.zip -d /tmp/ \ - && sed -i s/"more << EOF"/"cat << EOF"/g /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ - && echo -e "yes\n\nyes\nyes\n" | /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ - && rm /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ - && cat /tmp/sysctl.conf.add >> /etc/sysctl.conf \ - && cat /tmp/limits.conf.add >> /etc/security/limits.conf \ - && rm -f /tmp/*.add \ - && echo "localhost" > /tmp/gpdb-hosts \ - && chmod 777 /tmp/gpinitsystem_singlenode \ - && hostname > ~/orig_hostname \ - && mv /tmp/run.sh /usr/local/bin/run.sh \ - && chmod +x /usr/local/bin/run.sh \ - && /usr/sbin/groupadd gpadmin \ - && /usr/sbin/useradd gpadmin -g gpadmin -G wheel \ - && echo "pivotal"|passwd --stdin gpadmin \ - && echo "gpadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ - && mv /tmp/bash_profile /home/gpadmin/.bash_profile \ - && chown -R gpadmin: /home/gpadmin \ - && mkdir -p /gpdata/master /gpdata/segments \ - && chown -R gpadmin: /gpdata \ - && chown -R gpadmin: /usr/local/green* \ - && service sshd start \ - && su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpssh-exkeys -f /tmp/gpdb-hosts" \ - && su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpinitsystem -a -c /tmp/gpinitsystem_singlenode -h /tmp/gpdb-hosts; exit 0 "\ - && su gpadmin -l -c "export MASTER_DATA_DIRECTORY=/gpdata/master/gpseg-1;source /usr/local/greenplum-db/greenplum_path.sh;psql -d template1 -c \"alter user gpadmin password 'pivotal'\"; createdb gpadmin; exit 0" + && yum install -y unzip which tar more util-linux-ng passwd openssh-clients openssh-server ed m4; yum clean all \ + && unzip /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.zip -d /tmp/ \ + && rm /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.zip \ + && sed -i s/"more << EOF"/"cat << EOF"/g /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ + && echo -e "yes\n\nyes\nyes\n" | /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ + && cat /tmp/sysctl.conf.add >> /etc/sysctl.conf \ + && cat /tmp/limits.conf.add >> /etc/security/limits.conf \ + && rm -f /tmp/*.add \ + && echo "localhost" > /tmp/gpdb-hosts \ + && chmod 777 /tmp/gpinitsystem_singlenode \ + && hostname > ~/orig_hostname \ + && mv /tmp/run.sh /usr/local/bin/run.sh \ + && chmod +x /usr/local/bin/run.sh \ + && /usr/sbin/groupadd gpadmin \ + && /usr/sbin/useradd gpadmin -g gpadmin -G wheel \ + && echo "pivotal"|passwd --stdin gpadmin \ + && echo "gpadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ + && mv /tmp/bash_profile /home/gpadmin/.bash_profile \ + && chown -R gpadmin: /home/gpadmin \ + && mkdir -p /gpdata/master /gpdata/segments \ + && chown -R gpadmin: /gpdata \ + && chown -R gpadmin: /usr/local/green* \ + && service sshd start \ + && su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpssh-exkeys -f /tmp/gpdb-hosts" \ + && su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpinitsystem -a -c /tmp/gpinitsystem_singlenode -h /tmp/gpdb-hosts; exit 0 "\ + && su gpadmin -l -c "export MASTER_DATA_DIRECTORY=/gpdata/master/gpseg-1;source /usr/local/greenplum-db/greenplum_path.sh;psql -d template1 -c \"alter user gpadmin password 'pivotal'\"; createdb gpadmin; exit 0" EXPOSE 5432 22 @@ -43,7 +40,7 @@ VOLUME /gpdata # Set the default command to run when starting the container CMD echo "127.0.0.1 $(cat ~/orig_hostname)" >> /etc/hosts \ - && service sshd start \ -# && sysctl -p \ - && su gpadmin -l -c "/usr/local/bin/run.sh" \ - && /bin/bash + && service sshd start \ +# && sysctl -p \ + && su gpadmin -l -c "/usr/local/bin/run.sh" \ + && /bin/bash