From a4e62607a3fc10028a033a7cc2c7f357b39eb88f Mon Sep 17 00:00:00 2001 From: Egon Rijpkema Date: Mon, 15 May 2017 09:18:54 +0200 Subject: [PATCH] Needed to add the -i flag otherise EOF trick doesn't work. --- roles/keystone/scripts/initialize_db.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/keystone/scripts/initialize_db.sh b/roles/keystone/scripts/initialize_db.sh index 520856e..b2977fa 100644 --- a/roles/keystone/scripts/initialize_db.sh +++ b/roles/keystone/scripts/initialize_db.sh @@ -1,5 +1,6 @@ #!/bin/bash -mysql -uroot -pgeheim --host 127.0.0.1 << EOF +# Start a mariadb container to use its mysql client to initialize the keystone database. +docker run -i mariadb:10.1.22 mysql -uroot -pgeheim --host 172.23.38.125 << EOF CREATE DATABASE IF NOT EXISTS keystone; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone'; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';