]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat engine : append watch server url to instance userdata
authorSteven Hardy <shardy@redhat.com>
Mon, 12 Nov 2012 18:31:16 +0000 (18:31 +0000)
committerSteven Hardy <shardy@redhat.com>
Wed, 14 Nov 2012 11:37:24 +0000 (11:37 +0000)
Append url for watch server to instance userdata, which avoids
post-install sed mangling in the template, and will make it easier
to transparently switch to a different metric service

Change-Id: I59b9b7efcd75d44e88ebe0a116a9ce1e3ef20c14
Signed-off-by: Steven Hardy <shardy@redhat.com>
docs/GettingStarted.rst
etc/heat/heat-engine.conf
heat/common/config.py
heat/engine/resources/instance.py

index e59e41b9bc45ef8390bdd6763db4f816f7aa7db0..b630b4e7734674972d346cd647f9913e9d97838b 100644 (file)
@@ -194,6 +194,7 @@ The heat engine configuration file should be updated with the address of the bri
 ::
     sudo sed -i -e "/heat_metadata_server_url/ s/127\.0\.0\.1/${BRIDGE_IP}/" /etc/heat/heat-engine.conf
     sudo sed -i -e "/heat_waitcondition_server_url/ s/127\.0\.0\.1/${BRIDGE_IP}/" /etc/heat/heat-engine.conf
+    sudo sed -i -e "/heat_watch_server_url/ s/127\.0\.0\.1/${BRIDGE_IP}/" /etc/heat/heat-engine.conf
 
 Launch the Heat services
 ------------------------
index 462835bedfc9d6592049f1c06d80d6a56d5e950c..172aa244a0a4c746480270cee7d9eb76f6b6656c 100644 (file)
@@ -29,6 +29,14 @@ heat_metadata_server_url = http://127.0.0.1:8000
 # NOTE : change this from 127.0.0.1 !!
 heat_waitcondition_server_url = http://127.0.0.1:8002
 
+# URL for instances to connect for publishing metric
+# data (ie via cfn-push-stats)
+# e.g the IP of the bridge device connecting the
+# instances with the host and the bind_port of
+# the heat-api-cloudwatch API
+# NOTE : change this from 127.0.0.1 !!
+heat_watch_server_url = http://127.0.0.1:8003
+
 # Log to this file. Make sure the user running heat-api has
 # permissions to write to this file!
 log_file = /var/log/heat/engine.log
index abd0c04a26f413902ba12738459f9b42cd612bce..a89ea9bc00e9d5f2bf01ad5ca934dbea77481762 100644 (file)
@@ -83,6 +83,9 @@ cfg.StrOpt('heat_metadata_server_url',
 cfg.StrOpt('heat_waitcondition_server_url',
            default="",
            help='URL of the Heat waitcondition server'),
+cfg.StrOpt('heat_watch_server_url',
+           default="",
+           help='URL of the Heat cloudwatch server'),
 cfg.StrOpt('heat_stack_user_role',
            default="heat_stack_user",
            help='Keystone role for heat template-defined users'),
index 2f2422e6d185dc2c8e4d34fd1e045e11bab4d2eb..6ffc8ddaee760422bad8d3f7b1814764ec85d81e 100644 (file)
@@ -181,6 +181,9 @@ class Instance(resource.Resource):
                 attachments.append((json.dumps(self.metadata),
                                     'cfn-init-data', 'x-cfninitdata'))
 
+            attachments.append((cfg.CONF.heat_watch_server_url,
+                                'cfn-watch-server', 'x-cfninitdata'))
+
             attachments.append((cfg.CONF.heat_metadata_server_url,
                                 'cfn-metadata-server', 'x-cfninitdata'))