diff options
Diffstat (limited to 'dev-db/aerospike-server-community/files')
5 files changed, 275 insertions, 0 deletions
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 + } +} + |