hpc-cloud/roles/keystone/scripts/initialize_db.sh
Egon Rijpkema a4e62607a3 Needed to add the -i flag
otherise EOF trick doesn't work.
2017-05-15 09:18:54 +02:00

8 lines
391 B
Bash

#!/bin/bash
# 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';
EOF