Skip to content

Instantly share code, notes, and snippets.

@metacoma
Created November 26, 2013 10:46
Show Gist options
  • Save metacoma/7656451 to your computer and use it in GitHub Desktop.
Save metacoma/7656451 to your computer and use it in GitHub Desktop.
# first example, data from different sources
---
openstack:
nova:
location:
source: link!openstack.hw.node0
conf:
source: link!/parent/location/fs/etc/nova/nova.conf
hw:
node0:
uptime:
cache: 5
source: ssh!node0 uptime
fs:
cache: 360
source: ssh-fs!node0
reboot:
source: ssh!node0 reboot
##
# second example (template usage)
---
# structure of abstraction on server side
openstack:
nova:
listen: %%parent.hw.nic.eth0.addr[0]%%:80
tempdir: "/tmp/nova"
# more nova options
#
cinder:
listen: %%parent.hw.nic.eth0.addr[0]%%:81
# more cinder options
#...
hw:
node0:
nic:
eth0:
addr:
- 10.2.50.90
- 172.16.26.1
## some related stuff
configs:
# for all nodes we need template processing
node1-nova: |
[first section]
listen = %%nova.listen%%
monkeys = 0
# Jerom comment
[second section]
tmpdir= %%nova.tmpdir%%
api = 1
---
# client side
# curl http://diagnostiapi/rest/openstack/configs/`hostname -s`-nova
[first section]
listen = 10.2.50.90:80
monkeys = 0
# Jerom comment
[second section]
tmpdir = /tmp/nova
api = 1
# replace source transport in openstack from file to rest (for example) api: http://diagnosticapi/rest/openstack/configs/%%hostname%-%servicename%
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment