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:50 UTC

[47/53] [abbrv] incubator-trafficcontrol git commit: merge master

merge master


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

Branch: refs/heads/psql-rebase
Commit: 4d2b1c841d57f996fe6b983dc8f4c9c564154f08
Parents: 0e44357
Author: Dan Kirkwood <da...@gmail.com>
Authored: Mon Nov 7 14:50:50 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Nov 11 14:43:10 2016 -0700

----------------------------------------------------------------------
 .../docker/build/Dockerfile-traffic_monitor     | 58 +++++++++++++
 .../docker/build/Dockerfile-traffic_ops         | 38 ++++++++-
 .../docker/build/Dockerfile-traffic_portal      | 56 ++++++++++++
 .../docker/build/Dockerfile-traffic_router      | 56 ++++++++++++
 .../docker/build/Dockerfile-traffic_stats       | 44 ++++++++++
 infrastructure/docker/build/README.md           |  8 --
 infrastructure/docker/build/docker-compose.yml  | 89 ++++++++++++++++++++
 infrastructure/docker/build/run-build.sh        | 16 ----
 .../app/lib/Fixtures/Integration/Servercheck.pm | 18 ++++
 traffic_ops/app/lib/Fixtures/StatsSummary.pm    |  1 -
 10 files changed, 357 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4d2b1c84/infrastructure/docker/build/Dockerfile-traffic_monitor
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_monitor b/infrastructure/docker/build/Dockerfile-traffic_monitor
index e69de29..a97aaed 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_monitor
+++ b/infrastructure/docker/build/Dockerfile-traffic_monitor
@@ -0,0 +1,58 @@
+# 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/4d2b1c84/infrastructure/docker/build/Dockerfile-traffic_ops
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_ops b/infrastructure/docker/build/Dockerfile-traffic_ops
index 49226d8..24878c7 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_ops
+++ b/infrastructure/docker/build/Dockerfile-traffic_ops
@@ -1,3 +1,19 @@
+# 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
@@ -8,8 +24,26 @@ RUN	yum -y install \
 		rpm-build && \
 	yum -y clean all
 
-ENV GITREPO https://github.com/Comcast/traffic_control
-ENV BRANCH master
+# install latest git
+RUN yum install -y \
+	expat-devel \
+	gcc \
+	gettext \
+	libcurl-devel \
+	make \
+	openssl-devel \
+	perl-ExtUtils-MakeMaker \
+	tar \
+	tcl && \
+	git clone https://github.com/git/git.git && \
+	cd git && \
+	make prefix=/usr/local all && \
+	make prefix=/usr/local install
+
+
+# all ENV vars can be controlled by, e.g. `docker run -e BRANCH=1.6.x <image>`
+ENV GITREPO=https://github.com/apache/incubator-trafficcontrol
+ENV BRANCH=master
 
 WORKDIR /repo
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4d2b1c84/infrastructure/docker/build/Dockerfile-traffic_portal
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_portal b/infrastructure/docker/build/Dockerfile-traffic_portal
index e69de29..7d535f5 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_portal
+++ b/infrastructure/docker/build/Dockerfile-traffic_portal
@@ -0,0 +1,56 @@
+# 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/4d2b1c84/infrastructure/docker/build/Dockerfile-traffic_router
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_router b/infrastructure/docker/build/Dockerfile-traffic_router
index e69de29..e2188f9 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_router
+++ b/infrastructure/docker/build/Dockerfile-traffic_router
@@ -0,0 +1,56 @@
+# 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/4d2b1c84/infrastructure/docker/build/Dockerfile-traffic_stats
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_stats b/infrastructure/docker/build/Dockerfile-traffic_stats
index e69de29..d669b03 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_stats
+++ b/infrastructure/docker/build/Dockerfile-traffic_stats
@@ -0,0 +1,44 @@
+# 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_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
+
+# vi:syntax=Dockerfile

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4d2b1c84/infrastructure/docker/build/README.md
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/README.md b/infrastructure/docker/build/README.md
index 469f7da..a600340 100644
--- a/infrastructure/docker/build/README.md
+++ b/infrastructure/docker/build/README.md
@@ -1,17 +1,9 @@
 
