diff options
7 files changed, 354 insertions, 0 deletions
diff --git a/dev-db/aerospike-server-community/Manifest b/dev-db/aerospike-server-community/Manifest new file mode 100644 index 0000000..8239254 --- /dev/null +++ b/dev-db/aerospike-server-community/Manifest @@ -0,0 +1,7 @@ +AUX aerospike.conf 1265 SHA256 546cc602656e4889eb9ad201874d54356fdd3058e821a70bb803637a1c1575e2 SHA512 5d2b2a368bb31e8230d2f88073befbf5f1aa33aecc628b669e5714cfde71e83d53143b28c0ee95b52f13e84027283413927abd97470a97e36946cc05605b15ed WHIRLPOOL c67e134dde02d2c04e2fa9f118a84b448d9a8d2ff01d952283b7f14fad590cc0d10c23d0f6432849b37f313e2b52e6d4a9d6bbcb2824bba4c81f0c0aa0a73f9c +AUX aerospike.init 1307 SHA256 cc89cd2ebdfb2d5a028b054af75d446d2636131ddabac6ec500b008fd2ae449b SHA512 765d315d64f77c3efaadba0b2734029cb727c9520cdb603c2c24b1dbc701a4c67f741977537a2ea0e5a18a2cba4d8b6ff65d919707ab6436608a231d2f05ed78 WHIRLPOOL 35ae7e66501f26f44e9650c34f5c017a1ab8838b1d17fc9b5a0a866ad9d760a1c62f26abbed0dd5b447675fbfc3c512f856510a018e9f7395c5a8c9b7354a0f8 +AUX aerospike.logrotate 191 SHA256 2984ecf6a19f08cea0ee4fdad725922f29b3b878df7478b6619f6b885263abb6 SHA512 4c014730ad2f829197f1a76912a1327586b36e5d4018a48ea1bbb7970698a5de94e98dbcd720b71656f7986fafa6fae5b9273b0f835d0cb33f3fcab5e57cbf70 WHIRLPOOL 9bd399d5c525280ad915d5725de6628d2fe46d163f62a611f601cd81edacb9686281cef66da38c20e315def6c3c78a1a61f5fb54cf3b87504db126e397369f73 +AUX aerospike_mesh.conf 1476 SHA256 27cd3b9304c5af4855ca1edea949b471e209d1402a27a15044b59f7329624572 SHA512 a7d5e52738a3153b649cc81d8a9b635b70fe21335802f5c2f348fe71f3b7087ea85aaf926c4ad3ce71514fa1b479f98bc27aadb95995a5bbb8808219bcbe28c4 WHIRLPOOL 27209abe9aae485e8a540dd6b4563d38c43d8e9a19f2c97e41ca7c995349b7c8f1abcef08e0a92f38431d4fe919838eb6442990201bd3506cc5126e37b92f2d1 +AUX aerospike_ssd.conf 1341 SHA256 11dbbffdea382e30d606c4564a577e0657f3ff87f37156f5169806d52acdb711 SHA512 0382842d4e7b20caaa4c39d999da0cd2b67c24bdd9fad6e5d2d393758b6f788decf0039ae9a262a4db7e89b358cbb9954efd082a15549d12e3e244b2c51675c9 WHIRLPOOL 2aa9230d6d1b477aad21b81f6760a915d15bbd51499512a618a1a0dd24342eb9ed0d46cbe0318885a6c446433bd009641adad5fa5e2fdf34e15138ffcabb1f84 +DIST aerospike-server-community-3.5.4-debian7.tgz 8395788 SHA256 80c23ea858278419297c51d8fd924ac64d7b62684b24334440c16725ba856e45 SHA512 0136bf48131a04754ff32faa1d3ec7dc9b0332312d902781171d8cb2828ad2245a182d190ac32fb16b314d7e9c15edaf7e64df3ed55ee845ed30d5b65b8f272c WHIRLPOOL a83257b2ffc591571f80332dee6e2e0c647bd1a2c47fdf55fdefa601cdffeea6759041bf36d7fdeb0aa4426823b8a656d60911f0e9f85e40a97cc6e115036a6e +EBUILD aerospike-server-community-3.5.4.ebuild 1676 SHA256 d2a605e4458ccac67de0a7f28b56610da2ee4e96c2900cabe8a953bd8ef8b930 SHA512 47e0c3b2d89a1def83b752cc4e2e9c4f39572c93e7f782f53645f09f58d080628a7837f7bf4932049a2b7c6661c816c8583b6018448cce3fa3b22763ab5ac51f WHIRLPOOL 7c601c2cecb7a1b2f03be5859395fcb6de4682bb9e8a0987598ebb92d194b6a86009f2a774e4798a678b4726bd788be719882f1657d3919e74f5607d2d6f4095 diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.5.4.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.5.4.ebuild new file mode 100644 index 0000000..baf4871 --- /dev/null +++ b/dev-db/aerospike-server-community/aerospike-server-community-3.5.4.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header $ + +EAPI=5 +inherit eutils user + +DESCRIPTION="Flash-optimized, in-memory, nosql database" +HOMEPAGE="http://www.aerospike.com" +SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz" + +LICENSE="AEROSPIKE SERVER LICENSE" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="app-crypt/gcr" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${P}-debian7" + +# change me at every version bump +TOOLS_PV="3.5.3" + +pkg_setup() { + enewgroup aerospike + enewuser aerospike -1 /bin/bash /opt/aerospike aerospike +} + +src_prepare() { + local server_deb="${P}.debian7.x86_64.deb" + local tools_deb="aerospike-tools-${TOOLS_PV}.debian7.x86_64.deb" + + ar x "${server_deb}" || die + tar xzf data.tar.gz && rm data.tar.gz || die + + ar x "${tools_deb}" || die + tar xzf data.tar.gz && rm data.tar.gz || die + + rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS + rm usr/bin/{asfixownership,asmigrate2to3} +} + +src_install() { + insinto /opt/ + doins -r opt/aerospike + + fperms +x -R /opt/aerospike/bin/ + fperms +x -R /opt/aerospike/lib/python/ + + for dir in '/etc' '/var/log'; do + keepdir "${dir}/aerospike" + done + + insinto /etc/aerospike + for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do + doins "${FILESDIR}/${conf}" + done + + insinto /usr/bin + doins usr/bin/* + fperms +x -R /usr/bin/asd + + insinto /etc/logrotate.d + newins "${FILESDIR}"/aerospike.logrotate aerospike + + newinitd "${FILESDIR}"/aerospike.init aerospike + + fowners -R aerospike:aerospike /opt/aerospike/ + fowners aerospike:aerospike /usr/bin/asd + fowners -R aerospike:aerospike /var/log/aerospike +} diff --git a/dev-db/aerospike-server-community/files/aerospike.conf b/dev-db/aerospike-server-community/files/aerospike.conf new file mode 100644 index 0000000..842873b --- /dev/null +++ b/dev-db/aerospike-server-community/files/aerospike.conf @@ -0,0 +1,70 @@ +# Aerospike database configuration file. + +service { + user root + group root + paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1. + pidfile /run/aerospike/aerospike.pid + service-threads 4 + transaction-queues 4 + transaction-threads-per-queue 4 + proto-fd-max 15000 +} + +logging { + # Log file must be an absolute path. + file /var/log/aerospike/aerospike.log { + context any info + } +} + +network { + service { + address any + port 3000 + } + + heartbeat { + mode multicast + address 239.1.99.222 + port 9918 + + # To use unicast-mesh heartbeats, remove the 3 lines above, and see + # aerospike_mesh.conf for alternative. + + interval 150 + timeout 10 + } + + fabric { + port 3001 + } + + info { + port 3003 + } +} + +namespace test { + replication-factor 2 + memory-size 4G + default-ttl 30d # 30 days, use 0 to never expire/evict. + + storage-engine memory +} + +namespace bar { + replication-factor 2 + memory-size 4G + default-ttl 30d # 30 days, use 0 to never expire/evict. + + storage-engine memory + + # To use file storage backing, comment out the line above and use the + # following lines instead. +# storage-engine device { +# file /opt/aerospike/data/bar.dat +# filesize 16G +# data-in-memory true # Store data in memory in addition to file. +# } +} diff --git a/dev-db/aerospike-server-community/files/aerospike.init b/dev-db/aerospike-server-community/files/aerospike.init new file mode 100755 index 0000000..1188424 --- /dev/null +++ b/dev-db/aerospike-server-community/files/aerospike.init @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd-r2,v 1.2 2014/05/26 08:03:45 ultrabug Exp $ + +config_file=${config_file:-/etc/aerospike/${SVCNAME}.conf} +run_dir=${run_dir:-/run/aerospike} + +command="/usr/bin/asd" +command_args="--config-file ${config_file}" +command_background="false" +pidfile=${run_dir}/${SVCNAME}.pid +user=${user:-aerospike} +group=${group:-aerospike} +start_stop_daemon_args="--user ${user} --group ${group}" +required_files="${config_file}" + +depend() { + use net +} + +set_shmall() { + mem=`/sbin/sysctl -n kernel.shmall` + min=4294967296 + if [ ${#mem} -le ${#min} ]; then + if [ $mem -lt $min ]; then + ewarn "kernel.shmall too low, setting to 4G pages = 16TB" + /sbin/sysctl -w kernel.shmall=$min + fi + fi +} + +set_shmmax() { + mem=`/sbin/sysctl -n kernel.shmmax` + min=1073741824 + if [ ${#mem} -le ${#min} ]; then + if [ $mem -lt $min ]; then + ewarn "kernel.shmmax too low, setting to 1GB" + /sbin/sysctl -w kernel.shmmax=$min + fi + fi +} + +start_pre() { + checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}" + set_shmall + set_shmmax + ulimit -n 100000 + if [ -n $LD_PRELOAD ]; then export LD_PRELOAD; fi +} + +start_post() { + ewaitfile 60 "${pidfile}" +} diff --git a/dev-db/aerospike-server-community/files/aerospike.logrotate b/dev-db/aerospike-server-community/files/aerospike.logrotate new file mode 100644 index 0000000..410f5be --- /dev/null +++ b/dev-db/aerospike-server-community/files/aerospike.logrotate @@ -0,0 +1,10 @@ +/var/log/aerospike/aerospike.log { + daily + rotate 90 + dateext + compress + olddir /var/log/aerospike/ + postrotate + kill -HUP `cat /var/run/aerospike/asd.pid` + endscript +} diff --git a/dev-db/aerospike-server-community/files/aerospike_mesh.conf b/dev-db/aerospike-server-community/files/aerospike_mesh.conf new file mode 100644 index 0000000..26274f3 --- /dev/null +++ b/dev-db/aerospike-server-community/files/aerospike_mesh.conf @@ -0,0 +1,73 @@ +# Aerospike database configuration file for deployments using mesh heartbeats. + +service { + user root + group root + paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1. + pidfile /run/aerospike/aerospike.pid + service-threads 4 + transaction-queues 4 + transaction-threads-per-queue 4 + proto-fd-max 15000 +} + +logging { + # Log file must be an absolute path. + file /var/log/aerospike/aerospike.log { + context any info + } +} + +network { + service { + address any + port 3000 + } + + heartbeat { + mode mesh + port 3002 # Heartbeat port for this node. + + # List one or more other nodes, one ip-address & port per line: + mesh-seed-address-port 10.10.10.10 3002 +# mesh-seed-address-port 10.10.10.11 3002 +# mesh-seed-address-port 10.10.10.12 3002 +# mesh-seed-address-port 10.10.10.13 3002 +# mesh-seed-address-port 10.10.10.14 3002 + + interval 250 + timeout 10 + } + + fabric { + port 3001 + } + + info { + port 3003 + } +} + +namespace test { + replication-factor 2 + memory-size 4G + default-ttl 30d # 30 days, use 0 to never expire/evict. + + storage-engine memory +} + +namespace bar { + replication-factor 2 + memory-size 4G + default-ttl 30d # 30 days, use 0 to never expire/evict. + + storage-engine memory + + # To use file storage backing, comment out the line above and use the + # following lines instead. +# storage-engine device { +# file /opt/aerospike/data/bar.dat +# filesize 16G +# data-in-memory true # Store data in memory in addition to file. +# } +} diff --git a/dev-db/aerospike-server-community/files/aerospike_ssd.conf b/dev-db/aerospike-server-community/files/aerospike_ssd.conf new file mode 100644 index 0000000..3d75bd6 --- /dev/null +++ b/dev-db/aerospike-server-community/files/aerospike_ssd.conf @@ -0,0 +1,68 @@ +# Aerospike database configuration file for deployments using raw storage. + +service { + user root + group root + paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1. + pidfile /run/aerospike/aerospike.pid + service-threads 8 + transaction-queues 8 + transaction-threads-per-queue 8 + proto-fd-max 15000 +} + +logging { + # Log file must be an absolute path. + file /var/log/aerospike/aerospike.log { + context any info + } +} + +network { + service { + address any + port 3000 + } + + heartbeat { + mode multicast + address 239.1.99.222 + port 9918 + + # To use unicast-mesh heartbeats, remove the 3 lines above, and see + # aerospike_mesh.conf for alternative. + + interval 150 + timeout 10 + } + + fabric { + port 3001 + } + + info { + port 3003 + } +} + +namespace test { + replication-factor 2 + memory-size 4G + default-ttl 30d # 30 days, use 0 to never expire/evict. + + # Warning - legacy data in defined raw partition devices will be erased. + # These partitions must not be mounted by the file system. + storage-engine device { + # Use one or more lines like those below with actual device paths. +# device /dev/sdb +# device /dev/sdc + + # The 2 lines below optimize for SSD. + scheduler-mode noop + write-block-size 128K + + # Use the line below to store data in memory in addition to devices. +# data-in-memory true + } +} + |