summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Hros2018-04-21 00:32:56 +0200
committerMario Hros2018-04-21 00:35:59 +0200
commit3547a6427f60bc8ffb2ce081e9d751a639f5827a (patch)
treec52312feeeeb006546a91e6b5ebf278f17ef12c4
downloadaur-3547a6427f60bc8ffb2ce081e9d751a639f5827a.tar.gz
initial for version 0.11.0
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD46
-rw-r--r--carbonapi.service12
-rw-r--r--carbonapi.yaml13
4 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..437b2eb2c9f5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = carbonapi
+ pkgdesc = Replacement graphite API server written in Go
+ pkgver = 0.11.0
+ pkgrel = 1
+ url = https://github.com/go-graphite/carbonapi
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = go>=1.8
+ depends = glibc
+ conflicts = -git
+ options = !strip
+ source = carbonapi-0.11.0.tar.gz::https://github.com/go-graphite/carbonapi/archive/0.11.0.tar.gz
+ source = carbonapi.yaml
+ source = carbonapi.service
+ sha256sums = d54228f0fce17db1ed319bc7a65c4296b539e6fec34645bfcaed4baf39840efc
+ sha256sums = cef6f2fb6702d32ce84765615ec8208f8d03f9d540f177e904f47c61e5ea1215
+ sha256sums = d82c982d0f2673385d129c96d2566b28beed642b0bbd75f2b54dc497fa36bc24
+
+pkgname = carbonapi
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..810f0a05eee7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Mario Hros <m-aur@k3a.me>
+
+_userid=511
+_username=carbonapi
+
+pkgname=carbonapi
+pkgver=0.11.0
+pkgrel=1
+pkgdesc="Replacement graphite API server written in Go"
+arch=(i686 x86_64)
+url='https://github.com/go-graphite/carbonapi'
+license=('BSD')
+conflicts=("$_pkgname-git")
+options=('!strip')
+depends=(glibc)
+makedepends=('go>=1.8')
+_gopkg=github.com/go-graphite/$pkgname
+source=($pkgname-$pkgver.tar.gz::https://$_gopkg/archive/$pkgver.tar.gz
+ carbonapi.yaml
+ carbonapi.service)
+sha256sums=('d54228f0fce17db1ed319bc7a65c4296b539e6fec34645bfcaed4baf39840efc'
+ 'cef6f2fb6702d32ce84765615ec8208f8d03f9d540f177e904f47c61e5ea1215'
+ 'd82c982d0f2673385d129c96d2566b28beed642b0bbd75f2b54dc497fa36bc24')
+
+build() {
+ export GOPATH="${srcdir}"
+
+ # make fake GOPATH structure
+ local _importPath="${srcdir}/src/$_gopkg"
+ mkdir -p `dirname "$_importPath"`
+
+ ln -sf "${srcdir}/${pkgname}-${pkgver}" "${_importPath}"
+ cd "${_importPath}"
+
+ pwd
+ make
+}
+
+package() {
+ cd "${srcdir}/src/$_gopkg"
+
+ install -Dm0755 "./carbonapi" "${pkgdir}/usr/bin/carbonapi"
+ install -Dm0644 "${srcdir}/carbonapi.service" "${pkgdir}/usr/lib/systemd/system/carbonapi.service"
+ install -Dm0644 "${srcdir}/carbonapi.yaml" "${pkgdir}/etc/carbonapi.yaml"
+}
+
diff --git a/carbonapi.service b/carbonapi.service
new file mode 100644
index 000000000000..311f56332533
--- /dev/null
+++ b/carbonapi.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Graphite API server
+Documentation=https://github.com/go-graphite/carbonapi
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/carbonapi -config /etc/carbonapi.yaml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/carbonapi.yaml b/carbonapi.yaml
new file mode 100644
index 000000000000..cc661410168d
--- /dev/null
+++ b/carbonapi.yaml
@@ -0,0 +1,13 @@
+# Listen address, should always include hostname or ip address and a port.
+listen: "localhost:8081"
+
+# Max concurrent requests to CarbonZipper
+concurency: 10
+
+cache:
+ # Type of caching. Valid: "mem", "memcache", "null"
+ type: "mem"
+
+upstreams:
+ backends:
+ - "http://127.0.0.1:8080"