diff --git a/.github/workflows/package-tests.yml b/.github/workflows/package-tests.yml deleted file mode 100644 index 0d401807..00000000 --- a/.github/workflows/package-tests.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: citus-package-tests - -on: - push: - branches: - - "**" - - workflow_dispatch: - inputs: - project_version: - description: "The version to be tested" - required: true - -jobs: - metadata: - runs-on: ubuntu-latest - outputs: - pg_versions: ${{ steps.generate-postgres.outputs.pg_versions }} - citus_version: ${{ steps.get-citus-version.outputs.citus_version }} - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - name: Package version - id: get-citus-version - run: | - echo ${{ github.event.inputs.project_version }} - echo "Version: ${{ github.event.inputs.project_version }}" - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources - - name: Install python requirements - run: python -m pip install -r packaging_automation/requirements.txt - - name: generate postgres - id: generate-postgres - run: | - export PROJECT_VERSION="${{ github.event.inputs.project_version }}" - echo "project_version: ${{ github.event.inputs.project_version }}" - # To be able to test pipeline without triggering with project_version parameter using workflow_dispatch parameter, - # if workflow_dispatch parameter is empty, 12.1.5 parameter is set to execute pipeline. - [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=12.1.5 - POSTGRES_VERSIONS=$(python -m packaging_automation.get_postgres_versions --project_version ${PROJECT_VERSION}) - echo "Postgres Version: ${POSTGRES_VERSIONS}" - echo "::set-output name=pg_versions::${POSTGRES_VERSIONS}" - test_execution: - runs-on: ubuntu-latest - needs: metadata - strategy: - fail-fast: false - matrix: - platform: - - centos/8 - - el/9 - - ol/9 - - debian/bullseye - - debian/bookworm - - ubuntu/jammy - pg: ${{ fromJson(needs.metadata.outputs.pg_versions) }} - env: - PLATFORM: ${{ matrix.platform }} - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources - - - name: Install python requirements - run: python -m pip install -r packaging_automation/requirements.txt - - - name: Citus package tests - run: | - export PROJECT_VERSION="${{ github.event.inputs.project_version }}" - echo "Citus Version: ${PROJECT_VERSION} " - [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=12.1.5 - python -m packaging_automation.test_citus_package \ - --project_version "${PROJECT_VERSION}" \ - --os_release ${{ matrix.platform }} \ - --pg_major_version ${{ matrix.pg }} diff --git a/packaging_automation/get_postgres_versions.py b/packaging_automation/get_postgres_versions.py index ad2a52f1..fd4aefea 100644 --- a/packaging_automation/get_postgres_versions.py +++ b/packaging_automation/get_postgres_versions.py @@ -1,7 +1,28 @@ import argparse import json +import requests + +from typing import List + +from .common_tool_methods import ( + get_supported_postgres_release_versions, +) + +POSTGRES_MATRIX_FILE = "postgres-matrix.yml" +POSTGRES_MATRIX_WEB_ADDRESS = "https://raw.githubusercontent.com/citusdata/packaging/all-citus/postgres-matrix.yml" + + +def get_postgres_versions_from_matrix_file(project_version: str) -> List[str]: + r = requests.get(POSTGRES_MATRIX_WEB_ADDRESS, allow_redirects=True, timeout=60) + + with open(POSTGRES_MATRIX_FILE, "wb") as writer: + writer.write(r.content) + pg_versions = get_supported_postgres_release_versions( + POSTGRES_MATRIX_FILE, project_version + ) + + return pg_versions -from .test_citus_package import get_postgres_versions_from_matrix_file if __name__ == "__main__": parser = argparse.ArgumentParser() diff --git a/packaging_automation/test_citus_package.py b/packaging_automation/test_citus_package.py deleted file mode 100644 index 6705e78d..00000000 --- a/packaging_automation/test_citus_package.py +++ /dev/null @@ -1,133 +0,0 @@ -import argparse -import os -import subprocess -import shlex -import requests -from enum import Enum -import sys -from typing import List - -from .common_tool_methods import ( - get_supported_postgres_release_versions, - get_minor_version, -) - -POSTGRES_MATRIX_FILE = "postgres-matrix.yml" -POSTGRES_MATRIX_WEB_ADDRESS = "https://raw.githubusercontent.com/citusdata/packaging/all-citus/postgres-matrix.yml" - - -def run_command(command: str) -> int: - with subprocess.Popen( - shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) as process: - for line in iter(process.stdout.readline, b""): # b'\n'-separated lines - print(line.decode("utf-8"), end=" ") - exitcode = process.wait() - return exitcode - - -class TestPlatform(Enum): - el_7 = {"name": "el/7", "docker_image_name": "el-7"} - el_8 = {"name": "el/8", "docker_image_name": "el-8"} - el_9 = {"name": "el/9", "docker_image_name": "almalinux-9"} - centos_8 = {"name": "centos/8", "docker_image_name": "centos-8"} - centos_7 = {"name": "centos/7", "docker_image_name": "centos-7"} - ol_7 = {"name": "ol/7", "docker_image_name": "ol-7"} - ol_8 = {"name": "ol/8", "docker_image_name": "ol-8"} - ol_9 = {"name": "ol/9", "docker_image_name": "ol-9"} - debian_stretch = {"name": "debian/stretch", "docker_image_name": "debian-stretch"} - debian_buster = {"name": "debian/buster", "docker_image_name": "debian-buster"} - debian_bullseye = { - "name": "debian/bullseye", - "docker_image_name": "debian-bullseye", - } - debian_bookworm = { - "name": "debian/bookworm", - "docker_image_name": "debian-bookworm", - } - debian_trixie = {"name": "debian/trixie", "docker_image_name": "debian-trixie"} - ubuntu_bionic = {"name": "ubuntu/bionic", "docker_image_name": "ubuntu-bionic"} - ubuntu_focal = {"name": "ubuntu/focal", "docker_image_name": "ubuntu-focal"} - ubuntu_jammy = {"name": "ubuntu/jammy", "docker_image_name": "ubuntu-jammy"} - ubuntu_noble = {"name": "ubuntu/noble", "docker_image_name": "ubuntu-noble"} - ubuntu_kinetic = {"name": "ubuntu/kinetic", "docker_image_name": "ubuntu-kinetic"} - undefined = {"name": "undefined", "docker_image_name": "undefined"} - - -def get_test_platform_for_os_release(os_release: str) -> TestPlatform: - result = TestPlatform.undefined - for tp in TestPlatform: - if tp.value["name"] == os_release: - result = tp - return result - - -def get_postgres_versions_from_matrix_file(project_version: str) -> List[str]: - r = requests.get(POSTGRES_MATRIX_WEB_ADDRESS, allow_redirects=True, timeout=60) - - with open(POSTGRES_MATRIX_FILE, "wb") as writer: - writer.write(r.content) - pg_versions = get_supported_postgres_release_versions( - POSTGRES_MATRIX_FILE, project_version - ) - - return pg_versions - - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument("--project_version", required=True) - parser.add_argument("--pg_major_version") - parser.add_argument("--os_release", choices=[t.value["name"] for t in TestPlatform]) - - args = parser.parse_args() - test_platform = get_test_platform_for_os_release(args.os_release) - minor_project_version = get_minor_version(args.project_version) - - platform = args.os_release - - postgres_versions = get_postgres_versions_from_matrix_file(args.project_version) - - print(f"This version of Citus supports following pg versions: {postgres_versions}") - - os.chdir("test-images") - return_codes = {} - - if args.pg_major_version: - postgres_versions = [p for p in postgres_versions if p == args.pg_major_version] - - if len(postgres_versions) == 0: - raise ValueError("At least one supported postgres version is required") - - for postgres_version in postgres_versions: - print(f"Testing package for following pg version: {postgres_version}") - docker_image_name = ( - f"test:{test_platform.value['docker_image_name']}-{postgres_version}" - ) - build_command = ( - f"docker build --pull --no-cache " - f"-t {docker_image_name} " - f"-f {test_platform.value['docker_image_name']}/Dockerfile " - f"--build-arg CITUS_VERSION={args.project_version} " - f"--build-arg PG_MAJOR={postgres_version} " - f"--build-arg CITUS_MAJOR_VERSION={minor_project_version} ." - ) - print(build_command) - return_build = run_command(build_command) - return_run = run_command( - f"docker run -e POSTGRES_VERSION={postgres_version} {docker_image_name} " - ) - return_codes[f"{docker_image_name}-build"] = return_build - return_codes[f"{docker_image_name}-run"] = return_run - - error_exists = False - print("-----------------Summary Report------------------") - for key, value in return_codes.items(): - if value > 0: - error_exists = True - print(f"{key}: {'Success' if value == 0 else f'Fail. ErrorCode: {value}'}") - summary_error = "FAILED :(" if error_exists else "SUCCESS :)" - print(f"------------------------{summary_error}------------------------") - - if error_exists: - sys.exit("Failed") diff --git a/test-images/almalinux-9/Dockerfile b/test-images/almalinux-9/Dockerfile deleted file mode 100644 index 74418740..00000000 --- a/test-images/almalinux-9/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -FROM almalinux:9 -ARG CITUS_VERSION -# Format should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 -ARG PACKAGE_RELEASE_SUFFIX=el9 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - - -RUN yum update -y - - -# TODO Parameterize Citus and postgres version -RUN export CITUS_MAJOR_VER=${CITUS_MAJOR_VERSION//./} && \ - curl https://raw.githubusercontent.com/citusdata/packaging/gh-pages/community/rpm.sh | bash && \ - yum install -y citus${CITUS_MAJOR_VER}_${PG_MAJOR}-${CITUS_VERSION}.citus-${FANCY}.${PACKAGE_RELEASE_SUFFIX} \ - hll_${PG_MAJOR}-${HLL_VERSION}.${PACKAGE_RELEASE_SUFFIX} \ - topn_${PG_MAJOR}-${TOPN_VERSION}.${PACKAGE_RELEASE_SUFFIX} - - -ARG POSTGRES_HOME=/var/lib/pgsql -ENV PATH=/usr/pgsql-${PG_MAJOR}/bin:${PATH}:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - - - - - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Enable EPEL repository and install dependencies for Python 3.8 -RUN yum install -y epel-release && \ - yum install -y gcc make libcurl-devel openssl-devel bzip2-devel libffi-devel xz-devel wget tar zlib-devel && \ - wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz && \ - tar xvf Python-3.8.12.tgz && \ - cd Python-3.8.12 && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - - -COPY scripts/* ./ - -# Use pip-tools to compile and install requirements -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] - diff --git a/test-images/centos-7/Dockerfile b/test-images/centos-7/Dockerfile deleted file mode 100644 index c5cd69ca..00000000 --- a/test-images/centos-7/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -FROM centos:7 - -ARG CITUS_VERSION -# Format should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 -ARG PACKAGE_RELEASE_SUFFIX=el7 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - - -RUN yum update -y && \ - yum install -y curl - - -# TODO Parameterize Citus and postgres version -RUN export CITUS_MAJOR_VER=${CITUS_MAJOR_VERSION//./} && \ - curl https://install.citusdata.com/community/rpm.sh | bash && \ - yum install -y citus${CITUS_MAJOR_VER}_${PG_MAJOR}-${CITUS_VERSION}.citus-${FANCY}.${PACKAGE_RELEASE_SUFFIX} \ - hll_${PG_MAJOR}-${HLL_VERSION}.${PACKAGE_RELEASE_SUFFIX} \ - topn_${PG_MAJOR}-${TOPN_VERSION}.${PACKAGE_RELEASE_SUFFIX} - - - -ARG POSTGRES_HOME=/var/lib/pgsql -ENV PATH=/usr/pgsql-${PG_MAJOR}/bin:${PATH}:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - - - - - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN yum install -y gcc make && \ - yum -y install libcurl-devel \ - openssl-devel \ - bzip2-devel \ - libffi-devel \ - xz-devel \ - python38-devel \ - openssl-devel &&\ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/centos-8/Dockerfile b/test-images/centos-8/Dockerfile deleted file mode 100644 index c2a3c058..00000000 --- a/test-images/centos-8/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -FROM centos:8 - -ARG CITUS_VERSION -# Format should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 -ARG PACKAGE_RELEASE_SUFFIX=el8 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -RUN cd /etc/yum.repos.d/ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ - && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-* - -RUN yum update -y && \ - yum install -y curl - - -# TODO Parameterize Citus and postgres version -RUN export CITUS_MAJOR_VER=${CITUS_MAJOR_VERSION//./} && \ - curl https://install.citusdata.com/community/rpm.sh | bash && \ - yum install -y citus${CITUS_MAJOR_VER}_${PG_MAJOR}-${CITUS_VERSION}.citus-${FANCY}.${PACKAGE_RELEASE_SUFFIX} \ - hll_${PG_MAJOR}-${HLL_VERSION}.${PACKAGE_RELEASE_SUFFIX} \ - topn_${PG_MAJOR}-${TOPN_VERSION}.${PACKAGE_RELEASE_SUFFIX} - - - -ARG POSTGRES_HOME=/var/lib/pgsql -ENV PATH=/usr/pgsql-${PG_MAJOR}/bin:${PATH}:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - - - - - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN yum install -y gcc make && \ - yum -y install libcurl-devel \ - openssl-devel \ - bzip2-devel \ - libffi-devel \ - xz-devel \ - python38-devel \ - openssl-devel &&\ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/debian-bookworm/Dockerfile b/test-images/debian-bookworm/Dockerfile deleted file mode 100644 index 5a802b9c..00000000 --- a/test-images/debian-bookworm/Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -FROM debian:bookworm -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/debian-bullseye/Dockerfile b/test-images/debian-bullseye/Dockerfile deleted file mode 100644 index 8ad82e50..00000000 --- a/test-images/debian-bullseye/Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -FROM debian:bullseye -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/debian-buster/Dockerfile b/test-images/debian-buster/Dockerfile deleted file mode 100644 index efa25676..00000000 --- a/test-images/debian-buster/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM debian:buster -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/debian-stretch/Dockerfile b/test-images/debian-stretch/Dockerfile deleted file mode 100644 index b5dd77b0..00000000 --- a/test-images/debian-stretch/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM debian:stretch -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/debian-trixie/Dockerfile b/test-images/debian-trixie/Dockerfile deleted file mode 100644 index 5a6403a9..00000000 --- a/test-images/debian-trixie/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM debian:trixie -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - # software-properties-common Commenting out as it is not available in debian base image - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/el-7/Dockerfile b/test-images/el-7/Dockerfile deleted file mode 100644 index ff42ec93..00000000 --- a/test-images/el-7/Dockerfile +++ /dev/null @@ -1,71 +0,0 @@ -FROM registry.access.redhat.com/ubi7 - -ARG CITUS_VERSION -# Format should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 -ARG PACKAGE_RELEASE_SUFFIX=el7 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - - -RUN yum update -y && \ - yum install -y curl - - -# TODO Parameterize Citus and postgres version -RUN export CITUS_MAJOR_VER=${CITUS_MAJOR_VERSION//./} && \ - curl https://install.citusdata.com/community/rpm.sh | bash && \ - yum install -y citus${CITUS_MAJOR_VER}_${PG_MAJOR}-${CITUS_VERSION}.citus-${FANCY}.${PACKAGE_RELEASE_SUFFIX} \ - hll_${PG_MAJOR}-${HLL_VERSION}.${PACKAGE_RELEASE_SUFFIX} \ - topn_${PG_MAJOR}-${TOPN_VERSION}.${PACKAGE_RELEASE_SUFFIX} - - - -ARG POSTGRES_HOME=/var/lib/pgsql -ENV PATH=/usr/pgsql-${PG_MAJOR}/bin:${PATH}:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - - - - - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN yum install -y gcc make && \ - yum groupinstall -y 'Development Tools' && \ - yum -y install libcurl-devel \ - openssl-devel \ - bzip2-devel \ - libffi-devel \ - xz-devel \ - python38-devel \ - openssl-devel &&\ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/el-8/Dockerfile b/test-images/el-8/Dockerfile deleted file mode 100644 index 4a62ddf4..00000000 --- a/test-images/el-8/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -FROM registry.access.redhat.com/ubi8 - -ARG CITUS_VERSION -# Format should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 -ARG PACKAGE_RELEASE_SUFFIX=el8 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - - -RUN yum update -y && \ - yum install -y curl - - -# TODO Parameterize Citus and postgres version -RUN export CITUS_MAJOR_VER=${CITUS_MAJOR_VERSION//./} && \ - curl https://install.citusdata.com/community/rpm.sh | bash && \ - yum install -y citus${CITUS_MAJOR_VER}_${PG_MAJOR}-${CITUS_VERSION}.citus-${FANCY}.${PACKAGE_RELEASE_SUFFIX} \ - hll_${PG_MAJOR}-${HLL_VERSION}.${PACKAGE_RELEASE_SUFFIX} \ - topn_${PG_MAJOR}-${TOPN_VERSION}.${PACKAGE_RELEASE_SUFFIX} - - - -ARG POSTGRES_HOME=/var/lib/pgsql -ENV PATH=/usr/pgsql-${PG_MAJOR}/bin:${PATH}:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - - - - - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN yum install -y gcc make && \ - yum -y install libcurl-devel \ - openssl-devel \ - bzip2-devel \ - libffi-devel \ - xz-devel \ - python38-devel \ - openssl-devel &&\ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/ol-7/Dockerfile b/test-images/ol-7/Dockerfile deleted file mode 100644 index 4c6ed510..00000000 --- a/test-images/ol-7/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM oraclelinux:7 - -ARG CITUS_VERSION -# Format should be X.Y and should include dots e.g for 10.2.1=>10.2 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 -ARG PACKAGE_RELEASE_SUFFIX=el7 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - - -RUN yum update -y && \ - yum install -y curl - - -RUN export CITUS_MAJOR_VER=${CITUS_MAJOR_VERSION//./} && \ - curl https://install.citusdata.com/community/rpm.sh | bash && \ - yum install -y citus${CITUS_MAJOR_VER}_${PG_MAJOR}-${CITUS_VERSION}.citus-${FANCY}.${PACKAGE_RELEASE_SUFFIX} \ - hll_${PG_MAJOR}-${HLL_VERSION}.${PACKAGE_RELEASE_SUFFIX} \ - topn_${PG_MAJOR}-${TOPN_VERSION}.${PACKAGE_RELEASE_SUFFIX} - -ARG POSTGRES_HOME=/var/lib/pgsql -ENV PATH=/usr/pgsql-${PG_MAJOR}/bin:${PATH}:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN yum install -y gcc make && \ - yum -y install libcurl-devel \ - openssl-devel \ - bzip2-devel \ - libffi-devel \ - xz-devel \ - python38-devel \ - libzstd-devel \ - openssl-devel &&\ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/ol-9/Dockerfile b/test-images/ol-9/Dockerfile deleted file mode 100644 index d79fdcc5..00000000 --- a/test-images/ol-9/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -FROM oraclelinux:9 - -ARG CITUS_VERSION -# Format should be X.Y and should include dots e.g for 10.2.1=>10.2 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 -ARG PACKAGE_RELEASE_SUFFIX=el9 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - - -RUN yum update -y && \ - yum install -y curl - - -RUN export CITUS_MAJOR_VER=${CITUS_MAJOR_VERSION//./} && \ - curl https://install.citusdata.com/community/rpm.sh | bash && \ - yum install -y citus${CITUS_MAJOR_VER}_${PG_MAJOR}-${CITUS_VERSION}.citus-${FANCY}.${PACKAGE_RELEASE_SUFFIX} \ - hll_${PG_MAJOR}-${HLL_VERSION}.${PACKAGE_RELEASE_SUFFIX} \ - topn_${PG_MAJOR}-${TOPN_VERSION}.${PACKAGE_RELEASE_SUFFIX} - -ARG POSTGRES_HOME=/var/lib/pgsql -ENV PATH=/usr/pgsql-${PG_MAJOR}/bin:${PATH}:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN yum install -y gcc make && \ - yum -y install libcurl-devel \ - openssl-devel \ - bzip2-devel \ - libffi-devel \ - xz-devel \ - libzstd-devel \ - zlib-devel &&\ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/scripts/requirements.in b/test-images/scripts/requirements.in deleted file mode 100644 index ab9c488d..00000000 --- a/test-images/scripts/requirements.in +++ /dev/null @@ -1,16 +0,0 @@ -docker -GitPython -Jinja2 -parameters_validation -pathlib2 -pycurl<7.45.0 -PyGithub -pytest -python-gnupg -python-string-utils -PyYAML -requests -SQLAlchemy -urllib3 -wheel -python-dotenv diff --git a/test-images/scripts/test.py b/test-images/scripts/test.py deleted file mode 100644 index dd3132b8..00000000 --- a/test-images/scripts/test.py +++ /dev/null @@ -1,72 +0,0 @@ -import subprocess -import shlex -from enum import Enum -import os -import re - -CITUS_VERSION = os.getenv("CITUS_VERSION") -POSTGRES_VERSION = os.getenv("POSTGRES_VERSION") - - -def run_with_output(command, *args, **kwargs): - # this method's main objective is to return output. Therefore it is caller's responsibility to handle - # success status - # pylint: disable=subprocess-run-check - result = subprocess.run(shlex.split(command), *args, capture_output=True, **kwargs) - return result - - -class VerificationType(Enum): - equals = 1 - contains = 2 - - -def verify( - output, - expected_result, - verification_type: VerificationType = VerificationType.equals, -) -> bool: - if verification_type == VerificationType.equals: - return_value = output == expected_result - elif VerificationType.contains: - return_value = expected_result in output - else: - return_value = False - return return_value - - -def verify_output(result, expected_result) -> bool: - if result.returncode != 0: - print(result.stderr.decode("utf-8")) - print(f"Error: Error Code : {result.returncode}") - return False - output = result.stdout.decode("utf-8") - print("Result:") - print(output) - if re.match(expected_result, repr(output)): - print(output) - return True - - print(rf"Expected Result: {expected_result}") - print(rf"Actual Result: {repr(output)}") - return False - - -def test_citus(): - assert verify_output( - run_with_output('pg_ctl -D citus -o "-p 9700" -l citus/citus_logfile start'), - r"^'waiting for server to start.... done\\nserver started\\n'$", - ) - assert verify_output( - run_with_output('psql -p 9700 -c "CREATE EXTENSION citus;"'), - r"^'CREATE EXTENSION\\n'$", - ) - assert verify_output( - run_with_output('psql -p 9700 -c "select version();"'), - rf".*PostgreSQL {POSTGRES_VERSION}.* on x86_64-pc-linux-gnu, compiled by gcc \(.*", - ) - # Since version info for ol and el 7 contains undefined, undefined was needed to add as expected param for pc - assert verify_output( - run_with_output('psql -p 9700 -c "select citus_version();"'), - rf".*Citus {CITUS_VERSION} on x86_64-(pc|unknown)-linux-gnu, compiled by gcc.*", - ) diff --git a/test-images/scripts/test_internal.sh b/test-images/scripts/test_internal.sh deleted file mode 100755 index 6c6db111..00000000 --- a/test-images/scripts/test_internal.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -python3.8 -m pytest -q test.py -s \ No newline at end of file diff --git a/test-images/ubuntu-bionic/Dockerfile b/test-images/ubuntu-bionic/Dockerfile deleted file mode 100644 index 418e40ca..00000000 --- a/test-images/ubuntu-bionic/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM ubuntu:bionic -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/ubuntu-focal/Dockerfile b/test-images/ubuntu-focal/Dockerfile deleted file mode 100644 index de65a8a3..00000000 --- a/test-images/ubuntu-focal/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM ubuntu:focal -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/ubuntu-jammy/Dockerfile b/test-images/ubuntu-jammy/Dockerfile deleted file mode 100644 index 6894a2b4..00000000 --- a/test-images/ubuntu-jammy/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM ubuntu:jammy -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"] diff --git a/test-images/ubuntu-noble/Dockerfile b/test-images/ubuntu-noble/Dockerfile deleted file mode 100644 index 10ff2636..00000000 --- a/test-images/ubuntu-noble/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM ubuntu:noble -ARG CITUS_VERSION -# FOrmat should be XY and should not include dots e.g for 10.2.1=>102 -ARG CITUS_MAJOR_VERSION -ARG PG_MAJOR -ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 - -ENV CITUS_VERSION ${CITUS_VERSION} - -ENV PG_MAJOR ${PG_MAJOR} - -ENV TZ=Europe/Istanbul -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -# install prequisities -RUN apt-get update \ - && apt-get install -y lsb-release \ - apt-utils \ - vim \ - wget \ - curl \ - gnupg2 \ - software-properties-common \ - libcurl4-openssl-dev \ - libssl-dev - - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash -RUN apt-get install -y postgresql-${PG_MAJOR}-citus-${CITUS_MAJOR_VERSION}=${CITUS_VERSION}.citus-${FANCY} \ - postgresql-$PG_MAJOR-hll=${HLL_VERSION} \ - postgresql-$PG_MAJOR-topn=${TOPN_VERSION} \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/*12 - - - -ARG POSTGRES_HOME=/var/lib/postgresql/ -ENV PATH=${PATH}:/usr/lib/postgresql/${PG_MAJOR}/bin:${POSTGRES_HOME} - -WORKDIR ${POSTGRES_HOME} - -RUN mkdir citus && chown postgres citus - -USER postgres -RUN cd ~ && initdb -D citus && echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf - -USER root -# Install python 3.8 and its dependencies -RUN apt-get install -y build-essential \ - libcurl4-openssl-dev \ - libssl-dev \ - zlib1g-dev \ - curl \ - libffi-dev \ - gnupg2 && \ - curl https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz --output Python-3.8.12.tgz &&\ - tar xvf Python-3.8.12.tgz &&\ - cd Python-3.8.*/ && \ - ./configure --enable-optimizations && \ - make altinstall && \ - python3.8 -m pip install pip-tools - -COPY scripts/* ./ - -RUN pip-compile && python3.8 -m pip install -r requirements.txt - -USER postgres - -WORKDIR ${POSTGRES_HOME} - -CMD ["test_internal.sh"]