This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from SUSE/master
merge in msater
- Loading branch information
Showing
27 changed files
with
303 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM splatform/stratos-db-base:opensuse | ||
|
||
COPY mariadb-entrypoint.sh /docker-entrypoint.sh | ||
|
||
# ENTRYPOINT | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
EXPOSE 3306 | ||
CMD ["mysqld_safe"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
MYSQL_DATADIR="/var/lib/mysql" | ||
|
||
if [ ! -d "$MYSQL_DATADIR/mysql" ]; then | ||
# if [ -z "$MYSQL_ROOT_PASSWORD" -a -z "$MYSQL_ALLOW_EMPTY_PASSWORD" ]; then | ||
# echo >&2 'error: database is uninitialized and MYSQL_ROOT_PASSWORD not set' | ||
# echo >&2 ' Did you forget to add -e MYSQL_ROOT_PASSWORD=... ?' | ||
# exit 1 | ||
# fi | ||
|
||
echo 'Running mysql_install_db ...' | ||
mysql_install_db --datadir="$MYSQL_DATADIR" | ||
echo 'Finished mysql_install_db' | ||
|
||
# These statements _must_ be on individual lines, and _must_ end with | ||
# semicolons (no line breaks or comments are permitted). | ||
# TODO proper SQL escaping on ALL the things D: | ||
|
||
tempSqlFile='/tmp/mysql-first-time.sql' | ||
cat > "$tempSqlFile" <<-EOSQL | ||
DELETE FROM mysql.user ; | ||
CREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ; | ||
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ; | ||
DROP DATABASE IF EXISTS test ; | ||
EOSQL | ||
|
||
if [ "$MYSQL_DATABASE" ]; then | ||
echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` ;" >> "$tempSqlFile" | ||
fi | ||
|
||
if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then | ||
echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD' ;" >> "$tempSqlFile" | ||
|
||
if [ "$MYSQL_DATABASE" ]; then | ||
echo "GRANT ALL ON \`$MYSQL_DATABASE\`.* TO '$MYSQL_USER'@'%' ;" >> "$tempSqlFile" | ||
fi | ||
fi | ||
|
||
echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile" | ||
set -- "$@" --init-file="$tempSqlFile" | ||
fi | ||
|
||
chown -R mysql:mysql "$MYSQL_DATADIR" | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
description: A Helm chart for deploying Console | ||
description: A Helm chart for deploying Stratos UI Console | ||
name: console | ||
version: 0.1.0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.