Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos
Commits
a8cf9639
Commit
a8cf9639
authored
Sep 12, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Plain Diff
Mariadb 10.4
/reviewed-on
nexedi/slapos!622
parents
7998fc25
39654d3c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
27 deletions
+22
-27
component/mariadb/buildout.cfg
component/mariadb/buildout.cfg
+10
-16
software/neoppod/software-common.cfg
software/neoppod/software-common.cfg
+1
-0
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+3
-3
stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in
...rp5/instance-mariadb-resiliency-after-import-script.sh.in
+1
-1
stack/erp5/instance-mariadb-start-clone-from-backup.sh.in
stack/erp5/instance-mariadb-start-clone-from-backup.sh.in
+5
-5
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+2
-2
No files found.
component/mariadb/buildout.cfg
View file @
a8cf9639
...
@@ -29,8 +29,8 @@ parts =
...
@@ -29,8 +29,8 @@ parts =
[mariadb]
[mariadb]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http%3A//fr.mirror.babylon.network/mariadb/?serve
url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http%3A//fr.mirror.babylon.network/mariadb/?serve
version = 10.
3.2
2
version = 10.
4.1
2
md5sum =
f712a5e6fde038d0c9c6d2a2cd88b84e
md5sum =
97d7c0f508c04a31c138fdb24e95dbc4
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
pre-configure =
pre-configure =
set -e '\bSET(PLUGIN_AUTH_PAM YES)' cmake/build_configurations/mysql_release.cmake
set -e '\bSET(PLUGIN_AUTH_PAM YES)' cmake/build_configurations/mysql_release.cmake
...
@@ -76,9 +76,10 @@ environment =
...
@@ -76,9 +76,10 @@ environment =
CMAKE_INCLUDE_PATH=${bzip2:location}/include:${libaio:location}/include:${libaio:location}/include:${libxml2:location}/include:${ncurses:location}/include:${openssl:location}/include:${readline5:location}/include:${xz-utils:location}/include:${zlib:location}/include:${unixodbc:location}/include:${lz4:location}/include:${snappy:location}/include:${zstd:location}/include
CMAKE_INCLUDE_PATH=${bzip2:location}/include:${libaio:location}/include:${libaio:location}/include:${libxml2:location}/include:${ncurses:location}/include:${openssl:location}/include:${readline5:location}/include:${xz-utils:location}/include:${zlib:location}/include:${unixodbc:location}/include:${lz4:location}/include:${snappy:location}/include:${zstd:location}/include
CMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH}
CMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH}
LDFLAGS=-L${bzip2:location}/lib -L${jemalloc:location}/lib -L${libaio:location}/lib -L${xz-utils:location}/lib -L${zlib:location}/lib -L${unixodbc:location}/lib -L${lz4:location}/lib -L${snappy:location}/lib -L${zstd:location}/lib
LDFLAGS=-L${bzip2:location}/lib -L${jemalloc:location}/lib -L${libaio:location}/lib -L${xz-utils:location}/lib -L${zlib:location}/lib -L${unixodbc:location}/lib -L${lz4:location}/lib -L${snappy:location}/lib -L${zstd:location}/lib
post-install =
post-install = set -e
mkdir -p ${:location}/include/wsrep &&
set -- wsrep-lib/wsrep-API/*/wsrep_api.h
cp -p wsrep/wsrep_api.h ${:location}/include/wsrep
install -DpT $1 ${:location}/$1
cp -a wsrep-lib/include ${:location}/wsrep-lib
[mroonga-mariadb]
[mroonga-mariadb]
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
...
@@ -89,15 +90,10 @@ md5sum = d0af673f1bad3b9ccf33870bb2344a25
...
@@ -89,15 +90,10 @@ md5sum = d0af673f1bad3b9ccf33870bb2344a25
pre-configure = set -e
pre-configure = set -e
rm -rf fake_mariadb_source
rm -rf fake_mariadb_source
mkdir -p fake_mariadb_source
mkdir -p fake_mariadb_source
test -d ${mariadb:location}/include/mysql/server/private && (
cd fake_mariadb_source
mkdir -p fake_mariadb_source/sql
ln -s ${mariadb:location}/wsrep-lib
cp -a ${mariadb:location}/include/mysql/server/private/* fake_mariadb_source/sql
cp -a ${mariadb:location}/include/mysql/server include
cp -a ${mariadb:location}/include/mysql/server/*.h fake_mariadb_source/sql
mv include/private sql
cp -a ${mariadb:location}/include/mysql/server/mysql fake_mariadb_source/sql
) || ln -s ${mariadb:location}/include/mysql/private fake_mariadb_source/sql
cp -ar ${mariadb:location}/include fake_mariadb_source/include
! test -f fake_mariadb_source/include/mysql/mariadb_stmt.h ||
sed -i -E -e '/^enum enum_(cursor|indicator)_type$/,/};/d' fake_mariadb_source/include/mysql/mariadb_stmt.h
configure-options =
configure-options =
--with-mysql-source=fake_mariadb_source
--with-mysql-source=fake_mariadb_source
--with-mysql-config=${mariadb:location}/bin/mysql_config
--with-mysql-config=${mariadb:location}/bin/mysql_config
...
@@ -106,8 +102,6 @@ configure-options =
...
@@ -106,8 +102,6 @@ configure-options =
patch-options = -p1
patch-options = -p1
patches =
patches =
${:_profile_base_location_}/mroonga_boolean.patch#c818568fe35ca6a4298f18e575d962a0
${:_profile_base_location_}/mroonga_boolean.patch#c818568fe35ca6a4298f18e575d962a0
pre-build =
sed -i -e "s,${mariadb:location}/include,$(pwd)/fake_mariadb_source/include,g" Makefile */Makefile
environment =
environment =
PATH=${binutils:location}/bin:${groonga:location}/bin:${patch:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PATH=${binutils:location}/bin:${groonga:location}/bin:${patch:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
CPPFLAGS=-I${groonga:location}/include/groonga
...
...
software/neoppod/software-common.cfg
View file @
a8cf9639
...
@@ -137,6 +137,7 @@ template =
...
@@ -137,6 +137,7 @@ template =
'${mariadb:location}/scripts/mysql_install_db' \
'${mariadb:location}/scripts/mysql_install_db' \
--defaults-file='{{defaults_file}}' \
--defaults-file='{{defaults_file}}' \
--skip-name-resolve \
--skip-name-resolve \
--auth-root-authentication-method=normal \
--basedir='${mariadb:location}' \
--basedir='${mariadb:location}' \
--datadir="$datadir.new"
--datadir="$datadir.new"
mv -v "$datadir.new" "$datadir"
mv -v "$datadir.new" "$datadir"
...
...
stack/erp5/buildout.hash.cfg
View file @
a8cf9639
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# not need these here).
# not need these here).
[mariadb-resiliency-after-import-script]
[mariadb-resiliency-after-import-script]
filename = instance-mariadb-resiliency-after-import-script.sh.in
filename = instance-mariadb-resiliency-after-import-script.sh.in
md5sum =
aff3bb574c8f0a2db9911fee30540e12
md5sum =
85ce1e2f3d251aa435fef8118dca8a63
[mariadb-slow-query-report-script]
[mariadb-slow-query-report-script]
filename = mysql-querydigest.sh.in
filename = mysql-querydigest.sh.in
...
@@ -22,11 +22,11 @@ md5sum = 0c0d98a68230cd0ad36046bb25b35f4a
...
@@ -22,11 +22,11 @@ md5sum = 0c0d98a68230cd0ad36046bb25b35f4a
[mariadb-start-clone-from-backup]
[mariadb-start-clone-from-backup]
filename = instance-mariadb-start-clone-from-backup.sh.in
filename = instance-mariadb-start-clone-from-backup.sh.in
md5sum = d
95e8500bdc72d1f40b97cc414656e7e
md5sum = d
10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb]
[template-mariadb]
filename = instance-mariadb.cfg.in
filename = instance-mariadb.cfg.in
md5sum =
b29449652ef996c267518e4dcfd8e9e1
md5sum =
0eb2f45a145dde0c59d3488bfdbe66ff
[template-kumofs]
[template-kumofs]
filename = instance-kumofs.cfg.in
filename = instance-kumofs.cfg.in
...
...
stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in
View file @
a8cf9639
...
@@ -59,7 +59,7 @@ fi
...
@@ -59,7 +59,7 @@ fi
echo "Importing data..."
echo "Importing data..."
# Use latest dump XXX can contain funny characters
# Use latest dump XXX can contain funny characters
dump=$(ls -r "$mariadb_backup_directory" | head -1)
dump=$(ls -r "$mariadb_backup_directory" | head -1)
zcat "$mariadb_backup_directory/$dump" | $mysql_executable
-u root
|| {
zcat "$mariadb_backup_directory/$dump" | $mysql_executable || {
RESTORE_EXIT_CODE=$?
RESTORE_EXIT_CODE=$?
echo 'Backup restoration failed.'
echo 'Backup restoration failed.'
exit $RESTORE_EXIT_CODE
exit $RESTORE_EXIT_CODE
...
...
stack/erp5/instance-mariadb-start-clone-from-backup.sh.in
View file @
a8cf9639
...
@@ -84,16 +84,16 @@ done
...
@@ -84,16 +84,16 @@ done
"$UPDATE"
"$UPDATE"
echo "Importing $BACKUP ..."
echo "Importing $BACKUP ..."
zcat "$BACKUP" | "$CLIENT"
-u root
zcat "$BACKUP" | "$CLIENT"
echo "Configuring server as slave..."
echo "Configuring server as slave..."
if [ "$MASTER_USE_GTID" -eq 1 ]; then
if [ "$MASTER_USE_GTID" -eq 1 ]; then
"$CLIENT" -
u root -
e "$SQL_SET_GTID"
"$CLIENT" -e "$SQL_SET_GTID"
MASTER_USE_GTID_SQL="slave_pos"
MASTER_USE_GTID_SQL="slave_pos"
else
else
MASTER_USE_GTID_SQL="NO"
MASTER_USE_GTID_SQL="NO"
fi
fi
"$CLIENT" -
u root -
e "
"$CLIENT" -e "
CHANGE MASTER TO
CHANGE MASTER TO
MASTER_HOST='$MASTER_HOST',
MASTER_HOST='$MASTER_HOST',
MASTER_USER='$MASTER_USER',
MASTER_USER='$MASTER_USER',
...
@@ -111,9 +111,9 @@ if [ "$MASTER_USE_GTID" -eq 0 ]; then
...
@@ -111,9 +111,9 @@ if [ "$MASTER_USE_GTID" -eq 0 ]; then
# Notes:
# Notes:
# - Must happen after setting MASTER_HOST & MASTER_PORT.
# - Must happen after setting MASTER_HOST & MASTER_PORT.
# - Implicitly sets MASTER_USE_GTID=NO if it was set before.
# - Implicitly sets MASTER_USE_GTID=NO if it was set before.
"$CLIENT" -
u root -
e "$SQL_CHANGE_MASTER"
"$CLIENT" -e "$SQL_CHANGE_MASTER"
fi
fi
"$CLIENT" -
u root -
e "START SLAVE;"
"$CLIENT" -e "START SLAVE;"
echo "Stopping mariadb..."
echo "Stopping mariadb..."
trap EXIT
trap EXIT
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
a8cf9639
...
@@ -107,7 +107,7 @@ time = {{ dumps(backup_periodicity) }}
...
@@ -107,7 +107,7 @@ time = {{ dumps(backup_periodicity) }}
# can be fully restored.
# can be fully restored.
# master-data: use value "2" as we are not in a replication case
# master-data: use value "2" as we are not in a replication case
#}
#}
command = "${binary-wrap-mysqldump:wrapper-path}" -
u root -
-all-databases --flush-privileges --single-transaction --max-allowed-packet=128M {% if incremental_backup_retention_days > -1 %}--flush-logs --master-data=2 {% endif %}| {{ parameter_dict['gzip-location'] }}/bin/gzip > "${directory:mariadb-backup-full}/$({{ parameter_dict['coreutils-location'] }}/bin/date "+%Y%m%d%H%M%S").sql.gz"
command = "${binary-wrap-mysqldump:wrapper-path}" --all-databases --flush-privileges --single-transaction --max-allowed-packet=128M {% if incremental_backup_retention_days > -1 %}--flush-logs --master-data=2 {% endif %}| {{ parameter_dict['gzip-location'] }}/bin/gzip > "${directory:mariadb-backup-full}/$({{ parameter_dict['coreutils-location'] }}/bin/date "+%Y%m%d%H%M%S").sql.gz"
{# KEEP GLOB PATTERN IN SYNC with generated filenames above
{# KEEP GLOB PATTERN IN SYNC with generated filenames above
# YYYYmmddHHMMSS -#}
# YYYYmmddHHMMSS -#}
file-glob = ??????????????.sql.gz
file-glob = ??????????????.sql.gz
...
@@ -206,7 +206,7 @@ context = section parameter_dict odbc-ini-text
...
@@ -206,7 +206,7 @@ context = section parameter_dict odbc-ini-text
< = logrotate-entry-base
< = logrotate-entry-base
name = mariadb
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = "${binary-wrap-mysql:wrapper-path}" -B -
u root -
e "FLUSH LOGS"
post = "${binary-wrap-mysql:wrapper-path}" -B -e "FLUSH LOGS"
[{{ section('binary-link') }}]
[{{ section('binary-link') }}]
recipe = slapos.cookbook:symbolic.link
recipe = slapos.cookbook:symbolic.link
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment