Six Raspberry Pi computers running as a utility node and five Riak nodes.
This assumes all Raspberry Pi nodes are running Raspbian which comes
pre-installed with some unnecessary software and a pi user. The pi user
has sudo rights, so this can be used for the initial setup.
Login with username:pi and password:raspberry.
I recommend using something like csshX to
manage the cluster and run the install scripts.
The Riak Pi Cluster is expected to run as a standalone system with hardcoded IP
addresses. These are currently defined in scripts/node/bootstrap.sh in the update_hostname_and_ipaddr function.
You can edit the IP addresses to suit your needs but hostnames are fixed and matched to node MAC addresses during "bootstrap".
Below is an example of a sane IP configuration. You should configure your laptop (if you are also connecting to the switch) to use a neighbouring IP.
utility_eth0_ipaddr="192.168.0.110"
riak1_eth0_ipaddr="192.168.0.111"
riak2_eth0_ipaddr="192.168.0.112"
riak3_eth0_ipaddr="192.168.0.113"
riak4_eth0_ipaddr="192.168.0.114"
riak5_eth0_ipaddr="192.168.0.115"
The bootstrap script installs avahi-daemon which will avoid the need for additional hostname configuration.
- Expects to be run as the
piuser with sudo on a vanilla install of raspbian - Creates a
bashouser with the passworddemo-clusterand installsdemo_cluster_idssh key - Sets each nodes hostname and IP address based on hardcoded MAC address
- Updates the ulimit and sets some recommended sysctl tunings for Riak
- Copies necessary setup files to
/usr/share/riak-pi-clusterfor later use
- Expects to be run as the
bashouser after bootstrap.sh using updated hostname and IP address - Runs
scripts/riak-node/install-riak.sh - Runs
scripts/riak-node/install-collectd.sh
- (If not available locally) downloads pre-built version of Riak 2.0.6 for ARM
- Unpacks Riak to
/home/basho/riak - Configures Riak with settings suitable for Raspberry Pi specifications
- Configures Riak Explorer on riak1.local
- Does not cluster the nodes
- Expects to be run as the
bashouser after bootstrap.sh using updated hostname and IP address - Installs collectd
- Configures collectd to
curl_jsonthe Riak/statsendpoint - Configures collectd to send data to graphite on the utility.local node
- Expects to be run as the
bashouser after bootstrap.sh using updated hostname and IP address - Runs
scripts/utility-node/install-basho_bench.sh - Runs
scripts/utility-node/install-haproxy.sh - Runs
scripts/utility-node/install-jupyter.sh - Runs
scripts/utility-node/install-monitoring.sh
- Installs haproxy
- Configures an admin view on port
8888with usernameadminand passwordadmin - Configures two haproxy frontends listening on all available IP addresses
- Protocol buffers frontend on port
8087 - HTTP frontend on port
8098
- Protocol buffers frontend on port
- Configures corresponding haproxy backends comprising the riak nodes
- Installs Jupyter
- Should be started when required with
jupyter notebook --ip=0.0.0.0 --port=9999 --no-browser & - See logins below for access
The logins and services setup by the scripts are summarised here:
- Linux login:
bashodemo-cluster - Graphite:
http://utility.localrootpassword - Grafana:
http://utility.local:3000adminadmin - HA Proxy Status:
http://utility.local:8888adminadmin - Jupyter:
http://utility.local:9999
- todo: document
install-basho_bench.sh - todo: document
install-monitoring.sh