You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by hz...@apache.org on 2016/03/08 19:39:57 UTC

[1/2] incubator-trafodion git commit: TRAFODION-1878 Initial commit for adding a portable (docker) build environment

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 97a7da4a9 -> ca1e5f104


TRAFODION-1878 Initial commit for adding a portable (docker) build environment


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/0a63c989
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/0a63c989
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/0a63c989

Branch: refs/heads/master
Commit: 0a63c9892ae85caa6f48fed70054d2b612906dcf
Parents: e24ea17
Author: Nitin Lamba <ni...@ampool.io>
Authored: Sat Mar 5 15:54:47 2016 -0800
Committer: Nitin Lamba <ni...@ampool.io>
Committed: Sat Mar 5 15:54:47 2016 -0800

----------------------------------------------------------------------
 tools/docker/Dockerfile              | 45 +++++++++++++++++++++
 tools/docker/build-base-docker.sh    | 29 +++++++++++++
 tools/docker/start-compile-docker.sh | 67 +++++++++++++++++++++++++++++++
 3 files changed, 141 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a63c989/tools/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
new file mode 100644
index 0000000..be75b9b
--- /dev/null
+++ b/tools/docker/Dockerfile
@@ -0,0 +1,45 @@
+# 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:centos6.6
+MAINTAINER Trafodion Community <de...@trafodion.incubator.apache.org>
+
+LABEL Vendor="Apache Trafodion (incubating)"
+LABEL version=unstable
+
+# download and install environment dependencies
+RUN	yum install -y epel-release alsa-lib-devel ant ant-nodeps boost-devel cmake \
+	     device-mapper-multipath dhcp flex gcc-c++ gd git glibc-devel \
+       glibc-devel.i686 graphviz-perl gzip java-1.7.0-openjdk-devel \
+  		 apr-devel apr-util-devel \
+       libX11-devel libXau-devel libaio-devel \
+       libcurl-devel libibcm.i686 libibumad-devel libibumad-devel.i686 \
+       libiodbc libiodbc-devel librdmacm-devel librdmacm-devel.i686 \
+       libxml2-devel lua-devel lzo-minilzo \
+       net-snmp-devel net-snmp-perl openldap-clients openldap-devel \
+       openldap-devel.i686 openmotif openssl-devel openssl-devel.i686 \
+       openssl-static perl-Config-IniFiles perl-Config-Tiny \
+       perl-DBD-SQLite perl-Expect perl-IO-Tty perl-Math-Calc-Units \
+       perl-Params-Validate perl-Parse-RecDescent perl-TermReadKey \
+       perl-Time-HiRes protobuf-compiler protobuf-devel \
+       readline-devel saslwrapper sqlite-devel \
+       unixODBC unixODBC-devel uuid-perl wget xerces-c-devel xinetd \
+  && yum -y erase pdsh \
+	&& yum clean all
+
+# set environment
+ENV	JAVA_HOME /usr/lib/jvm/java-1.7.0-openjdk.x86_64
+ENV PATH $PATH:$JAVA_HOME/bin

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a63c989/tools/docker/build-base-docker.sh
----------------------------------------------------------------------
diff --git a/tools/docker/build-base-docker.sh b/tools/docker/build-base-docker.sh
new file mode 100755
index 0000000..a280321
--- /dev/null
+++ b/tools/docker/build-base-docker.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# 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.
+
+set -e -x -u
+
+BASE_SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+
+export DOCKER_ENV_VERSION="0.1"
+export BASE_IMAGE_NAME="trafodion/base:${DOCKER_ENV_VERSION}"
+
+pushd ${BASE_SCRIPT_DIR}
+
+docker build --rm=true -t ${BASE_IMAGE_NAME} .
+
+popd

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a63c989/tools/docker/start-compile-docker.sh
----------------------------------------------------------------------
diff --git a/tools/docker/start-compile-docker.sh b/tools/docker/start-compile-docker.sh
new file mode 100755
index 0000000..f9697ec
--- /dev/null
+++ b/tools/docker/start-compile-docker.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+# 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.
+
+set -e -x -u
+
+SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+
+source ${SCRIPT_DIR}/build-base-docker.sh
+
+IMAGE_NAME="trafodion/base:${DOCKER_ENV_VERSION}"
+
+if [ "$(uname -s)" == "Linux" ]; then
+  USER_NAME=${SUDO_USER:=$USER}
+  USER_ID=$(id -u "${USER_NAME}")
+  GROUP_ID=$(id -g "${USER_NAME}")
+else # boot2docker uid and gid
+  USER_NAME=$USER
+  USER_ID=1000
+  GROUP_ID=50
+fi
+
+# create user home directory; download and install build tools
+docker build -t "${IMAGE_NAME}-${USER_NAME}" - <<UserSpecificDocker
+FROM ${IMAGE_NAME} 
+RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME}
+RUN useradd -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME}
+ENV HOME /home/${USER_NAME}
+RUN cd /home/${USER_NAME} \
+ && mkdir download \
+ && mkdir trafodion-build-tools \
+ && wget https://raw.githubusercontent.com/apache/incubator-trafodion/master/install/traf_tools_setup.sh \
+ && chmod +x traf_tools_setup.sh \
+ && ./traf_tools_setup.sh -d ~/download -i ~/trafodion-build-tools \
+ && rm -fr ./download \
+ && yum install -y qt-devel qt-config
+ENV TOOLSDIR /home/${USER_NAME}/trafodion-build-tools
+ENV PATH $PATH:/home/${USER_NAME}/trafodion-build-tools/apache-maven-3.3.3/bin:/usr/lib64/qt4/bin/
+UserSpecificDocker
+
+# Go to root project folder
+pushd ${SCRIPT_DIR}/../..
+
+docker run -i -t \
+  --rm=true \
+  -w "/home/${USER_NAME}/incubator-trafodion" \
+  -u "${USER_NAME}" \
+  -v "$PWD:/home/${USER_NAME}/incubator-trafodion" \
+  -v "$HOME/.m2:/home/${USER_NAME}/.m2" \
+  --name TrafodionEnv \
+  ${IMAGE_NAME}-${USER_NAME} \
+  bash
+
+popd


[2/2] incubator-trafodion git commit: TRAFODION-1878 Initial commit for adding a portable (docker) build env

Posted by hz...@apache.org.
TRAFODION-1878 Initial commit for adding a portable (docker) build env


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/ca1e5f10
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/ca1e5f10
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/ca1e5f10

Branch: refs/heads/master
Commit: ca1e5f104e859bf527790851e57878f00c222998
Parents: 97a7da4 0a63c98
Author: Hans Zeller <hz...@apache.org>
Authored: Tue Mar 8 18:38:54 2016 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Tue Mar 8 18:38:54 2016 +0000

----------------------------------------------------------------------
 tools/docker/Dockerfile              | 45 +++++++++++++++++++++
 tools/docker/build-base-docker.sh    | 29 +++++++++++++
 tools/docker/start-compile-docker.sh | 67 +++++++++++++++++++++++++++++++
 3 files changed, 141 insertions(+)
----------------------------------------------------------------------