You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/11/14 17:07:44 UTC
[41/53] [abbrv] incubator-trafficcontrol git commit: simplify;
remove clone volume
simplify; remove clone volume
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/e427d9a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/e427d9a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/e427d9a5
Branch: refs/heads/psql-rebase
Commit: e427d9a56b8032d748fa84b6b6c520b77f3a273a
Parents: f7c243f
Author: Dan Kirkwood <da...@gmail.com>
Authored: Sat Oct 8 16:46:41 2016 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Nov 11 14:19:12 2016 -0700
----------------------------------------------------------------------
infrastructure/docker/build/Dockerfile-clone | 23 ---
.../docker/build/Dockerfile-traffic_monitor | 58 -------
.../docker/build/Dockerfile-traffic_ops | 25 ++-
.../docker/build/Dockerfile-traffic_portal | 56 -------
.../docker/build/Dockerfile-traffic_router | 56 -------
.../docker/build/Dockerfile-traffic_stats | 68 --------
infrastructure/docker/build/docker-compose.yml | 168 -------------------
infrastructure/docker/build/run-build.sh | 16 ++
8 files changed, 28 insertions(+), 442 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/Dockerfile-clone
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-clone b/infrastructure/docker/build/Dockerfile-clone
deleted file mode 100644
index 3679ee1..0000000
--- a/infrastructure/docker/build/Dockerfile-clone
+++ /dev/null
@@ -1,23 +0,0 @@
-FROM centos:7
-
-MAINTAINER Dan Kirkwood
-
-RUN yum -y install \
- epel-release \
- git \
- rpm-build && \
- yum -y clean all
-
-ENV GITREPO https://github.com/Comcast/traffic_control
-ENV BRANCH master
-
-WORKDIR /repo
-RUN echo $'\n\
-echo GITREPO=${GITREPO:=https://github.com/Comcast/traffic_control}\n\
-echo BRANCH=${BRANCH:=master}\n\
-git clone $GITREPO -b $BRANCH traffic_control && touch clone-finished\n\
-' >run.sh
-
-CMD sh -x /repo/run.sh
-
-# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/Dockerfile-traffic_monitor
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_monitor b/infrastructure/docker/build/Dockerfile-traffic_monitor
index a97aaed..e69de29 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_monitor
+++ b/infrastructure/docker/build/Dockerfile-traffic_monitor
@@ -1,58 +0,0 @@
-# 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:7
-
-MAINTAINER Dan Kirkwood
-
-RUN yum -y install \
- epel-release \
- git \
- rpm-build && \
- yum -y clean all
-
-ENV GITREPO=https://github.com/apache/incubator-trafficcontrol
-ENV BRANCH=master
-
-# Above are common for all sub-projects.
-
-### traffic_monitor specific
-RUN yum -y install \
- which && \
- yum -y clean all
-
-WORKDIR /opt
-RUN curl -L -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.tar.gz | tar xzf - && \
- curl -L http://mirror.nexcess.net/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | tar xzf -
-RUN ln -s jdk* java && ln -s apache-maven* maven
-
-RUN alternatives --install /usr/bin/java java /opt/java/bin/java 2 && \
- alternatives --install /usr/bin/jar jar /opt/java/bin/jar 2 && \
- alternatives --install /usr/bin/javac javac /opt/java/bin/javac 2 && \
- alternatives --set java /opt/java/bin/java && \
- alternatives --set jar /opt/java/bin/jar && \
- alternatives --set javac /opt/java/bin/javac && \
- alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 1
-WORKDIR /
-###
-
-VOLUME ./artifacts:/artifacts
-
-ADD run-build.sh .
-
-CMD ./run-build.sh traffic_monitor 2>&1 | tee /artifacts/build-traffic_monitor.log
-
-# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/Dockerfile-traffic_ops
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_ops b/infrastructure/docker/build/Dockerfile-traffic_ops
index 0e379e7..49226d8 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_ops
+++ b/infrastructure/docker/build/Dockerfile-traffic_ops
@@ -8,21 +8,20 @@ RUN yum -y install \
rpm-build && \
yum -y clean all
+ENV GITREPO https://github.com/Comcast/traffic_control
+ENV BRANCH master
+
+WORKDIR /repo
+
+# traffic_ops specific
RUN yum -y install \
golang
+###
+
+VOLUME ./artifacts:/artifacts
+
+ADD run-build.sh .
-# wait for clone to be available, then
-# build the rpm and copy to /artifacts
-RUN echo $'\n\
-while [ ! -f /repo/clone-finished ]; do sleep 1; done\n\
-\n\
-tc=/repo/traffic_control\n\
-cd $tc/traffic_ops\n\
-./build/build_rpm.sh\n\
-mkdir -p /artifacts\n\
-cp $tc/dist/* /artifacts/.\n\
-' >/run.sh
-
-CMD sh -x /run.sh
+CMD ./run-build.sh traffic_ops 2>&1 | tee /artifacts/build-traffic_ops.log
# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/Dockerfile-traffic_portal
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_portal b/infrastructure/docker/build/Dockerfile-traffic_portal
index 7d535f5..e69de29 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_portal
+++ b/infrastructure/docker/build/Dockerfile-traffic_portal
@@ -1,56 +0,0 @@
-# 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:7
-
-MAINTAINER Dan Kirkwood
-
-RUN yum -y install \
- epel-release \
- git \
- rpm-build && \
- yum -y clean all
-
-ENV GITREPO https://github.com/apache/incubator-trafficcontrol
-ENV BRANCH master
-
-WORKDIR /repo
-
-# traffic_portal specific
-RUN yum -y install \
- gcc \
- libffi-devel \
- make \
- nodejs \
- npm \
- ruby-devel \
- rubygems
-
-RUN gem install compass
-RUN npm -g install bower grunt-cli
-
-# bower will not run as root by default
-RUN echo '{ "allow_root": true }' > /root/.bowerrc
-
-###
-
-VOLUME ./artifacts:/artifacts
-
-ADD run-build.sh .
-
-CMD ./run-build.sh traffic_portal 2>&1 | tee /artifacts/build-traffic_portal.log
-
-# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/Dockerfile-traffic_router
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_router b/infrastructure/docker/build/Dockerfile-traffic_router
index e2188f9..e69de29 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_router
+++ b/infrastructure/docker/build/Dockerfile-traffic_router
@@ -1,56 +0,0 @@
-# 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:7
-
-MAINTAINER Dan Kirkwood
-
-RUN yum -y install \
- epel-release \
- git \
- rpm-build && \
- yum -y clean all
-
-ENV GITREPO https://github.com/apache/incubator-trafficcontrol
-ENV BRANCH master
-
-WORKDIR /repo
-
-### traffic_router specific
-RUN yum -y install \
- which
-
-WORKDIR /opt
-RUN curl -L -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.tar.gz | tar xzf - && \
- curl -L http://mirror.nexcess.net/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | tar xzf -
-RUN ln -s jdk* java && ln -s apache-maven* maven
-
-RUN alternatives --install /usr/bin/java java /opt/java/bin/java 2 && \
- alternatives --install /usr/bin/jar jar /opt/java/bin/jar 2 && \
- alternatives --install /usr/bin/javac javac /opt/java/bin/javac 2 && \
- alternatives --set java /opt/java/bin/java && \
- alternatives --set jar /opt/java/bin/jar && \
- alternatives --set javac /opt/java/bin/javac && \
- alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 1
-###
-
-VOLUME ./artifacts:/artifacts
-
-ADD run-build.sh .
-
-CMD ./run-build.sh traffic_router 2>&1 | tee /artifacts/build-traffic_router.log
-
-# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/Dockerfile-traffic_stats
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_stats b/infrastructure/docker/build/Dockerfile-traffic_stats
index 98e1db9..e69de29 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_stats
+++ b/infrastructure/docker/build/Dockerfile-traffic_stats
@@ -1,68 +0,0 @@
-<<<<<<< HEAD
-# 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.
-=======
->>>>>>> 343f0b7... move docker-compose files to infrastructure
-FROM centos:7
-
-MAINTAINER Dan Kirkwood
-
-RUN yum -y install \
- epel-release \
- git \
-<<<<<<< HEAD
- rpm-build && \
- yum -y clean all
-
-ENV GITREPO https://github.com/apache/incubator-trafficcontrol
-ENV BRANCH master
-
-WORKDIR /repo
-
-# traffic_stats specific
-RUN yum -y install \
- golang && \
- yum -y clean all
-###
-
-VOLUME ./artifacts:/artifacts
-
-ADD run-build.sh .
-
-CMD ./run-build.sh traffic_stats 2>&1 | tee /artifacts/build-traffic_stats.log
-=======
- rpm-build
-
-RUN yum -y install \
- golang
-
-# wait for clone to be available, then
-# build the rpm and copy to /artifacts
-RUN echo $'\n\
-while [ ! -f /repo/clone-finished ]; do sleep 1; done\n\
-\n\
-tc=/repo/traffic_control\n\
-cd $tc/traffic_stats\n\
-./build/build_rpm.sh\n\
-mkdir -p /artifacts\n\
-cp $tc/dist/* /artifacts/.\n\
-' >/run.sh
-
-CMD sh -x /run.sh
->>>>>>> 343f0b7... move docker-compose files to infrastructure
-
-# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/docker-compose.yml
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/docker-compose.yml b/infrastructure/docker/build/docker-compose.yml
index c5ccf73..e69de29 100644
--- a/infrastructure/docker/build/docker-compose.yml
+++ b/infrastructure/docker/build/docker-compose.yml
@@ -1,168 +0,0 @@
-<<<<<<< HEAD
-# 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.
----
-
-# Build configuration for trafficcontrol
-# Usage:
-# GITREPO=... BRANCH=... docker-compose up [<service>...]
-#
-# where GITREPO is https path to trafficcontrol clone
-# (default: https://github.com/apache/incubator-trafficcontrol)
-# and <branch> is name of branch to test
-# (default: master).
-#
-# [<service>...] (optional) is one or more of the services listed below, e.g.
-# traffic_ops_build. Default is to build all.
-#
-# All rpms are delivered to ./artifacts.
-#
-version: '2'
-
-services:
- traffic_monitor_build:
- image: traffic_monitor_builder
-=======
----
-
-# IMPORTANT: Prior to starting another build, the containers and build_repo
-# volume must be deleted:
-# docker-compose down -v
-#
-#
-# Build configuration for traffic_control
-# Usage:
-# GITREPO=... BRANCH=... docker-compose up [<service>...]
-#
-# where GITREPO is https path to traffic_control clone
-# (default: https://github.com/Comcast/traffic_control)
-# and <branch> is name of branch to test
-# (default: master).
-#
-# [<service>...] (optional) is one or more of the services listed below, e.g.
-# traffic_ops_build. (not necessary to list clone -- all others depend on
-# it..). Default is to build all.
-#
-# All rpms are delivered to ./artifacts.
-#
-version: '2'
-
-volumes:
- repo:
-
-services:
- clone:
- build:
- dockerfile: Dockerfile-clone
- context: .
- environment:
- - GITREPO
- - BRANCH
- volumes:
- - repo:/repo
-
- traffic_monitor_build:
- depends_on: [ clone ]
->>>>>>> 343f0b7... move docker-compose files to infrastructure
- build:
- dockerfile: Dockerfile-traffic_monitor
- context: .
- environment:
- - GITREPO
- - BRANCH
- volumes:
-<<<<<<< HEAD
- - ./artifacts:/artifacts
-
- traffic_ops_build:
- image: traffic_ops_builder
-=======
- - repo:/repo
- - ./artifacts:/artifacts
-
- traffic_ops_build:
- depends_on: [ clone ]
->>>>>>> 343f0b7... move docker-compose files to infrastructure
- build:
- dockerfile: Dockerfile-traffic_ops
- context: .
- environment:
- - GITREPO
- - BRANCH
- volumes:
-<<<<<<< HEAD
- - ./artifacts:/artifacts
-
- traffic_portal_build:
- image: traffic_portal_builder
-=======
- - repo:/repo
- - ./artifacts:/artifacts
-
- traffic_portal_build:
- depends_on: [ clone ]
->>>>>>> 343f0b7... move docker-compose files to infrastructure
- build:
- dockerfile: Dockerfile-traffic_portal
- context: .
- environment:
- - GITREPO
- - BRANCH
- volumes:
-<<<<<<< HEAD
- - ./artifacts:/artifacts
-
- traffic_router_build:
- image: traffic_router_builder
-=======
- - repo:/repo
- - ./artifacts:/artifacts
-
- traffic_router_build:
- depends_on: [ clone ]
->>>>>>> 343f0b7... move docker-compose files to infrastructure
- build:
- dockerfile: Dockerfile-traffic_router
- context: .
- environment:
- - GITREPO
- - BRANCH
- volumes:
-<<<<<<< HEAD
- - ./artifacts:/artifacts
-
- traffic_stats_build:
- image: traffic_stats_builder
-=======
- - repo:/repo
- - ./artifacts:/artifacts
-
- traffic_stats_build:
- depends_on: [ clone ]
->>>>>>> 343f0b7... move docker-compose files to infrastructure
- build:
- dockerfile: Dockerfile-traffic_stats
- context: .
- environment:
- - GITREPO
- - BRANCH
- volumes:
-<<<<<<< HEAD
-=======
- - repo:/repo
->>>>>>> 343f0b7... move docker-compose files to infrastructure
- - ./artifacts:/artifacts
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e427d9a5/infrastructure/docker/build/run-build.sh
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/run-build.sh b/infrastructure/docker/build/run-build.sh
index 58127d8..719aab5 100755
--- a/infrastructure/docker/build/run-build.sh
+++ b/infrastructure/docker/build/run-build.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+<<<<<<< HEAD
# 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
@@ -15,11 +16,14 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+=======
+>>>>>>> c2e0979... simplify; remove clone volume
target=$1
[[ -z $target ]] && echo "No target specified"
echo "Building $target"
+<<<<<<< HEAD
echo "GITREPO=${GITREPO:=https://github.com/apache/incubator-trafficcontrol}"
echo "BRANCH=${BRANCH:=master}"
@@ -35,3 +39,15 @@ cp ../dist/* /artifacts/.
# Clean up for next build
cd -
rm -r $dir
+=======
+echo "GITREPO=${GITREPO:=https://github.com/Comcast/traffic_control}"
+echo "BRANCH=${BRANCH:=master}"
+
+set -x
+git clone $GITREPO -b $BRANCH traffic_control
+
+cd traffic_control/$target
+./build/build_rpm.sh
+mkdir -p /artifacts
+cp ../dist/* /artifacts/.
+>>>>>>> c2e0979... simplify; remove clone volume