Skip to content

Instantly share code, notes, and snippets.

View markmc's full-sized avatar

Mark McLoughlin markmc

View GitHub Profile

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

Apply configuration from cloud metadata (JSON).

What does it do?

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

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?

@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)
@markmc
markmc / 0-server.py
Last active December 30, 2015 11:38
Sample oslo.messaging server with some config options set, but not using config files
import eventlet
eventlet.monkey_patch(os=False)
import logging
from oslo import messaging
logging.basicConfig(level=logging.DEBUG)
@markmc
markmc / gist:7908899
Created December 11, 2013 11:34
rst enum list

There can be multiple form of actions, but two have been implemented so far:

  1. http call back: you provide a URL to be called whenever the alarm has been set off. The payload of the request contains all the details of why the alarm went off.
  2. log: mostly useful for debugging, stores alarms in a log file.
@markmc
markmc / gist:8472575
Last active January 3, 2016 13:58
A nova/oslo.messaging rebase
commit: de2218e
merge-base: ce71b66
onto: d34a04d
git diff ce71b66..d34a04d
CONFLICT (content): Merge conflict in requirements.txt
- easy
CONFLICT (content): Merge conflict in nova/utils.py
@markmc
markmc / console
Last active August 29, 2015 13:56
$> python ./test-notification-server.py
$> python test-notification.py --config-file ./test.conf --debug
$> git reset --hard 5315399
$> python test-notification-old.py --config-file ./test.conf --debug
class Kombu(object):
def __init__(self):
self.params = {
'hostname': 'localhost',
'port': 5672,
'virtual_host': '/',