Added config files to snap.

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: Ic32b6e6b3665db9a43878b91c9288a408c8a8c0e
This commit is contained in:
Pete Vander Giessen 2017-08-09 21:40:23 +00:00
parent 308362db4d
commit 493a7aeb96
5 changed files with 38 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://glance:glance@localhost/glance

View File

@ -0,0 +1,13 @@
[keystone_authtoken]
auth_uri = http://localhost:5000
auth_url = http://localhost:35357
memcached_servers = localhost:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance
[paste_deploy]
flavor = keystone

View File

@ -4,8 +4,15 @@ set -ex
source $BASE_DIR/admin-openrc
sudo mysql -u root << EOF
CREATE DATABASE IF NOT EXISTS glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
IDENTIFIED BY 'glance';
EOF
while sudo [ ! -d /var/snap/glance/common/etc/glance/ ]; do sleep 0.1; done;
sudo cp -r $BASE_DIR/etc/snap-glance/* /var/snap/glance/common/etc/
# sudo cp -r $BASE_DIR/etc/* /var/snap/glance/common/etc/
openstack user show glance || {
openstack user create --domain default --password glance glance

7
tests/glance_cleanup.sh Executable file
View File

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