FAQ - Aerospike on Docker

FAQ - Aerospike on Docker

Detail

FAQ on running Aerospike on Docker for either the Aerospike Community Edition (CE) or the Enterprise Edition(EE)

Where can I find the Dockerfile?

The basic config for a docker container is the Dockerfile. This file contains the install steps for the Aerospike server and path to its configs.

This file can be found at the following locations:

Can I deploy on Docker Swarm?

Using a custom Dockerfile and Docker Compose file, it is possible to deploy Aerospike to a Docker Swarm environment. An overlay network may be needed to help node clustering and allow for different services to access the containers across multiple physical hosts.

More details can be found on the aerospike-docker-swarm git repo.

How do I deploy AMC on Docker?

In order to run AMC on Docker the first step is to create a custom Dockerfile that includes the AMC install commands for the relevant base OS.

Save AMC Dockerfile to a folder:

FROM ubuntu:bionic

ENV AMC_VERSION 4.0.25 

# Install AMC server 

RUN \
  apt-get update -y \
  && apt-get install -y wget python python-argparse python-bcrypt python-openssl logrotate net-tools iproute2 iputils-ping \
  && wget "https://www.aerospike.com/artifacts/aerospike-amc-community/${AMC_VERSION}/aerospike-amc-community-${AMC_VERSION}_amd64.deb" -O aerospike-amc.deb \
  && dpkg -i aerospike-amc.deb \
  && apt-get purge -y

EXPOSE 8081 

# Execute the run script in foreground mode
ENTRYPOINT ["/opt/amc/amc"]

CMD [" -config-file=/etc/amc/amc.conf -config-dir=/etc/amc"]

Build the AMC image:

docker build -t my-amc .

Start AMC container and server:

docker run --rm -tid  --name amc -p 8081:8081 my-amc

Access your AMC container:

http://localhost:8081

Enter a node’s IP address at the prompt. Ensure that the AMC container is able to connect to the Aerospike servers over the configured service ports (3000). In case of an Aerospike cluster running on a Docker overlay network, ensure that the AMC container is also a member of that overlay network.

Notes

The example AMC Dockerfile above can be used as a template to create a Dockerfile for any service.

Keywords

DOCKER AMC

Timestamp

July 2019

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.