Merge "Remove hardcoded enable_load_balancer from Controller role"
[apex-tripleo-heat-templates.git] / puppet / services / nova-vnc-proxy.yaml
index 179112d..2db44d6 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2016-04-08
+heat_template_version: pike
 
 description: >
   OpenStack Nova Vncproxy service configured with Puppet
@@ -13,6 +13,14 @@ parameters:
   DefaultPasswords:
     default: {}
     type: json
+  RoleName:
+    default: ''
+    description: Role name on which the service is applied
+    type: string
+  RoleParameters:
+    default: {}
+    description: Parameters specific to the role
+    type: json
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
@@ -21,6 +29,11 @@ parameters:
   MonitoringSubscriptionNovaVNCProxy:
     default: 'overcloud-nova-vncproxy'
     type: string
+  NovaVncproxyLoggingSource:
+    type: json
+    default:
+      tag: openstack.nova.vncproxy
+      path: /var/log/nova/nova-vncproxy.log
 
 resources:
   NovaBase:
@@ -29,6 +42,8 @@ resources:
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       EndpointMap: {get_param: EndpointMap}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
 
 outputs:
   role_data:
@@ -36,19 +51,15 @@ outputs:
     value:
       service_name: nova_vnc_proxy
       monitoring_subscription: {get_param: MonitoringSubscriptionNovaVNCProxy}
+      logging_source: {get_param: NovaVncproxyLoggingSource}
+      logging_groups:
+        - nova
       config_settings:
         map_merge:
           - get_attr: [NovaBase, role_data, config_settings]
           - nova::vncproxy::enabled: true
             nova::vncproxy::common::vncproxy_protocol: {get_param: [EndpointMap, NovaVNCProxyPublic, protocol]}
-            # Remove brackets that may come if the IP address is IPv6.
-            # For DNS names and IPv4, this will just get NovaVNCProxyPublic
-            nova::vncproxy::common::vncproxy_host:
-              str_replace:
-                template: {get_param: [EndpointMap, NovaVNCProxyPublic, host]}
-                params:
-                  '[': ''
-                  ']': ''
+            nova::vncproxy::common::vncproxy_host: {get_param: [EndpointMap, NovaVNCProxyPublic, host_nobrackets]}
             nova::vncproxy::common::vncproxy_port: {get_param: [EndpointMap, NovaVNCProxyPublic, port]}
             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
             # for the given network; replacement examples (eg. for internal_api):
@@ -56,5 +67,14 @@ outputs:
             # internal_api_uri -> [IP]
             # internal_api_subnet - > IP/CIDR
             nova::vncproxy::host: {get_param: [ServiceNetMap, NovaApiNetwork]}
+            tripleo.nova_vnc_proxy.firewall_rules:
+              '137 nova_vnc_proxy':
+                dport:
+                  - 6080
+                  - 13080
       step_config: |
         include tripleo::profile::base::nova::vncproxy
+      upgrade_tasks:
+        - name: Stop nova_vnc_proxy service
+          tags: step1
+          service: name=openstack-nova-consoleauth state=stopped