Filippo Giunchedi has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/172228

Change subject: carbon-c-relay: add debian packaging
......................................................................

carbon-c-relay: add debian packaging

Enhanced C implementation of Carbon relay, aggregator and rewriter.

Initially, the idea is to be able to mirror carbon traffic to another host for
testing purposes. Going forward it can be used to provide HA, testing and so
on.

Change-Id: I1a48a09b485dfa6010f46bae24b24d43683172f6
---
A debian/carbon-c-relay.conf
A debian/carbon-c-relay.dirs
A debian/carbon-c-relay.docs
A debian/carbon-c-relay.install
A debian/carbon-c-relay.lintian-overrides
A debian/carbon-c-relay.service
A debian/carbon-c-relay.upstart
A debian/changelog
A debian/clean
A debian/compat
A debian/control
A debian/copyright
A debian/postinst
A debian/rules
A debian/source/format
15 files changed, 119 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/carbon-c-relay 
refs/changes/28/172228/1

diff --git a/debian/carbon-c-relay.conf b/debian/carbon-c-relay.conf
new file mode 100644
index 0000000..f470578
--- /dev/null
+++ b/debian/carbon-c-relay.conf
@@ -0,0 +1,16 @@
+# example configuration scenarios.
+# Refer to /usr/share/doc/carbon-c-relay/README.md.gz for additional examples!
+
+## mirror all incoming metrics towards two destinations
+#cluster send-through
+#  forward
+#    host1:2003
+#    host2:2003
+#  ;
+#
+#match * send to send-through;
+
+## send all incoming metrics to the first responsive host
+#cluster send-to-any-one
+#  any_of host1:2003 host2:2003;
+#match * send to send-to-any-one;
diff --git a/debian/carbon-c-relay.dirs b/debian/carbon-c-relay.dirs
new file mode 100644
index 0000000..6bac063
--- /dev/null
+++ b/debian/carbon-c-relay.dirs
@@ -0,0 +1 @@
+/var/lib/carbon-c-relay
diff --git a/debian/carbon-c-relay.docs b/debian/carbon-c-relay.docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/carbon-c-relay.docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/carbon-c-relay.install b/debian/carbon-c-relay.install
new file mode 100644
index 0000000..45bfc65
--- /dev/null
+++ b/debian/carbon-c-relay.install
@@ -0,0 +1,2 @@
+carbon-c-relay usr/bin
+debian/carbon-c-relay.conf /etc
diff --git a/debian/carbon-c-relay.lintian-overrides 
b/debian/carbon-c-relay.lintian-overrides
new file mode 100644
index 0000000..90311ac
--- /dev/null
+++ b/debian/carbon-c-relay.lintian-overrides
@@ -0,0 +1,4 @@
+# the package is shipping only upstart and systemd scripts, however the init
+# script is mentioned in postinst
+carbon-c-relay: init.d-script-not-included-in-package etc/init.d/carbon-c-relay
+carbon-c-relay: init.d-script-not-marked-as-conffile etc/init.d/carbon-c-relay
diff --git a/debian/carbon-c-relay.service b/debian/carbon-c-relay.service
new file mode 100644
index 0000000..96c557e
--- /dev/null
+++ b/debian/carbon-c-relay.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=carbon relay C implementation
+
+[Service]
+User=carbon-c-relay
+ExecStart=/usr/bin/carbon-c-relay -f /etc/carbon-c-relay.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/carbon-c-relay.upstart b/debian/carbon-c-relay.upstart
new file mode 100644
index 0000000..cbe9254
--- /dev/null
+++ b/debian/carbon-c-relay.upstart
@@ -0,0 +1,10 @@
+description "carbon relay C implementation"
+
+start on (local-filesystems and net-device-up IFACE!=lo)
+stop on [!12345]
+
+limit nofile 32768 32768
+
+setuid carbon-c-relay
+
+exec /usr/bin/carbon-c-relay -f /etc/carbon-c-relay.conf
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..37ef623
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+carbon-c-relay (0.36-1) UNRELEASED; urgency=medium
+
+  * Initial release.
+
+ -- Filippo Giunchedi <fili...@wikimedia.org>  Fri, 07 Nov 2014 15:48:03 +0000
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..c58b7be
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+carbon-c-relay
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b23f25d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: carbon-c-relay
+Section: net
+Priority: optional
+Maintainer: Filippo Giunchedi <fili...@wikimedia.org>
+Build-Depends: debhelper (>= 9), dh-systemd, libssl-dev, pkg-config
+Standards-Version: 3.9.6
+X-Python-Version: >= 2.7
+
+Package: carbon-c-relay
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Carbon-like graphite line mode relay
+ This project aims to be a replacement of graphite's original carbon-relay
+ component.
+ .
+ This project provides a multithreaded relay which can address multiple targets
+ and clusters for each and every metric based on pattern matches.
+ Consistent-hash routing compatible with the original carbon's implementation
+ is also provided. This relay also supports aggregation, failover of backend
+ servers and more.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..ef9a13a
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: carbon-c-relay
+Upstream-Contact: Fabian Groffen
+Source: https://github.com/grobian/carbon-c-relay
+
+Files: *
+Copyright: 2013-2014 Fabian Groffen
+License: Apache-2
+
+Files: debian/*
+Copyright: 2014 Filippo Giunchedi     <fgiunch...@wikimedia.org>
+           2014 Wikimedia Foundation
+License: Apache-2
+
+License: Apache-2
+  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.
+  .
+  On Debian systems, the full text of the Apache License version 2 can be found
+  in the file `/usr/share/common-licenses/Apache-2.0'.
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..eef74df
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    configure)
+        adduser --quiet --system --no-create-home \
+            --home /var/lib/carbon-c-relay carbon-c-relay
+    ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..4dd096a
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@ --with systemd
+
+override_dh_install:
+       cp relay carbon-c-relay
+       dh_install
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

-- 
To view, visit https://gerrit.wikimedia.org/r/172228
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a48a09b485dfa6010f46bae24b24d43683172f6
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/carbon-c-relay
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to