Remove Riak

This commit is contained in:
Keith Whyte 2023-01-11 17:45:53 +01:00
parent 232985753c
commit be4b675292
5 changed files with 0 additions and 276 deletions

View file

@ -1,147 +0,0 @@
#! /bin/bash
### BEGIN INIT INFO
# Provides: riak
# Required-Start: $remote_fs $syslog tinc
# Required-Stop: $remote_fs $syslog tinc
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Riak is a distributed data store
# Description: Riak is a distributed data store
### END INIT INFO
NAME=riak
DAEMON=/usr/sbin/$NAME
SCRIPTNAME=/etc/init.d/$NAME
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
. /lib/lsb/init-functions
# `service` strips all environmental VARS so
# if no HOME was set in /etc/default/$NAME then set one here
# to the data directory for erlexec's sake
if [ -z "$HOME" ]; then
export HOME=/var/lib/riak
fi
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
# Startup with the appropriate user
start-stop-daemon --start \
--name riak \
--user riak \
--exec $DAEMON -- start \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Identify the erts directory
ERTS_PATH=`$DAEMON ertspath`
# Attempt a clean shutdown.
$DAEMON stop
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
# Make sure it's down by using a more direct approach
start-stop-daemon --stop \
--quiet \
--retry=TERM/30/KILL/5 \
--user riak \
--exec $ERTS_PATH/run_erl
return $?
}
#
# Function that graceful reload the daemon/service
#
do_reload() {
# Restart the VM without exiting the process
$DAEMON restart && return $? || return 2
}
# Checks the status of a node
do_status() {
$DAEMON ping && echo $"$NAME is running" && return 0
echo $"$NAME is stopped" && return 2
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $NAME"
$DAEMON ping >/dev/null 2>&1 && echo $"$NAME is already running" && exit 0
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1
exit 1
;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1
exit 1
;;
esac
;;
ping)
# See if the VM is alive
$DAEMON ping || exit $?
;;
reload|force-reload)
log_daemon_msg "Reloading $NAME"
do_reload
ES=$?
log_end_msg $ES
exit $ES
;;
restart)
log_daemon_msg "Restarting $NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 && exit 1 ;; # Old process is still running
*) log_end_msg 1 && exit 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1 && exit 1
;;
esac
;;
status)
do_status && exit 0 || exit $?
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|ping|restart|force-reload|status}" >&2
exit 3
;;
esac
:

View file

@ -73,7 +73,6 @@ class rhizo_base {
$bsc_ip_address = hiera('rhizo::bsc_ip_address', '172.16.0.1')
$vpn_ip_address = hiera('rhizo::vpn_ip_address')
$wan_ip_address = hiera('rhizo::wan_ip_address')
$riak_ip_address = hiera('rhizo::riak_ip_address', $vpn_ip_address)
$sip_central_ip_address = hiera('rhizo::sip_central_ip_address')
$webphone_prefix = hiera('rhizo::webphone_prefix', '[]')
$latency_check_address = hiera('rhizo::latency_check_address','1.1.1.1')
@ -198,25 +197,6 @@ class rhizo_base {
include rhizo_base::sems
}
if $vpn_ip_address == $riak_ip_address {
if $operatingsystem != 'Debian' {
file { '/etc/init.d/riak':
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
source => 'puppet:///modules/rhizo_base/etc/init.d/riak',
require => Class['::riak'],
notify => Exec['insserv'],
}
include rhizo_base::riak
}
} else {
file { '/etc/init.d/riak':
ensure => absent,
}
}
sysctl { 'net.ipv4.ip_forward':
value => '1'
}
@ -662,11 +642,6 @@ schedule { 'never':
}
}
python::pip { 'riak':
schedule => 'onceweek',
ensure => '2.0.3',
pkgname => 'riak',
}
python::pip { 'gsm0338':
schedule => 'onceweek',

View file

@ -1,95 +0,0 @@
[
{bitcask, [
{data_root, "/var/lib/riak/bitcask"}
]},
{eleveldb, [
{data_root, "/var/lib/riak/leveldb"}
]},
{kernel, [
{inet_dist_listen_max, 7999},
{inet_dist_listen_min, 6000}
]},
{lager, [
{crash_log, "/var/log/riak/crash.log"},
{crash_log_count, 5},
{crash_log_date, "$D0"},
{crash_log_msg_side, 65536},
{crash_log_size, 10485760},
{error_logger_redirect, true},
{handlers, [
{lager_file_backend, [
{"/var/log/riak/error.log", error, 10485760, "$D0", 5},
{"/var/log/riak/console.log", info, 10485760, "$D0", 5}
]}
]}
]},
{merge_index, [
{buffer_rollover_size, 1048576},
{data_root, "/var/lib/riak/merge_index"},
{max_compact_segments, 20}
]},
{riak_api, [
{pb_ip, "127.0.0.1"},
{pb_port, 8087}
]},
{riak_control, [
{admin, true},
{auth, "userlist"},
{enabled, false},
{userlist, {"user", "pass"}}
]},
{riak_core, [
{dtrace_support, false},
{handoff_port, 8099},
{http, [
{"127.0.0.1", 8098}
]},
{platform_bin_dir, "/usr/sbin"},
{platform_data_dir, "/var/lib/riak"},
{platform_etc_dir, "/etc/riak"},
{platform_lib_dir, "/usr/lib/riak"},
{platform_log_dir, "/var/log/riak"},
{ring_creation_size, 64},
{ring_state_dir, "/var/lib/riak/ring"},
{default_bucket_props, [
{n_val,3},
{allow_mult,false},
{last_write_wins,true},
{r, 1},
{w, 2},
{dw, 0},
{rw, 0}
]}
]},
{riak_kv, [
{hook_js_vm_count, 2},
{http_url_encoding, on},
{js_max_vm_mem, 8},
{js_thread_stack, 16},
{legacy_keylisting, false},
{listkeys_backpressure, true},
{map_js_vm_count, 8},
{mapred_2i_pipe, true},
{mapred_name, "mapred"},
{mapred_system, "pipe"},
{reduce_js_vm_count, 6},
{storage_backend, riak_kv_eleveldb_backend},
{vnode_vclocks, true},
{anti_entropy, {on, []}}
]},
{riak_search, [
{enabled, false}
]},
{riak_sysmon, [
{busy_dist_port, true},
{busy_port, true},
{gc_ms_limit, 100},
{heap_word_limit, 40111000},
{post_limit, 2},
{process_limit, 20}
]},
{sasl, [
{sasl_error_logger, false},
{utc_log, true}
]}
].

View file

@ -36,7 +36,6 @@ network_name = "<%= @network_name %>"
# VPN ip address
vpn_ip_address = "<%= @vpn_ip_address %>"
wan_ip_address = "<%= @wan_ip_address %>"
riak_ip_address = "<%= @riak_ip_address %>"
mncc_ip_address = "<%= @mncc_ip_address %>"
sip_central_ip_address = <%= @sip_central_ip_address %>
webphone_prefix = <%= @webphone_prefix %>

View file

@ -1,8 +0,0 @@
+A 64
+K true
-env ERL_CRASH_DUMP /var/log/riak/erl_crash.dmp
-env ERL_MAX_PORTS 4096
-ip <%= @vpn_ip_address %>
-name riak@<%= @vpn_ip_address %>
-setcookie riak
-smp enable