| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,67 @@ |
| 0 |
+[DEFAULT] |
|
| 1 |
+# Show more verbose log output (sets INFO log level output) |
|
| 2 |
+verbose = True |
|
| 3 |
+ |
|
| 4 |
+# Show debugging output in logs (sets DEBUG log level output) |
|
| 5 |
+debug = False |
|
| 6 |
+ |
|
| 7 |
+# Address to bind the registry server |
|
| 8 |
+bind_host = 0.0.0.0 |
|
| 9 |
+ |
|
| 10 |
+# Port the bind the registry server to |
|
| 11 |
+bind_port = 9191 |
|
| 12 |
+ |
|
| 13 |
+# Log to this file. Make sure you do not set the same log |
|
| 14 |
+# file for both the API and registry servers! |
|
| 15 |
+log_file = /var/log/glance/registry.log |
|
| 16 |
+ |
|
| 17 |
+# Send logs to syslog (/dev/log) instead of to file specified by `log_file` |
|
| 18 |
+use_syslog = False |
|
| 19 |
+ |
|
| 20 |
+# SQLAlchemy connection string for the reference implementation |
|
| 21 |
+# registry server. Any valid SQLAlchemy connection string is fine. |
|
| 22 |
+# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine |
|
| 23 |
+sql_connection = mysql://root:nova@localhost/glance |
|
| 24 |
+ |
|
| 25 |
+# Period in seconds after which SQLAlchemy should reestablish its connection |
|
| 26 |
+# to the database. |
|
| 27 |
+# |
|
| 28 |
+# MySQL uses a default `wait_timeout` of 8 hours, after which it will drop |
|
| 29 |
+# idle connections. This can result in 'MySQL Gone Away' exceptions. If you |
|
| 30 |
+# notice this, you can lower this value to ensure that SQLAlchemy reconnects |
|
| 31 |
+# before MySQL can drop the connection. |
|
| 32 |
+sql_idle_timeout = 3600 |
|
| 33 |
+ |
|
| 34 |
+# Limit the api to return `param_limit_max` items in a call to a container. If |
|
| 35 |
+# a larger `limit` query param is provided, it will be reduced to this value. |
|
| 36 |
+api_limit_max = 1000 |
|
| 37 |
+ |
|
| 38 |
+# If a `limit` query param is not provided in an api request, it will |
|
| 39 |
+# default to `limit_param_default` |
|
| 40 |
+limit_param_default = 25 |
|
| 41 |
+ |
|
| 42 |
+[pipeline:glance-registry] |
|
| 43 |
+pipeline = context registryapp |
|
| 44 |
+# NOTE: use the following pipeline for keystone |
|
| 45 |
+# pipeline = authtoken keystone_shim context registryapp |
|
| 46 |
+ |
|
| 47 |
+[app:registryapp] |
|
| 48 |
+paste.app_factory = glance.registry.server:app_factory |
|
| 49 |
+ |
|
| 50 |
+[filter:context] |
|
| 51 |
+context_class = glance.registry.context.RequestContext |
|
| 52 |
+paste.filter_factory = glance.common.context:filter_factory |
|
| 53 |
+ |
|
| 54 |
+[filter:authtoken] |
|
| 55 |
+paste.filter_factory = keystone.middleware.auth_token:filter_factory |
|
| 56 |
+service_protocol = http |
|
| 57 |
+service_host = 127.0.0.1 |
|
| 58 |
+service_port = 5000 |
|
| 59 |
+auth_host = 127.0.0.1 |
|
| 60 |
+auth_port = 5001 |
|
| 61 |
+auth_protocol = http |
|
| 62 |
+auth_uri = http://127.0.0.1:5000/ |
|
| 63 |
+admin_token = 999888777666 |
|
| 64 |
+ |
|
| 65 |
+[filter:keystone_shim] |
|
| 66 |
+paste.filter_factory = keystone.middleware.glance_auth_token:filter_factory |
| ... | ... |
@@ -173,8 +173,11 @@ sudo chown -R `whoami` /var/lib/glance |
| 173 | 173 |
|
| 174 | 174 |
# Delete existing images/database as glance will recreate the db on startup |
| 175 | 175 |
rm -rf /var/lib/glance/images/* |
| 176 |
-rm -f $GLANCE_DIR/glance.sqlite |
|
| 177 |
- |
|
| 176 |
+# (re)create glance database |
|
| 177 |
+mysql -uroot -p$MYSQL_PASS -e 'DROP DATABASE glance;' || true |
|
| 178 |
+mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE glance;' |
|
| 179 |
+# Copy over our glance-registry.conf |
|
| 180 |
+cp $DIR/files/glance-registry.conf $GLANCE_DIR/etc/glance-registry.conf |
|
| 178 | 181 |
|
| 179 | 182 |
# Nova |
| 180 | 183 |
# ---- |