diff --git a/bake.hcl b/bake.hcl index cb38debf..b7543fd2 100644 --- a/bake.hcl +++ b/bake.hcl @@ -10,60 +10,60 @@ #------------------------------------- test ----------------------------------- group "test" { - targets=["enterprise_debian11_amd64", "enterprise_debian11_arm64", "federal_debian11_amd64", "community_debian11_amd64", "community_debian11_arm64"] + targets=["enterprise_debian12_amd64", "enterprise_debian12_arm64", "federal_debian12_amd64", "community_debian12_amd64", "community_debian12_arm64"] } -target "enterprise_debian11_amd64" { - tags=["aerospike/aerospike-server-enterprise-amd64:6.3.0.12", "aerospike/aerospike-server-enterprise-amd64:latest"] +target "enterprise_debian12_amd64" { + tags=["aerospike/aerospike-server-enterprise-amd64:6.4.0.6", "aerospike/aerospike-server-enterprise-amd64:latest"] platforms=["linux/amd64"] - context="./enterprise/debian11" + context="./enterprise/debian12" } -target "enterprise_debian11_arm64" { - tags=["aerospike/aerospike-server-enterprise-arm64:6.3.0.12", "aerospike/aerospike-server-enterprise-arm64:latest"] +target "enterprise_debian12_arm64" { + tags=["aerospike/aerospike-server-enterprise-arm64:6.4.0.6", "aerospike/aerospike-server-enterprise-arm64:latest"] platforms=["linux/arm64"] - context="./enterprise/debian11" + context="./enterprise/debian12" } -target "federal_debian11_amd64" { - tags=["aerospike/aerospike-server-federal-amd64:6.3.0.12", "aerospike/aerospike-server-federal-amd64:latest"] +target "federal_debian12_amd64" { + tags=["aerospike/aerospike-server-federal-amd64:6.4.0.6", "aerospike/aerospike-server-federal-amd64:latest"] platforms=["linux/amd64"] - context="./federal/debian11" + context="./federal/debian12" } -target "community_debian11_amd64" { - tags=["aerospike/aerospike-server-community-amd64:6.3.0.12", "aerospike/aerospike-server-community-amd64:latest"] +target "community_debian12_amd64" { + tags=["aerospike/aerospike-server-community-amd64:6.4.0.6", "aerospike/aerospike-server-community-amd64:latest"] platforms=["linux/amd64"] - context="./community/debian11" + context="./community/debian12" } -target "community_debian11_arm64" { - tags=["aerospike/aerospike-server-community-arm64:6.3.0.12", "aerospike/aerospike-server-community-arm64:latest"] +target "community_debian12_arm64" { + tags=["aerospike/aerospike-server-community-arm64:6.4.0.6", "aerospike/aerospike-server-community-arm64:latest"] platforms=["linux/arm64"] - context="./community/debian11" + context="./community/debian12" } #------------------------------------ push ----------------------------------- group "push" { - targets=["enterprise_debian11", "federal_debian11", "community_debian11"] + targets=["enterprise_debian12", "federal_debian12", "community_debian12"] } -target "enterprise_debian11" { - tags=["aerospike/aerospike-server-enterprise:6.3.0.12", "aerospike/aerospike-server-enterprise:6.3.0.12_1"] +target "enterprise_debian12" { + tags=["aerospike/aerospike-server-enterprise:6.4.0.6", "aerospike/aerospike-server-enterprise:6.4.0.6_1", "aerospike/aerospike-server-enterprise:latest"] platforms=["linux/amd64,linux/arm64"] - context="./enterprise/debian11" + context="./enterprise/debian12" } -target "federal_debian11" { - tags=["aerospike/aerospike-server-federal:6.3.0.12", "aerospike/aerospike-server-federal:6.3.0.12_1"] +target "federal_debian12" { + tags=["aerospike/aerospike-server-federal:6.4.0.6", "aerospike/aerospike-server-federal:6.4.0.6_1", "aerospike/aerospike-server-federal:latest"] platforms=["linux/amd64"] - context="./federal/debian11" + context="./federal/debian12" } -target "community_debian11" { - tags=["aerospike/aerospike-server:6.3.0.12", "aerospike/aerospike-server:6.3.0.12_1"] +target "community_debian12" { + tags=["aerospike/aerospike-server:6.4.0.6", "aerospike/aerospike-server:6.4.0.6_1", "aerospike/aerospike-server:latest"] platforms=["linux/amd64,linux/arm64"] - context="./community/debian11" + context="./community/debian12" } diff --git a/community/debian11/Dockerfile b/community/debian11/Dockerfile deleted file mode 100644 index 4fabd8c4..00000000 --- a/community/debian11/Dockerfile +++ /dev/null @@ -1,190 +0,0 @@ - -# -# Aerospike Server Dockerfile -# -# http://github.com/aerospike/aerospike-server.docker -# - -FROM debian:bullseye-slim - -# AEROSPIKE_EDITION - required - must be "community", "enterprise", or -# "federal". -# By selecting "community" you agree to the "COMMUNITY_LICENSE". -# By selecting "enterprise" you agree to the "ENTERPRISE_LICENSE". -# By selecting "federal" you agree to the "FEDERAL_LICENSE" -ARG AEROSPIKE_EDITION="community" - -ARG AEROSPIKE_X86_64_LINK="https://artifacts.aerospike.com/aerospike-server-community/6.3.0.12/aerospike-server-community_6.3.0.12_tools-8.5.1_debian11_x86_64.tgz" -ARG AEROSPIKE_SHA_X86_64="3124a424f6157a588c580c139d3a48a428d523bcba865b571d744e3ffbc7c69f" -ARG AEROSPIKE_AARCH64_LINK="https://artifacts.aerospike.com/aerospike-server-community/6.3.0.12/aerospike-server-community_6.3.0.12_tools-8.5.1_debian11_aarch64.tgz" -ARG AEROSPIKE_SHA_AARCH64="647ae14b09ad7b173c35ca3ed01e96cdf3f4f3598e9e209a405083b6bfa74552" - -SHELL ["/bin/bash", "-Eeuo", "pipefail", "-c"] - -# Install Aerospike Server and Tools -RUN \ - { \ - # 00-prelude-deb.part - Setup dependencies for scripts. - export DEBIAN_FRONTEND=noninteractive; \ - apt-get update -y; \ - apt-get install -y --no-install-recommends apt-utils; \ - apt-get install -y --no-install-recommends \ - binutils \ - ca-certificates \ - curl \ - xz-utils; \ - }; \ - { \ - # 00-prelude-deb.part - Install procps for tests. - apt-get install -y --no-install-recommends procps; \ - }; \ - { \ - # 10-download.part - Vars used for tini and tools. - VERSION="$(grep -oE "/[0-9]+[.][0-9]+[.][0-9]+([.][0-9]+)+(-rc[0-9]+)*/" <<<"${AEROSPIKE_X86_64_LINK}" | tr -d '/')"; \ - }; \ - { \ - # 10-common.part - Install tini. - ARCH="$(dpkg --print-architecture)"; \ - if [ "${ARCH}" = "amd64" ]; then \ - sha256=d1f6826dd70cdd88dde3d5a20d8ed248883a3bc2caba3071c8a3a9b0e0de5940; \ - suffix=""; \ - elif [ "${ARCH}" = "arm64" ]; then \ - sha256=1c398e5283af2f33888b7d8ac5b01ac89f777ea27c85d25866a40d1e64d0341b; \ - suffix="-arm64"; \ - else \ - echo "Unsuported architecture - ${ARCH}" >&2; \ - exit 1; \ - fi; \ - curl -fsSL "https://github.com/aerospike/tini/releases/download/1.0.1/as-tini-static${suffix}" --output /usr/bin/as-tini-static; \ - echo "${sha256} /usr/bin/as-tini-static" | sha256sum -c -; \ - chmod +x /usr/bin/as-tini-static; \ - }; \ - { \ - # 10-download.part - Download server and tools. - ARCH="$(dpkg --print-architecture)"; \ - mkdir -p aerospike/pkg; \ - if [ "${ARCH}" = "amd64" ]; then \ - pkg_link="${AEROSPIKE_X86_64_LINK}"; \ - sha256="${AEROSPIKE_SHA_X86_64}"; \ - elif [ "${ARCH}" = "arm64" ]; then \ - pkg_link="${AEROSPIKE_AARCH64_LINK}"; \ - sha256="${AEROSPIKE_SHA_AARCH64}"; \ - else \ - echo "Unsuported architecture - ${ARCH}" >&2; \ - exit 1; \ - fi; \ - if ! curl -fsSL "${pkg_link}" --output aerospike-server.tgz; then \ - echo "Could not fetch pkg - ${pkg_link}" >&2; \ - exit 1; \ - fi; \ - echo "${sha256} aerospike-server.tgz" | sha256sum -c -; \ - tar xzf aerospike-server.tgz --strip-components=1 -C aerospike; \ - rm aerospike-server.tgz; \ - # These directories are required for backward compatibility. - mkdir -p /var/{log,run}/aerospike; \ - # Copy license file to standard location. - mkdir -p /licenses; \ - cp aerospike/LICENSE /licenses; \ - }; \ - { \ - # 20-install-dependencies-deb.part - Install server and dependencies. - if [ "${AEROSPIKE_EDITION}" = "enterprise" ]; then \ - apt-get install -y --no-install-recommends \ - libcurl4 \ - libldap-2.4.2; \ - elif ! [ "$(printf "%s\n%s" "${VERSION}" "6.0" | sort -V | head -1)" != "${VERSION}" ]; then \ - apt-get install -y --no-install-recommends \ - libcurl4; \ - fi; \ - dpkg -i aerospike/aerospike-server-*.deb; \ - rm -rf /opt/aerospike/bin; \ - }; \ - { \ - # 20-install-dependencies-deb.part - Install tools dependencies. - if ! [ "$(printf "%s\n%s" "${VERSION}" "5.1" | sort -V | head -1)" != "${VERSION}" ]; then \ - # Tools before 5.1 need python2. - apt-get install -y --no-install-recommends \ - python2; \ - elif ! [ "$(printf "%s\n%s" "${VERSION}" "6.2.0.3" | sort -V | head -1)" != "${VERSION}" ]; then \ - # Tools before 6.0 need python3. - apt-get install -y --no-install-recommends \ - python3 \ - python3-distutils; \ - fi; \ - # Tools after 6.0 bundled their own python interpreter. - }; \ - { \ - # 20-install-dependencies-deb.part - Extract tools. - # ar on debian10 doesn't support '--output' - pushd aerospike/pkg || exit 1; \ - ar -x ../aerospike-tools*.deb; \ - popd || exit 1; \ - tar xf aerospike/pkg/data.tar.xz -C aerospike/pkg/; \ - }; \ - { \ - # 30-install-tools.part - install asinfo and asadm. - find aerospike/pkg/opt/aerospike/bin/ -user aerospike -group aerospike -exec chown root:root {} +; \ - mv aerospike/pkg/etc/aerospike/astools.conf /etc/aerospike; \ - if ! [ "$(printf "%s\n%s" "${VERSION}" "6.2" | sort -V | head -1)" != "${VERSION}" ]; then \ - mv aerospike/pkg/opt/aerospike/bin/aql /usr/bin; \ - fi; \ - if [ -d 'aerospike/pkg/opt/aerospike/bin/asadm' ]; then \ - # Since tools release 7.0.5, asadm has been moved from - # /opt/aerospike/bin/asadm to /opt/aerospike/bin/asadm/asadm - # (inside an asadm directory). - mv aerospike/pkg/opt/aerospike/bin/asadm /usr/lib/; \ - else \ - mkdir /usr/lib/asadm; \ - mv aerospike/pkg/opt/aerospike/bin/asadm /usr/lib/asadm/; \ - fi; \ - ln -s /usr/lib/asadm/asadm /usr/bin/asadm; \ - if [ -f 'aerospike/pkg/opt/aerospike/bin/asinfo' ]; then \ - # Since tools release 7.1.1, asinfo has been moved from - # /opt/aerospike/bin/asinfo to /opt/aerospike/bin/asadm/asinfo - # (inside an asadm directory). - mv aerospike/pkg/opt/aerospike/bin/asinfo /usr/lib/asadm/; \ - fi; \ - ln -s /usr/lib/asadm/asinfo /usr/bin/asinfo; \ - }; \ - { \ - # 40-cleanup.part - remove extracted aerospike pkg directory. - rm -rf aerospike; \ - }; \ - { \ - # 50-remove-prelude-deb.part - Remove dependencies for scripts. - rm -rf /var/lib/apt/lists/*; \ - dpkg --purge \ - apt-utils \ - binutils \ - ca-certificates \ - curl \ - xz-utils 2>&1; \ - apt-get purge -y; \ - apt-get autoremove -y; \ - unset DEBIAN_FRONTEND; \ - }; \ - echo "done"; - -# Add the Aerospike configuration specific to this dockerfile -COPY aerospike.template.conf /etc/aerospike/aerospike.template.conf - -# Mount the Aerospike data directory -# VOLUME ["/opt/aerospike/data"] -# Mount the Aerospike config directory -# VOLUME ["/etc/aerospike/"] - -# Expose Aerospike ports -# -# 3000 – service port, for client connections -# 3001 – fabric port, for cluster communication -# 3002 – mesh port, for cluster heartbeat -# -EXPOSE 3000 3001 3002 - -COPY entrypoint.sh /entrypoint.sh - -# Tini init set to restart ASD on SIGUSR1 and terminate ASD on SIGTERM -ENTRYPOINT ["/usr/bin/as-tini-static", "-r", "SIGUSR1", "-t", "SIGTERM", "--", "/entrypoint.sh"] - -# Execute the run script in foreground mode -CMD ["asd"] diff --git a/community/debian11/README.md b/community/debian11/README.md deleted file mode 100644 index a0bb028c..00000000 --- a/community/debian11/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Dockerfile Template - -These files are managed by `update.sh`, do not edit files outside of the `template` directory. - -After updating files in the `template` directory, be sure to run `update.sh` before committing. diff --git a/community/debian11/aerospike.template.conf b/community/debian11/aerospike.template.conf deleted file mode 100644 index 6737692b..00000000 --- a/community/debian11/aerospike.template.conf +++ /dev/null @@ -1,67 +0,0 @@ -# Aerospike database configuration file -# This template sets up a single-node, single namespace developer environment. -# -# Alternatively, you can pass in your own configuration file. -# You can see more examples at -# https://github.com/aerospike/aerospike-server/tree/master/as/etc - -# This stanza must come first. -service { - $([ -n "${FEATURE_KEY_FILE}" ] && echo "feature-key-file ${FEATURE_KEY_FILE}") -} - -logging { - $([ -n "${LOGFILE}" ] && echo "# Log file must be an absolute path.") - $([ -n "${LOGFILE}" ] && echo "file ${LOGFILE} {") - $([ -n "${LOGFILE}" ] && echo " context any info") - $([ -n "${LOGFILE}" ] && echo "}") - - # Send log messages to stdout - console { - context any info - } -} - -network { - service { - address ${SERVICE_ADDRESS} - port ${SERVICE_PORT} - - # Uncomment the following to set the 'access-address' parameter to the - # IP address of the Docker host. This will the allow the server to correctly - # publish the address which applications and other nodes in the cluster to - # use when addressing this node. - # access-address - } - - heartbeat { - # mesh is used for environments that do not support multicast - mode mesh - address local - port 3002 - interval 150 - timeout 10 - } - - fabric { - # Intra-cluster communication port (migrates, replication, etc) - # default to same address in 'service' - address local - port 3001 - } - -} - -namespace ${NAMESPACE} { - default-ttl ${DEFAULT_TTL} # use 0 to never expire/evict. - memory-size ${MEM_GB}G - nsup-period ${NSUP_PERIOD} - replication-factor 1 - storage-engine device { - data-in-memory ${DATA_IN_MEMORY} # if true, in-memory, persisted to the filesystem - file /opt/aerospike/data/${NAMESPACE}.dat - filesize ${STORAGE_GB}G - read-page-cache ${READ_PAGE_CACHE} - } -} - diff --git a/community/debian11/entrypoint.sh b/community/debian11/entrypoint.sh deleted file mode 100755 index 1aa9d0ea..00000000 --- a/community/debian11/entrypoint.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash - -set -Eeuo pipefail - -export FEATURE_KEY_FILE=${FEATURE_KEY_FILE:-"/etc/aerospike/features.conf"} -export LOGFILE=${LOGFILE:-""} -export SERVICE_ADDRESS=${SERVICE_ADDRESS:-any} -export SERVICE_PORT=${SERVICE_PORT:-3000} -export NAMESPACE=${NAMESPACE:-test} -export DATA_IN_MEMORY=${DATA_IN_MEMORY:-false} -export DEFAULT_TTL=${DEFAULT_TTL:-30d} -export MEM_GB=${MEM_GB:-1} -export NSUP_PERIOD=${NSUP_PERIOD:-120} -export STORAGE_GB=${STORAGE_GB:-4} - -if [ "${DATA_IN_MEMORY}" = "true" ]; then - export READ_PAGE_CACHE="false" -else - export READ_PAGE_CACHE="true" -fi - -if asd --version | grep -q "Community"; then - FEATURE_KEY_FILE="" # invalid for community edition -fi - -function bash_eval_template() { - local template_file=$1 - local target_file=$2 - - echo "" >"${target_file}" - - while IFS= read -r line; do - if grep -qE "[$][(]|[{]" <<<"${line}"; then - local update - update=$(eval echo "\"${line}\"") || exit 1 - grep -qE "[^[:space:]]*" <<<"${update}" && echo "${update}" >>"${target_file}" - else - echo "${line}" >>"${target_file}" - fi - done <"${template_file}" - - # Ignore failure when template is mounted in a read-only filesystem. - rm "${template_file}" || true -} - -# Fill out conffile with above values -if [ -f /etc/aerospike/aerospike.template.conf ]; then - conf=/etc/aerospike/aerospike.conf - template=/etc/aerospike/aerospike.template.conf - - bash_eval_template "${template}" "${conf}" -fi - -# if command starts with an option, prepend asd -if [ "${1:0:1}" = '-' ]; then - set -- asd "$@" -fi - -# if asd is specified for the command, start it with any given options -if [ "$1" = 'asd' ]; then - NETLINK=${NETLINK:-eth0} - - # We will wait a bit for the network link to be up. - NETLINK_UP=0 - NETLINK_COUNT=0 - - echo "link ${NETLINK} state $(cat /sys/class/net/"${NETLINK}"/operstate)" - - while [ ${NETLINK_UP} -eq 0 ] && [ ${NETLINK_COUNT} -lt 20 ]; do - if grep -q "up" /sys/class/net/"${NETLINK}"/operstate; then - NETLINK_UP=1 - else - sleep 0.1 - ((++NETLINK_COUNT)) - fi - done - - echo "link ${NETLINK} state $(cat /sys/class/net/"${NETLINK}"/operstate) in ${NETLINK_COUNT}" - # asd should always run in the foreground. - set -- "$@" --foreground -fi - -exec "$@" diff --git a/enterprise/debian11/Dockerfile b/enterprise/debian11/Dockerfile deleted file mode 100644 index 1bbe92aa..00000000 --- a/enterprise/debian11/Dockerfile +++ /dev/null @@ -1,190 +0,0 @@ - -# -# Aerospike Server Dockerfile -# -# http://github.com/aerospike/aerospike-server.docker -# - -FROM debian:bullseye-slim - -# AEROSPIKE_EDITION - required - must be "community", "enterprise", or -# "federal". -# By selecting "community" you agree to the "COMMUNITY_LICENSE". -# By selecting "enterprise" you agree to the "ENTERPRISE_LICENSE". -# By selecting "federal" you agree to the "FEDERAL_LICENSE" -ARG AEROSPIKE_EDITION="enterprise" - -ARG AEROSPIKE_X86_64_LINK="https://artifacts.aerospike.com/aerospike-server-enterprise/6.3.0.12/aerospike-server-enterprise_6.3.0.12_tools-8.5.1_debian11_x86_64.tgz" -ARG AEROSPIKE_SHA_X86_64="ce78cfcd2a3df46ab9ed5c0fbb88ec26fe5e502298cdcbec33af96ad04f86382" -ARG AEROSPIKE_AARCH64_LINK="https://artifacts.aerospike.com/aerospike-server-enterprise/6.3.0.12/aerospike-server-enterprise_6.3.0.12_tools-8.5.1_debian11_aarch64.tgz" -ARG AEROSPIKE_SHA_AARCH64="1564dae0c31de970ef8f7d69eddef7d131a9e337657f6cd01168da0e983e4e7e" - -SHELL ["/bin/bash", "-Eeuo", "pipefail", "-c"] - -# Install Aerospike Server and Tools -RUN \ - { \ - # 00-prelude-deb.part - Setup dependencies for scripts. - export DEBIAN_FRONTEND=noninteractive; \ - apt-get update -y; \ - apt-get install -y --no-install-recommends apt-utils; \ - apt-get install -y --no-install-recommends \ - binutils \ - ca-certificates \ - curl \ - xz-utils; \ - }; \ - { \ - # 00-prelude-deb.part - Install procps for tests. - apt-get install -y --no-install-recommends procps; \ - }; \ - { \ - # 10-download.part - Vars used for tini and tools. - VERSION="$(grep -oE "/[0-9]+[.][0-9]+[.][0-9]+([.][0-9]+)+(-rc[0-9]+)*/" <<<"${AEROSPIKE_X86_64_LINK}" | tr -d '/')"; \ - }; \ - { \ - # 10-common.part - Install tini. - ARCH="$(dpkg --print-architecture)"; \ - if [ "${ARCH}" = "amd64" ]; then \ - sha256=d1f6826dd70cdd88dde3d5a20d8ed248883a3bc2caba3071c8a3a9b0e0de5940; \ - suffix=""; \ - elif [ "${ARCH}" = "arm64" ]; then \ - sha256=1c398e5283af2f33888b7d8ac5b01ac89f777ea27c85d25866a40d1e64d0341b; \ - suffix="-arm64"; \ - else \ - echo "Unsuported architecture - ${ARCH}" >&2; \ - exit 1; \ - fi; \ - curl -fsSL "https://github.com/aerospike/tini/releases/download/1.0.1/as-tini-static${suffix}" --output /usr/bin/as-tini-static; \ - echo "${sha256} /usr/bin/as-tini-static" | sha256sum -c -; \ - chmod +x /usr/bin/as-tini-static; \ - }; \ - { \ - # 10-download.part - Download server and tools. - ARCH="$(dpkg --print-architecture)"; \ - mkdir -p aerospike/pkg; \ - if [ "${ARCH}" = "amd64" ]; then \ - pkg_link="${AEROSPIKE_X86_64_LINK}"; \ - sha256="${AEROSPIKE_SHA_X86_64}"; \ - elif [ "${ARCH}" = "arm64" ]; then \ - pkg_link="${AEROSPIKE_AARCH64_LINK}"; \ - sha256="${AEROSPIKE_SHA_AARCH64}"; \ - else \ - echo "Unsuported architecture - ${ARCH}" >&2; \ - exit 1; \ - fi; \ - if ! curl -fsSL "${pkg_link}" --output aerospike-server.tgz; then \ - echo "Could not fetch pkg - ${pkg_link}" >&2; \ - exit 1; \ - fi; \ - echo "${sha256} aerospike-server.tgz" | sha256sum -c -; \ - tar xzf aerospike-server.tgz --strip-components=1 -C aerospike; \ - rm aerospike-server.tgz; \ - # These directories are required for backward compatibility. - mkdir -p /var/{log,run}/aerospike; \ - # Copy license file to standard location. - mkdir -p /licenses; \ - cp aerospike/LICENSE /licenses; \ - }; \ - { \ - # 20-install-dependencies-deb.part - Install server and dependencies. - if [ "${AEROSPIKE_EDITION}" = "enterprise" ]; then \ - apt-get install -y --no-install-recommends \ - libcurl4 \ - libldap-2.4.2; \ - elif ! [ "$(printf "%s\n%s" "${VERSION}" "6.0" | sort -V | head -1)" != "${VERSION}" ]; then \ - apt-get install -y --no-install-recommends \ - libcurl4; \ - fi; \ - dpkg -i aerospike/aerospike-server-*.deb; \ - rm -rf /opt/aerospike/bin; \ - }; \ - { \ - # 20-install-dependencies-deb.part - Install tools dependencies. - if ! [ "$(printf "%s\n%s" "${VERSION}" "5.1" | sort -V | head -1)" != "${VERSION}" ]; then \ - # Tools before 5.1 need python2. - apt-get install -y --no-install-recommends \ - python2; \ - elif ! [ "$(printf "%s\n%s" "${VERSION}" "6.2.0.3" | sort -V | head -1)" != "${VERSION}" ]; then \ - # Tools before 6.0 need python3. - apt-get install -y --no-install-recommends \ - python3 \ - python3-distutils; \ - fi; \ - # Tools after 6.0 bundled their own python interpreter. - }; \ - { \ - # 20-install-dependencies-deb.part - Extract tools. - # ar on debian10 doesn't support '--output' - pushd aerospike/pkg || exit 1; \ - ar -x ../aerospike-tools*.deb; \ - popd || exit 1; \ - tar xf aerospike/pkg/data.tar.xz -C aerospike/pkg/; \ - }; \ - { \ - # 30-install-tools.part - install asinfo and asadm. - find aerospike/pkg/opt/aerospike/bin/ -user aerospike -group aerospike -exec chown root:root {} +; \ - mv aerospike/pkg/etc/aerospike/astools.conf /etc/aerospike; \ - if ! [ "$(printf "%s\n%s" "${VERSION}" "6.2" | sort -V | head -1)" != "${VERSION}" ]; then \ - mv aerospike/pkg/opt/aerospike/bin/aql /usr/bin; \ - fi; \ - if [ -d 'aerospike/pkg/opt/aerospike/bin/asadm' ]; then \ - # Since tools release 7.0.5, asadm has been moved from - # /opt/aerospike/bin/asadm to /opt/aerospike/bin/asadm/asadm - # (inside an asadm directory). - mv aerospike/pkg/opt/aerospike/bin/asadm /usr/lib/; \ - else \ - mkdir /usr/lib/asadm; \ - mv aerospike/pkg/opt/aerospike/bin/asadm /usr/lib/asadm/; \ - fi; \ - ln -s /usr/lib/asadm/asadm /usr/bin/asadm; \ - if [ -f 'aerospike/pkg/opt/aerospike/bin/asinfo' ]; then \ - # Since tools release 7.1.1, asinfo has been moved from - # /opt/aerospike/bin/asinfo to /opt/aerospike/bin/asadm/asinfo - # (inside an asadm directory). - mv aerospike/pkg/opt/aerospike/bin/asinfo /usr/lib/asadm/; \ - fi; \ - ln -s /usr/lib/asadm/asinfo /usr/bin/asinfo; \ - }; \ - { \ - # 40-cleanup.part - remove extracted aerospike pkg directory. - rm -rf aerospike; \ - }; \ - { \ - # 50-remove-prelude-deb.part - Remove dependencies for scripts. - rm -rf /var/lib/apt/lists/*; \ - dpkg --purge \ - apt-utils \ - binutils \ - ca-certificates \ - curl \ - xz-utils 2>&1; \ - apt-get purge -y; \ - apt-get autoremove -y; \ - unset DEBIAN_FRONTEND; \ - }; \ - echo "done"; - -# Add the Aerospike configuration specific to this dockerfile -COPY aerospike.template.conf /etc/aerospike/aerospike.template.conf - -# Mount the Aerospike data directory -# VOLUME ["/opt/aerospike/data"] -# Mount the Aerospike config directory -# VOLUME ["/etc/aerospike/"] - -# Expose Aerospike ports -# -# 3000 – service port, for client connections -# 3001 – fabric port, for cluster communication -# 3002 – mesh port, for cluster heartbeat -# -EXPOSE 3000 3001 3002 - -COPY entrypoint.sh /entrypoint.sh - -# Tini init set to restart ASD on SIGUSR1 and terminate ASD on SIGTERM -ENTRYPOINT ["/usr/bin/as-tini-static", "-r", "SIGUSR1", "-t", "SIGTERM", "--", "/entrypoint.sh"] - -# Execute the run script in foreground mode -CMD ["asd"] diff --git a/enterprise/debian11/README.md b/enterprise/debian11/README.md deleted file mode 100644 index a0bb028c..00000000 --- a/enterprise/debian11/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Dockerfile Template - -These files are managed by `update.sh`, do not edit files outside of the `template` directory. - -After updating files in the `template` directory, be sure to run `update.sh` before committing. diff --git a/enterprise/debian11/aerospike.template.conf b/enterprise/debian11/aerospike.template.conf deleted file mode 100644 index 6737692b..00000000 --- a/enterprise/debian11/aerospike.template.conf +++ /dev/null @@ -1,67 +0,0 @@ -# Aerospike database configuration file -# This template sets up a single-node, single namespace developer environment. -# -# Alternatively, you can pass in your own configuration file. -# You can see more examples at -# https://github.com/aerospike/aerospike-server/tree/master/as/etc - -# This stanza must come first. -service { - $([ -n "${FEATURE_KEY_FILE}" ] && echo "feature-key-file ${FEATURE_KEY_FILE}") -} - -logging { - $([ -n "${LOGFILE}" ] && echo "# Log file must be an absolute path.") - $([ -n "${LOGFILE}" ] && echo "file ${LOGFILE} {") - $([ -n "${LOGFILE}" ] && echo " context any info") - $([ -n "${LOGFILE}" ] && echo "}") - - # Send log messages to stdout - console { - context any info - } -} - -network { - service { - address ${SERVICE_ADDRESS} - port ${SERVICE_PORT} - - # Uncomment the following to set the 'access-address' parameter to the - # IP address of the Docker host. This will the allow the server to correctly - # publish the address which applications and other nodes in the cluster to - # use when addressing this node. - # access-address - } - - heartbeat { - # mesh is used for environments that do not support multicast - mode mesh - address local - port 3002 - interval 150 - timeout 10 - } - - fabric { - # Intra-cluster communication port (migrates, replication, etc) - # default to same address in 'service' - address local - port 3001 - } - -} - -namespace ${NAMESPACE} { - default-ttl ${DEFAULT_TTL} # use 0 to never expire/evict. - memory-size ${MEM_GB}G - nsup-period ${NSUP_PERIOD} - replication-factor 1 - storage-engine device { - data-in-memory ${DATA_IN_MEMORY} # if true, in-memory, persisted to the filesystem - file /opt/aerospike/data/${NAMESPACE}.dat - filesize ${STORAGE_GB}G - read-page-cache ${READ_PAGE_CACHE} - } -} - diff --git a/enterprise/debian11/entrypoint.sh b/enterprise/debian11/entrypoint.sh deleted file mode 100755 index 1aa9d0ea..00000000 --- a/enterprise/debian11/entrypoint.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash - -set -Eeuo pipefail - -export FEATURE_KEY_FILE=${FEATURE_KEY_FILE:-"/etc/aerospike/features.conf"} -export LOGFILE=${LOGFILE:-""} -export SERVICE_ADDRESS=${SERVICE_ADDRESS:-any} -export SERVICE_PORT=${SERVICE_PORT:-3000} -export NAMESPACE=${NAMESPACE:-test} -export DATA_IN_MEMORY=${DATA_IN_MEMORY:-false} -export DEFAULT_TTL=${DEFAULT_TTL:-30d} -export MEM_GB=${MEM_GB:-1} -export NSUP_PERIOD=${NSUP_PERIOD:-120} -export STORAGE_GB=${STORAGE_GB:-4} - -if [ "${DATA_IN_MEMORY}" = "true" ]; then - export READ_PAGE_CACHE="false" -else - export READ_PAGE_CACHE="true" -fi - -if asd --version | grep -q "Community"; then - FEATURE_KEY_FILE="" # invalid for community edition -fi - -function bash_eval_template() { - local template_file=$1 - local target_file=$2 - - echo "" >"${target_file}" - - while IFS= read -r line; do - if grep -qE "[$][(]|[{]" <<<"${line}"; then - local update - update=$(eval echo "\"${line}\"") || exit 1 - grep -qE "[^[:space:]]*" <<<"${update}" && echo "${update}" >>"${target_file}" - else - echo "${line}" >>"${target_file}" - fi - done <"${template_file}" - - # Ignore failure when template is mounted in a read-only filesystem. - rm "${template_file}" || true -} - -# Fill out conffile with above values -if [ -f /etc/aerospike/aerospike.template.conf ]; then - conf=/etc/aerospike/aerospike.conf - template=/etc/aerospike/aerospike.template.conf - - bash_eval_template "${template}" "${conf}" -fi - -# if command starts with an option, prepend asd -if [ "${1:0:1}" = '-' ]; then - set -- asd "$@" -fi - -# if asd is specified for the command, start it with any given options -if [ "$1" = 'asd' ]; then - NETLINK=${NETLINK:-eth0} - - # We will wait a bit for the network link to be up. - NETLINK_UP=0 - NETLINK_COUNT=0 - - echo "link ${NETLINK} state $(cat /sys/class/net/"${NETLINK}"/operstate)" - - while [ ${NETLINK_UP} -eq 0 ] && [ ${NETLINK_COUNT} -lt 20 ]; do - if grep -q "up" /sys/class/net/"${NETLINK}"/operstate; then - NETLINK_UP=1 - else - sleep 0.1 - ((++NETLINK_COUNT)) - fi - done - - echo "link ${NETLINK} state $(cat /sys/class/net/"${NETLINK}"/operstate) in ${NETLINK_COUNT}" - # asd should always run in the foreground. - set -- "$@" --foreground -fi - -exec "$@" diff --git a/federal/debian11/Dockerfile b/federal/debian11/Dockerfile deleted file mode 100644 index d63233e6..00000000 --- a/federal/debian11/Dockerfile +++ /dev/null @@ -1,190 +0,0 @@ - -# -# Aerospike Server Dockerfile -# -# http://github.com/aerospike/aerospike-server.docker -# - -FROM debian:bullseye-slim - -# AEROSPIKE_EDITION - required - must be "community", "enterprise", or -# "federal". -# By selecting "community" you agree to the "COMMUNITY_LICENSE". -# By selecting "enterprise" you agree to the "ENTERPRISE_LICENSE". -# By selecting "federal" you agree to the "FEDERAL_LICENSE" -ARG AEROSPIKE_EDITION="federal" - -ARG AEROSPIKE_X86_64_LINK="https://artifacts.aerospike.com/aerospike-server-federal/6.3.0.12/aerospike-server-federal_6.3.0.12_tools-8.5.1_debian11_x86_64.tgz" -ARG AEROSPIKE_SHA_X86_64="0f6eddc6f24b1d252d37002d1ed07a9036825953ac3fa2f32e3e3a08cc575763" -ARG AEROSPIKE_AARCH64_LINK="" -ARG AEROSPIKE_SHA_AARCH64="" - -SHELL ["/bin/bash", "-Eeuo", "pipefail", "-c"] - -# Install Aerospike Server and Tools -RUN \ - { \ - # 00-prelude-deb.part - Setup dependencies for scripts. - export DEBIAN_FRONTEND=noninteractive; \ - apt-get update -y; \ - apt-get install -y --no-install-recommends apt-utils; \ - apt-get install -y --no-install-recommends \ - binutils \ - ca-certificates \ - curl \ - xz-utils; \ - }; \ - { \ - # 00-prelude-deb.part - Install procps for tests. - apt-get install -y --no-install-recommends procps; \ - }; \ - { \ - # 10-download.part - Vars used for tini and tools. - VERSION="$(grep -oE "/[0-9]+[.][0-9]+[.][0-9]+([.][0-9]+)+(-rc[0-9]+)*/" <<<"${AEROSPIKE_X86_64_LINK}" | tr -d '/')"; \ - }; \ - { \ - # 10-common.part - Install tini. - ARCH="$(dpkg --print-architecture)"; \ - if [ "${ARCH}" = "amd64" ]; then \ - sha256=d1f6826dd70cdd88dde3d5a20d8ed248883a3bc2caba3071c8a3a9b0e0de5940; \ - suffix=""; \ - elif [ "${ARCH}" = "arm64" ]; then \ - sha256=1c398e5283af2f33888b7d8ac5b01ac89f777ea27c85d25866a40d1e64d0341b; \ - suffix="-arm64"; \ - else \ - echo "Unsuported architecture - ${ARCH}" >&2; \ - exit 1; \ - fi; \ - curl -fsSL "https://github.com/aerospike/tini/releases/download/1.0.1/as-tini-static${suffix}" --output /usr/bin/as-tini-static; \ - echo "${sha256} /usr/bin/as-tini-static" | sha256sum -c -; \ - chmod +x /usr/bin/as-tini-static; \ - }; \ - { \ - # 10-download.part - Download server and tools. - ARCH="$(dpkg --print-architecture)"; \ - mkdir -p aerospike/pkg; \ - if [ "${ARCH}" = "amd64" ]; then \ - pkg_link="${AEROSPIKE_X86_64_LINK}"; \ - sha256="${AEROSPIKE_SHA_X86_64}"; \ - elif [ "${ARCH}" = "arm64" ]; then \ - pkg_link="${AEROSPIKE_AARCH64_LINK}"; \ - sha256="${AEROSPIKE_SHA_AARCH64}"; \ - else \ - echo "Unsuported architecture - ${ARCH}" >&2; \ - exit 1; \ - fi; \ - if ! curl -fsSL "${pkg_link}" --output aerospike-server.tgz; then \ - echo "Could not fetch pkg - ${pkg_link}" >&2; \ - exit 1; \ - fi; \ - echo "${sha256} aerospike-server.tgz" | sha256sum -c -; \ - tar xzf aerospike-server.tgz --strip-components=1 -C aerospike; \ - rm aerospike-server.tgz; \ - # These directories are required for backward compatibility. - mkdir -p /var/{log,run}/aerospike; \ - # Copy license file to standard location. - mkdir -p /licenses; \ - cp aerospike/LICENSE /licenses; \ - }; \ - { \ - # 20-install-dependencies-deb.part - Install server and dependencies. - if [ "${AEROSPIKE_EDITION}" = "enterprise" ]; then \ - apt-get install -y --no-install-recommends \ - libcurl4 \ - libldap-2.4.2; \ - elif ! [ "$(printf "%s\n%s" "${VERSION}" "6.0" | sort -V | head -1)" != "${VERSION}" ]; then \ - apt-get install -y --no-install-recommends \ - libcurl4; \ - fi; \ - dpkg -i aerospike/aerospike-server-*.deb; \ - rm -rf /opt/aerospike/bin; \ - }; \ - { \ - # 20-install-dependencies-deb.part - Install tools dependencies. - if ! [ "$(printf "%s\n%s" "${VERSION}" "5.1" | sort -V | head -1)" != "${VERSION}" ]; then \ - # Tools before 5.1 need python2. - apt-get install -y --no-install-recommends \ - python2; \ - elif ! [ "$(printf "%s\n%s" "${VERSION}" "6.2.0.3" | sort -V | head -1)" != "${VERSION}" ]; then \ - # Tools before 6.0 need python3. - apt-get install -y --no-install-recommends \ - python3 \ - python3-distutils; \ - fi; \ - # Tools after 6.0 bundled their own python interpreter. - }; \ - { \ - # 20-install-dependencies-deb.part - Extract tools. - # ar on debian10 doesn't support '--output' - pushd aerospike/pkg || exit 1; \ - ar -x ../aerospike-tools*.deb; \ - popd || exit 1; \ - tar xf aerospike/pkg/data.tar.xz -C aerospike/pkg/; \ - }; \ - { \ - # 30-install-tools.part - install asinfo and asadm. - find aerospike/pkg/opt/aerospike/bin/ -user aerospike -group aerospike -exec chown root:root {} +; \ - mv aerospike/pkg/etc/aerospike/astools.conf /etc/aerospike; \ - if ! [ "$(printf "%s\n%s" "${VERSION}" "6.2" | sort -V | head -1)" != "${VERSION}" ]; then \ - mv aerospike/pkg/opt/aerospike/bin/aql /usr/bin; \ - fi; \ - if [ -d 'aerospike/pkg/opt/aerospike/bin/asadm' ]; then \ - # Since tools release 7.0.5, asadm has been moved from - # /opt/aerospike/bin/asadm to /opt/aerospike/bin/asadm/asadm - # (inside an asadm directory). - mv aerospike/pkg/opt/aerospike/bin/asadm /usr/lib/; \ - else \ - mkdir /usr/lib/asadm; \ - mv aerospike/pkg/opt/aerospike/bin/asadm /usr/lib/asadm/; \ - fi; \ - ln -s /usr/lib/asadm/asadm /usr/bin/asadm; \ - if [ -f 'aerospike/pkg/opt/aerospike/bin/asinfo' ]; then \ - # Since tools release 7.1.1, asinfo has been moved from - # /opt/aerospike/bin/asinfo to /opt/aerospike/bin/asadm/asinfo - # (inside an asadm directory). - mv aerospike/pkg/opt/aerospike/bin/asinfo /usr/lib/asadm/; \ - fi; \ - ln -s /usr/lib/asadm/asinfo /usr/bin/asinfo; \ - }; \ - { \ - # 40-cleanup.part - remove extracted aerospike pkg directory. - rm -rf aerospike; \ - }; \ - { \ - # 50-remove-prelude-deb.part - Remove dependencies for scripts. - rm -rf /var/lib/apt/lists/*; \ - dpkg --purge \ - apt-utils \ - binutils \ - ca-certificates \ - curl \ - xz-utils 2>&1; \ - apt-get purge -y; \ - apt-get autoremove -y; \ - unset DEBIAN_FRONTEND; \ - }; \ - echo "done"; - -# Add the Aerospike configuration specific to this dockerfile -COPY aerospike.template.conf /etc/aerospike/aerospike.template.conf - -# Mount the Aerospike data directory -# VOLUME ["/opt/aerospike/data"] -# Mount the Aerospike config directory -# VOLUME ["/etc/aerospike/"] - -# Expose Aerospike ports -# -# 3000 – service port, for client connections -# 3001 – fabric port, for cluster communication -# 3002 – mesh port, for cluster heartbeat -# -EXPOSE 3000 3001 3002 - -COPY entrypoint.sh /entrypoint.sh - -# Tini init set to restart ASD on SIGUSR1 and terminate ASD on SIGTERM -ENTRYPOINT ["/usr/bin/as-tini-static", "-r", "SIGUSR1", "-t", "SIGTERM", "--", "/entrypoint.sh"] - -# Execute the run script in foreground mode -CMD ["asd"] diff --git a/federal/debian11/README.md b/federal/debian11/README.md deleted file mode 100644 index a0bb028c..00000000 --- a/federal/debian11/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Dockerfile Template - -These files are managed by `update.sh`, do not edit files outside of the `template` directory. - -After updating files in the `template` directory, be sure to run `update.sh` before committing. diff --git a/federal/debian11/aerospike.template.conf b/federal/debian11/aerospike.template.conf deleted file mode 100644 index 6737692b..00000000 --- a/federal/debian11/aerospike.template.conf +++ /dev/null @@ -1,67 +0,0 @@ -# Aerospike database configuration file -# This template sets up a single-node, single namespace developer environment. -# -# Alternatively, you can pass in your own configuration file. -# You can see more examples at -# https://github.com/aerospike/aerospike-server/tree/master/as/etc - -# This stanza must come first. -service { - $([ -n "${FEATURE_KEY_FILE}" ] && echo "feature-key-file ${FEATURE_KEY_FILE}") -} - -logging { - $([ -n "${LOGFILE}" ] && echo "# Log file must be an absolute path.") - $([ -n "${LOGFILE}" ] && echo "file ${LOGFILE} {") - $([ -n "${LOGFILE}" ] && echo " context any info") - $([ -n "${LOGFILE}" ] && echo "}") - - # Send log messages to stdout - console { - context any info - } -} - -network { - service { - address ${SERVICE_ADDRESS} - port ${SERVICE_PORT} - - # Uncomment the following to set the 'access-address' parameter to the - # IP address of the Docker host. This will the allow the server to correctly - # publish the address which applications and other nodes in the cluster to - # use when addressing this node. - # access-address - } - - heartbeat { - # mesh is used for environments that do not support multicast - mode mesh - address local - port 3002 - interval 150 - timeout 10 - } - - fabric { - # Intra-cluster communication port (migrates, replication, etc) - # default to same address in 'service' - address local - port 3001 - } - -} - -namespace ${NAMESPACE} { - default-ttl ${DEFAULT_TTL} # use 0 to never expire/evict. - memory-size ${MEM_GB}G - nsup-period ${NSUP_PERIOD} - replication-factor 1 - storage-engine device { - data-in-memory ${DATA_IN_MEMORY} # if true, in-memory, persisted to the filesystem - file /opt/aerospike/data/${NAMESPACE}.dat - filesize ${STORAGE_GB}G - read-page-cache ${READ_PAGE_CACHE} - } -} - diff --git a/federal/debian11/entrypoint.sh b/federal/debian11/entrypoint.sh deleted file mode 100755 index 1aa9d0ea..00000000 --- a/federal/debian11/entrypoint.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash - -set -Eeuo pipefail - -export FEATURE_KEY_FILE=${FEATURE_KEY_FILE:-"/etc/aerospike/features.conf"} -export LOGFILE=${LOGFILE:-""} -export SERVICE_ADDRESS=${SERVICE_ADDRESS:-any} -export SERVICE_PORT=${SERVICE_PORT:-3000} -export NAMESPACE=${NAMESPACE:-test} -export DATA_IN_MEMORY=${DATA_IN_MEMORY:-false} -export DEFAULT_TTL=${DEFAULT_TTL:-30d} -export MEM_GB=${MEM_GB:-1} -export NSUP_PERIOD=${NSUP_PERIOD:-120} -export STORAGE_GB=${STORAGE_GB:-4} - -if [ "${DATA_IN_MEMORY}" = "true" ]; then - export READ_PAGE_CACHE="false" -else - export READ_PAGE_CACHE="true" -fi - -if asd --version | grep -q "Community"; then - FEATURE_KEY_FILE="" # invalid for community edition -fi - -function bash_eval_template() { - local template_file=$1 - local target_file=$2 - - echo "" >"${target_file}" - - while IFS= read -r line; do - if grep -qE "[$][(]|[{]" <<<"${line}"; then - local update - update=$(eval echo "\"${line}\"") || exit 1 - grep -qE "[^[:space:]]*" <<<"${update}" && echo "${update}" >>"${target_file}" - else - echo "${line}" >>"${target_file}" - fi - done <"${template_file}" - - # Ignore failure when template is mounted in a read-only filesystem. - rm "${template_file}" || true -} - -# Fill out conffile with above values -if [ -f /etc/aerospike/aerospike.template.conf ]; then - conf=/etc/aerospike/aerospike.conf - template=/etc/aerospike/aerospike.template.conf - - bash_eval_template "${template}" "${conf}" -fi - -# if command starts with an option, prepend asd -if [ "${1:0:1}" = '-' ]; then - set -- asd "$@" -fi - -# if asd is specified for the command, start it with any given options -if [ "$1" = 'asd' ]; then - NETLINK=${NETLINK:-eth0} - - # We will wait a bit for the network link to be up. - NETLINK_UP=0 - NETLINK_COUNT=0 - - echo "link ${NETLINK} state $(cat /sys/class/net/"${NETLINK}"/operstate)" - - while [ ${NETLINK_UP} -eq 0 ] && [ ${NETLINK_COUNT} -lt 20 ]; do - if grep -q "up" /sys/class/net/"${NETLINK}"/operstate; then - NETLINK_UP=1 - else - sleep 0.1 - ((++NETLINK_COUNT)) - fi - done - - echo "link ${NETLINK} state $(cat /sys/class/net/"${NETLINK}"/operstate) in ${NETLINK_COUNT}" - # asd should always run in the foreground. - set -- "$@" --foreground -fi - -exec "$@"