Lab Installation of Aerospike Data Server on Ubuntu 18.04

Mindwatering Incorporated

Author: Tripp W Black

Created: 03/19/2020 at 09:05 PM

 

Category:
Ubuntu
General

Tasks:
Install the current release of the Aerospike Community Edition server on Ubuntu 18.04.
Install the AMC Management Console


Task - Community Edition Aerospike Server
Steps:
Download the current release.
(e.g. www.aerospike.com/download/server)
Transfer to the server, or use wget to download directly.
$ cd /home/myadmin/tmp/
$ wget -O aerospike.tgz 'https://www.aerospike.com/download/server/latest/artifact/ubuntuVersion'

The above command 2020/03 downloads the following version, as the file aerospike.tgz.
e.g. aerospike-server-community-4.8.0.8-ubuntu18.04.tgz

Extract the tar file:
$ tar -xvf aerospike.tgz
$ cd aerospike-server-community-4.8.08-ubuntu18.04/

Note:
The extracted folder includes the .deb file, but installation by direct execution of the deb file is not supported. You have to run the ./asinstall script.
$ sudo ./asinstall

Confirm if systemd enabled and running:
$ sudo systemctl status aerospike

To confirm the actual system is in a ready state use:
$ su aerospike
$ sudo asinfo -v STATUS

The systemd service commands support stop, start, restart, and status, as expected.

For logging, by default with systemd, Aerospike logs use the main console - Use the journalctl commands:
$ sudo journalctl -u aerospike -a -o cat -f
(-a = full lines, -o cat trims the timestamp off each line to make them shorter, -f is optional, and used to watch the service as its logging/running)



Miscellaneous Set-up Notes:
The community edition comes with a default in memory namespace called test.

The configuration is in the etc folder at:
/etc/aerospike/aerospike.conf
Contains the following required main sections: service, heartbeat, fabric, info

Example configuration:
service {
address any
access-address 10.0.22.10 # service IP - internal network
alternate-access-address 25.20.15.10 # service IP - alternate network (e.g. public or second subnet)
port 3000 # service listening port
}
fabric {
address any
port 3001 # intra-cluster data port
}
info {
address any
port 3003 # plain text telnet management port.
}
heartbeat {
mode multicast # Send heartbeats using Multicast
address 239.1.99.2 # multicast address
port 9918 # multicast port
interface-address 10.0.22.10 # fabric NIC IP
interval 150 # milliseconds between heartbeats
timeout 10 # node timeout - heartbeat intervals to wait
}
logging {
console {
context any info
}
}
namespace <ns-prod> {
memory-size 4G # 4GB of memory to be used for index and data
replication-factor 2 # multi-nodes keep 2 copies of the data
high-water-memory-pct 60 # evict non-zero TTL data if capacity exceeds 60% of 4GB
stop-writes-pct 90 # stop writes if capacity exceeds 90% of 4GB
# default-ttl 0 # writes from client that do not provide a TTL, will default to 0 or never expire
storage-engine memory # Store data in memory only
}

Conf file notes:
- The heartbeat can also be mesh instead of multicast. The options are different, as each node needs to "ping" each other node with the mesh option.
- The logging is set-up for systemd. Change the info option for other logging levels: critical, warning, info, debug, detail.
- Storage engine can be also raw devices:
- - storage-engine device
- - device /dev/sdb

The program folder root folder is
/opt/aerospike/

as expected, the executable tools folder is:
/opt/aerospike/bin

The Ubuntu install includes the user aerospike. The bin folder is in its default paths.

The Ports used by Aerospike are:
3000 - Service - App, tools, and XDR
3001 - Fabric - Internal cluster data replica writes, migration.
3002 - Mesh Heartbeat -
9918 - Multicast Heartbeat
3003 - Info - Telnet port for asinfo
3004 - no longer used after 3.8 for health info queries


Task - AMC Management Console
Steps:
Download the latest deb.
(e.g. www.aerospike.com/download/amc)
(e.g. aerospike-amc-community-4.0.27_amd64.deb )

Backup current configuration if upgrading:
$ sudo cp /etc/amc/amc.conf /etc/amc/amc.conf.backup

Install:
$ sudo dpkg -i aerospike-amc-4.0.27_amd64.deb

Restore config like:
$ sudo cp /etc/amc/amc.conf.backup /etc/amc/amc.conf

Check the systemd status:
$ sudo systemctl status amc

Supports the common start, stop, restart commands.

Try out the console:
Open your browser (e.g. Firefox, Safari). Open the server node using IP or DNS name and port 8081.
Note: The monitoring window requires 2 GB of free memory up to 10 minutes, and 4 GB if greater than 10 minutes.

To get to any node, enter a node DNS or IP, and its standard 3000 port, and click the Connect button. (e.g. localhost if installed on a node)

Try out the main tabs: Dashboard (main screen with charts), Statistics, Definitions, and Jobs.
Switch nodes on the top right corner.


previous page