Apply configuration from cloud metadata (JSON).
It turns metadata from one or more JSON files like this:
os-collect-config | |
================= | |
Collect configuration from cloud metadata sources. | |
# What does it do? | |
It collects data from defined configuration sources and runs a defined hook whenever the metadata has changed. |
os-refresh-config uses dib-run-parts to run scripts in a pre-defined set of directories. Its intended purpose is to quiesce (pre-configure.d), configure (configure.d), migrate (migration.d), and then activate (post-configure.d) a configuration on first boot or in response to Heat Metadata changes.
To cause a script to be run on every os-refresh-config run, install
import socket | |
class ImageDownloadFailure(Exception): | |
def __init__(self, host, port, path, error): | |
self.host = host | |
self.port = port | |
self.path = path | |
msg = ('Failed to download %(path)s from %(host)s:%(port)s: %(error)s' | |
% {'host': host, 'port': port, 'path': path, 'error': error}) |
(py27)[markmc@sorcha oslo.config]$ cat t.py | |
from oslo.config import cfg | |
cfg.CONF.register_opt(cfg.StrOpt('connection', | |
deprecated_name='sql_connection'), | |
group='database') | |
cfg.CONF() |