From 7fb0174503345500fc8179830a20ae6d3f867df1 Mon Sep 17 00:00:00 2001 From: Markus Reinhold Date: Wed, 7 Feb 2024 23:04:49 +0100 Subject: [PATCH] Use images as described in #209 --- deploy/load-test/stack/app.env | 4 ++-- deploy/load-test/stack/chat/mysql.yml | 5 +---- deploy/load-test/stack/chat/redis.yml | 3 +-- deploy/load-test/stack/connect-four/mysql-1.yml | 5 +---- deploy/load-test/stack/connect-four/mysql-2.yml | 5 +---- deploy/load-test/stack/connect-four/mysql-3.yml | 5 +---- deploy/load-test/stack/connect-four/mysql-4.yml | 5 +---- deploy/load-test/stack/connect-four/mysql-5.yml | 5 +---- deploy/load-test/stack/connect-four/redis.yml | 3 +-- deploy/load-test/stack/identity/mysql.yml | 5 +---- deploy/load-test/stack/observability.yml | 13 +++---------- deploy/load-test/stack/proxysql-sidecar.yml | 6 +++--- .../load-test/stack/{rabbit-mq.yml => rabbitmq.yml} | 12 ++++++------ deploy/load-test/stack/traefik.yml | 2 +- deploy/load-test/stack/web-interface/nchan.yml | 4 +++- deploy/load-test/stack/web-interface/redis.yml | 3 +-- 16 files changed, 28 insertions(+), 57 deletions(-) rename deploy/load-test/stack/{rabbit-mq.yml => rabbitmq.yml} (57%) diff --git a/deploy/load-test/stack/app.env b/deploy/load-test/stack/app.env index 458d65ce..1e4e3a96 100644 --- a/deploy/load-test/stack/app.env +++ b/deploy/load-test/stack/app.env @@ -1,7 +1,7 @@ APP_ENVIRONMENT=prod APP_KERNEL_SECRET=ThisTokenIsNotSoSecretChangeIt -APP_WAIT_FOR=unix:///var/run/proxysql/proxysql.sock,chat-mysql:3306,connect-four-mysql-1:3306,connect-four-mysql-2:3306,connect-four-mysql-3:3306,connect-four-mysql-4:3306,connect-four-mysql-5:3306,identity-mysql:3306,chat-redis:6379,connect-four-redis:6379,web-interface-redis:6379,rabbit-mq:5672,nchan:81 -APP_RABBIT_MQ_DSN=amqp://guest:guest@rabbit-mq:5672?heartbeat=60&prefetchCount=30 +APP_WAIT_FOR=unix:///var/run/proxysql/proxysql.sock,chat-mysql:3306,connect-four-mysql-1:3306,connect-four-mysql-2:3306,connect-four-mysql-3:3306,connect-four-mysql-4:3306,connect-four-mysql-5:3306,identity-mysql:3306,chat-redis:6379,connect-four-redis:6379,web-interface-redis:6379,rabbitmq:5672,nchan:81 +APP_RABBIT_MQ_DSN=amqp://guest:guest@rabbitmq:5672?heartbeat=60&prefetchCount=30 APP_CHAT_DOCTRINE_DBAL_URL=mysqli://root:password@localhost/chat?persistent=1&unix_socket=/var/run/proxysql/proxysql.sock APP_CHAT_RUN_MIGRATIONS=1 diff --git a/deploy/load-test/stack/chat/mysql.yml b/deploy/load-test/stack/chat/mysql.yml index 97b1df06..21316d02 100644 --- a/deploy/load-test/stack/chat/mysql.yml +++ b/deploy/load-test/stack/chat/mysql.yml @@ -2,10 +2,7 @@ version: '3.4' services: chat-mysql: - image: marein/php-gaming-website:mysql - command: mysqld --max-connections=1000 - environment: - MYSQL_ROOT_PASSWORD: password + image: ghcr.io/gaming-platform/docker-mysql:8.2 volumes: - chat-mysql:/var/lib/mysql deploy: diff --git a/deploy/load-test/stack/chat/redis.yml b/deploy/load-test/stack/chat/redis.yml index be647d21..ab2ee7ba 100644 --- a/deploy/load-test/stack/chat/redis.yml +++ b/deploy/load-test/stack/chat/redis.yml @@ -2,8 +2,7 @@ version: '3.4' services: chat-redis: - image: marein/php-gaming-website:redis - command: redis-server --appendonly yes + image: ghcr.io/gaming-platform/docker-redis:7.2 volumes: - chat-redis:/data deploy: diff --git a/deploy/load-test/stack/connect-four/mysql-1.yml b/deploy/load-test/stack/connect-four/mysql-1.yml index 95e24cf3..b5f8ae6c 100644 --- a/deploy/load-test/stack/connect-four/mysql-1.yml +++ b/deploy/load-test/stack/connect-four/mysql-1.yml @@ -2,10 +2,7 @@ version: '3.4' services: connect-four-mysql-1: - image: marein/php-gaming-website:mysql - command: mysqld --max-connections=1000 - environment: - MYSQL_ROOT_PASSWORD: password + image: ghcr.io/gaming-platform/docker-mysql:8.2 volumes: - connect-four-mysql-1:/var/lib/mysql deploy: diff --git a/deploy/load-test/stack/connect-four/mysql-2.yml b/deploy/load-test/stack/connect-four/mysql-2.yml index 814a9d3a..d8da5ca1 100644 --- a/deploy/load-test/stack/connect-four/mysql-2.yml +++ b/deploy/load-test/stack/connect-four/mysql-2.yml @@ -2,10 +2,7 @@ version: '3.4' services: connect-four-mysql-2: - image: marein/php-gaming-website:mysql - command: mysqld --max-connections=1000 - environment: - MYSQL_ROOT_PASSWORD: password + image: ghcr.io/gaming-platform/docker-mysql:8.2 volumes: - connect-four-mysql-2:/var/lib/mysql deploy: diff --git a/deploy/load-test/stack/connect-four/mysql-3.yml b/deploy/load-test/stack/connect-four/mysql-3.yml index 4ddd0a95..94c1addd 100644 --- a/deploy/load-test/stack/connect-four/mysql-3.yml +++ b/deploy/load-test/stack/connect-four/mysql-3.yml @@ -2,10 +2,7 @@ version: '3.4' services: connect-four-mysql-3: - image: marein/php-gaming-website:mysql - command: mysqld --max-connections=1000 - environment: - MYSQL_ROOT_PASSWORD: password + image: ghcr.io/gaming-platform/docker-mysql:8.2 volumes: - connect-four-mysql-3:/var/lib/mysql deploy: diff --git a/deploy/load-test/stack/connect-four/mysql-4.yml b/deploy/load-test/stack/connect-four/mysql-4.yml index deab3050..d3c0cc58 100644 --- a/deploy/load-test/stack/connect-four/mysql-4.yml +++ b/deploy/load-test/stack/connect-four/mysql-4.yml @@ -2,10 +2,7 @@ version: '3.4' services: connect-four-mysql-4: - image: marein/php-gaming-website:mysql - command: mysqld --max-connections=1000 - environment: - MYSQL_ROOT_PASSWORD: password + image: ghcr.io/gaming-platform/docker-mysql:8.2 volumes: - connect-four-mysql-4:/var/lib/mysql deploy: diff --git a/deploy/load-test/stack/connect-four/mysql-5.yml b/deploy/load-test/stack/connect-four/mysql-5.yml index a4ebef57..523cbf55 100644 --- a/deploy/load-test/stack/connect-four/mysql-5.yml +++ b/deploy/load-test/stack/connect-four/mysql-5.yml @@ -2,10 +2,7 @@ version: '3.4' services: connect-four-mysql-5: - image: marein/php-gaming-website:mysql - command: mysqld --max-connections=1000 - environment: - MYSQL_ROOT_PASSWORD: password + image: ghcr.io/gaming-platform/docker-mysql:8.2 volumes: - connect-four-mysql-5:/var/lib/mysql deploy: diff --git a/deploy/load-test/stack/connect-four/redis.yml b/deploy/load-test/stack/connect-four/redis.yml index 460b84c4..3d5ce116 100644 --- a/deploy/load-test/stack/connect-four/redis.yml +++ b/deploy/load-test/stack/connect-four/redis.yml @@ -2,8 +2,7 @@ version: '3.4' services: connect-four-redis: - image: marein/php-gaming-website:redis - command: redis-server --appendonly yes + image: ghcr.io/gaming-platform/docker-redis:7.2 volumes: - connect-four-redis:/data deploy: diff --git a/deploy/load-test/stack/identity/mysql.yml b/deploy/load-test/stack/identity/mysql.yml index 330870d0..5e9548a5 100644 --- a/deploy/load-test/stack/identity/mysql.yml +++ b/deploy/load-test/stack/identity/mysql.yml @@ -2,10 +2,7 @@ version: '3.4' services: identity-mysql: - image: marein/php-gaming-website:mysql - command: mysqld --max-connections=1000 - environment: - MYSQL_ROOT_PASSWORD: password + image: ghcr.io/gaming-platform/docker-mysql:8.2 volumes: - identity-mysql:/var/lib/mysql deploy: diff --git a/deploy/load-test/stack/observability.yml b/deploy/load-test/stack/observability.yml index f93a1cf4..05e00b5c 100644 --- a/deploy/load-test/stack/observability.yml +++ b/deploy/load-test/stack/observability.yml @@ -2,11 +2,7 @@ version: '3.4' services: grafana: - image: marein/php-gaming-website:grafana - environment: - GF_AUTH_DISABLE_LOGIN_FORM: 1 - GF_AUTH_ANONYMOUS_ENABLED: 1 - GF_AUTH_ANONYMOUS_ORG_ROLE: Admin + image: ghcr.io/gaming-platform/docker-grafana:10.0 ports: - "8083:3000" deploy: @@ -14,11 +10,8 @@ services: constraints: - "node.labels.grafana==1" prometheus: - image: marein/php-gaming-website:prometheus - user: root # Needed for accessing docker.sock. In prod, it may be handled via file permissions. - command: - - '--config.file=/etc/prometheus/prometheus-dockerswarm.yml' - - '--storage.tsdb.path=/prometheus' + image: ghcr.io/gaming-platform/docker-prometheus:2.45 + command: --config.file=/etc/prometheus/dockerswarm.yml volumes: - prometheus:/prometheus - /var/run/docker.sock:/var/run/docker.sock diff --git a/deploy/load-test/stack/proxysql-sidecar.yml b/deploy/load-test/stack/proxysql-sidecar.yml index f24026ab..9397d92c 100644 --- a/deploy/load-test/stack/proxysql-sidecar.yml +++ b/deploy/load-test/stack/proxysql-sidecar.yml @@ -2,15 +2,16 @@ version: '3.4' services: proxysql-sidecar: - image: marein/php-gaming-website:proxysql + image: ghcr.io/gaming-platform/docker-proxysql:2.5 environment: PROXYSQL_CONFIG: | admin_variables: { restapi_enabled="true" + hash_passwords="false" } mysql_variables: { interfaces="/var/run/proxysql/proxysql.sock" - server_version="8.0" + server_version="8.2" monitor_username="root" monitor_password="password" auto_increment_delay_multiplex=0 @@ -54,7 +55,6 @@ services: labels: - "prometheus-job=proxysql" - "prometheus-port=6070" - - "prometheus-path=/metrics" volumes: proxysql.sock: diff --git a/deploy/load-test/stack/rabbit-mq.yml b/deploy/load-test/stack/rabbitmq.yml similarity index 57% rename from deploy/load-test/stack/rabbit-mq.yml rename to deploy/load-test/stack/rabbitmq.yml index cada1b77..c8f664e4 100644 --- a/deploy/load-test/stack/rabbit-mq.yml +++ b/deploy/load-test/stack/rabbitmq.yml @@ -1,19 +1,19 @@ version: '3.4' services: - rabbit-mq: - image: marein/php-gaming-website:rabbit-mq - hostname: rabbit-mq + rabbitmq: + image: ghcr.io/gaming-platform/docker-rabbitmq:3.12 + hostname: rabbitmq volumes: - - rabbit-mq:/var/lib/rabbitmq/mnesia + - rabbitmq:/var/lib/rabbitmq/mnesia deploy: placement: constraints: - - "node.labels.rabbit-mq==1" + - "node.labels.rabbitmq==1" labels: - "prometheus-job=rabbitmq" - "prometheus-port=15692" - "prometheus-path=/metrics/per-object" volumes: - rabbit-mq: + rabbitmq: diff --git a/deploy/load-test/stack/traefik.yml b/deploy/load-test/stack/traefik.yml index d7d0202a..17ff4881 100644 --- a/deploy/load-test/stack/traefik.yml +++ b/deploy/load-test/stack/traefik.yml @@ -2,7 +2,7 @@ version: '3.4' services: traefik: - image: marein/php-gaming-website:traefik + image: traefik:2.10 command: - --metrics.prometheus=true - --providers.docker diff --git a/deploy/load-test/stack/web-interface/nchan.yml b/deploy/load-test/stack/web-interface/nchan.yml index 26f46536..6511a953 100644 --- a/deploy/load-test/stack/web-interface/nchan.yml +++ b/deploy/load-test/stack/web-interface/nchan.yml @@ -2,7 +2,7 @@ version: '3.4' services: nchan: - image: marein/php-gaming-website:nchan + image: ghcr.io/gaming-platform/docker-nchan:1.3 deploy: placement: constraints: @@ -11,6 +11,8 @@ services: - "traefik.enable=true" - "traefik.http.routers.nchan.priority=20" - "traefik.http.routers.nchan.rule=PathPrefix(`/sse`)" + - "traefik.http.routers.nchan.middlewares=nchan-stripprefix" + - "traefik.http.middlewares.nchan-stripprefix.stripprefix.prefixes=/sse" - "traefik.http.services.nchan.loadbalancer.server.port=80" - "prometheus-job=nchan" - "prometheus-port=81" diff --git a/deploy/load-test/stack/web-interface/redis.yml b/deploy/load-test/stack/web-interface/redis.yml index 002fe63f..3e03ff30 100644 --- a/deploy/load-test/stack/web-interface/redis.yml +++ b/deploy/load-test/stack/web-interface/redis.yml @@ -2,8 +2,7 @@ version: '3.4' services: web-interface-redis: - image: marein/php-gaming-website:redis - command: redis-server --appendonly yes + image: ghcr.io/gaming-platform/docker-redis:7.2 volumes: - web-interface-redis:/data deploy: