Prerequisites
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
Applies to
This tutorial uses the following software versions.
- Aerospike Database Enterprise Edition 8.1.1.0 (Community Edition does not support change notification)
- Elasticsearch connector 3.0.2
- Aerospike Tools 13.0.1
- Elasticsearch 9.5.0
- Docker Compose on a local machine (single-node, non-HA topology)
Prerequisites
This tutorial requires:
- A Bash terminal with
curl,grep,awk,tr,cp,chmod,mkdir,sleep, andid. - Docker 20.10 or later with Docker Compose v2, a running Docker service, and at least 4 GB of memory available to Docker.
mkcert1.4 or later for generating local TLS certificates.- OpenSSL 1.1.1 or later for inspecting certificates and confirming TLS handshakes.
- An Aerospike Database Enterprise Edition feature-key file that is valid for version 8.1.1.0 and includes
asdb-change-notification true. Community Edition does not support change notification and does not work for this tutorial. You can download a free Enterprise Edition feature-key file good for 60 days from Get started with Aerospike. - Network access to the container registries used by the tutorial. Access to the Elasticsearch connector image is subject to the requirements described in Install the Elasticsearch connector.
- The container names
aerospike,elasticsearch,aerospike-elasticsearch-outbound, andaerospike-tools, and local ports8443,8902, and9200, must be available.
Optional readiness check
If you are not sure whether your system meets the prerequisites, open a terminal in the directory containing your features.conf feature-key file and run the following check.
The script reports every check that passes or fails and returns a nonzero status if anything is missing.
It inspects image manifests but does not pull images or start, stop, or remove containers.
bash <<'CHECK'FEATURE_KEY_FILE="./features.conf"failures=0
pass() { printf 'PASS %s\n' "$1"}
fail() { printf 'FAIL %s\n' "$1" >&2 failures=$((failures + 1))}
version_at_least() { local actual="${1#v}" local required="$2" local index actual_part required_part local -a actual_parts required_parts
actual="${actual%%[-+]*}" IFS=. read -r -a actual_parts <<< "$actual" IFS=. read -r -a required_parts <<< "$required"
for index in 0 1 2 3; do actual_part="${actual_parts[$index]:-0}" required_part="${required_parts[$index]:-0}" actual_part="${actual_part%%[!0-9]*}" required_part="${required_part%%[!0-9]*}" actual_part="${actual_part:-0}" required_part="${required_part:-0}"
if ((actual_part > required_part)); then return 0 fi if ((actual_part < required_part)); then return 1 fi done
return 0}
for command_name in curl grep awk tr cp chmod mkdir sleep id mkcert openssl; do if command -v "$command_name" >/dev/null 2>&1; then pass "$command_name is installed" else fail "$command_name is not installed" fidone
if command -v mkcert >/dev/null 2>&1; then mkcert_version="$(mkcert -version 2>/dev/null)" if version_at_least "$mkcert_version" "1.4"; then pass "mkcert ${mkcert_version} meets the 1.4 minimum" else fail "mkcert ${mkcert_version:-unknown} does not meet the 1.4 minimum" fifi
if command -v openssl >/dev/null 2>&1; then openssl_output="$(openssl version 2>/dev/null)" openssl_name="${openssl_output%% *}" openssl_version="${openssl_output#* }" openssl_version="${openssl_version%% *}" if [ "$openssl_name" = "OpenSSL" ] && version_at_least "$openssl_version" "1.1.1"; then pass "OpenSSL ${openssl_version} meets the 1.1.1 minimum" else fail "${openssl_name:-OpenSSL} ${openssl_version:-unknown} does not meet the OpenSSL 1.1.1 minimum" fi
if openssl s_client -help 2>&1 | grep -q -- '-brief'; then pass "OpenSSL s_client supports -brief" else fail "OpenSSL s_client does not support -brief" fifi
docker_installed=0docker_running=0
if command -v docker >/dev/null 2>&1; then docker_installed=1 docker_output="$(docker --version 2>/dev/null)" docker_version="${docker_output#Docker version }" docker_version="${docker_version%%,*}" if version_at_least "$docker_version" "20.10"; then pass "Docker ${docker_version} meets the 20.10 minimum" else fail "Docker ${docker_version:-unknown} does not meet the 20.10 minimum" fielse fail "docker is not installed"fi
if ((docker_installed)); then if docker compose version >/dev/null 2>&1; then pass "Docker Compose v2 is installed" else fail "Docker Compose v2 is not installed" fi
if docker info >/dev/null 2>&1; then docker_running=1 pass "Docker service is running" memory_bytes="$(docker info --format '{{.MemTotal}}' 2>/dev/null)" if [[ "$memory_bytes" =~ ^[0-9]+$ ]] && ((memory_bytes >= 4294967296)); then pass "Docker has at least 4 GB of memory available" else fail "Docker has less than 4 GB of memory available" fi else fail "Docker service is not running" fifi
if [ -r "$FEATURE_KEY_FILE" ]; then pass "Feature-key file is readable"else fail "Feature-key file is not readable: $FEATURE_KEY_FILE"fi
if grep -Eq '^asdb-change-notification[[:space:]]+true$' "$FEATURE_KEY_FILE" 2>/dev/null; then pass "Feature key enables change notification"else fail "Feature key does not enable change notification"fi
if ((docker_installed)); then for image in \ aerospike/aerospike-server-enterprise:8.1.1.0 \ docker.elastic.co/elasticsearch/elasticsearch:9.5.0 \ aerospike/aerospike-elasticsearch-outbound:3.0.2 \ aerospike/aerospike-tools:13.0.1; do if docker manifest inspect "$image" >/dev/null 2>&1; then pass "Container image is accessible: $image" else fail "Container image is not accessible: $image" fi donefi
if ((docker_running)); then for container_name in aerospike elasticsearch aerospike-elasticsearch-outbound aerospike-tools; do if docker container inspect "$container_name" >/dev/null 2>&1; then fail "Container name is already in use: $container_name" else pass "Container name is available: $container_name" fi donefi
for port in 8443 8902 9200; do curl --silent --output /dev/null --noproxy '*' \ --connect-timeout 1 --max-time 1 "http://127.0.0.1:${port}" curl_status=$? if [ "$curl_status" -eq 7 ]; then pass "Local port is available: $port" else fail "Local port might already be in use: $port" fidone
printf '\n'if [ "$failures" -eq 0 ]; then printf 'READY All prerequisite checks passed.\n'else printf 'NOT READY %s prerequisite check(s) failed.\n' "$failures" >&2 exit 1fiCHECKThe feature-key checks confirm that the file is readable and declares change notification. Aerospike Database validates the key’s signature and version or date limits when the container starts.