You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by ok...@apache.org on 2018/01/19 19:24:12 UTC

madlib git commit: Add centos 7 postgres 9.6/10 docker files for automated testing.

Repository: madlib
Updated Branches:
  refs/heads/master b6858d3e0 -> 53db7363a


Add centos 7 postgres 9.6/10 docker files for automated testing.

Additional Author : Nikhil Kak <nk...@pivotal.io>

Also added a readme to describe all the docker files.

Closes #228


Project: http://git-wip-us.apache.org/repos/asf/madlib/repo
Commit: http://git-wip-us.apache.org/repos/asf/madlib/commit/53db7363
Tree: http://git-wip-us.apache.org/repos/asf/madlib/tree/53db7363
Diff: http://git-wip-us.apache.org/repos/asf/madlib/diff/53db7363

Branch: refs/heads/master
Commit: 53db7363a876d3bc483385d327d2f26e9ada1c0e
Parents: b6858d3
Author: Nikhil Kak and Orhan Kislal <nk...@pivotal.io>
Authored: Thu Jan 18 14:42:22 2018 -0800
Committer: Nikhil Kak and Orhan Kislal <nk...@pivotal.io>
Committed: Fri Jan 19 11:23:57 2018 -0800

----------------------------------------------------------------------
 .../docker/base/Dockerfile_centos_5_gpdb_4_3_10 | 71 ++++++++++++++++++++
 .../docker/base/Dockerfile_centos_7_postgres_10 | 50 ++++++++++++++
 .../base/Dockerfile_centos_7_postgres_9_6       | 51 ++++++++++++++
 tool/docker/base/Dockerfile_gpdb_4_3_10         |  2 +-
 tool/docker/base/README.md                      | 15 +++++
 5 files changed, 188 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/madlib/blob/53db7363/tool/docker/base/Dockerfile_centos_5_gpdb_4_3_10
----------------------------------------------------------------------
diff --git a/tool/docker/base/Dockerfile_centos_5_gpdb_4_3_10 b/tool/docker/base/Dockerfile_centos_5_gpdb_4_3_10
new file mode 100644
index 0000000..fdb7ffd
--- /dev/null
+++ b/tool/docker/base/Dockerfile_centos_5_gpdb_4_3_10
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+### This is work in progress, does not work at the moment.
+#FROM pivotaldata/gpdb4310:latest
+#
+#### Get postgres specific add-ons
+#RUN yum -y update \
+#    && yum -y groupinstall "Development tools" \
+#    && yum -y install epel-release      \
+#    && yum -y install cmake             \
+#                      openssl-devel     \
+#                      openssl-libs      \
+#                      openssh-server    \
+#                      python-devel
+#
+#
+#### Build MADlib
+#ADD ./ /madlib
+##RUN cd madlib && \
+##     mkdir build && \
+#	 cd build && \
+#	 cmake .. && \
+#	 make && \
+#	 make install
+#
+###################################################################################################
+################## PLACEHOLDER COMMANDS ##################
+#### WARNING: This is under construction, for future reference####################
+### Build the image from this docker file:
+## docker build -t gpdb -f tool/gpdb/Dockerfile_4_3_10 .
+#
+#### Steps to use the image for installing MADlib, building changed source code:
+### Run the container, mounting the source code's folder to the container. For example:
+## 1) docker run -d -it --name gpdb -v (path-to-madlib)/src:/madlib/src gpdb bash
+#
+### When the container is up, connect to it and execute (Install MADlib):
+## 2) docker exec -it gpdb /madlib/build/src/bin/madpack -p greenplum -c gpadmin@127.0.0.1:5432/gpadmin install
+#
+### Go into the container to build and run commands like install-check for modules:
+## 3) docker exec -it gpdb sh
+#
+### The above command gives us terminal access to the container, run commands such as:
+## - cd /madlib/build
+## - make (This can be run after changing code in the madlib source code)
+## - src/bin/madpack -p postgres  -c postgres/postgres@localhost:5432/postgres install-check -t svm
+### Install or reinstall MADlib if required:
+## - src/bin/madpack -p postgres  -c postgres/postgres@localhost:5432/postgres install
+## - src/bin/madpack -p postgres  -c postgres/postgres@localhost:5432/postgres reinstall
+#
+#
+#### Common docker commands:
+### Kill and remove containers:
+## - docker kill gpdb
+## - docker rm gpdb
+#
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/madlib/blob/53db7363/tool/docker/base/Dockerfile_centos_7_postgres_10
----------------------------------------------------------------------
diff --git a/tool/docker/base/Dockerfile_centos_7_postgres_10 b/tool/docker/base/Dockerfile_centos_7_postgres_10
new file mode 100644
index 0000000..2bc5397
--- /dev/null
+++ b/tool/docker/base/Dockerfile_centos_7_postgres_10
@@ -0,0 +1,50 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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 centos:centos7
+RUN rpm -Uvh https://yum.postgresql.org/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
+
+RUN yum -y update; yum clean all
+RUN yum -y install epel-release; yum clean all
+RUN yum -y install postgresql10-server postgresql10 postgresql10-contrib postgresql10-plpython supervisor; yum clean all
+
+USER root
+
+### Get postgres specific add-ons
+RUN yum update -y && yum install -y \
+                    gcc \
+                    wget \
+                    postgresql10-devel \
+                    openssl \
+                    m4 \
+                    vim \
+                    flex \
+                    bison \
+                    graphviz \
+                    java \
+                    epel-release \
+                    python-devel
+
+RUN yum install -y python-pip
+ENV PATH="$PATH:/usr/pgsql-10/bin"
+RUN pip install awscli pygresql paramiko --upgrade
+
+## To build an image from this docker file without LaTex, from madlib folder, run:
+## docker build -t madlib/centos_7_postgres_10:latest -f tool/docker/base/Dockerfile_centos_7_postgres_10 .
+## To push it to docker hub, run:
+## docker push madlib/centos_7_postgres_10:latest

