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:
parent
308362db4d
commit
493a7aeb96
9
.gitignore
vendored
9
.gitignore
vendored
@ -3,3 +3,12 @@ prime
|
||||
stage
|
||||
*.snap
|
||||
.tox
|
||||
|
||||
# Snapcraft
|
||||
.snapcraft
|
||||
__pycache__
|
||||
.cache
|
||||
|
||||
# emacs
|
||||
*~
|
||||
\#*
|
||||
|
2
tests/etc/snap-glance/glance/glance.conf.d/database.conf
Normal file
2
tests/etc/snap-glance/glance/glance.conf.d/database.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[database]
|
||||
connection = mysql+pymysql://glance:glance@localhost/glance
|
13
tests/etc/snap-glance/glance/glance.conf.d/keystone.conf
Normal file
13
tests/etc/snap-glance/glance/glance.conf.d/keystone.conf
Normal 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
|
@ -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
7
tests/glance_cleanup.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
sudo mysql -u root << EOF
|
||||
DROP DATABASE glance;
|
||||
EOF"""
|
Loading…
Reference in New Issue
Block a user