summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Kojevnikov2015-06-28 03:46:26 +1000
committerAndrey Kojevnikov2015-06-28 03:46:26 +1000
commit3748f65da75b4f28321b388a3b025fe0b1507dbd (patch)
treec174911623b06979099c50f3b46ac31a6b11aec1
downloadaur-3748f65da75b4f28321b388a3b025fe0b1507dbd.tar.gz
aur4
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD40
-rw-r--r--etcd.conf172
-rw-r--r--etcd.install14
-rw-r--r--etcd.service16
5 files changed, 265 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..267af93faa53
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = etcd
+ pkgdesc = A highly-available key value store for shared configuration and service discovery.
+ pkgver = 2.0.13
+ pkgrel = 1
+ url = https://github.com/coreos/etcd
+ install = etcd.install
+ arch = x86_64
+ arch = i686
+ license = Apache License 2
+ makedepends = go
+ provides = etcdctl
+ conflicts = etcdctl
+ replaces = etcdctl
+ backup = etc/conf.d/etcd
+ source = etcd-2.0.13.tar.gz::https://github.com/coreos/etcd/archive/v2.0.13.tar.gz
+ source = etcd.service
+ source = etcd.conf
+ md5sums = 29b0cacac8bfcbe7b094ea5638adec74
+ md5sums = dabe32f9e766b935c075b832672b2a79
+ md5sums = a6043503d766097eb9fb0d0e142b96f3
+
+pkgname = etcd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cab588c2cf87
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: korjjj <korjjj+aur[at]gmail[dot]com>
+# Contributor: xeross <contact at xeross dot me>
+# Contributor: codekoala <codekoala at gmail dot com>
+
+pkgname=etcd
+pkgver=2.0.13
+pkgrel=1
+pkgdesc='A highly-available key value store for shared configuration and service discovery.'
+arch=('x86_64' 'i686')
+url='https://github.com/coreos/etcd'
+license=('Apache License 2')
+makedepends=('go')
+backup=('etc/conf.d/etcd')
+provides=('etcdctl')
+replaces=('etcdctl')
+conflicts=('etcdctl')
+install="${pkgname}.install"
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/coreos/${pkgname}/archive/v${pkgver}.tar.gz"
+ "${pkgname}.service"
+ "${pkgname}.conf")
+md5sums=('29b0cacac8bfcbe7b094ea5638adec74'
+ 'dabe32f9e766b935c075b832672b2a79'
+ 'a6043503d766097eb9fb0d0e142b96f3')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./build
+}
+
+package() {
+ install -Dm644 ${srcdir}/${pkgname}.conf ${pkgdir}/etc/conf.d/${pkgname}
+ install -Dm644 ${srcdir}/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
+ install -Dm755 ${srcdir}/${pkgname}-${pkgver}/bin/etcd ${pkgdir}/usr/bin/etcd
+ install -Dm755 ${srcdir}/${pkgname}-${pkgver}/bin/etcdctl ${pkgdir}/usr/bin/etcdctl
+ install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -dm755 ${pkgdir}/usr/share/doc/${pkgname}
+ install -m644 ${srcdir}/${pkgname}-${pkgver}/Documentation/*.md -t ${pkgdir}/usr/share/doc/${pkgname}
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/etcd.conf b/etcd.conf
new file mode 100644
index 000000000000..1eb860ce1dd4
--- /dev/null
+++ b/etcd.conf
@@ -0,0 +1,172 @@
+# Human_readable name for this member.
+# default: "default"
+#
+# ETCD_NAME="default"
+#
+
+# Path to the data directory.
+# default: "${name}.etcd"
+# distribution default: "/var/lib/etcd"
+#
+# ETCD_DATA_DIR="/var/lib/etcd"
+#
+
+# Number of committed transactions to trigger a snapshot to disk.
+# default: "10000"
+#
+# ETCD_SNAPSHOT_COUNT="10000"
+#
+
+# Time (in milliseconds) of a heartbeat interval.
+# default: "100"
+#
+# ETCD_HEARTBEAT_INTERVAL="100"
+#
+
+# Time (in milliseconds) for an election to timeout.
+# default: "1000"
+#
+# ETCD_ELECTION_TIMEOUT="1000"
+#
+
+# List of URLs to listen on for peer traffic.
+# default: "http://localhost:2380,http://localhost:7001"
+#
+# ETCD_LISTEN_PEER_URLS="http://localhost:2380,http://localhost:7001"
+#
+
+# List of URLs to listen on for client traffic.
+# default: "http://localhost:2379,http://localhost:4001"
+#
+# ETCD_LISTEN_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
+#
+
+# Maximum number of snapshot files to retain (0 is unlimited)
+# default: 5
+#
+# ETCD_MAX_SNAPSHOTS=5
+#
+
+# Maximum number of wal files to retain (0 is unlimited)
+# default: 5
+#
+# ETCD_MAX_WALS=5
+#
+
+# Comma_separated white list of origins for CORS (cross_origin resource sharing).
+# default: none
+#
+# ETCD_CORS=
+#
+
+# List of this member's peer URLs to advertise to the rest of the cluster.
+# These addresses are used for communicating etcd data around the cluster.
+# At least one must be routable to all cluster members.
+# default: "http://localhost:2380,http://localhost:7001"
+#
+# ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380,http://localhost:7001"
+#
+
+# Initial cluster configuration for bootstrapping.
+# default: "default=http://localhost:2380,default=http://localhost:7001"
+# distribution default: "default=http://localhost:2380,default=http://localhost:7001"
+#
+# ETCD_INITIAL_CLUSTER="default=http://localhost:2380,default=http://localhost:7001"
+#
+
+# Initial cluster state ("new" or "existing").
+# Set to new for all members present during initial static or DNS bootstrapping.
+# If this option is set to existing, etcd will attempt to join the existing cluster.
+# If the wrong value is set, etcd will attempt to start but fail safely.
+# default: "new"
+#
+# ETCD_INITIAL_CLUSTER_STATE="new"
+#
+
+# Initial cluster token for the etcd cluster during bootstrap.
+# default: "etcd_cluster"
+#
+# ETCD_INITIAL_CLUSTER_TOKEN="etcd_cluster"
+#
+
+# List of this member's client URLs to advertise to the rest of the cluster.
+# default: "http://localhost:2379,http://localhost:4001"
+#
+# ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
+#
+
+# Discovery URL used to bootstrap the cluster.
+# default: none
+#
+# ETCD_DISCOVERY=
+#
+
+# DNS srv domain used to bootstrap the cluster.
+# default: none
+#
+# ETCD_DISCOVERY_SRV=
+#
+
+# Expected behavior ("exit" or "proxy") when discovery services fails.
+# default: "proxy"
+#
+# ETCD_DISCOVERY_FALLBACK="proxy"
+#
+
+# HTTP proxy to use for traffic to discovery service.
+# default: none
+#
+# ETCD_DISCOVERY_PROXY=
+#
+
+# Proxy mode setting ("off", "readonly" or "on").
+# default: "off"
+#
+# ETCD_PROXY="off"
+#
+
+# Path to the client server TLS CA file.
+# default: none
+#
+# ETCD_CA_FILE=
+#
+
+# Path to the client server TLS cert file.
+# default: none
+#
+# ETCD_CERT_FILE=
+#
+
+# Path to the client server TLS key file.
+# default: none
+#
+# ETCD_KEY_FILE=
+#
+
+# Path to the peer server TLS CA file.
+# default: none
+#
+# ETCD_PEER_CA_FILE=
+#
+
+# Path to the peer server TLS cert file.
+# default: none
+#
+# ETCD_PEER_CERT_FILE=
+#
+
+# Path to the peer server TLS key file.
+# default: none
+#
+# ETCD_PEER_KEY_FILE=
+#
+
+# Force to create a new one_member cluster.
+# It commits configuration changes in force to remove all existing members in the cluster and add itself.
+# It needs to be set to restore a backup.
+# default: false
+#
+# ETCD_FORCE_NEW_CLUSTER="false"
+#
+
+# vim:ft=sh:
diff --git a/etcd.install b/etcd.install
new file mode 100644
index 000000000000..1e3696cc88b6
--- /dev/null
+++ b/etcd.install
@@ -0,0 +1,14 @@
+ETCD_DATA_DIR="/var/lib/etcd/"
+
+post_install() {
+ mkdir -p "${ETCD_DATA_DIR}"
+
+ # create an etcd user
+ id -u etcd &>/dev/null || useradd -r -M -U -d /dev/null -s /bin/nologin etcd
+
+ chown -R etcd:etcd "${ETCD_DATA_DIR}"
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/etcd.service b/etcd.service
new file mode 100644
index 000000000000..f6bb84728af7
--- /dev/null
+++ b/etcd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=etcd
+
+[Service]
+User=etcd
+PermissionsStartOnly=true
+Environment=ETCD_DATA_DIR=/var/lib/etcd
+Environment=ETCD_NAME=%H
+Environment=ETCD_INITIAL_CLUSTER=%H=http://localhost:2380,%H=http://localhost:7001
+EnvironmentFile=-/etc/conf.d/etcd
+ExecStart=/usr/bin/etcd
+Restart=always
+RestartSec=10s
+
+[Install]
+WantedBy=multi-user.target