set default value of `MARIADB_MASTER_USER` to `root`

Refer #34
This commit is contained in:
Sameer Naik 2016-01-30 12:23:18 +05:30
parent 7b05a5f006
commit 5725653c6f
4 changed files with 4 additions and 13 deletions

View File

@ -9,7 +9,7 @@
MARIADB_REPLICATION_USER: Replication user. User is created on master on the first boot (default: none).
MARIADB_REPLICATION_PASSWORD: Replication users password. Password is set for MARIADB_REPLICATION_USER on master on the first boot (default: none).
MARIADB_MASTER_HOST: Replication masters hostname/ip (parameter available only on slave).
MARIADB_MASTER_USER: User on replication master with access to MARIADB_DATABASE (parameter available only on slave).
MARIADB_MASTER_USER: User on replication master with access to MARIADB_DATABASE. (default: root, parameter available only on slave).
MARIADB_MASTER_PASSWORD: Password of user on replication master with access to MARIADB_DATABASE (parameter available only on slave).
VOLUMES:

View File

@ -7,7 +7,7 @@ environment_variables:
MARIADB_REPLICATION_USER: "Replication user. User is created on master on the first boot (default: none)."
MARIADB_REPLICATION_PASSWORD: "Replication users password. Password is set for MARIADB_REPLICATION_USER on master on the first boot (default: none)."
MARIADB_MASTER_HOST: "Replication masters hostname/ip (parameter available only on slave)."
MARIADB_MASTER_USER: "User on replication master with access to MARIADB_DATABASE (parameter available only on slave)."
MARIADB_MASTER_USER: "User on replication master with access to MARIADB_DATABASE. (default: root, parameter available only on slave)."
MARIADB_MASTER_PASSWORD: "Password of user on replication master with access to MARIADB_DATABASE (parameter available only on slave)."
volumes:
$BITNAMI_APP_VOL_PREFIX/data: "Location of $BITNAMI_APP_NAME data files."

View File

@ -97,9 +97,8 @@ configure_replication() {
fi
if [ ! $MARIADB_MASTER_USER ]; then
echo "In order to setup a replication slave you need to provide the MARIADB_MASTER_USER as well"
echo ""
exit -1
echo "MARIADB_MASTER_USER not specified. Defaulting to root"
MARIADB_MASTER_USER=${MARIADB_MASTER_USER:-root}
fi
if [ ! $MARIADB_DATABASE ]; then

View File

@ -207,14 +207,6 @@ cleanup_environment
[[ "$output" =~ "you need to provide the MARIADB_MASTER_HOST" ]]
}
@test "Can't setup replication slave without master user" {
# create replication slave without specifying MARIADB_MASTER_USER
run container_create slave0 \
-e MARIADB_REPLICATION_MODE=slave \
-e MARIADB_MASTER_HOST=master
[[ "$output" =~ "you need to provide the MARIADB_MASTER_USER" ]]
}
@test "Can't setup replication slave without database" {
# create replication slave without specifying MARIADB_DATABASE
run container_create slave0 \