http://git-wip-us.apache.org/repos/asf/madlib/blob/53db7363/tool/docker/base/Dockerfile_centos_7_postgres_9_6
----------------------------------------------------------------------
diff --git a/tool/docker/base/Dockerfile_centos_7_postgres_9_6 b/tool/docker/base/Dockerfile_centos_7_postgres_9_6
new file mode 100644
index 0000000..9785649
--- /dev/null
+++ b/tool/docker/base/Dockerfile_centos_7_postgres_9_6
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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 centos/postgresql-96-centos7:9.6
+
+USER root
+
+### Get postgres specific add-ons
+RUN yum install -y \
+                    gcc \
+                    gcc-c++ \
+                    wget \
+                    postgresql-devel \
+                    openssl \
+                    m4 \
+                    vim \
+                    make \
+                    java \
+                    epel-release \
+                    python-devel \
+                    rh-postgresql96-postgresql-plpython
+
+RUN yum install -y python-pip
+ENV PATH="PATH=$PATH:/opt/rh/rh-postgresql96/root/usr/bin"
+RUN pip install awscli pygresql paramiko --upgrade
+
+## To build an image from this docker file without LaTex, from madlib folder, run:
+## docker build -t madlib/centos_7_postgres_9.6:latest -f tool/docker/base/Dockerfile_centos_7_postgres_9_6 .
+## To push it to docker hub, run:
+## docker push madlib/centos_7_postgres_9.6:latest
+
+## To build an image from this docker file with LaTex, from madlib folder, uncomment
+## line 60, and run:
+## docker build -t madlib/centos_7_postgres_9.6:LaTex -f tool/docker/base/Dockerfile_postgres_9_6 .
+## To push it to docker hub, run:
+## docker push madlib/centos_7_postgres_9.6:LaTex

http://git-wip-us.apache.org/repos/asf/madlib/blob/53db7363/tool/docker/base/Dockerfile_gpdb_4_3_10
----------------------------------------------------------------------
diff --git a/tool/docker/base/Dockerfile_gpdb_4_3_10 b/tool/docker/base/Dockerfile_gpdb_4_3_10
index fdb7ffd..4468822 100644
--- a/tool/docker/base/Dockerfile_gpdb_4_3_10
+++ b/tool/docker/base/Dockerfile_gpdb_4_3_10
@@ -68,4 +68,4 @@
 ### Kill and remove containers:
 ## - docker kill gpdb
 ## - docker rm gpdb
-#
\ No newline at end of file
+#

http://git-wip-us.apache.org/repos/asf/madlib/blob/53db7363/tool/docker/base/README.md
----------------------------------------------------------------------
diff --git a/tool/docker/base/README.md b/tool/docker/base/README.md
new file mode 100644
index 0000000..486cdb7
--- /dev/null
+++ b/tool/docker/base/README.md
@@ -0,0 +1,15 @@
+Docker Images
+=======================
+
+## Following docker configs are based on Debian (jessie) images:
+
+1) Dockerfile_postgres_9_6: Plese use this configuration for development purposes. Please refer to the [top level README](https://github.com/apache/madlib/blob/master/README.md) for setup instructions.
+
+2) Dockerfile_postgres_9_6_Jenkins: This configuration is used by the Jenkins builds (https://builds.apache.org/job/madlib-master-build and https://builds.apache.org/job/madlib-pr-build).
+
+## The rest of the configs are based on CentOS images:
+
+1) Dockerfile_centos_7_postgres_9.6 : Used for automated testing on centos 7 with postgres 9.6.
+2) Dockerfile_centos_7_postgres_10 : Used for automated testing on centos 7 with postgres 10.
+
+3) Dockerfile_centos_5_gpdb_4_3_10: This is work in progress, does not work at the moment.