You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/04/11 16:09:13 UTC

[1/2] incubator-trafficcontrol git commit: created more formal docker compose service

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 5745f9046 -> 528c4ea0d


created more formal docker compose service


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

Branch: refs/heads/master
Commit: b8886c1c3003b9d270d5457773b087dd3bbb96fc
Parents: 5745f90
Author: Dewayne Richardson <de...@apache.org>
Authored: Tue Apr 11 08:49:55 2017 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Tue Apr 11 10:09:09 2017 -0600

----------------------------------------------------------------------
 traffic_ops/experimental/ui/docker/Dockerfile   | 13 +++++++++
 traffic_ops/experimental/ui/docker/clean.sh     |  6 ++++
 .../experimental/ui/docker/docker-compose.yml   | 30 ++++++++++++++++++++
 .../etc/systemd/service/trafficops-ui.service   | 30 ++++++++++++++++++++
 traffic_ops/experimental/ui/toui.sh             | 13 ---------
 5 files changed, 79 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b8886c1c/traffic_ops/experimental/ui/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/docker/Dockerfile b/traffic_ops/experimental/ui/docker/Dockerfile
new file mode 100644
index 0000000..bd17931
--- /dev/null
+++ b/traffic_ops/experimental/ui/docker/Dockerfile
@@ -0,0 +1,13 @@
+FROM node:4-onbuild
+#FROM buildpack-deps:jessie
+
+RUN apt-get update -y && apt-get install libffi-dev ruby-dev rubygems vim -y
+
+# replace this with your application's default port
+RUN gem update --system && gem install --no-rdoc --no-ri compass && gem install --no-rdoc --no-ri sass -v 3.4.22
+RUN npm install -g bower grunt-cli
+RUN echo '{ "allow_root": true }' > /root/.bowerrc
+RUN cd /usr/src/app && /usr/local/bin/bower install
+RUN cd /usr/src/app && /usr/local/bin/grunt dist
+
+EXPOSE 8888

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b8886c1c/traffic_ops/experimental/ui/docker/clean.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/docker/clean.sh b/traffic_ops/experimental/ui/docker/clean.sh
new file mode 100755
index 0000000..536f973
--- /dev/null
+++ b/traffic_ops/experimental/ui/docker/clean.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+#docker-compose -p trafficops build
+
+docker rmi trafficops_ui
+docker ps -a

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b8886c1c/traffic_ops/experimental/ui/docker/docker-compose.yml
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/docker/docker-compose.yml b/traffic_ops/experimental/ui/docker/docker-compose.yml
new file mode 100644
index 0000000..d1ba3fd
--- /dev/null
+++ b/traffic_ops/experimental/ui/docker/docker-compose.yml
@@ -0,0 +1,30 @@
+#
+#  Licensed 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.
+#
+version: '2'
+
+services:
+  ui:
+    build:
+      context: ..
+      dockerfile: /opt/traffic_ops_ui/docker/Dockerfile
+    ports:
+      - 80:8080
+    volumes:
+      - /etc/traffic_ops_ui/conf:/etc/traffic_ops_ui/conf
+    networks:
+      - default
+
+networks:
+  default:
+     driver: bridge

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b8886c1c/traffic_ops/experimental/ui/etc/systemd/service/trafficops-ui.service
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/etc/systemd/service/trafficops-ui.service b/traffic_ops/experimental/ui/etc/systemd/service/trafficops-ui.service
new file mode 100644
index 0000000..3b2d8c4
--- /dev/null
+++ b/traffic_ops/experimental/ui/etc/systemd/service/trafficops-ui.service
@@ -0,0 +1,30 @@
+#
+#  Licensed 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.
+#
+#-----------------------------------------
+# Ansible managed
+#-----------------------------------------
+#
+[Unit]
+Description=Traffic Ops UI Docker Container
+Requires=docker.service
+After=docker.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/docker-compose -p trafficops -f /opt/traffic_ops_ui/docker/docker-compose.yml up
+ExecStop=/usr/bin/docker-compose -p trafficops -f /opt/traffic_ops_ui/docker/docker-compose.yml down -v
+WorkingDirectory=/opt/traffic_ops_ui
+
+[Install]
+WantedBy=default.target

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b8886c1c/traffic_ops/experimental/ui/toui.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/toui.sh b/traffic_ops/experimental/ui/toui.sh
deleted file mode 100755
index 136a51b..0000000
--- a/traffic_ops/experimental/ui/toui.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-# Temporary helper wrapper script
-ACTION=$1
-
-if [[ "$ACTION" == "run" ]];then
-  docker-compose -p trafficops up -d
-elif [[ "$ACTION" == "stop" ]];then
-  docker-compose -p trafficops down -v
-else
-  echo "Invalid action: only 'run' or 'stop' available."
-fi
-


[2/2] incubator-trafficcontrol git commit: This closes #452

Posted by mi...@apache.org.
This closes #452


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

Branch: refs/heads/master
Commit: 528c4ea0d557ff1e16b2a91353131611e9d6329b
Parents: b8886c1
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Tue Apr 11 10:09:44 2017 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Tue Apr 11 10:09:44 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------