import os
import uuid

from mischief.actors.pipe import get_local_ip


role = os.environ.get('ROLE') or 'no_role'
peer = os.environ.get('PEER')
ip = os.environ.get('IP') or get_local_ip('8.8.8.8')
bind_port = os.environ.get('SERF_PORT') or 7946
node = os.environ.get('NODE_NAME') or uuid.uuid4().hex
rpc_port = os.environ.get('RPC_PORT') or 7373
service = os.environ.get('SERVICE_IP') or ip
service_port = os.environ.get('SERVICE_PORT') or 0

@@ -66,27 +66,224 @@
 _ip%0A
-%0A%0Arole = os.environ
+import yaml%0A%0A%0Adef read_serfnode_yml():%0A    with open('/serfnode.yml') as input:%0A        conf = yaml.load(input) or %7B%7D%0A        return conf%5B'serfnode'%5D%0A%0A%0Ayml = read_serfnode_yml()%0A%0A%0Arole = os.environ.get('ROLE') or yml
 .get
@@ -337,14 +337,34 @@
 ER')
+ or yml.get('PEER')
 %0Aip = 
+(
 os.e
@@ -375,24 +375,29 @@
 on.get('
+SERF_
 IP') or 
 get_loca
@@ -388,16 +388,44 @@
 IP') or 
+yml.get('SERF_IP') or%0A      
 get_loca
@@ -439,16 +439,17 @@
 .8.8.8')
+)
 %0Abind_po
@@ -476,24 +476,48 @@
 'SERF_PORT')
+ or yml.get('SERF_PORT')
  or 7946%0Anod
@@ -648,24 +648,49 @@
 SERVICE_IP')
+ or yml.get('SERVICE_IP')
  or ip%0Aservi
@@ -725,18 +725,45 @@
 RVICE_PORT')
+ or yml.get('SERVICE_PORT')
  or 0%0A

Use serfnode.yml as source of defaults for config