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 2017/05/16 19:41:30 UTC
[4/5] incubator-trafficcontrol git commit: added installer for the
Postgres Docker service-a
added installer for the Postgres Docker service-a
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/e4872fdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/e4872fdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/e4872fdf
Branch: refs/heads/master
Commit: e4872fdf24ab0dd464933e5866bd04848dabbf11
Parents: ac0d7d7
Author: Dewayne Richardson <de...@apache.org>
Authored: Thu May 11 15:11:47 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Tue May 16 13:40:46 2017 -0600
----------------------------------------------------------------------
traffic_ops_db/bin/install_systemd_unit.sh | 4 +++
traffic_ops_db/systemd/traffic_ops_db.service | 30 ++++++++++++++++++++++
2 files changed, 34 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e4872fdf/traffic_ops_db/bin/install_systemd_unit.sh
----------------------------------------------------------------------
diff --git a/traffic_ops_db/bin/install_systemd_unit.sh b/traffic_ops_db/bin/install_systemd_unit.sh
index 321a101..454b3e2 100644
--- a/traffic_ops_db/bin/install_systemd_unit.sh
+++ b/traffic_ops_db/bin/install_systemd_unit.sh
@@ -14,3 +14,7 @@
# limitations under the License.
#
+systemctl enable traffic_ops_db.service
+
+printf "\nNow you can start manually start the traffic_ops service with the command:\n"
+printf "systemctl start traffic_ops_db\n"
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e4872fdf/traffic_ops_db/systemd/traffic_ops_db.service
----------------------------------------------------------------------
diff --git a/traffic_ops_db/systemd/traffic_ops_db.service b/traffic_ops_db/systemd/traffic_ops_db.service
new file mode 100644
index 0000000..31110e3
--- /dev/null
+++ b/traffic_ops_db/systemd/traffic_ops_db.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 Postgres Docker Container
+Requires=docker.service
+After=docker.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/docker-compose -p trafficops -f /opt/traffic_ops_db/docker/docker-compose.yml up
+ExecStop=/usr/bin/docker-compose -p trafficops -f /opt/traffic_ops_db/docker/docker-compose.yml stop
+
+[Install]
+WantedBy=default.target