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:
parent
a1e372560b
commit
416723f1f1
9
.gitignore
vendored
9
.gitignore
vendored
@ -3,3 +3,12 @@ prime
|
|||||||
stage
|
stage
|
||||||
*.snap
|
*.snap
|
||||||
.tox
|
.tox
|
||||||
|
|
||||||
|
# Snapcraft
|
||||||
|
.snapcraft
|
||||||
|
__pycache__
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# emacs
|
||||||
|
*~
|
||||||
|
\#*
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
[database]
|
||||||
|
connection = mysql+pymysql://keystone:keystone@localhost/keystone
|
@ -4,8 +4,16 @@ set -ex
|
|||||||
|
|
||||||
source $BASE_DIR/admin-openrc
|
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;
|
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/
|
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.
|
# Manually define alias if snap isn't installed from snap store.
|
||||||
# Otherwise, snap store defines this alias automatically.
|
# Otherwise, snap store defines this alias automatically.
|
||||||
|
7
tests/keystone_cleanup.sh
Normal file
7
tests/keystone_cleanup.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
sudo mysql -u root << EOF
|
||||||
|
DROP DATABASE keystone;
|
||||||
|
EOF
|
Loading…
x
Reference in New Issue
Block a user