]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat engine : add option to control instance boto http/https
authorSteven Hardy <shardy@redhat.com>
Fri, 8 Feb 2013 11:39:17 +0000 (11:39 +0000)
committerSteven Hardy <shardy@redhat.com>
Fri, 8 Feb 2013 11:39:17 +0000 (11:39 +0000)
Currently the heat-jeos code defaults to http only, but we are
about to fix that, so we instead need a way to specify if
instances should connect via http or https - boto provides the
is_secure config file option, so add a new heat option which
controls this setting in the boto config we create in userdata

fixes bug 1117594

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

index 755df05773bb7f05150e8ddcce4a5d0fa484f37a..8d97de5c7ba989fcc7a31af134859ca6a2ffca06 100644 (file)
@@ -14,6 +14,11 @@ bind_port = 8001
 # Keystone role for heat template-defined users
 heat_stack_user_role = heat_stack_user
 
+# Make instances connect to the heat services via https
+# default to off since it will require images and host
+# to be configured correctly to support ssl connections
+instance_connection_is_secure = 0
+
 # URL for instances to connect for metadata
 # ie the IP of the bridge device connecting the
 # instances with the host and the bind_port of
index ff80aff73c5662254e1ca2f94d73b2be21e514a7..cc054fe0f9e8ae12eb26a52e354c7c790b779b67 100644 (file)
@@ -76,6 +76,9 @@ service_opts = [
     cfg.StrOpt('heat_watch_server_url',
                default="",
                help='URL of the Heat cloudwatch server'),
+    cfg.StrOpt('instance_connection_is_secure',
+               default="0",
+               help='Instance connection to cfn/cw API via https'),
     cfg.StrOpt('heat_stack_user_role',
                default="heat_stack_user",
                help='Keystone role for heat template-defined users')]
index ef38f2b3d01272af8e1ca47659e1ddbce0ebc739..2d057425a46114d06ec4e728dcc359f09e095303 100644 (file)
@@ -195,8 +195,10 @@ class Instance(resource.Resource):
             # where the cfn and cw API's are to be accessed
             cfn_url = urlparse(cfg.CONF.heat_metadata_server_url)
             cw_url = urlparse(cfg.CONF.heat_watch_server_url)
+            is_secure = cfg.CONF.instance_connection_is_secure
             boto_cfg = "\n".join(["[Boto]",
                                   "debug = 0",
+                                  "is_secure = %s" % is_secure,
                                   "cfn_region_name = heat",
                                   "cfn_region_endpoint = %s" %
                                   cfn_url.hostname,