Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade ci postgres version from 10 -> 14 & parameterize all CI devcluster scripts on postgres version #10106

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
2 changes: 1 addition & 1 deletion .circleci/compose/e2e/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
determined-db:
image: postgres:10.8
image: postgres:14.13
volumes:
- determined-db-volume:/var/lib/postgresql/data
restart: always
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- db:
name: db

image_name: "postgres":$DET_POSTGRES_VERSION
- master:
pre:
- sh: make -C tools prep-root
Expand Down
2 changes: 1 addition & 1 deletion .circleci/devcluster/double-priority.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- db:
name: db

image_name: "postgres:${DET_POSTGRES_VERSION}"
- master:
pre:
- sh: make -C tools prep-root
Expand Down
5 changes: 4 additions & 1 deletion .circleci/devcluster/double-reattach.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
stages:
- db:
name: db

image_name: "postgres:${DET_POSTGRES_VERSION}"
- master:
pre:
- sh: make -C tools prep-root
config_file:
security:
initial_user_password: $INITIAL_USER_PASSWORD
token:
max_lifespan:
default_lifespan:
db:
host: localhost
port: 5432
Expand Down
2 changes: 1 addition & 1 deletion .circleci/devcluster/double.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- db:
name: db

image_name: "postgres:${DET_POSTGRES_VERSION}"
- master:
pre:
- sh: make -C tools prep-root
Expand Down
2 changes: 1 addition & 1 deletion .circleci/devcluster/elastic-base.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
stages:
- db:
name: db

image_name: "postgres:${DET_POSTGRES_VERSION}"
- elastic:
name: elastic
1 change: 1 addition & 0 deletions .circleci/devcluster/elastic.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- db:
name: db
image_name: "postgres:${DET_POSTGRES_VERSION}"

- elastic:
name: elastic
Expand Down
2 changes: 1 addition & 1 deletion .circleci/devcluster/multi-k8s.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- db:
name: db

image_name: "postgres:${DET_POSTGRES_VERSION}"
- master:
pre:
- sh: make -C tools prep-root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ stages:
- db:
name: db
port: 5434
image_name: "postgres:${DET_POSTGRES_VERSION}"

- master:
pre:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/devcluster/oauth.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- db:
name: db

image_name: "postgres:${DET_POSTGRES_VERSION}"
- master:
pre:
- sh: make -C tools prep-root
Expand Down
1 change: 1 addition & 0 deletions .circleci/devcluster/port-registry.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- db:
name: db
image_name: "postgres:${DET_POSTGRES_VERSION}"

- master:
pre:
Expand Down
4 changes: 2 additions & 2 deletions .circleci/devcluster/postgres-with-ssl.devcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ stages:
cd /tmp/pg
openssl req -new -x509 -days 365 -nodes -text -out server.crt -keyout server.key -subj "/CN=localhost"
chmod 0400 server.crt server.key
uid=$(docker run --rm postgres:$DET_POSTGRES_VERSION id -u postgres)
uid=$(docker run --rm "postgres:${DET_POSTGRES_VERSION}" id -u postgres)
sudo chown $uid server.crt server.key
cat >pg_hba.conf <<EOF
local all all trust
Expand All @@ -34,7 +34,7 @@ stages:
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256 --auth-local=scram-sha-256
- -v
- /tmp/pg:/tmp/pg
- postgres:$DET_POSTGRES_VERSION
- "postgres:${DET_POSTGRES_VERSION}"
- postgres
- -c
- ssl=true
Expand Down
1 change: 1 addition & 0 deletions .circleci/devcluster/priority.devcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ stages:
db_name: db-priority-scheduler
container_name: determined_db-priority-scheduler
port: 5434
image_name: "postgres:${DET_POSTGRES_VERSION}"

- elastic:
name: elastic-priority-scheduler
Expand Down
1 change: 1 addition & 0 deletions .circleci/devcluster/rbac-model-registry.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- db:
name: db
image_name: "postgres:${DET_POSTGRES_VERSION}"

- master:
pre:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/devcluster/react.devcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ temp_dir: /tmp/priority_scheduler
stages:
- db:
name: db

image_name: "postgres:${DET_POSTGRES_VERSION}"
- master:
pre:
- sh: make -C tools prep-root
Expand Down
1 change: 1 addition & 0 deletions .circleci/devcluster/saml.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- db:
name: db
image_name: "postgres:${DET_POSTGRES_VERSION}"

- master:
pre:
Expand Down
1 change: 1 addition & 0 deletions .circleci/devcluster/single-k8s.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- db:
name: db
image_name: "postgres:${DET_POSTGRES_VERSION}"

- master:
pre:
Expand Down
1 change: 1 addition & 0 deletions .circleci/devcluster/single-rbac.devcluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- db:
name: db
image_name: "postgres:${DET_POSTGRES_VERSION}"

- master:
pre:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/real_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3060,7 +3060,7 @@ jobs:
default: false
postgres-version:
type: string
default: "10"
default: "14"
agent-version:
type: string
default: ""
Expand Down
Loading