From 37d5efc52cd519f04db86526fa0182f2ad6341c1 Mon Sep 17 00:00:00 2001 From: Yvonnick Esnault Date: Fri, 29 Oct 2021 08:57:22 +0200 Subject: [PATCH] feat: postgresql 14.0 recommanded (#5990) Signed-off-by: Yvonnick Esnault --- docker-compose.yml | 4 ++-- docs/content/development/contribute/development.md | 2 +- .../hosting/ready-to-run/docker-compose/full-example.md | 2 +- docs/content/hosting/ready-to-run/from-binaries.md | 4 ++-- docs/content/hosting/requirements.md | 2 +- engine/Makefile | 2 +- tests/fixtures/04SCWorkflowRunSimpleService/pipeline.yml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 95bede77ec..cfdb50f9a2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,14 +6,14 @@ version: '3' services: cds-db: - image: postgres:9.6 + image: postgres:14.0 environment: POSTGRES_PASSWORD: cds POSTGRES_USER: cds POSTGRES_DB: cds cds-db-init: - image: postgres:9.6 + image: postgres:14.0 command: > sh -exc " PGPASSWORD=cds psql -h cds-db -p 5432 -U cds -d cds -c \"CREATE SCHEMA IF NOT EXISTS cdn AUTHORIZATION cds;\";" diff --git a/docs/content/development/contribute/development.md b/docs/content/development/contribute/development.md index 79b3667385..782066cc63 100644 --- a/docs/content/development/contribute/development.md +++ b/docs/content/development/contribute/development.md @@ -18,7 +18,7 @@ If you are familiar with these different tools, you probably will not need to re ## PostgreSQL -Download PostgreSQL from https://www.postgresql.org/download/, version >= 9.6. +Download PostgreSQL from https://www.postgresql.org/download/, version >= 9.6. Version 14.0 recommanded You can easily use only PostgreSQL binaries, downloaded from https://www.enterprisedb.com/download-postgresql-binaries. diff --git a/docs/content/hosting/ready-to-run/docker-compose/full-example.md b/docs/content/hosting/ready-to-run/docker-compose/full-example.md index 319772b6ff..10f3d138de 100644 --- a/docs/content/hosting/ready-to-run/docker-compose/full-example.md +++ b/docs/content/hosting/ready-to-run/docker-compose/full-example.md @@ -276,7 +276,7 @@ fe2fcbee96aa ovhcom/cds-engine:latest "sh -c f2eb7b8c4329 ovhcom/cds-engine:latest "sh -c '/app/cds-eng…" 35 seconds ago Up 33 seconds (healthy) debian_cds-elasticsearch_1 22dc66a1b2a2 ovhcom/cds-engine:latest "sh -c '/app/cds-eng…" 35 seconds ago Up 33 seconds (healthy) debian_cds-hatchery-swarm_1 958ab1703f16 ovhcom/cds-engine:latest "sh -c '/app/cds-eng…" 39 seconds ago Up 39 seconds (healthy) 0.0.0.0:8081->8081/tcp debian_cds-api_1 -9223395500ab postgres:9.6 "docker-entrypoint.s…" 2 minutes ago Up About a minute 5432/tcp debian_cds-db_1 +9223395500ab postgres:14.0 "docker-entrypoint.s…" 2 minutes ago Up About a minute 5432/tcp debian_cds-db_1 c9b58ce83003 docker.elastic.co/elasticsearch/elasticsearch:6.7.2 "/usr/local/bin/dock…" 2 minutes ago Up About a minute 9200/tcp, 9300/tcp debian_elasticsearch_1 08cfe15c3e2c bobrik/socat "socat TCP4-LISTEN:2…" 2 minutes ago Up About a minute 127.0.0.1:2375->2375/tcp debian_dockerhost_1 fc2ac075c000 redis:alpine "docker-entrypoint.s…" 2 minutes ago Up About a minute 6379/tcp debian_cds-cache_1 diff --git a/docs/content/hosting/ready-to-run/from-binaries.md b/docs/content/hosting/ready-to-run/from-binaries.md index e6ac52cc44..9abb9a4038 100644 --- a/docs/content/hosting/ready-to-run/from-binaries.md +++ b/docs/content/hosting/ready-to-run/from-binaries.md @@ -14,7 +14,7 @@ This article contains the steps to start CDS locally, with API, UI and a local H ## Prerequisite - a Redis -- a PostgreSQL 9.6 min +- a PostgreSQL 9.6 min (Version 14.0 recommanded) ## Get the latest release from GitHub @@ -80,7 +80,7 @@ You can edit the section `api.database` in `conf.toml` file if needed. If it's just for test purpose, you can start a postgreSQL database with docker, as: ```bash -docker run --name cds-db -e POSTGRES_PASSWORD=cds -e POSTGRES_USER=cds -e POSTGRES_DB=cds -p 127.0.0.1:5432:5432 -d postgres:9.6 +docker run --name cds-db -e POSTGRES_PASSWORD=cds -e POSTGRES_USER=cds -e POSTGRES_DB=cds -p 127.0.0.1:5432:5432 -d postgres:14.0 ``` ```bash diff --git a/docs/content/hosting/requirements.md b/docs/content/hosting/requirements.md index d3efffd0c7..28dacaff7e 100644 --- a/docs/content/hosting/requirements.md +++ b/docs/content/hosting/requirements.md @@ -16,7 +16,7 @@ There is are two ways to set up CDS: ## CDS API Third-parties -At the minimum, CDS needs a PostgreSQL database >= 9.6 and Redis >= 3.2. But for serious usage your may need: +At the minimum, CDS needs a PostgreSQL database >= 9.6 (version 14.0 recommanded) and Redis >= 3.2. But for serious usage your may need: - A [Redis](https://redis.io) server or sentinels based cluster used as a cache and session store - A LDAP Server for authentication diff --git a/engine/Makefile b/engine/Makefile index 8645a95eab..24850e6a12 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -38,7 +38,7 @@ TEST_CDN_DB_CREATE_SCHEMA = PGPASSWORD=${TEST_DB_PASS} psql -h ${TEST_DB_HOST} - TEST_CDN_DB_INIT = ./engine database upgrade --db-host $(TEST_DB_HOST) --db-port $(TEST_DB_PORT) --db-user $(TEST_DB_USER) --db-password $(TEST_DB_PASS) --db-name $(TEST_DB_NAME) --db-schema $(TEST_CDN_DB_SCHEMA) --db-sslmode disable --migrate-dir ./sql/cdn TEST_DB_STOP_DOCKER = docker rm -f postgres-cds -TEST_DB_START_DOCKER = docker run -d -p $(TEST_DB_PORT):5432 -e POSTGRES_PASSWORD=$(TEST_DB_PASS) -e POSTGRES_USER=$(TEST_DB_USER) -e POSTGRES_DB=$(TEST_DB_NAME) --name postgres-cds postgres:9.6 +TEST_DB_START_DOCKER = docker run -d -p $(TEST_DB_PORT):5432 -e POSTGRES_PASSWORD=$(TEST_DB_PASS) -e POSTGRES_USER=$(TEST_DB_USER) -e POSTGRES_DB=$(TEST_DB_NAME) --name postgres-cds postgres:14.0 TEST_REDIS_PORT = 6379 TEST_REDIS_HOST = $(if ${CDS_CACHE_REDIS_HOST},${CDS_CACHE_REDIS_HOST},localhost:$(TEST_REDIS_PORT)) diff --git a/tests/fixtures/04SCWorkflowRunSimpleService/pipeline.yml b/tests/fixtures/04SCWorkflowRunSimpleService/pipeline.yml index f5951966ce..eefd9c2d80 100644 --- a/tests/fixtures/04SCWorkflowRunSimpleService/pipeline.yml +++ b/tests/fixtures/04SCWorkflowRunSimpleService/pipeline.yml @@ -19,5 +19,5 @@ jobs: requirements: - service: name: mypg - value: postgres:9.6 POSTGRES_USER=foo POSTGRES_PASSWORD=bar + value: postgres:14.0 POSTGRES_USER=foo POSTGRES_PASSWORD=bar - os-architecture: linux/amd64