diff options
author | Mark Vainomaa | 2016-07-27 23:11:05 +0300 |
---|---|---|
committer | Mark Vainomaa | 2016-07-27 23:11:05 +0300 |
commit | d6d943e648ce8e3b828e721ce543544dd6a10ca3 (patch) | |
tree | 6584157191411bb72d2dc30b2839ea656b60d949 | |
download | aur-d6d943e648ce8e3b828e721ce543544dd6a10ca3.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | etcd.conf | 249 | ||||
-rw-r--r-- | etcd.install | 21 | ||||
-rw-r--r-- | etcd.service | 17 |
5 files changed, 358 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2b8c13fe4522 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = etcd-git + pkgdesc = A highly-available key value store for shared configuration and service discovery. + pkgver = r9178.13c2d32 + pkgrel = 1 + url = https://github.com/coreos/etcd + install = etcd.install + arch = x86_64 + arch = i686 + arch = armv6h + arch = armv7h + license = Apache + makedepends = go + provides = etcd + conflicts = etcd + replaces = etcd + backup = etc/conf.d/etcd + backup = usr/lib/systemd/system/etcd.service + source = etcd-git::git+https://github.com/coreos/etcd.git + source = etcd.service + source = etcd.conf + md5sums = SKIP + md5sums = 1ccf13f8b80f10e21e92361a4dea1a44 + md5sums = bd315606b36e519c578db34722b57622 + +pkgname = etcd-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5bb25933fe51 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Mark Vainomaa <mikroskeem@mikroskeem.eu> +# PKGBUILD Based on https://aur.archlinux.org/packages/etcd + +pkgname=etcd-git +pkgver=r9178.13c2d32 +pkgrel=1 +pkgdesc='A highly-available key value store for shared configuration and service discovery.' +arch=('x86_64' 'i686' 'armv6h' 'armv7h') +url='https://github.com/coreos/etcd' +license=('Apache') +makedepends=('go') +backup=('etc/conf.d/etcd' 'usr/lib/systemd/system/etcd.service') +provides=('etcd') +replaces=('etcd') +conflicts=('etcd') +install="etcd.install" +source=("etcd-git::git+https://github.com/coreos/etcd.git" + "etcd.service" + "etcd.conf") +md5sums=('SKIP' + '1ccf13f8b80f10e21e92361a4dea1a44' + 'bd315606b36e519c578db34722b57622') + +pkgver() { + cd ${srcdir}/${pkgname} + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd ${srcdir}/${pkgname} + ./build +} + +package() { + install -Dm644 ${srcdir}/etcd.conf ${pkgdir}/etc/conf.d/etcd + install -Dm644 ${srcdir}/etcd.service ${pkgdir}/usr/lib/systemd/system/etcd.service + install -Dm755 ${srcdir}/${pkgname}/bin/etcd ${pkgdir}/usr/bin/etcd + install -Dm755 ${srcdir}/${pkgname}/bin/etcdctl ${pkgdir}/usr/bin/etcdctl + install -Dm644 ${srcdir}/${pkgname}/LICENSE ${pkgdir}/usr/share/licenses/etcd/LICENSE + install -dm755 ${pkgdir}/usr/share/doc/etcd + cp -r ${srcdir}/${pkgname}/Documentation/* ${pkgdir}/usr/share/doc/etcd + chmod -R 644 ${pkgdir}/usr/share/doc +} + +# vim:set ts=4 sw=4 ft=sh: diff --git a/etcd.conf b/etcd.conf new file mode 100644 index 000000000000..023129b0e075 --- /dev/null +++ b/etcd.conf @@ -0,0 +1,249 @@ +# 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" + +# Path to the dedicated wal directory. +# If this flag is set, etcd will write the WAL files +# to the walDir rather than the dataDir. +# +# default: "" +# +# ETCD_WAL_DIR="" + +# 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" + +# Time (in milliseconds) an endpoint will be held +# in a failed state before being reconsidered for proxied requests. +# +# default: 5000 +# +# ETCD_PROXY_FAILURE_WAIT=5000 + +# Time (in milliseconds) of the endpoints refresh interval. +# +# default: 30000 +# +# ETCD_PROXY_REFRESH_INTERVAL=30000 + +# Time (in milliseconds) for a dial to timeout or 0 to disable the timeout. +# +# default: 1000 +# +# ETCD_PROXY_DIAL_TIMEOUT=1000 + +# Time (in milliseconds) for a write to timeout or 0 to disable the timeout. +# +# default: 5000 +# +# ETCD_PROXY_WRITE_TIMEOUT=5000 + +# Time (in milliseconds) for a read to timeout or 0 to disable the timeout. +# Don't change this value if you use watches because they are using long polling requests. +# +# default: 0 +# +# ETCD_PROXY_READ_TIMEOUT=0 + +# 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= + +# Enable client cert authentication. +# +# default: false +# +# ETCD_CLIENT_CERT_AUTH=false + +# Path to the client server TLS trusted CA key file. +# +# default: none +# +# ETCD_TRUSTED_CA_FILE= + +# [DEPRECATED] 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= + +# Enable peer client cert authentication. +# +# default: false +# +# ETCD_PEER_CLIENT_CERT_AUTH=false + +# Path to the peer server TLS trusted CA file. +# +# default: none +# +# ETCD_PEER_TRUSTED_CA_FILE= + +# Drop the default log level to DEBUG for all subpackages. +# +# default: false (INFO for all packages) +# +# ETCD_DEBUG=false + +# Set individual etcd subpackages to specific log levels. +# An example being etcdserver=WARNING,security=DEBUG +# +# default: none (INFO for all packages) +# +# ETCD_LOG_PACKAGE_LEVELS= + +# 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..3e08d8504892 --- /dev/null +++ b/etcd.install @@ -0,0 +1,21 @@ +ETCD_DATA_DIR="/var/lib/etcd" + +pre_upgrade() { +cat << EOF + Upgrading from 2.3 to 3.0: + /usr/share/doc/etcd/upgrades/upgrade_3_0.md +EOF +} + +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..567f490c98cc --- /dev/null +++ b/etcd.service @@ -0,0 +1,17 @@ +[Unit] +Description=etcd key-value store +Documentation=https://github.com/coreos/etcd + +[Service] +User=etcd +Type=notify +Environment=ETCD_DATA_DIR=/var/lib/etcd +Environment=ETCD_NAME=%m +EnvironmentFile=-/etc/conf.d/etcd +ExecStart=/usr/bin/etcd +Restart=always +RestartSec=10s +LimitNOFILE=40000 + +[Install] +WantedBy=multi-user.target |