Skip to content

Commit

Permalink
chore: fully parameterize image specs in compose files (#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshimkus-rh authored Jun 24, 2024
1 parent 0d10ac7 commit 46e5fd4
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 48 deletions.
28 changes: 14 additions & 14 deletions tools/docker/docker-compose-dev-redis-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ x-environment:
services:
podman-pre-setup:
user: "0"
image: quay.io/containers/podman:${EDA_PODMAN_VERSION:-v4}
image: ${EDA_PODMAN_IMAGE:-quay.io/containers/podman}:${EDA_PODMAN_VERSION:-v4}
privileged: true
command: >-
chown -R podman /home/podman/.local/share/containers/storage
Expand All @@ -54,7 +54,7 @@ services:

podman:
user: "1000"
image: quay.io/containers/podman:${EDA_PODMAN_VERSION:-v4}
image: ${EDA_PODMAN_IMAGE:-quay.io/containers/podman}:${EDA_PODMAN_VERSION:-v4}
privileged: true
command: >-
podman system service --time=0 tcp://0.0.0.0:8888
Expand All @@ -66,7 +66,7 @@ services:
- podman-pre-setup

eda-ui:
image: "${EDA_UI_IMAGE:-quay.io/ansible/eda-ui:main}"
image: ${EDA_UI_IMAGE:-quay.io/ansible/eda-ui}:${EDA_UI_VERSION:-main}
environment: *common-env
ports:
- '${EDA_UI_PORT:-8443}:443'
Expand All @@ -75,7 +75,7 @@ services:
condition: service_healthy

eda-api:
image: "${EDA_IMAGE:-localhost/aap-eda}"
image: ${EDA_IMAGE:-localhost/aap-eda}
build:
context: ../../
dockerfile: tools/docker/Dockerfile
Expand Down Expand Up @@ -104,7 +104,7 @@ services:
- '../../:/app/src:z'

eda-ws:
image: "${EDA_IMAGE:-localhost/aap-eda}"
image: ${EDA_IMAGE:-localhost/aap-eda}
environment: *common-env
command:
- /bin/bash
Expand All @@ -120,7 +120,7 @@ services:
- '../../:/app/src:z'

eda-scheduler:
image: "${EDA_IMAGE:-localhost/aap-eda}"
image: ${EDA_IMAGE:-localhost/aap-eda}
environment: *common-env
command:
- /bin/bash
Expand All @@ -138,9 +138,9 @@ services:
- '../../:/app/src:z'

eda-default-worker:
image: ${EDA_IMAGE:-localhost/aap-eda}
deploy:
replicas: ${EDA_DEFAULT_WORKERS:-1}
image: "${EDA_IMAGE:-localhost/aap-eda}"
environment: *common-env
command:
- aap-eda-manage
Expand All @@ -159,9 +159,9 @@ services:
restart: always

eda-activation-worker:
image: ${EDA_IMAGE:-localhost/aap-eda}
deploy:
replicas: ${EDA_ACTIVATION_WORKERS:-2}
image: "${EDA_IMAGE:-localhost/aap-eda}"
command:
- aap-eda-manage
- rqworker
Expand All @@ -180,7 +180,7 @@ services:
restart: always

certs:
image: certbot/certbot
image: ${EDA_CERTBOT_IMAGE:-certbot/certbot}:${EDA_CERTBOT_VERSION:-latest}
volumes:
- ./postgres_ssl_config/certs:/etc/ssl/certs:z
entrypoint:
Expand All @@ -192,12 +192,12 @@ services:
openssl genrsa -out /etc/ssl/certs/server.key 2048
openssl req -new -key /etc/ssl/certs/server.key -out /etc/ssl/certs/server.csr -subj "/CN=eda-postgres-1"
openssl x509 -req -in /etc/ssl/certs/server.csr -CA /etc/ssl/certs/ca.crt -CAkey /etc/ssl/certs/ca.key -CAcreateserial -out /etc/ssl/certs/server.crt -days 3650
chmod 640 /etc/ssl/certs/*.crt
chmod 640 /etc/ssl/certs/*.key
chmod 600 /etc/ssl/certs/*.crt
chmod 600 /etc/ssl/certs/*.key
restart: on-failure

postgres:
image: 'quay.io/sclorg/postgresql-15-c9s:latest'
image: ${EDA_POSTGRES_IMAGE:-quay.io/sclorg/postgresql-15-c9s}:${EDA_POSTGRES_VERSION:-latest}
environment:
POSTGRESQL_USER: eda
POSTGRESQL_PASSWORD: secret
Expand All @@ -216,10 +216,10 @@ services:
retries: 3
start_period: 5s
depends_on:
- certs
- certs

redis:
image: 'quay.io/fedora/redis-6:latest'
image: ${EDA_REDIS_IMAGE:-quay.io/fedora/redis-6}:${EDA_REDIS_VERSION:-latest}
ports:
- '${EDA_MQ_PORT:-6379}:6379'
command:
Expand Down
28 changes: 14 additions & 14 deletions tools/docker/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ x-environment: &common-env
services:
podman-pre-setup-node1:
user: "0"
image: quay.io/containers/podman:${EDA_PODMAN_VERSION:-v4}
image: ${EDA_PODMAN_IMAGE:-quay.io/containers/podman}:${EDA_PODMAN_VERSION:-v4}
privileged: true
command: >-
chown -R podman /home/podman/.local/share/containers/storage
Expand All @@ -48,7 +48,7 @@ services:

podman-pre-setup-node2:
user: "0"
image: quay.io/containers/podman:${EDA_PODMAN_VERSION:-v4}
image: ${EDA_PODMAN_IMAGE:-quay.io/containers/podman}:${EDA_PODMAN_VERSION:-v4}
privileged: true
command: >-
chown -R podman /home/podman/.local/share/containers/storage
Expand All @@ -57,7 +57,7 @@ services:

podman-node1:
user: "1000"
image: quay.io/containers/podman:${EDA_PODMAN_VERSION:-v4}
image: ${EDA_PODMAN_IMAGE:-quay.io/containers/podman}:${EDA_PODMAN_VERSION:-v4}
privileged: true
command: >-
podman system service --time=0 tcp://0.0.0.0:8888
Expand All @@ -70,7 +70,7 @@ services:

podman-node2:
user: "1000"
image: quay.io/containers/podman:${EDA_PODMAN_VERSION:-v4}
image: ${EDA_PODMAN_IMAGE:-quay.io/containers/podman}:${EDA_PODMAN_VERSION:-v4}
privileged: true
command: >-
podman system service --time=0 tcp://0.0.0.0:8888
Expand All @@ -82,7 +82,7 @@ services:
- podman-pre-setup-node2

eda-ui:
image: "${EDA_UI_IMAGE:-quay.io/ansible/eda-ui:main}"
image: ${EDA_UI_IMAGE:-quay.io/ansible/eda-ui}:${EDA_UI_VERSION:-main}
environment: *common-env
ports:
- '${EDA_UI_PORT:-8443}:443'
Expand All @@ -91,7 +91,7 @@ services:
condition: service_healthy

eda-api:
image: "${EDA_IMAGE:-localhost/aap-eda}"
image: ${EDA_IMAGE:-localhost/aap-eda}
build:
context: ../../
dockerfile: tools/docker/Dockerfile
Expand Down Expand Up @@ -123,7 +123,7 @@ services:
- default

eda-ws:
image: "${EDA_IMAGE:-localhost/aap-eda}"
image: ${EDA_IMAGE:-localhost/aap-eda}
environment: *common-env
command:
- /bin/bash
Expand All @@ -139,7 +139,7 @@ services:
- '../../:/app/src:z'

eda-scheduler:
image: "${EDA_IMAGE:-localhost/aap-eda}"
image: ${EDA_IMAGE:-localhost/aap-eda}
deploy:
replicas: ${EDA_SCHEDULER_WORKERS:-2}
environment: *common-env
Expand All @@ -159,9 +159,9 @@ services:
- '../../:/app/src:z'

eda-default-worker:
image: ${EDA_IMAGE:-localhost/aap-eda}
deploy:
replicas: ${EDA_DEFAULT_WORKERS:-2}
image: "${EDA_IMAGE:-localhost/aap-eda}"
environment: *common-env
command:
- aap-eda-manage
Expand All @@ -180,9 +180,9 @@ services:
restart: always

eda-activation-worker-node1:
image: ${EDA_IMAGE:-localhost/aap-eda}
deploy:
replicas: ${EDA_ACTIVATION_WORKERS:-2}
image: "${EDA_IMAGE:-localhost/aap-eda}"
environment:
<<: *common-env
EDA_RULEBOOK_QUEUE_NAME: 'activation-node1'
Expand All @@ -204,9 +204,9 @@ services:
restart: always

eda-activation-worker-node2:
image: ${EDA_IMAGE:-localhost/aap-eda}
deploy:
replicas: ${EDA_ACTIVATION_WORKERS:-2}
image: "${EDA_IMAGE:-localhost/aap-eda}"
environment:
<<: *common-env
EDA_RULEBOOK_QUEUE_NAME: 'activation-node2'
Expand All @@ -229,7 +229,7 @@ services:


postgres:
image: 'quay.io/sclorg/postgresql-15-c9s:latest'
image: ${EDA_POSTGRES_IMAGE:-quay.io/sclorg/postgresql-15-c9s}:${EDA_POSTGRES_VERSION:-latest}
environment:
POSTGRESQL_USER: eda
POSTGRESQL_PASSWORD: secret
Expand All @@ -247,7 +247,7 @@ services:
start_period: 5s

redis:
image: 'quay.io/fedora/redis-6:latest'
image: ${EDA_REDIS_IMAGE:-quay.io/fedora/redis-6}:${EDA_REDIS_VERSION:-latest}
ports:
- '${EDA_REDIS_PORT:-6379}:6379'
healthcheck:
Expand All @@ -258,9 +258,9 @@ services:
start_period: 5s

squid:
image: ${EDA_SQUID_IMAGE:-quay.io/openshifttest/squid-proxy}:${EDA_SQUID_VERSION:-1.2.0}
profiles:
- proxy
image: 'quay.io/openshifttest/squid-proxy:1.2.0'
hostname: squid
volumes:
- './squid/squid.conf:/etc/squid/squid.conf:z'
Expand Down
18 changes: 9 additions & 9 deletions tools/docker/docker-compose-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ x-environment:

services:
eda-ui:
image: "${EDA_UI_IMAGE:-quay.io/ansible/eda-ui:main}"
image: ${EDA_UI_IMAGE:-quay.io/ansible/eda-ui}:${EDA_UI_VERSION:-main}
environment: *common-env
ports:
- '${EDA_UI_PORT:-8443}:443'
Expand All @@ -46,7 +46,7 @@ services:
condition: service_healthy

eda-api:
image: "${EDA_IMAGE:-quay.io/ansible/eda-server:main}"
image: ${EDA_IMAGE:-quay.io/ansible/eda-server}:${EDA_IMAGE_VERSION:-main}
environment: *common-env
security_opt:
- label=disable
Expand Down Expand Up @@ -74,7 +74,7 @@ services:
- ${EDA_HOST_PODMAN_SOCKET_URL:-/run/user/501/podman/podman.sock}:/run/podman/podman.sock:z

eda-ws:
image: "${EDA_IMAGE:-quay.io/ansible/eda-server:main}"
image: ${EDA_IMAGE:-quay.io/ansible/eda-server}:${EDA_IMAGE_VERSION:-main}
environment: *common-env
command:
- /bin/bash
Expand All @@ -89,9 +89,9 @@ services:

eda-default-worker:
user: "${EDA_POD_USER_ID:-0}"
image: ${EDA_IMAGE:-quay.io/ansible/eda-server}:${EDA_IMAGE_VERSION:-main}
deploy:
replicas: ${EDA_DEFAULT_WORKERS:-1}
image: "${EDA_IMAGE:-quay.io/ansible/eda-server:main}"
environment: *common-env
security_opt:
- label=disable
Expand All @@ -113,9 +113,9 @@ services:

eda-activation-worker:
user: "${EDA_POD_USER_ID:-0}"
image: ${EDA_IMAGE:-quay.io/ansible/eda-server}:${EDA_IMAGE_VERSION:-main}
deploy:
replicas: ${EDA_ACTIVATION_WORKERS:-2}
image: "${EDA_IMAGE:-quay.io/ansible/eda-server:main}"
environment: *common-env
security_opt:
- label=disable
Expand All @@ -136,7 +136,7 @@ services:
- ${EDA_HOST_PODMAN_SOCKET_URL:-/run/user/501/podman/podman.sock}:/run/podman/podman.sock:z

eda-scheduler:
image: "${EDA_IMAGE:-quay.io/ansible/eda-server:main}"
image: ${EDA_IMAGE:-quay.io/ansible/eda-server}:${EDA_IMAGE_VERSION:-main}
environment: *common-env
command:
- /bin/bash
Expand All @@ -152,7 +152,7 @@ services:
condition: service_healthy

postgres:
image: 'quay.io/sclorg/postgresql-15-c9s:latest'
image: ${EDA_POSTGRES_IMAGE:-quay.io/sclorg/postgresql-15-c9s}:${EDA_POSTGRES_VERSION:-latest}
environment:
POSTGRESQL_USER: eda
POSTGRESQL_PASSWORD: secret
Expand All @@ -170,7 +170,7 @@ services:
start_period: 5s

redis:
image: 'docker.io/library/redis:6.2.14'
image: ${EDA_REDIS_IMAGE:-docker.io/library/redis}:${EDA_REDIS_VERSION:-6.2.14}
ports:
- '${EDA_REDIS_PORT:-6379}:6379'
healthcheck:
Expand All @@ -181,9 +181,9 @@ services:
start_period: 5s

squid:
image: ${EDA_SQUID_IMAGE:-quay.io/openshifttest/squid-proxy}:${EDA_SQUID_VERSION:-1.2.0}
profiles:
- proxy
image: 'quay.io/openshifttest/squid-proxy:1.2.0'
hostname: squid
volumes:
- ./squid/squid.conf:/etc/squid/squid.conf
Expand Down
Loading

0 comments on commit 46e5fd4

Please sign in to comment.