From 644b03dcec42aaedf3a53e49351bb5efde22326b Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 30 Dec 2021 23:19:25 +0200 Subject: [PATCH] add cnf --- install/usr/share/swarmlab.io/sec/my.cnf | 34 +++++++++++++++++++ .../usr/share/swarmlab.io/sec/sec_bootstrap | 4 +-- .../usr/share/swarmlab.io/sec/swarmlab-sec | 2 +- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 install/usr/share/swarmlab.io/sec/my.cnf diff --git a/install/usr/share/swarmlab.io/sec/my.cnf b/install/usr/share/swarmlab.io/sec/my.cnf new file mode 100644 index 0000000..b329808 --- /dev/null +++ b/install/usr/share/swarmlab.io/sec/my.cnf @@ -0,0 +1,34 @@ +# The MariaDB configuration file +# +# The MariaDB/MySQL tools read configuration files in the following order: +# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read. +# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults, +# 2. "/etc/mysql/conf.d/*.cnf" to set global options. +# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options. +# 4. "~/.my.cnf" to set user-specific options. +# +# If the same option is defined multiple times, the last one will apply. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/ + +# +# This group is read both by the client and the server +# use it for options that affect everything +# +[client-server] +# Port or socket location where to connect +# port = 3306 +socket = /run/mysqld/mysqld.sock + +# Import all .cnf files from configuration directory +[mariadbd] +skip-host-cache +skip-name-resolve +skip-grant-tables + +!includedir /etc/mysql/mariadb.conf.d/ +!includedir /etc/mysql/conf.d/ diff --git a/install/usr/share/swarmlab.io/sec/sec_bootstrap b/install/usr/share/swarmlab.io/sec/sec_bootstrap index a2b3c41..105135d 100755 --- a/install/usr/share/swarmlab.io/sec/sec_bootstrap +++ b/install/usr/share/swarmlab.io/sec/sec_bootstrap @@ -45,9 +45,9 @@ case $ROLE in # Auto update default host file in background and dumb all output auto_update_hosts "${HOSTNAMES}" > /dev/null 2>&1 & - - ttyd -p 3787 bash + ttyd -p 3787 bash & + mariadbd --user=root tail -f /dev/null # Start ssh server diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index f78a546..dc8dae4 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -306,7 +306,7 @@ services: volumes: - $Wdir/project:/home/docker/project - $Wdir/bin/ttyd.x86_64:/usr/bin/ttyd - - $Wdir/project/sqldata:/var/lib/mysql + - $Wdir/my.cnf:/etc/mysql/my.cnf # workerservice: