From aa2be569e19e83529403c23b59bec5fa41b8addd Mon Sep 17 00:00:00 2001 From: Andrei-Adnan Ismail Date: Mon, 26 Oct 2015 11:09:38 +0200 Subject: [PATCH] #395 Add scenario with 1 proxy and 4 backend servers --- .../5backends-replication/docker-compose.yml | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 docker/scenarios/5backends-replication/docker-compose.yml diff --git a/docker/scenarios/5backends-replication/docker-compose.yml b/docker/scenarios/5backends-replication/docker-compose.yml new file mode 100644 index 000000000..b2c75060f --- /dev/null +++ b/docker/scenarios/5backends-replication/docker-compose.yml @@ -0,0 +1,109 @@ +proxysql: + image: proxysql:{{proxysql_image}} + links: + - backend1hostgroup0 + - backend1hostgroup1 + - backend2hostgroup1 + - backend3hostgroup1 + - backend4hostgroup1 + ports: + # ProxySQL admin port for MySQL commands + - "6032:6032" + # ProxySQL main port + - "6033:6033" + # gdbserver + - "2345:2345" + volumes: + # Sharing the data with + - /tmp/proxysql-tests:/tmp/proxysql-src + privileged: true + + # TODO(aismail): remove these hardcoded labels and add them in the template + # as a variable by using docker-inspect on the image. + labels: + "com.proxysql.config": "simple" + "com.proxysql.interactive": "false" + "com.proxysql.os": "ubuntu14" + "com.proxysql.purpose": "testing" + "com.proxysql.type": "proxysql" + "vendor": "proxysql" + +backend1hostgroup0: + image: proxysql:mysql-simple-dump-replication + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_SERVER_ID: 1 + expose: + - "3306" + ports: + - "13306:3306" + # TODO(aismail): remove these hardcoded labels and add them in the template + # as a variable by using docker-inspect on the image. + labels: + "com.proxysql.type": "mysql" + "vendor": "proxysql" + "com.proxysql.hostgroup": "0" + +backend1hostgroup1: + image: proxysql:mysql-simple-dump-replication + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_SERVER_ID: 2 + expose: + - "3306" + ports: + - "13307:3306" + # TODO(aismail): remove these hardcoded labels and add them in the template + # as a variable by using docker-inspect on the image. + labels: + "com.proxysql.type": "mysql" + "vendor": "proxysql" + "com.proxysql.hostgroup": "1" + +backend2hostgroup1: + image: proxysql:mysql-simple-dump-replication + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_SERVER_ID: 3 + expose: + - "3306" + ports: + - "13308:3306" + # TODO(aismail): remove these hardcoded labels and add them in the template + # as a variable by using docker-inspect on the image. + labels: + "com.proxysql.type": "mysql" + "vendor": "proxysql" + "com.proxysql.hostgroup": "1" + +backend3hostgroup1: + image: proxysql:mysql-simple-dump-replication + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_SERVER_ID: 4 + expose: + - "3306" + ports: + - "13309:3306" + # TODO(aismail): remove these hardcoded labels and add them in the template + # as a variable by using docker-inspect on the image. + labels: + "com.proxysql.type": "mysql" + "vendor": "proxysql" + "com.proxysql.hostgroup": "1" + +backend4hostgroup1: + image: proxysql:mysql-simple-dump-replication + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_SERVER_ID: 5 + expose: + - "3306" + ports: + - "13310:3306" + # TODO(aismail): remove these hardcoded labels and add them in the template + # as a variable by using docker-inspect on the image. + labels: + "com.proxysql.type": "mysql" + "vendor": "proxysql" + "com.proxysql.hostgroup": "1" \ No newline at end of file