• Stars
    star
    140
  • Rank 253,069 (Top 6 %)
  • Language
    Shell
  • License
    Other
  • Created almost 10 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dockerfiles for Aerospike Server

Aerospike Database Docker Images

What is Aerospike?

Aerospike is a distributed NoSQL database purposefully designed for high performance applications. Aerospike supports key-value and document data models, and has multiple data types including List, Map, HyperLogLog, GeoJSON, and Blob. Aerospike's patented hybrid memory architecture delivers predictable high performance at scale and high data density per node.

aerospike_square_logo

Getting Started

Aerospike Database Community Edition (CE) supports the same developer APIs as Aerospike Database Enterprise Edition (EE), except for durable deletes. They differ in ease of operation and enterprise features, such as compression.

Since server version 6.1, Aerospike EE starts in a single-node cluster evaluation mode, with all its enterprise features available.

Running an Aerospike Server node

Enterprise Edition

Running Enterprise Edition with default evaluation feature key (versions 6.1+).

docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-enterprise

Running Enterprise Edition with a feature key file in a mapped directory:

docker run -d -v DIR:/opt/aerospike/etc/ -e "FEATURE_KEY_FILE=/opt/aerospike/etc/features.conf" --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-enterprise

Running Enterprise Edition with a feature key file in an environment variable:

FEATKEY=$(base64 ~/Desktop/evaluation-features.conf)
docker run -d -e "FEATURES=$FEATKEY" -e "FEATURE_KEY_FILE=env-b64:FEATURES" --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-enterprise

Above, DIR is a directory on your machine where you drop your feature key file. Make sure Docker Desktop has file sharing permission to bind mount it into Docker containers.

Enterprise Edition for US Federal

Running Enterprise Edition for US Federal with default evaluation feature key (versions 6.1+).

docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-federal

Running Aerospike Enterprise Edition for US Federal with a feature key file in a mapped directory:

docker run -d -v DIR:/opt/aerospike/etc/ -e "FEATURE_KEY_FILE=/opt/aerospike/etc/features.conf" --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-federal

Above, DIR is a directory on your machine where you drop your feature key file. Make sure Docker Desktop has file sharing permission to bind mount it into Docker containers.

Running Aerospike Enterprise Edition for US Federal with a feature key file in an environment variable:

FEATKEY=$(base64 ~/Desktop/evaluation-features.conf)
docker run -d -e "FEATURES=$FEATKEY" -e "FEATURE_KEY_FILE=env-b64:FEATURES" --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-federal

Community Edition

By using Aerospike Community Edition you agree to the COMMUNITY_LICENSE.

Running Aerospike Community Edition:

docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server

Connecting to your Aerospike Container

You can use the latest aerospike-tools image to connect to your Aerospike container.

Using aql

docker run -ti aerospike/aerospike-tools:latest aql -h  $(docker inspect -f '{{.NetworkSettings.IPAddress }}' aerospike)

Seed:         172.17.0.2
User:         None
Config File:  /etc/aerospike/astools.conf /root/.aerospike/astools.conf 
Aerospike Query Client
Version 7.0.4
C Client Version 6.0.0
Copyright 2012-2021 Aerospike. All rights reserved.
aql> show namespaces
+------------+
| namespaces |
+------------+
| "test"     |
+------------+
[172.17.0.2:3000] 1 row in set (0.002 secs)

OK

aql> 

Using asadm

docker run -ti aerospike/aerospike-tools:latest asadm -h  $(docker inspect -f '{{.NetworkSettings.IPAddress }}' aerospike)

Seed:        [('172.17.0.2', 3000, None)]
Config_file: /root/.aerospike/astools.conf, /etc/aerospike/astools.conf
Aerospike Interactive Shell, version 2.10.0

Found 1 nodes
Online:  172.17.0.2:3000

