Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View markmc's full-sized avatar

Mark McLoughlin markmc

View GitHub Profile
@markmc
markmc / gist:7823230
Created December 6, 2013 12:50
Sample oslo.messaging server which doesn't use config files
import eventlet
eventlet.monkey_patch(os=False)
import logging
from oslo.config import cfg
from oslo import messaging
logging.basicConfig(level=logging.DEBUG)

os-apply-config

Apply configuration from cloud metadata (JSON)

What does it do?

Oslo Rootwrap

The Oslo Rootwrap allows fine filtering of shell commands to run as root from OpenStack services.

Unlike other Oslo deliverables, it should not be used as a Python library, but called as a separate process through the oslo-rootwrap command:

os-apply-config

Apply configuration from cloud metadata (JSON).

What does it do?

It turns metadata from one or more JSON files like this:

os-apply-config

Apply configuration from cloud metadata (JSON).

What does it do?

It turns metadata from one or more JSON files like this:

{"keystone": {"database": {"host": "127.0.0.1", "user": "keystone", "password": "foobar"}}}

os-refresh-config

os-refresh-config uses dib-run-parts to run scripts in a pre-defined set of directories:

/opt/stack/os-config-refresh/pre-configure.d
/opt/stack/os-config-refresh/configure.d
/opt/stack/os-config-refresh/migration.d

Install os-refresh-config

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

os-collect-config

Collect configuration from cloud metadata sources

What does it do?

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-collect-config

Collect configuration from cloud metadata sources

What does it do?