Merge "Added config files to snap."

This commit is contained in:
Jenkins 2017-08-11 15:02:57 +00:00 committed by Gerrit Code Review
commit 57a0d06aac
4 changed files with 26 additions and 0 deletions

9
.gitignore vendored
View File

@ -3,3 +3,12 @@ prime
stage
*.snap
.tox
# Snapcraft
.snapcraft
__pycache__
.cache
# emacs
*~
\#*

View File

@ -0,0 +1,2 @@
[database]
connection = mysql+pymysql://keystone:keystone@localhost/keystone

View File

@ -4,8 +4,16 @@ set -ex
source $BASE_DIR/admin-openrc
sudo mysql -u root << EOF
CREATE DATABASE IF NOT EXISTS keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
IDENTIFIED BY 'keystone';
EOF
while sudo [ ! -d /var/snap/keystone/common/etc/keystone/ ]; do sleep 0.1; done;
sudo cp -r $BASE_DIR/etc/snap-keystone/* /var/snap/keystone/common/etc/
# Uncomment when ready to move to using config files in snaps:
# sudo cp -r $BASE_DIR/etc/* /var/snap/keystone/common/etc/
# Manually define alias if snap isn't installed from snap store.
# Otherwise, snap store defines this alias automatically.

View File

@ -0,0 +1,7 @@
#!/bin/bash
set -x
sudo mysql -u root << EOF
DROP DATABASE keystone;
EOF