Admin> info
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Network Information (2022-11-01 00:48:05 UTC)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           Node|         Node ID|             IP|    Build|Migrations|~~~~~~~~~~~~~~~~~~Cluster~~~~~~~~~~~~~~~~~~|Client|  Uptime
               |                |               |         |          |Size|         Key|Integrity|      Principal| Conns|        
172.17.0.2:3000|*BB9020011AC4202|172.17.0.2:3000|E-6.1.0.3|   0.000  |   1|19E628721D9A|True     |BB9020011AC4202|     8|00:02:09
Number of rows: 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Namespace Usage Information (2022-11-01 00:48:05 UTC)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Namespace|           Node|  Total|Expirations|Evictions|  Stop|~~~~~~~~~~Device~~~~~~~~~~|~~~~~~~~~~Memory~~~~~~~~~|~Primary~
         |               |Records|           |         |Writes|    Used|Used%|HWM%|Avail%|    Used|Used%|HWM%|Stop%|~~Index~~
         |               |       |           |         |      |        |     |    |      |        |     |    |     |     Type
test     |172.17.0.2:3000|0.000  |    0.000  |  0.000  |False |0.000 B |  0.0|   0|    99|0.000 B |  0.0|   0|   90|shmem    
test     |               |0.000  |    0.000  |  0.000  |      |0.000 B |  0.0|    |      |0.000 B |  0.0|    |     |         
Number of rows: 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Namespace Object Information (2022-11-01 00:48:05 UTC)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Namespace|           Node|Rack|  Repl|  Total|~~~~~~~~~~Objects~~~~~~~~~~|~~~~~~~~~Tombstones~~~~~~~~|~~~~Pending~~~~
         |               |  ID|Factor|Records| Master|  Prole|Non-Replica| Master|  Prole|Non-Replica|~~~~Migrates~~~
         |               |    |      |       |       |       |           |       |       |           |     Tx|     Rx
test     |172.17.0.2:3000|   0|     1|0.000  |0.000  |0.000  |    0.000  |0.000  |0.000  |    0.000  |0.000  |0.000  
test     |               |    |      |0.000  |0.000  |0.000  |    0.000  |0.000  |0.000  |    0.000  |0.000  |0.000  
Number of rows: 1

Admin>

Customizing the Default Developer Environment

The Aerospike Docker image comes with a default configuration file, which sets up a single node, single namespace developer environment. Alternatively, you can provide your own configuration file (see below).

You can inject parameters into the default configuration template using container-side environment variables with the -e flag.

For example, to set the default namespace name to demo:

docker run -d --name aerospike -e "NAMESPACE=demo" -p 3000-3002:3000-3002 -v /my/dir:/opt/aerospike/etc/ -e "FEATURE_KEY_FILE=/opt/aerospike/etc/features.conf" aerospike/aerospike-server-enterprise

Injecting configuration parameters into the configuration template isn't compatible with providing a configuration file. You can use one or the other.

List of template variables

FEATURE_KEY_FILE

The feature_key_file of the service context which is only applicable and to Enterprise editions and must be set to the empty string when running the Community edition. Default: /etc/aerospike/features.conf.

LOGFILE

