Added config files to snap.

This is part of a transition to storing the config files in the snap,
rather than in snapstack.

Also updated .gitignore to ignore emacs temp files and snapcraft
cruft.

Change-Id: I30a5421faec0a976741f3dd0d5452f2437e19503
This commit is contained in:
Pete Vander Giessen 2017-08-10 14:56:55 +00:00
parent a1e372560b
commit 416723f1f1
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