X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id CA897DC2C01 for ; Sat, 18 Apr 2015 13:30:52 +0000 (UTC) Received: from smtp.core-hosting.net (ns1.core-hosting.net [95.130.13.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 04EEDDC04D9 for ; Sat, 18 Apr 2015 13:30:46 +0000 (UTC) Received: from tiptop.internal (59.153.78.83.dynamic.wline.res.cust.swisscom.ch [83.78.153.59]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.core-hosting.net (Postfix) with ESMTPSA id 9EE7EAA218D; Sat, 18 Apr 2015 15:30:41 +0200 (CEST) Date: Sat, 18 Apr 2015 15:30:22 +0200 From: Olivier To: =?UTF-8?B?QmFydMWCb21pZWo=?= Piotrowski Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] testing/consul: new aport Message-ID: <20150418153022.238d7cb6@tiptop.internal> In-Reply-To: <20150418121659.41e2cca5@wallander> References: <87742e9a14b503094df60cca9925cf93@core-hosting.net> <20150418121659.41e2cca5@wallander> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/Apxzj_zUtceDFuGmgn9DHi2"; protocol="application/pgp-signature" X-Virus-Scanned: ClamAV using ClamSMTP --Sig_/Apxzj_zUtceDFuGmgn9DHi2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 18 Apr 2015 12:16:59 +0200 Bart=C5=82omiej Piotrowski wrote: > On Thu, 02 Apr 2015 12:56:56 +0200 > Olivier Mauras wrote: > > From d557e1c4388fda66e422d53e6b5af2a78f056dcf Mon Sep 17 00:00:00 > > 2001 From: Olivier Mauras > > Date: Thu, 2 Apr 2015 11:43:13 +0200 > > Subject: testing/consul: new aport > >=20 > > https://consul.io/ > > A tool for service discovery, monitoring and configuration > >=20 > > diff --git a/testing/consul/0001-Remove-git-requirement.patch=20 > > b/testing/consul/0001-Remove-git-requirement.patch > > new file mode 100644 > > index 0000000..96cc508 > > --- /dev/null > > +++ b/testing/consul/0001-Remove-git-requirement.patch > > @@ -0,0 +1,37 @@ > > +From 866df648ed3665ab685c144bb7c709b579411a8b Mon Sep 17 00:00:00 > > 2001 +From: Olivier Mauras > > +Date: Wed, 1 Apr 2015 16:22:36 +0200 > > +Subject: [PATCH] Remove Git requirement > > + > > +--- > > + scripts/build.sh | 7 +------ > > + 1 file changed, 1 insertion(+), 6 deletions(-) > > + > > +diff --git a/scripts/build.sh b/scripts/build.sh > > +index 5f08688..65240a1 100755 > > +--- a/scripts/build.sh > > ++++ b/scripts/build.sh > > +@@ -11,11 +11,6 @@ DIR=3D"$( cd -P "$( dirname "$SOURCE" )/.." && pwd > > )" > > + # Change into that directory > > + cd $DIR > > + > > +-# Get the git commit > > +-GIT_COMMIT=3D$(git rev-parse HEAD) > > +-GIT_DIRTY=3D$(test -n "`git status --porcelain`" && echo "+CHANGES" > > || true) > > +-GIT_DESCRIBE=3D$(git describe --tags) > > +- > > + # If we're building on Windows, specify an extension > > + EXTENSION=3D"" > > + if [ "$(go env GOOS)" =3D "windows" ]; then > > +@@ -46,7 +41,7 @@ go get \ > > + # Build! > > + echo "--> Building..." > > + go build \ > > +- -ldflags "${CGO_LDFLAGS} -X main.GitCommit=20 > > ${GIT_COMMIT}${GIT_DIRTY} -X main.GitDescribe ${GIT_DESCRIBE}" \ > > ++ -ldflags "${CGO_LDFLAGS} -X main.GitDescribe v0.5.0" \ > > + -v \ > > + -o bin/consul${EXTENSION} > > + cp bin/consul${EXTENSION} ${GOPATHSINGLE}/bin > > +-- > > +2.3.4 > > + > > diff --git a/testing/consul/APKBUILD b/testing/consul/APKBUILD > > new file mode 100644 > > index 0000000..e3a34eb > > --- /dev/null > > +++ b/testing/consul/APKBUILD > > @@ -0,0 +1,119 @@ > > +# Contributor: Olivier Mauras > > +# Maintainer: > > +pkgname=3Dconsul > > +pkgver=3D0.5.0 > > +pkgrel=3D0 > > +pkgdesc=3D"A tool for service discovery, monitoring and configuration" > > +url=3D"https://www.consul.io/" > > +arch=3D"all" > > +license=3D"MPL 2.0" > > +depends=3D"" > > +depends_dev=3D"" > > +makedepends=3D"go $depends_dev" > > +install=3D"$pkgname.pre-install $pkgname.pre-deinstall=20 > > $pkgname.post-deinstall" > > +pkgusers=3D"consul" > > +pkggroups=3D"consul" > > +subpackages=3D"" > > +source=3D" > > + https://github.com/hashicorp/consul/archive/v${pkgver}.tar.gz > > + 0001-Remove-git-requirement.patch > > + consul.initd > > + consul.confd > > + acl.json.sample > > + encrypt.json.sample > > + server.json > > + tls.json.sample > > + " > > + > > +_builddir=3D"$srcdir"/${pkgname}_go_build > > +prepare() { > > + cd "$srcdir"/${pkgname}-${pkgver} > > + local i > > + for i in $source; do > > + case $i in > > + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return > > 1;; > > + esac > > + done > > + > > + # Move sources in GOPATH > > + mkdir -p $_builddir > > + cd "$_builddir" > > + > > + mkdir -p src/github.com/hashicorp/${pkgname} > > + mv ../${pkgname}-${pkgver}/* > > src/github.com/hashicorp/${pkgname}/ +} > > + > > +build() { > > + cd "$_builddir" > > + export GOPATH=3D"$_builddir" > > + > > + # Install godep > > + echo "! Installing godep" > > + go get github.com/tools/godep > > + > > + # Fetch Godeps file > > + mkdir -p Godeps > > + wget -q -O Godeps/Godeps.json=20 > > https://raw.githubusercontent.com/hashicorp/consul/master/deps/v0-5-0.j= son > > + > > + # Install deps with godep > > + echo "! Installing deps using godep" > > + $GOPATH/bin/godep restore > > + > > + # Doesn't make sense but seems it can't get everything in > > one pass -_- > > + go get github.com/prometheus/client_golang/_vendor/goautoneg > > + go get > > github.com/prometheus/client_golang/_vendor/perks/quantile + > > + # Run consul make > > + echo "! Building consul" > > + cd src/github.com/hashicorp/${pkgname}/ > > + make > > +} > > + > > +package() { > > + cd "$_builddir" > > + > > + # Consul init script > > + install -m755 -D "$srcdir"/$pkgname.initd \ > > + "$pkgdir"/etc/init.d/$pkgname || return 1 > > + # Consul init conf > > + install -m644 -D "$srcdir"/$pkgname.confd \ > > + "$pkgdir"/etc/conf.d/$pkgname || return 1 > > + # Main binary > > + install -m750 -o root -g consul \ > > + -D > > src/github.com/hashicorp/${pkgname}/bin/${pkgname} \ > > + "$pkgdir"/usr/sbin/${pkgname} || return 1 > > + # Consul datadir > > + install -m750 -o consul -g consul -d > > "$pkgdir"/var/${pkgname} || return 1 > > + # Consul configdir > > + install -m750 -o root -g consul -d "$pkgdir"/etc/${pkgname} > > || return 1 > > + # Consul sample config files > > + for cf in acl.json.sample encrypt.json.sample server.json=20 > > tls.json.sample; do > > + install -m640 -o root -g consul "$srcdir"/$cf=20 > > "$pkgdir"/etc/${pkgname} || return 1 > > + done > > + > > +} > > + > > +md5sums=3D"1f69f1c90f3a595c24bbd7d0eecb138b v0.5.0.tar.gz > > +75c92e72009c39d14a8bfc072024077c 0001-Remove-git-requirement.patch > > +34adfd50f993e57f5941d77963a23eef consul.initd > > +9873f8d9a30f788eda9298e89366a1c9 consul.confd > > +3ecdfa3d217bf8517a2b025da321811d acl.json.sample > > +3cfcc6f98d15ce3f3ac7021657786ab6 encrypt.json.sample > > +75a654690d6096987d52796a6e01e405 server.json > > +11b09a876487013ddd564c152a4e0920 tls.json.sample" > > +sha256sums=3D"282f561c814fdb1f61106f3bb64b881c8eabc71f79f70f581509714e= 96f0449a=20 > > v0.5.0.tar.gz > > +c7e879bcdd99867f8412661396899cb4ebb7e93bebb0944c0bcc2c464a584de8 =20 > > 0001-Remove-git-requirement.patch > > +f6caf13d0797f1cdc3d861e3417baa4e4fc3e8beaf5698b278ce514b3af5edac =20 > > consul.initd > > +888aaaee84b3d8431526960becfdb123eaf438ae10fa58f59b5520ae0c0d0830 =20 > > consul.confd > > +40b230f47a5a52eac87cfea4cdda99125a2136630bdf49d22af0df814201f313 =20 > > acl.json.sample > > +927f9b480d4593a9d3dfe5e3e047e30fddc954a83157517135db3f60e7596a6f =20 > > encrypt.json.sample > > +1058636fbbe66890c8a04a264f1200572202b205976aa562b07fe86f4faab89f =20 > > server.json > > +b404ee9359c6e041cffe98bc4ab0808703bec627ed4a30e44386c7038580b74f =20 > > tls.json.sample" > > +sha512sums=3D"8d86b4f9e7cf14aa2bd063a81a459d0bf9953d880901471759dacbb2= a920d7143e41dad8a880fb92a1e6fbd250ceeae55dc6138a7da6247bb1ecec7ddd8a8886=20 > > v0.5.0.tar.gz > > +6b83d4a3d16197564f68ccefe126ee9d9ed24fa0186bc55acd8abe5d9949a1cdcf4211= 034d0457af7426037cec1218ba8e651817128f559f8caef160d7843ff1=20 > > 0001-Remove-git-requirement.patch > > +8510cdd05c8fa8e856cbc3806d8851adfebf64f34d7736503e6516050df6c98537e0fe= 334a28dc8ce2278be87ab7e1c0e09f77f26848bb6fff70f28ff702218a=20 > > consul.initd > > +f2c5af74dfcbca2fea8ebea31139d93f44455b93ef17ec611b880d7071af4125615dbb= d23969d0d04ca636c26d7b4e7eb97f1266baa89252097f4cbc5173d817=20 > > consul.confd > > +d4310dde63d3b8fc4791124bd255bf2a1402b86d00f6b1732e18b0caedb75eae6c7738= 2e1a48f12469828ef4bb363db4580fb1aafa63fcdc97b1431f6ea96d58=20 > > acl.json.sample > > +ec30ad73c13f9dd5ba15389567436dbf74c24e822cb959c6ccc40a35e36e212313c70f= 3cf1ccee3f63a7bb98760173d6c2478161a25b85e14dd889a47572aff1=20 > > encrypt.json.sample > > +a8b984db03f0bfb652d541dbdd3f1bc9be22f16cce78f73e495cc54adea1e09e9ac0e2= f306ca8436590433c80a2ef824641f790b30aea9acb806b01fcabc918e=20 > > server.json > > +8ff5241ca0c195ba23bdd9786b4da81148cd51da429193c6f32b67a8d25e7ba1c12c91= e22287e64ab6f02bc511308b2774ed8f768244f78b1ffb54c27fd84d76=20 > > tls.json.sample" > > diff --git a/testing/consul/acl.json.sample=20 > > b/testing/consul/acl.json.sample > > new file mode 100644 > > index 0000000..629e05c > > --- /dev/null > > +++ b/testing/consul/acl.json.sample > > @@ -0,0 +1,8 @@ > > +# Sample locked down default ACL policy > > +# Use uuidgen to generate a master_token - Accepts any string format > > +#{ > > +# "acl_datacenter": "dc1", > > +# "acl_master_token": "35629809-57c6-4ef5-a807-b3a23394d57d", > > +# "acl_default_policy": "deny", > > +# "acl_down_policy": "deny" > > +#} > > diff --git a/testing/consul/consul.confd b/testing/consul/consul.confd > > new file mode 100644 > > index 0000000..c06224b > > --- /dev/null > > +++ b/testing/consul/consul.confd > > @@ -0,0 +1,2 @@ > > +# Consul startup > > +consul_opts=3D"agent -config-dir=3D/etc/consul" > > diff --git a/testing/consul/consul.initd b/testing/consul/consul.initd > > new file mode 100644 > > index 0000000..73613d9 > > --- /dev/null > > +++ b/testing/consul/consul.initd > > @@ -0,0 +1,30 @@ > > +#!/sbin/runscript > > + > > +name=3Dconsul > > +daemon=3D/usr/sbin/$name > > +daemon_user=3D$name > > +daemon_group=3D$name > > + > > +depend() { > > + need net > > + after firewall > > +} > > + > > +start() { > > + ebegin "Starting ${name}" > > + start-stop-daemon --start --quiet \ > > + -m --pidfile /var/run/${name}.pid \ > > + --user ${daemon_user} --group > > ${daemon_group} \ > > + -b -1 /dev/null -2 /dev/null \ > > + -k 027 --exec ${daemon} -- ${consul_opts} > > + eend $? > > +} > > + > > +stop() { > > + ebegin "Stopping ${name}" > > + start-stop-daemon --stop --quiet \ > > + --pidfile /var/run/${name}.pid \ > > + --exec ${daemon} > > + eend $? > > +} > > + > > diff --git a/testing/consul/consul.post-deinstall=20 > > b/testing/consul/consul.post-deinstall > > new file mode 100644 > > index 0000000..a4da5f3 > > --- /dev/null > > +++ b/testing/consul/consul.post-deinstall > > @@ -0,0 +1,7 @@ > > +#!/bin/sh > > + > > +# Delete consul group and user > > +delgroup consul 2> /dev/null > > +deluser consul 2> /dev/null > > +exit 0 > > + > > diff --git a/testing/consul/consul.pre-deinstall=20 > > b/testing/consul/consul.pre-deinstall > > new file mode 100644 > > index 0000000..e352a05 > > --- /dev/null > > +++ b/testing/consul/consul.pre-deinstall > > @@ -0,0 +1,6 @@ > > +#!/bin/sh > > + > > +# Stop consul service > > +rc-service consul stop &> /dev/null > > +exit 0 > > + > > diff --git a/testing/consul/consul.pre-install=20 > > b/testing/consul/consul.pre-install > > new file mode 100644 > > index 0000000..aef4230 > > --- /dev/null > > +++ b/testing/consul/consul.pre-install > > @@ -0,0 +1,7 @@ > > +#!/bin/sh > > + > > +# Create consul group and user > > +addgroup -S consul 2> /dev/null > > +adduser -h /var/consul -s /sbin/nologin -G consul -S -D consul 2>=20 > > /dev/null > > +exit 0 > > + > > diff --git a/testing/consul/encrypt.json.sample=20 > > b/testing/consul/encrypt.json.sample > > new file mode 100644 > > index 0000000..8e8fc89 > > --- /dev/null > > +++ b/testing/consul/encrypt.json.sample > > @@ -0,0 +1,5 @@ > > +# Enable gossip message encryption > > +# Use 'consul keygen' to generate a new one > > +#{ > > +# "encrypt": "HnAKJceZzkkqiHBkP52iEQ=3D=3D" > > +#} > > diff --git a/testing/consul/server.json b/testing/consul/server.json > > new file mode 100644 > > index 0000000..d09b568 > > --- /dev/null > > +++ b/testing/consul/server.json > > @@ -0,0 +1,8 @@ > > +{ > > + "data_dir": "/var/consul", > > + "server": true, > > + "bootstrap_expect": 1, > > + "disable_update_check": true, > > + "disable_remote_exec": true, > > + "enable_syslog": true > > +} > > diff --git a/testing/consul/tls.json.sample=20 > > b/testing/consul/tls.json.sample > > new file mode 100644 > > index 0000000..fda1d0d > > --- /dev/null > > +++ b/testing/consul/tls.json.sample > > @@ -0,0 +1,8 @@ > > +# Enable RPC encryption with TLS > > +#{ > > +# "ca_file": "/etc/consul/ssl/ca_cert.pem", > > +# "cert_file": "/etc/consul/ssl/server.pem", > > +# "key_file": "/etc/consul/ssl/server.key", > > +# "verify_incoming": true, > > +# "verify_outgoing": true > > +#} >=20 > The package is missing bash and mercurial as make dependencies and > actually successes to build only because there is not even one > '|| return 1' in build function. There are also issues with pulling Go > dependencies: https://paste.xinu.at/lEpSL/ >=20 > Cheers, > Bart=C5=82omiej Rebased the whole patch with fixups http://git.mauras.ch/aports/patch/?id=3D3e1af95e0a8795461c56fcdb8a204f50302= 2d589 =46rom 3e1af95e0a8795461c56fcdb8a204f503022d589 Mon Sep 17 00:00:00 2001 From: Olivier Mauras Date: Thu, 2 Apr 2015 11:43:13 +0200 Subject: testing/consul: new aport https://consul.io/ A tool for service discovery, monitoring and configuration diff --git a/testing/consul/0001-Remove-git-requirement.patch b/testing/con= sul/0001-Remove-git-requirement.patch new file mode 100644 index 0000000..fe9b51b --- /dev/null +++ b/testing/consul/0001-Remove-git-requirement.patch @@ -0,0 +1,37 @@ +From 866df648ed3665ab685c144bb7c709b579411a8b Mon Sep 17 00:00:00 2001 +From: Olivier Mauras +Date: Wed, 1 Apr 2015 16:22:36 +0200 +Subject: [PATCH] Remove Git requirement + +--- + scripts/build.sh | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/scripts/build.sh b/scripts/build.sh +index 5f08688..65240a1 100755 +--- a/scripts/build.sh ++++ b/scripts/build.sh +@@ -11,11 +11,6 @@ DIR=3D"$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" + # Change into that directory + cd $DIR + +-# Get the git commit +-GIT_COMMIT=3D$(git rev-parse HEAD) +-GIT_DIRTY=3D$(test -n "`git status --porcelain`" && echo "+CHANGES" || tr= ue) +-GIT_DESCRIBE=3D$(git describe --tags) +- + # If we're building on Windows, specify an extension + EXTENSION=3D"" + if [ "$(go env GOOS)" =3D "windows" ]; then +@@ -46,7 +41,7 @@ go get \ + # Build! + echo "--> Building..." + go build \ +- -ldflags "${CGO_LDFLAGS} -X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY} = -X main.GitDescribe ${GIT_DESCRIBE}" \ ++ -ldflags "${CGO_LDFLAGS} -X main.GitDescribe v0.5.0" \ + -v \ + -o bin/consul${EXTENSION} + cp bin/consul${EXTENSION} ${GOPATHSINGLE}/bin +-- +2.3.4 + diff --git a/testing/consul/APKBUILD b/testing/consul/APKBUILD new file mode 100644 index 0000000..4efb988 --- /dev/null +++ b/testing/consul/APKBUILD @@ -0,0 +1,118 @@ +# Contributor: Olivier Mauras +# Maintainer: +pkgname=3Dconsul +pkgver=3D0.5.0 +pkgrel=3D0 +pkgdesc=3D"A tool for service discovery, monitoring and configuration" +url=3D"https://www.consul.io/" +arch=3D"all" +license=3D"MPL 2.0" +depends=3D"" +depends_dev=3D"" +makedepends=3D"go bash mercurial $depends_dev" +install=3D"$pkgname.pre-install $pkgname.pre-deinstall $pkgname.post-deins= tall" +pkgusers=3D"consul" +pkggroups=3D"consul" +subpackages=3D"" +source=3D" + https://github.com/hashicorp/consul/archive/v${pkgver}.tar.gz + 0001-Remove-git-requirement.patch + consul.initd + consul.confd + acl.json.sample + encrypt.json.sample + server.json + tls.json.sample + " + +_builddir=3D"$srcdir"/${pkgname}_go_build +prepare() { + cd "$srcdir"/${pkgname}-${pkgver} + local i + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + + # Move sources in GOPATH + mkdir -p $_builddir + cd "$_builddir" + + mkdir -p src/github.com/hashicorp/${pkgname} + mv ../${pkgname}-${pkgver}/* src/github.com/hashicorp/${pkgname}/ +} + +build() { + cd "$_builddir" + export GOPATH=3D"$_builddir" + + # Install godep + echo "! Installing godep" + go get github.com/tools/godep || return 1 + + # Fetch Godeps file + (mkdir -p Godeps + wget -q -O Godeps/Godeps.json https://raw.githubusercontent.com/hashicorp= /consul/master/deps/v0-5-0.json) || return 1 + + # Install deps with godep + echo "! Installing deps using godep" + $GOPATH/bin/godep restore || true + + # Godep restore isn't able to get these two for some reason. + go get github.com/prometheus/client_golang/_vendor/goautoneg || return 1 + go get github.com/prometheus/client_golang/_vendor/perks/quantile || retu= rn 1 + + # Run consul make + echo "! Building consul" + cd src/github.com/hashicorp/${pkgname}/ + make || return 1 +} + +package() { + cd "$_builddir" + + # Consul init script + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + # Consul init conf + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 + # Main binary + install -m750 -o root -g consul \ + -D src/github.com/hashicorp/${pkgname}/bin/${pkgname} \ + "$pkgdir"/usr/sbin/${pkgname} || return 1 + # Consul datadir + install -m750 -o consul -g consul -d "$pkgdir"/var/${pkgname} || return 1 + # Consul configdir + install -m750 -o root -g consul -d "$pkgdir"/etc/${pkgname} || return 1 + # Consul sample config files + for cf in acl.json.sample encrypt.json.sample server.json tls.json.sample= ; do + install -m640 -o root -g consul "$srcdir"/$cf "$pkgdir"/etc/${pkgname} |= | return 1 + done +} + +md5sums=3D"1f69f1c90f3a595c24bbd7d0eecb138b v0.5.0.tar.gz +a90ec7d89029fb9c9485568eeec71baa 0001-Remove-git-requirement.patch +34adfd50f993e57f5941d77963a23eef consul.initd +9873f8d9a30f788eda9298e89366a1c9 consul.confd +3ecdfa3d217bf8517a2b025da321811d acl.json.sample +3cfcc6f98d15ce3f3ac7021657786ab6 encrypt.json.sample +75a654690d6096987d52796a6e01e405 server.json +f16f70961c3297b54affc6f2c615873a tls.json.sample" +sha256sums=3D"282f561c814fdb1f61106f3bb64b881c8eabc71f79f70f581509714e96f0= 449a v0.5.0.tar.gz +75592e7c770dcd82214ad0f7294fb4458781b336663646e47f047d6aeae79049 0001-Rem= ove-git-requirement.patch +f6caf13d0797f1cdc3d861e3417baa4e4fc3e8beaf5698b278ce514b3af5edac consul.i= nitd +888aaaee84b3d8431526960becfdb123eaf438ae10fa58f59b5520ae0c0d0830 consul.c= onfd +40b230f47a5a52eac87cfea4cdda99125a2136630bdf49d22af0df814201f313 acl.json= .sample +927f9b480d4593a9d3dfe5e3e047e30fddc954a83157517135db3f60e7596a6f encrypt.= json.sample +1058636fbbe66890c8a04a264f1200572202b205976aa562b07fe86f4faab89f server.j= son +b10bd00587a8ed56284e1c0bc9f1bdc6d556986320113ddf4e118042dc39cd2d tls.json= .sample" +sha512sums=3D"8d86b4f9e7cf14aa2bd063a81a459d0bf9953d880901471759dacbb2a920= d7143e41dad8a880fb92a1e6fbd250ceeae55dc6138a7da6247bb1ecec7ddd8a8886 v0.5.= 0.tar.gz +8a61554db78a2759742feb0248bcfef4f3c66d6b6247130ea39d64a620ec7d67a88fdf32c7= 4b9a516229014bd25b0b697ca0d86639a523c65e39424ad44bf43a 0001-Remove-git-req= uirement.patch +8510cdd05c8fa8e856cbc3806d8851adfebf64f34d7736503e6516050df6c98537e0fe334a= 28dc8ce2278be87ab7e1c0e09f77f26848bb6fff70f28ff702218a consul.initd +f2c5af74dfcbca2fea8ebea31139d93f44455b93ef17ec611b880d7071af4125615dbbd239= 69d0d04ca636c26d7b4e7eb97f1266baa89252097f4cbc5173d817 consul.confd +d4310dde63d3b8fc4791124bd255bf2a1402b86d00f6b1732e18b0caedb75eae6c77382e1a= 48f12469828ef4bb363db4580fb1aafa63fcdc97b1431f6ea96d58 acl.json.sample +ec30ad73c13f9dd5ba15389567436dbf74c24e822cb959c6ccc40a35e36e212313c70f3cf1= ccee3f63a7bb98760173d6c2478161a25b85e14dd889a47572aff1 encrypt.json.sample +a8b984db03f0bfb652d541dbdd3f1bc9be22f16cce78f73e495cc54adea1e09e9ac0e2f306= ca8436590433c80a2ef824641f790b30aea9acb806b01fcabc918e server.json +7582f1845a742cf570db5aa52077eb4c4cbfe68ee2ae9569cc2806444217eba0ee960a3a52= f3edd1a7c36ca8b7811df5cab6dd062b060ab43ed57b8c811c85de tls.json.sample" diff --git a/testing/consul/acl.json.sample b/testing/consul/acl.json.sample new file mode 100644 index 0000000..629e05c --- /dev/null +++ b/testing/consul/acl.json.sample @@ -0,0 +1,8 @@ +# Sample locked down default ACL policy +# Use uuidgen to generate a master_token - Accepts any string format +#{ +# "acl_datacenter": "dc1", +# "acl_master_token": "35629809-57c6-4ef5-a807-b3a23394d57d", +# "acl_default_policy": "deny", +# "acl_down_policy": "deny" +#} diff --git a/testing/consul/consul.confd b/testing/consul/consul.confd new file mode 100644 index 0000000..c06224b --- /dev/null +++ b/testing/consul/consul.confd @@ -0,0 +1,2 @@ +# Consul startup +consul_opts=3D"agent -config-dir=3D/etc/consul" diff --git a/testing/consul/consul.initd b/testing/consul/consul.initd new file mode 100644 index 0000000..73613d9 --- /dev/null +++ b/testing/consul/consul.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript + +name=3Dconsul +daemon=3D/usr/sbin/$name +daemon_user=3D$name +daemon_group=3D$name + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${name}" + start-stop-daemon --start --quiet \ + -m --pidfile /var/run/${name}.pid \ + --user ${daemon_user} --group ${daemon_group} \ + -b -1 /dev/null -2 /dev/null \ + -k 027 --exec ${daemon} -- ${consul_opts} + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/${name}.pid \ + --exec ${daemon} + eend $? +} + diff --git a/testing/consul/consul.post-deinstall b/testing/consul/consul.p= ost-deinstall new file mode 100644 index 0000000..a4da5f3 --- /dev/null +++ b/testing/consul/consul.post-deinstall @@ -0,0 +1,7 @@ +#!/bin/sh + +# Delete consul group and user +delgroup consul 2> /dev/null +deluser consul 2> /dev/null +exit 0 + diff --git a/testing/consul/consul.pre-deinstall b/testing/consul/consul.pr= e-deinstall new file mode 100644 index 0000000..e352a05 --- /dev/null +++ b/testing/consul/consul.pre-deinstall @@ -0,0 +1,6 @@ +#!/bin/sh + +# Stop consul service +rc-service consul stop &> /dev/null +exit 0 + diff --git a/testing/consul/consul.pre-install b/testing/consul/consul.pre-= install new file mode 100644 index 0000000..aef4230 --- /dev/null +++ b/testing/consul/consul.pre-install @@ -0,0 +1,7 @@ +#!/bin/sh + +# Create consul group and user +addgroup -S consul 2> /dev/null +adduser -h /var/consul -s /sbin/nologin -G consul -S -D consul 2> /dev/null +exit 0 + diff --git a/testing/consul/encrypt.json.sample b/testing/consul/encrypt.js= on.sample new file mode 100644 index 0000000..8e8fc89 --- /dev/null +++ b/testing/consul/encrypt.json.sample @@ -0,0 +1,5 @@ +# Enable gossip message encryption +# Use 'consul keygen' to generate a new one +#{ +# "encrypt": "HnAKJceZzkkqiHBkP52iEQ=3D=3D" +#} diff --git a/testing/consul/server.json b/testing/consul/server.json new file mode 100644 index 0000000..d09b568 --- /dev/null +++ b/testing/consul/server.json @@ -0,0 +1,8 @@ +{ + "data_dir": "/var/consul", + "server": true, + "bootstrap_expect": 1, + "disable_update_check": true, + "disable_remote_exec": true, + "enable_syslog": true +} diff --git a/testing/consul/tls.json.sample b/testing/consul/tls.json.sample new file mode 100644 index 0000000..93b2392 --- /dev/null +++ b/testing/consul/tls.json.sample @@ -0,0 +1,8 @@ +# Enable RPC encryption with TLS +#{ +# "ca_file": "/etc/consul/ssl/ca_cert.pem", +# "cert_file": "/etc/consul/ssl/server.pem", +# "key_file": "/etc/consul/ssl/server.key", +# "verify_incoming": true, +# "verify_outgoing": true +#} --=20 cgit v0.10.1 --Sig_/Apxzj_zUtceDFuGmgn9DHi2 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVMlxuAAoJEJXQwVHPrdN8WaIP/2pXuXkGvtboeH4xuKuS3c7U 48RwLnwZNGzi0sxI5CeJIkz7+ravoopMbsYVigri7Hced8SPBegwQRSqIn+ogyhk t3A3v5pvpYR2kzTeiThnFv/9aDMsut3Y+uxvvXzB2XB5x4vaQ7tct9WPxa78RK5v RYFQsuES9u0rcsaR2b3JZaoeaLD2LM54UGu9cM9+puZGUNzdafhav1a9Vd8D+eA9 MP2P+q06J2OvdnT0gnwvphcNzrPAN7a4IEcMbTzBCi9+p1OTLzI5ypSWEIpHg35g WspXbvZ67uMwf33s6XJrlmO/z199u2jOGUIJIgbddiSKb0A/B6JCUe0uUXqLMxod GZ8AQ4kOSqq5UTWQ8Zfp+kqm2yn2t5LH8juIBXA5H6rqdQMkpajkhI4yCm//+w/J 6vr0XjVOzhCnBQzB8LI4eqpcdVY0VgRsPyJzTKH39OWTQgf0b+nqxb8bej4JaxbF enr++1tZSlpfNPZ/ajfojsckdWMoQc7wFDH9v0kwHFV8WnPGPP5jQhtx+k8lrN3a OBA2dp5/iKlYwM16DAMUmlqqgLSJqXElYxZHWxEA51/VTM5fdfF4RIzLXYHjb3R4 gSxV+IYDym01whe1k5l4aZqAO7HNdvl7Hoqy+HE9+LbEUNMGTRIVH/Fs9QDK3h71 KJynmWbUcWM4G1LmhksD =WIfs -----END PGP SIGNATURE----- --Sig_/Apxzj_zUtceDFuGmgn9DHi2-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---