The file param of the logging context. Default: "", do not log to file. The container will also log to `stdout`` regardless of what is configured here.

SERVICE_ADDRESS

The bind address of the networking.service subcontext. Default: any

SERVICE_PORT

The port of the networking.service subcontext. Default: 3000

Preconfigured namespace

The single preconfigured namespace has the following variables:

NAMESPACE

The name of the namespace. Default: test

DATA_IN_MEMORY

The storage-engine data-in-memory setting. If false (default), the namespace only stores the index in memory, and all reads and writes are served from the filesystem. If true the namespace storage is in-memory with filesystem persistence, meaning that reads and writes happen from a full in-memory copy, and a synchronous write persists to disk.

DEFAULT_TTL

The namespace default-ttl. Default: 30d

MEM_GB

The namespace memory-size. Default: 1, the unit is always G (GB)

NSUP_PERIOD

The namespace nsup-period. Default: 120 , nsup-period in seconds

STORAGE_GB

The namespace persistence file size. Default: 4, the unit is always G (GB)

Advanced Configuration

You can override the default configuration file by providing your own aerospike.conf, as described in Configuring Aerospike Database.

You should first -v map a local directory, which Docker will bind mount. Next, drop your aerospike.conf file into this directory. Finally, use the --config-file option to tell Aerospike where in the container the configuration file is (the default path is /etc/aerospike/aerospike.conf). Remember that the feature key file is required, so use feature-key-file in your config file to point to a mounted path (such as /opt/aerospike/etc/feature.conf).

For example:

docker run -d -v /opt/aerospike/etc/:/opt/aerospike/etc/ --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-enterprise --config-file /opt/aerospike/etc/aerospike.conf

Persistent data directory

With Docker, the files within the container are not persisted past the life of the container. To persist data, you will want to mount a directory from the host to the container's /opt/aerospike/data using the -v option:

For example:

docker run -d  -v /opt/aerospike/data:/opt/aerospike/data  -v /opt/aerospike/etc:/opt/aerospike/etc/ --name aerospike -p 3000-3002:3000-3002 -e "FEATURE_KEY_FILE=/opt/aerospike/etc/features.conf" aerospike/aerospike-server-enterprise

The example above uses the configuration template, where the single defined namespace is in-memory with file-based persistence. Just mounting the predefined /opt/aerospike/data directory enables the data to be persisted on the host.

Alternatively, your custom configuration file is used with the parameter file set to be a file in the mounted /opt/aerospike/data, such as in the following config snippet:

namespace test {
    # :
    storage-engine device {
        file /opt/aerospike/data/test.dat
        filesize 4G
        data-in-memory true
    }
}

In this example we also mount the data directory in a similar way, using a custom configuration file

docker run -d -v /opt/aerospike/data:/opt/aerospike/data -v /opt/aerospike/etc/:/opt/aerospike/etc/ --name aerospike -p 3000-3002:3000-3002 --config-file /opt/aerospike/etc/aerospike.conf aerospike/aerospike-server-enterprise

Block storage

Docker provides an ability to expose a host's block devices to a running container. The --device option can be used to map a host block device within a container.

Update the storage-engine device section of the namespace in the custom Aerospike configuration file.

namespace test {
    # :
    storage-engine device {
        device /dev/xvdc
        write-block-size 128k
    }
}

Now to map a host drive /dev/sdc to /dev/xvdc on a container

docker run -d --device '/dev/sdc:/dev/xvdc' -v /opt/aerospike/etc/:/opt/aerospike/etc/ --name aerospike -p 3000-3002:3000-3002 --config-file /opt/aerospike/etc/aerospike.conf aerospike/aerospike-server-enterprise

Persistent Lua cache

Upon restart, your Lua cache will become emptied. To persist the cache, you will want to mount a directory from the host to the container's /opt/aerospike/usr/udf/lua using the -v option:

docker run -d -v /opt/aerospike/lua:/opt/aerospike/usr/udf/lua -v /opt/aerospike/data:/opt/aerospike/data --name aerospike -p 3000-3002:3000-3002 --config-file /opt/aerospike/etc/aerospike.conf aerospike/aerospike-server-enterprise

A note about security

For convenience, this image does not have security turned on by default, but it is a core Aerospike Enterprise Edition feature. The knowledge base article How To secure Aerospike database servers covers the topic well.

And Now for a Security Reminder that bad things can happen to good people.

Also see the knowledge base article How To secure Aerospike database servers.

Networking

Developers using the Aerospike Enterprise Edition single-node evaluation, and most others using Docker Desktop on their machine for development, will not need to configure the node for clustering. If you're interested in using clustering and have a feature key file without a single node limit or you are using the Community Edition, read the following sections.

Configuring the node's access address

In order for the Aerospike node to properly broadcast its address to the cluster and applications, the access-address configuration parameter needs to be set in the configuration file. If it is not set, then the IP address within the container will be used, which is not accessible to other nodes.

    network {
        service {
            address any                  # Listening IP Address
            port 3000                    # Listening Port
            access-address 192.168.1.100 # IP Address used by cluster nodes and applications
        }

    ...
    }

Mesh clustering

See How do I get a 2 nodes Aerospike cluster running quickly in Docker without editing a single file?

Sending Performance Data to Aerospike

Aerospike Telemetry is a feature that allows us to collect certain anonymized use data – not the database data – on your Aerospike Community Edition server use. We’d like to know when clusters are created and destroyed, cluster size, cluster workload, how often queries are run, whether instances are deployed purely in-memory or with Flash. Aerospike Telemetry collects information from running Community Edition server instances every 10 minutes. The data helps us to understand how the product is being used, identify issues, and create a better experience for the end user. More Info

Image Versions

These images are based on debian:*-slim.

Reporting Issues

Aerospike Enterprise evaluation users, if you have any problems with or questions about this image, please post on the Aerospike discussion forum or open an issue in aerospike/aerospike-server-enterprise.docker.

Enterprise customers are welcome to participate in the community forum, but can also report issues through the enterprise support system.

Community Edition users may report problems or ask questions about this image on the Aerospike Forums or open an issue in aerospike/aerospike-server.docker.

License

If you are using the Aerospike Database Enterprise Edition evaluation feature key file, you are operating under the Aerospike Evaluation License Agreement.

If you are using a feature key file you received as part of your commercial enterprise license, you are operating under the Aerospike Master License Agreement.

If you are using Aerospike Database CE refer to the license information in the aerospike/aerospike-server repository.

More Repositories

1

aerospike-server

Aerospike Database Server – flash-optimized, in-memory, nosql database
C
950
star
2

aerospike-client-go

Aerospike Client Go
Go
421
star
3

aerospike-client-java

Aerospike Java Client Library
Java
229
star
4

aerospike-client-nodejs

Node.js client for the Aerospike database
JavaScript
197
star
5

act

Aerospike Certification Tool
C
188
star
6

aerospike-client-python

Aerospike Python Client
Python
126
star
7

aerospike-client-c

Aerospike C Client
C
92
star
8

aerospike-kubernetes-operator

Kubernetes operator for the Aerospike database
Go
87
star
9

aerospike-client-rust

Rust client for the Aerospike database
Rust
76
star
10

aerospike-client-csharp

Aerospike C# Client Library
C#
69
star
11

aerospike-client-ruby

Ruby client for the Aerospike database
Ruby
60
star
12

aerospike-kubernetes

Mustache
51
star
13

aerospike-common

Common Library
C
47
star
14

aerospike-loader

Aerospike Data Loader
Java
41
star
15

aerospike-admin

Aerospike Administration tool: allows operations to view vital stats from the aerospike server from the command line.
Python
38
star
16

aerospike-prometheus-exporter

Monitoring suite for the Aerospike DB
Go
36
star
17

aerospike-monitoring

Python
33
star
18

aws-cloudformation

AWS CloudFormation scripts related to Aerospike
25
star
19

aerospike-jdbc

Minimalist JDBC driver for Aerospike
Java
25
star
20

aerospike-tools-backup

Aerospike backup and restore utility
C
25
star
21

asmalloc

Aerospike Memory Allocation Tracking Tool
C
25
star
22

jemalloc

Aerospike Fork of the JEMalloc Memory Allocator
C
21
star
23

gommander

Go library to manage multiple servers over SSH
Go
18
star
24

aerospike-tools.docker

Aerospike Tools Dockerfile
Dockerfile
18
star
25

aerospike-kubernetes-enterprise

Shell
17
star
26

java-object-mapper

The Java Object Mapper is a simple, light-weight framework used to map POJOs to the Aerospike database. Using simple annotations or a configuration YAML file to describe how to map the data to Aerospike, the project takes the tedium out of mapping the data through the powerful, low level interface.
Java
17
star
27

aerospike-rest-gateway

REST client for the Aerospike database
Java
15
star
28

aerospike-server-enterprise.docker

Dockerfile for Aerospike Server Enterprise Edition
Shell
15
star
29

aerospike-benchmark

A tool to benchmark the Aerospike Database.
C
14
star
30

aerolab

Quickly spin up Aerospike clusters on docker or in AWS
JavaScript
14
star
31

aerospike-mod-lua

Lua Interface Module for Aerospike Server and C Client
C
12
star
32

aerospike-document-lib

Aerospike Java Document API
Java
10
star
33

aerospike-lua-core

Aerospike Lua Core Library
Lua
9
star
34

luajit

Aerospike Fork of the Lua JIT (Just-In-Time Compiler) http://luajit.org/
C
8
star
35

aerospike-connect-inbound-sdk

Inbound SDK for custom transforms or other plugins
Java
8
star
36

aerospike-dev-notebooks.docker

Repo for a docker image with Server, Jupyter, Python client, Tools and Notebooks
Jupyter Notebook
8
star
37

aerospike-backup-service

Aerospike Backup Service
Go
8
star
38

aerospike-client-java-reactive

Reactive programming interfaces for the Aerospike Java client
Java
7
star
39

asmt

Backup & restore shmem indexes.
C
6
star
40

aerospike-management-lib

A library to hold aerospike management and operations tasks.
Go
6
star
41

lua-bac

The Lua programming language with CMake based build
C
6
star
42

aerospike-docker-swarm

Python
6
star
43

graph-synth

Graph Synthesis Tool
Java
5
star
44

aql

The Aerospike Quick Look data browsing utility.
C
5
star
45

aerospike-client-rest-kubernetes

Aerospike REST client Helm chart for Kubernetes
Smarty
5
star
46

aerospike-elk

Starting point for using Aerospike with ElasticSearch / LogStash / Kibana for log file analysis.
5
star
47

php-client

git repo for the new PHP Aerospike client
Rust
5
star
48

document-lib-python

Python
5
star
49

aerospike-telemetry-agent

Aerospike Telemetry Agent: Anonymized Usage Data Collector.
Python
4
star
50

asconfig

A CLI tool for managing Aerospike configuration files.
Go
4
star
51

s2-geometry-library

C++
4
star
52

jansson

C library for encoding, decoding and manipulating JSON data
C
4
star
53

trino-aerospike.docker

Trino with the Aeropsike connector Docker Image
Shell
3
star
54

aerospike-connect-outbound-sdk

An outbound SDK for creating custom transforms for streaming connectors.
Java
3
star
55

proximus-examples

proximus-examples
Python
3
star
56

kubernetes-operator

Website for the Aerospike Kubernetes Operator
JavaScript
2
star
57

tools-common-go

Common library used in tools golang projects.
Go
2
star
58

schemas

Location for public aerospike schemas (json / yaml / xml / etc)
2
star
59

cloud-qualification

Scripts and instructions to run benchmarks/tests on cloud environments.
Python
2
star
60

aerospike-kubernetes-operator-ctl

Aerospike kubernetes operator command line tool
Go
1
star
61

secret-agent-client-c

C
1
star
62

aerospike-kubernetes-init

Go
1
star
63

azure-resource-manager

Shell
1
star
64

cf-service-broker-tile

Package up the Aerospike Service Broker into a Pivotal Cloud Foundry tile
Python
1
star
65

aerospike-database-recovery

Aerospike Database Recovery Documentation
Shell
1
star
66

cf-managed-service-tile

Cloud Foundry Managed Service for Aerospike
Shell
1
star
67

aerospike-net-extensions

Aerospike .NET Extensions [IDistributedCache]
C#
1
star
68

aerospike-proxy-client-sdk

Aerospike Proxy Client SDK for building clients
Kotlin
1
star
69

movement

Parallel Dataflow System
Java
1
star
70

abseil-cpp

C++
1
star