diff --git a/pxc-57/Dockerfile b/pxc-57/Dockerfile index f2fb3ab43..570d8223d 100644 --- a/pxc-57/Dockerfile +++ b/pxc-57/Dockerfile @@ -5,9 +5,15 @@ RUN groupadd -r mysql && useradd -r -g mysql mysql RUN apt-get update && apt-get install -y --no-install-recommends \ apt-transport-https ca-certificates \ - pwgen wget \ + pwgen wget xinetd \ && rm -rf /var/lib/apt/lists/* +# [elouizbadr] : +# 1- Added "xinetd" on line 8 to install X Internet Services. +# 2- Added following line to install MySQLCheck service to work with HAProxy configuration. +RUN echo "mysqlchk 9200/tcp" >> /etc/services +#################################################################################################### + RUN wget https://repo.percona.com/apt/percona-release_0.1-4.jessie_all.deb \ && dpkg -i percona-release_0.1-4.jessie_all.deb diff --git a/pxc-57/entrypoint.sh b/pxc-57/entrypoint.sh index 7f43b5bff..036442cef 100755 --- a/pxc-57/entrypoint.sh +++ b/pxc-57/entrypoint.sh @@ -64,6 +64,9 @@ fi GRANT REPLICATION CLIENT ON *.* TO monitor@'%' IDENTIFIED BY 'monitor'; GRANT PROCESS ON *.* TO monitor@localhost IDENTIFIED BY 'monitor'; DROP DATABASE IF EXISTS test ; + -- [elouizbadr] : + -- Add CLusterCheck script username/password to work with HAProxy + GRANT PROCESS ON *.* TO clustercheckuser@'%' IDENTIFIED BY 'clustercheckpassword!'; FLUSH PRIVILEGES ; EOSQL if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then @@ -153,6 +156,9 @@ set -e fi +# [elouizbadr] : Launch xinetd service for HAProxy +/etc/init.d/xinetd start + #--log-error=${DATADIR}error.log exec mysqld --user=mysql --wsrep_cluster_name=$CLUSTER_NAME --wsrep_cluster_address="gcomm://$cluster_join" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth="xtrabackup:$XTRABACKUP_PASSWORD" --wsrep_node_address="$ipaddr" $CMDARG