Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398277 )

Change subject: Add Debianisation for prometheus-blazegraph-exporter
......................................................................

Add Debianisation for prometheus-blazegraph-exporter

Change-Id: If47861aa684e146198aab3a1d9b4c3a5340370f3
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/dirs
A debian/install
A debian/postinst
A debian/rules
A debian/service
9 files changed, 84 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/prometheus-blazegraph-exporter 
refs/changes/77/398277/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..93f7b71
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+prometheus-blazegraph-exporter (0.1) jessie-wikimedia; urgency=medium
+
+  * Initial release
+
+ -- Moritz Muehlenhoff <mor...@wikimedia.org>  Tue, 14 Dec 2017 16:38:29 +0000
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..d86c9ec
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,12 @@
+Source: prometheus-blazegraph-exporter
+Section: net
+Priority: extra
+Maintainer: Moritz Muehlenhoff <mor...@wikimedia.org>
+Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5)
+Standards-Version: 3.9.8
+
+Package: prometheus-blazegraph-exporter
+Architecture: all
+Depends: python-prometheus-client, ${misc:Depends}
+Description: Prometheus exporter for Blazegraph
+ Prometheus exporter for Blazegraph server metrics.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..236cabf
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,22 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+
+Files: *
+Copyright: 2017  Moritz Muehlenhoff <mor...@wikimedia.org>, Alexandros 
Kosiaris <akosia...@wikimedia.org>,
+                 Filippo Giunchedi <fili...@wikimedia.org>, Wikimedia 
Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ 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/dirs b/debian/dirs
new file mode 100644
index 0000000..1f11d5e
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+etc/prometheus
\ No newline at end of file
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..ea4903a
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+prometheus-blazegraph-exporter usr/bin
\ No newline at end of file
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..a43ff27
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+  configure)
+    # Add prometheus user
+    if ! getent passwd prometheus > /dev/null; then
+        adduser --quiet --system --no-create-home \
+            --group --gecos "Prometheus daemon" prometheus || true
+    fi
+
+  ;;
+
+  abort-upgrade|abort-remove|abort-deconfigure)
+    :
+  ;;
+
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..305c822
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@ --with systemd
diff --git a/debian/service b/debian/service
new file mode 100644
index 0000000..764352f
--- /dev/null
+++ b/debian/service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Prometheus Blazegraph Exporter
+
+[Service]
+Restart=always
+User=prometheus
+ExecStart=/usr/bin/prometheus-blazegraph-exporter
+
+[Install]
+WantedBy=multi-user.target

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If47861aa684e146198aab3a1d9b4c3a5340370f3
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/prometheus-blazegraph-exporter
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff <mmuhlenh...@wikimedia.org>

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

Reply via email to