-<<<<<<< HEAD
 # Building *trafficcontrol* using *docker-compose*
 
 - install `docker-engine` and `docker-compose`
 - `cd incubator-trafficcontrol/infrastructure/docker/build`
 - `export GITREPO=https://github.com/<username>/incubator-trafficcontrol`
-=======
-# Building *traffic_control* using *docker-compose*
-
-- install `docker-engine` and `docker-compose`
-- `cd traffic_control/infrastructure/docker/build`
-- `export GITREPO=https://github.com/<username>/traffic_control`
->>>>>>> cc99d24... README for docker build for rpms
 - `export BRANCH=mynewbranch`
 - `docker-compose up traffic_monitor_build traffic_ops_build ...`
 - new rpm files will be in `./artifacts`

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4d2b1c84/infrastructure/docker/build/docker-compose.yml
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/docker-compose.yml b/infrastructure/docker/build/docker-compose.yml
index e69de29..879446d 100644
--- a/infrastructure/docker/build/docker-compose.yml
+++ b/infrastructure/docker/build/docker-compose.yml
@@ -0,0 +1,89 @@
+# 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
+    build:
+      dockerfile: Dockerfile-traffic_monitor
+      context: .
+    environment:
+      - GITREPO
+      - BRANCH
+    volumes:
+      - ./artifacts:/artifacts
+
+  traffic_ops_build:
+    image: traffic_ops_builder
+    build:
+      dockerfile: Dockerfile-traffic_ops
+      context: .
+    environment:
+      - GITREPO
+      - BRANCH
+    volumes:
+      - ./artifacts:/artifacts
+
+  traffic_portal_build:
+    image: traffic_portal_builder
+    build:
+      dockerfile: Dockerfile-traffic_portal
+      context: .
+    environment:
+      - GITREPO
+      - BRANCH
+    volumes:
+      - ./artifacts:/artifacts
+
+  traffic_router_build:
+    image: traffic_router_builder
+    build:
+      dockerfile: Dockerfile-traffic_router
+      context: .
+    environment:
+      - GITREPO
+      - BRANCH
+    volumes:
+      - ./artifacts:/artifacts
+
+  traffic_stats_build:
+    image: traffic_stats_builder
+    build:
+      dockerfile: Dockerfile-traffic_stats
+      context: .
+    environment:
+      - GITREPO
+      - BRANCH
+    volumes:
+      - ./artifacts:/artifacts

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4d2b1c84/infrastructure/docker/build/run-build.sh
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/run-build.sh b/infrastructure/docker/build/run-build.sh
index 719aab5..58127d8 100755
--- a/infrastructure/docker/build/run-build.sh
+++ b/infrastructure/docker/build/run-build.sh
@@ -1,5 +1,4 @@
 #!/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
@@ -16,14 +15,11 @@
 # 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}"
 
@@ -39,15 +35,3 @@ 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

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4d2b1c84/traffic_ops/app/lib/Fixtures/Integration/Servercheck.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Servercheck.pm b/traffic_ops/app/lib/Fixtures/Integration/Servercheck.pm
index 6d6f1c7..4c8236b 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Servercheck.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Servercheck.pm
@@ -1,5 +1,23 @@
 package Fixtures::Integration::Servercheck;
 
+# 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.
+
+
 # Do not edit! Generated code.
 # See https://github.com/Comcast/traffic_control/wiki/The%20Kabletown%20example
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4d2b1c84/traffic_ops/app/lib/Fixtures/StatsSummary.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/StatsSummary.pm b/traffic_ops/app/lib/Fixtures/StatsSummary.pm
index 0cca0f2..94f2aec 100644
--- a/traffic_ops/app/lib/Fixtures/StatsSummary.pm
+++ b/traffic_ops/app/lib/Fixtures/StatsSummary.pm
@@ -1,6 +1,5 @@
 package Fixtures::StatsSummary;
 #
-# Copyright 2015 Comcast Cable Communications Management, LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.